forked from bartvdbraak/blender
b651f61278
** 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 |
||
---|---|---|
build_files | ||
doc | ||
extern | ||
intern | ||
release | ||
source | ||
CMakeLists.txt | ||
COPYING | ||
GNUmakefile | ||
SConstruct |