[GEM-dev] glsl- test patch
IOhannes m zmoelnig
zmoelnig at iem.at
Sat Nov 26 18:18:43 CET 2005
james tittle wrote:
> ...to go along with the commits, here's a test patch and a glsl vert/
> frag combo that I've been using to see if everything works: the shader
> is the toon shader (again!?!) from the orange book, with a coupla
> changes: I changed most of the uniform variables to const's, because I
> haven't done a vec3 uniform changer, and since uniform variables are
> always zeroed by the glsl linkage, even though the shader might be
> working, ya wouldn't likely see any output ;-\
> ...does it work elsewhere? ;-)
super, after my changes (already committed to the CVS) it seems to work
please check back what i broke.
apart from some typos and missing initilization, there was only one
thing that was really bad:
m_shaderObj is declared as an array of "GLhandleARB*"-objects.
however, on linux it needs to be of type "GLhandleARB"
(glAttachObjectARB() and glDeleteObjectARB() need GLhandleARB instead of
for now, i have changed the definition for non __APPLE__ platforms.
a similar thing (which we discussed recently here), was the actual type
quoting the gl2.0 specs:
I.1.4 Changes To Shader APIs
Small changes to the APIs for managing shader and program objects were
made in the process of promoting the shader extensions to the OpenGL 2.0
core. These changes do not affect the functionality of the shader APIs,
but include use of the existing uint core GL type rather than the new
handleARB type introduced by the extensions, and changes in some
function names, for example mapping the extension function
CreateShaderObjectARB into the core function CreateShader.
so i guess once proper OpenGL-2.0 headers are available for all
platforms, this will be automatically sorted out.
More information about the GEM-dev