I got a simple question for my first OpenGL project,
Actually i want to create some kind of flat mesh, for a 2D game thingy, and it works fine for now.
But my question is: is it anyhow possible to send an array for the vertex cords only with X and Y coordinates?
because Z is allways the same, for each layer (so that i would just translate the worldmatrix for each layer)
For saving 1/3 of memory for the vertex data
Is this anyhow possible?
Sure, just use “2, GL_FLOAT” when you’re calling glVertexAttribPointer or glVertexPointer (depending on whether you are using generic vertex attributes or legacy vertex attributes).