LWJGL
May 19, 2013, 05:06:18 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: glGetShaderiv and glGetProgramiv renamed to glGetShader and glGetProgram ?  (Read 2973 times)
Hurricane
Newbie
*
Posts: 1


« on: July 22, 2008, 03:25:46 »

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
Logged
Ciardhubh
Talks Too Much
***
Posts: 159


« Reply #1 on: July 22, 2008, 05:29:12 »

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.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!