Skip to main content
GameDev.net gamedev.net
🔒 Locked

DrawElements

Started by BGCJR Aug 10, 2003 at 9:17 PM 1 replies 350+ views
Original Post
BGCJR
BGCJR
How do i pass a vector array to glVertexPointer and Drawelements? Bobby
Game Core
Lyve
Lyve
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.
BGCJR
BGCJR
thanks Lyve
Game Core

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.