View Full Version : Reasoning: glVertex3f vs glVertexPointer

02-05-2001, 05:05 AM
This is just a question about OpenGL design.

Why is it that so many functions explicitly state the data type and component count in the function name, while others do not?

Case in point:
glVertex3f - three components per vertex, floating point type

glVertexPointer - we specify component count and type as parameters to the function. Doesn't this eliminate certain driver optimization opportunities by requiring a data type check, potential data casts, etc?

It just seems inconsistent, and I'd like to know 'why' if there's someone with the answer.

-- Jeff

02-05-2001, 06:19 AM
In glVertexPointer, you do specify the type of data. There is no significant loss in speed in this case since once the pointer is set, no type checking is needed.

02-05-2001, 06:49 AM
*nod* It just seems inconsistent without apparent reason.

-- Jeff