PDA

View Full Version : buffers and culling



giuseppe500
05-03-2011, 01:57 PM
Hello.
I have a list of vertex coord (x,y,z)
from 0 to 15
now i must create a vertex buffer and index buffer from a list of indices and create triangles.
Is different modify as the list of vertices as say the indexes(change the order in the vertices list) and create an index buffer sequential 0 1 2 3 4 5
and leave the vertices list as it is and modify the index buffer for example 2 1 0 5 4 3 for the culling?
Because i have to show only ccw triangles.
Thanks

Alfonse Reinheart
05-03-2011, 02:18 PM
Because i have to show only ccw triangles.

Why not just use face culling and let OpenGL do it for you?

giuseppe500
05-03-2011, 03:14 PM
because i use a front / back face shader(i import from scketchup and sketchup can have two material for two face back/front) , and i use the culling for that.
Thanks.