Go to file
Dalai Felinto b651f61278 bgl new methods (for glsl shaders - #version 120)
** I did not update rst docs. I will post on the quick-hack list. If no one volunteers to do it, I have it done before next release. **

this patch add the barebone functions to do glsl shaders in an addon.
For simplicity sakes it supports old GLSL, but not all the new modern methods (glBindFragDataLocation, ...).

It should be enough to make an addon to help with bge 2d filters.
I'm using this with a 3dview callback and it's working nicely:
self._handle = context.region.callback_add(draw_callback_px, (self, context), 'POST_VIEW')

I was considering not to commit this patch due to it not covering all OpenGL new methods.
But frankly it's not the first time bgl is expanded upon individual needs (guilty of that myself).
If a python developer knows enough to use OpenGL and need new functions, s/he should also be able to patch Blender for that,
so I see no problems here.

Another solution is to move to PyOpenGL or similar any soon. 

glShaderSource implemented differently than opengl standards. It's taking one source at a time (instead of an array of sources).
This is similar with PyOpenGL solution.

glActiveTexture
glAttachShader
glCompileShader
glCreateProgram
glCreateShader
glDeleteProgram
glDeleteShader
glDetachShader
glGetAttachedShaders
glGetProgramInfoLog
glGetProgramiv
glGetShaderInfoLog
glGetShaderiv
glGetShaderSource
glGetUniformLocation
glIsProgram
glIsShader
glLinkProgram
glShaderSource
glUniform1f
glUniform2f
glUniform3f
glUniform4f
glUniform1fv
glUniform2fv
glUniform3fv
glUniform4fv
glUniform1i
glUniform2i
glUniform3i
glUniform4i
glUniform1iv
glUniform2iv
glUniform3iv
glUniform4iv
glUniformMatrix2fv
glUniformMatrix3fv
glUniformMatrix4fv
glUniformMatrix2x3fv
glUniformMatrix3x2fv
glUniformMatrix2x4fv
glUniformMatrix4x2fv
glUniformMatrix3x4fv
glUniformMatrix4x3fv
glUseProgram
glValidateProgram
2012-05-09 02:42:30 +00:00
build_files Fix: recent commit setting python3.2 command should not be applied to this file 2012-05-02 09:03:04 +00:00
doc Python: documentation about overriding context members. 2012-05-02 13:28:13 +00:00
extern Enhance logging in libmv's trackers. 2012-05-08 23:13:53 +00:00
intern Cycles: fix issues with texture coordinates and object scale. Auto texture 2012-05-08 23:39:31 +00:00
release Mesh elements sorting refactor. 2012-05-06 17:14:56 +00:00
source bgl new methods (for glsl shaders - #version 120) 2012-05-09 02:42:30 +00:00
CMakeLists.txt code cleanup: BKE_scene api naming. 2012-05-05 14:33:36 +00:00
COPYING == docs == 2010-10-13 14:44:22 +00:00
GNUmakefile replace python3 command with python3.2, python3 isnt available on ubuntu. 2012-05-01 20:45:16 +00:00
SConstruct Add pthread dll for MinGW64 during installation. Now people who download from buildbot will be able to run the build even without MinGW-w64 installed. 2012-05-01 20:57:39 +00:00