PDA

View Full Version : Using VOB with Materials



Itun.itu
10-08-2010, 12:15 PM
How can I use Buffers to render indexed array of vertices with materials?
For example, it is need for application task: render 3DS file.
I put any pairs of buffers once for vertices and once for indexes. And how can I add Materials to them?

Alfonse Reinheart
10-08-2010, 01:37 PM
What do you mean by "materials?" Is this a 3D Studio Max-style "material" (a concept that OpenGL doesn't natively understand) or something else?

Itun.itu
10-08-2010, 02:00 PM
There are a vertex array, for this vertex array there are some indexed arrays for each there are material (DIFFUSE COLOR, AMBIEN COLOR, SPECULAR COLOR, etc.).
In this case I can create a vertex buffer and element buffers. I make glDrawElements(...) for each element buffer. All is well.
But how I can to add some material for each pieces or for each vertex, somebody other...
I want create the render without queries to CPU.