PDA

View Full Version : Creating a mesh of triangles with different collors



Sofia Gameiro
05-12-2003, 07:58 AM
Hi everyone:

I'm using opengl integrated with the cad software "solid edge".

I need to create a mesh of triangles, all with different colors, according to a specific criterion that is not important right now.

My problem is that if I use glBegin with GL_TRIANGLES, creating a lot of independent triangles, it gets to heavy to work with solid edge, but I canít figure out any other solution because if I use glBegin with GL_TRIANGLE_STRIP, which would optimize the visualization in solid edge, I canít give different colors to different triangles.

Can anyone help me?

raverbach
05-12-2003, 08:43 AM
Try using vertex arrays, var or the new vbo extensions.
with those youīll get the performance you need , without changint to triangles strips