Bosi Michele
11-26-2007, 04:36 PM
Does anyone know if OpenGL 3.0 will support glColor and glNormal commands? I find them very useful to set with a single commad the color / normal for a whole bunch of polygons before using my vertex arrays/VBOs.
Besides, with OpenGL I always missed a simple way to specify the color and normals "for-primitive" instead the usual "for-vertex" which forces the user to either use glBegin/End or to triplicate the number of vertices and to use more color/normal attribute than necessary (just imagine the unnecessary extra work needed to draw a cube with a unique flat color on each face using indexed triangles). Has this problem been addressed with OpenGL 3.0?
It would be nice to have something like:
glColorPointer(size, type, stride, pointer, GL_BIND_PER_PRIMITIVE);
glNormalPointer(type, stride, pointer, GL_BIND_PER_PRIMITIVE);
... etc ...
You could even use GL_PER_PRIMITIVE in some arrays and GL_PER_VERTEX in others. Obviously you could even have a GL_PER_OBJECT that specifies a single normal/color for the whole vertex array.
Basically GL_PER_VERTEX is what OpenGL does now.
Regards,
Michele
Besides, with OpenGL I always missed a simple way to specify the color and normals "for-primitive" instead the usual "for-vertex" which forces the user to either use glBegin/End or to triplicate the number of vertices and to use more color/normal attribute than necessary (just imagine the unnecessary extra work needed to draw a cube with a unique flat color on each face using indexed triangles). Has this problem been addressed with OpenGL 3.0?
It would be nice to have something like:
glColorPointer(size, type, stride, pointer, GL_BIND_PER_PRIMITIVE);
glNormalPointer(type, stride, pointer, GL_BIND_PER_PRIMITIVE);
... etc ...
You could even use GL_PER_PRIMITIVE in some arrays and GL_PER_VERTEX in others. Obviously you could even have a GL_PER_OBJECT that specifies a single normal/color for the whole vertex array.
Basically GL_PER_VERTEX is what OpenGL does now.
Regards,
Michele