glGetShaderiv and glGetProgramiv renamed to glGetShader and glGetProgram ?

Started by Hurricane, July 22, 2008, 10:25:46

Previous topic - Next topic

Hurricane

Hello

I'm trying to use shaders with LWJGL, but it seems I'm unable to use glGetShaderiv.
With a quick search in the source code, I found that they are instead called "glGetProgram" and "glGetShader".
Is there a reason for this ?

Just curious.

Thanks for this wonderful library.

Hurricane

Ciardhubh

Since Java supports overloading of methods depending on the type of parameters, there is no need to differentiate various OpenGL int, float, double, etc. functions by their names AND their parameters. If the parameter is for example an IntBuffer, the intended function was originally gl*i. The v is missing because it indicates a pointer if I remember correctly. Java doesn't have a concept of pointers similar to C and LWJGL always uses buffers, except for simple values.

f, i, d, etc. suffixes are only present if parameters can be ambiguous. For example a 1 can be a double, a float or an integer if passed to glTranslate(). But an IntBuffer is always an Intbuffer.

At least that is how I'd explain it.