First i have to apologies for writing oftopic but i’m confused because i can’t find an appropriate forum for posting cg-specific questions. If I’m just blind, please give me a hint and i close this topic immediately.
I have a fundamental question about reusing vertex-data.
I want to draw a cube with 512x512 vertices per face. My first thought was, to store one face as vbo/ibo and reuse it for each face. I’ve implemented it (CG/OpenGL) and tried to render each face with the same vertexprogram, arranging it by setting a matrix as uniform parameter befor each DrawElements-call and transforming the vertices within the shader.
First i noticed, that i have to bind the program before each draw - in the other case all faces seem to use the same (last) matrix-values. Unfortunately binding the program before every draw doesn’t help - i still get strange behaviours and faces are changing sides.
I’m afraid a don’t fully understand the functionality of setting uniform parameters…or the whole concept?!?
Is my approach wrong? do i have to store the complete vertex-data for the cube (1569792 vertices)?
Is there another possibility for reusing one side for each face?
Many thanks in advance!