blender/source
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
..
blender bgl new methods (for glsl shaders - #version 120) 2012-05-09 02:42:30 +00:00
blenderplayer update stubs for blenderplayer 2012-05-08 23:48:04 +00:00
creator code cleanup: BKE_ naming, also make bpy.data.images.load() always load a new image. (not use existing one) 2012-05-05 14:52:04 +00:00
darwin replace former applescript with an editable one 2011-10-19 19:15:35 +00:00
gameengine code cleanup: naming - pose/armature/image 2012-05-05 16:03:57 +00:00
icons set svn end of lines to native 2011-05-09 08:15:38 +00:00
tests rename Mesh.uv_loop_layers --> uv_layers 2012-04-22 23:51:50 +00:00
CMakeLists.txt remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
SConscript Add libMV and Scons support for MinGW-w64, patches by Caleb Joseph with slight modifications. 2012-04-24 12:57:58 +00:00