glVertexPointer(glDrawElement)
BlitzMax Forums/OpenGL Module/glVertexPointer(glDrawElement)
| ||
Hi ppl Is there any example about glVertexPointer(glDrawElement) and GLSL in BMax? |
| ||
go to http://www.opengl.org/documentation/red_book_1.0/ and see for almost anything you wan't about opengl. I can write to you an example but i think it's better to tell you to see the red book. |
| ||
Local vertices:Float[] = [-1.0#, -1.0#, 0.0#,.. 1.0#, -1.0#, 0.0#,.. 0.0#, 1.0#, 0.0#] Local indices:Short[] = [0:Short, 1:Short, 2:Short] glEnableClientState(GL_VERTEX_ARRAY) glVertexPointer(3, GL_FLOAT, 0, Varptr vertices[0]) glDrawElements(GL_TRIANGLES, indices.Length, GL_UNSIGNED_SHORT, Varptr indices[0]) I believe that should work. |
| ||
Thanks! |