DrawElements

Started by
1 comment, last by BGCJR 20 years, 8 months ago
How do i pass a vector array to glVertexPointer and Drawelements? Bobby
Game Core
Advertisement
quote:Original post by BGCJR
How do i pass a vector array to glVertexPointer and Drawelements?

Bobby


You only need glDrawElements if you also have indices.

Otherwise, use glDrawArrays. You have to call glVertexPointer at first to set the pointer to the vertices. Don''t forget to call glEnableClientState( GL_VERTEX_ARRAY ) to notify openGL that you want to use the vertex array. After that, you can call glDrawArrays.
_____________________________________http://www.winmaze.de, a 3D shoot em up in OpenGL, nice graphics, multiplayer, chat rooms, a nice community, worth visiting! ;)http://www.spheretris.tk, an upcoming Tetrisphere clone for windows, a 3D tetris game on a sphere with powerful graphics for Geforce FX and similar graphics cards.
thanks Lyve
Game Core

This topic is closed to new replies.

Advertisement