PDA

View Full Version : GLvoid



marcel
12-08-2003, 05:50 PM
Can anyone tell me why such thing as GLvoid even exist?
consistency? I don't think so, that's justify GLint and other things like that, besides why GLvoid exist(not really a big deal) I really want to know why shuld I use it, GLint, GLdouble and etc are justified by consistency, but GLvoid some tutorials use it, and some don't, I even found some sample code in sgi's website not using GLvoid at all...

mikael_aronsson
12-08-2003, 10:35 PM
Hi !

I am not sure, but one possibility is that on the stoneage many C compilers did not understand void, you had to use int or something else instead, and GLvoid might have been a way to solve that problem, just a guess.

Mikael

Bob
12-08-2003, 11:42 PM
Could also have been that in some places, a specific type does not makse sense. The selection buffer, for example, is always unsigned integers, so when you set it's pointer, the argument is a pointer to a GLuint. But for vertex arrays, you can pass several types of pointers (vertex format can be floats, doubles, shorts, integers, and so on), so a "no-specific-type"-pointer makes more sense than using a pointer of a specific type.

marcel
12-09-2003, 10:02 AM
so you're saying that GLvoid is for creating GLvoid* pointers?
I guess that acceptable, but what about functions that returns GLvoid?
like GLvoid glf(...) ?