one vertex array, different materials
Hi!
I would like to render one VertexArray with more materials. Is this somehow possible or should i split my arrays for each material? the whole thing should be extension independent... Hmm. Dunno how to do that. Any ideas? I''m very new into vertex arrays.. i mostly used immediate mode. i have to split for every texture too, right?
TIA
For materials you need to draw all triangles that use a single material seperately. You can use one giant vertex array, but each call to DrawElements/Arrays uses the current material, the current set of lights (up to max lights) and the current set of textures (however many textures a card can do per pass).
------------
- outRider -
------------
- outRider -
quote:should i split my arrays for each material?
Yes
quote:i have to split for every texture too, right?
..and yes
Think of it like this. A material is not only a color, it is a texture also.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement