TEST: Direct OpenGL Programming in BGE

hi,
i have a simple blend file which shows how to program a simple OpenGL program to work inside the Blender Game Engine.
This is a real simple setup which basically draws a red polygon, so checkout the blend file.:yes:

if you know more please post here, so that it might be useful for others as well.
thanks in advance.:wink:

source: INTERNET
reference: The Red Book

Attachments

OpenGL_test.blend (343 KB)

Cool! Can this be used to expose other OpenGL features like the geometry shader?

2.50 blender.

I dont think it is possible. sorry.

@others
did it worked?

Part of my GSoC work last summer was implementing geometry shaders. This isn’t in trunk yet, but here are some docs:
http://wiki.blender.org/index.php/User:Moguri/GSoC_Shaders_Docs

If you’re interested, I could try and build an updated win32 build of the branch. I say try because merging might be a pain again.

Any chance of a Linux build?

Can a geometry shader create a new mesh( so that we can create them procedurally or taking the coordinates from an obj file skip the part of creating it in python with the bpy library[extremely slow] and create it with the shader)?

A geometry shader is executed after the vertex shader and yes it is possible to create new triangles in the process. But usually geometry shaders operate on already existing triangles. A good example is chapter 1 in GPU Gems 3 “Generating Complex Procedural Terrains Using the GPU”.

Does Linux 64 work for you?