glVertexPointer documentation error?

Started by
3 comments, last by ShmeeBegek 20 years, 3 months ago
I used the MSDN documentation to implement a few gl*Pointer functions, including glVertexPointer. I've run into the same problem with all of them, the documentation does not match what is is gl/gl.h . MSDN tells me that glVertexPointer has the following prototype:

void glVertexPointer(
  GLint size,             
  GLenum type,            
  GLsizei stride,         
  GLsizei count,          
  const GLvoid *pointer   
);



But in gl/gl.h I get the following prototype:

   
WINGDIAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);

The count parameter is quite literally not there... Any ideas? Thanks, ~SPH EDIT: By the way, this is only in the MSDN cd documentation (comes with MSVC++ 6), and I looked up the actual prototype online and now my app is working, this is strange though isn't it ? [edited by - ShmeeBegek on December 28, 2003 9:51:43 PM]
AIM ME: aGaBoOgAmOnGeR
Advertisement
glVertexPointer doesn''t have a count parameter. Your version of MDSN must be wrong. The version I use (April 2003) has the correct prototype.
Back in the bad old days of OpenGL 1.0, when vertex arrays were only available as an extension, the count parameter was there; it was dropped in 1.1, when vertex arrays went into the core. Looks like MSDN didn''t change the documentation in time for the release.

"Sneftel is correct, if rather vulgar." --Flarelocke
The glVertexPointerEXT has a count parameter, not the glVertexPointer, get a newer MSDN ( i have jan 2001 and it''s correct)
If you really feel the need to use the count parameter.. either use glVertexPointerEXT... or use CVAs... ie glLockArraysEXT and glUnlockArraysEXT. Nowadays however, you are probably better off using VBOs. The count parameter was only intended to optimize performance on static geometry (and vertex arrays, to allow for transformed vertex reuse). VBOs provide both advantages, and guarantee that the vertex data will be put on the cards GFX memory. This is probably the ideal situation.

This topic is closed to new replies.

Advertisement