Hi there…
its me again… )
Can somebody can help ???
i’ve working through nehe tuts, SuperBible and others… i’m doing fine…
but i really can make something…
Draw a cube using a vertex array…
show me a sample source, ok ???
THANS!!!
[]'s
Hi there…
its me again… )
Can somebody can help ???
i’ve working through nehe tuts, SuperBible and others… i’m doing fine…
but i really can make something…
Draw a cube using a vertex array…
show me a sample source, ok ???
THANS!!!
[]'s
This will render a 2 unit square in the XY plane. Put it where you do you’re rendering and try it. You can look up the arguments to see what each do. This isn’t a cube, but you shouldnt have a problem figuring out the rest.
GLdouble pts[] = {-1,1,0,1,1,0,1,-1,0,-1,-1,0};
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(3, GL_DOUBLE, 0, pts);
glDrawArrays(GL_LINE_LOOP, 0, 4);
glDisableClientState(GL_VERTEX_ARRAY);
how to use glDrawElements ?
If you go to my website, I did just what you want. I drew a cube using vertex arrays on my last OpenGL tutorial. I haven’t donet he word file for it yet, but I have the code and the exe up.
Website link: http://umn.edu/~kesa0007