why drawIndexedTriangleList ?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
TYLENOL
Posts: 3
Joined: Mon Jan 19, 2004 10:46 am
Location: Brasil
Contact:

why drawIndexedTriangleList ?

Post by TYLENOL »

Hi niko and IrrLicht fans (like me)!

Maybe I miss the point but, why "drawIndexedTriangleList" function have so many parameters (vertices, vertexCount, indexList, triangleCount) if it is called (almost) always the same way:

Code: Select all

scene::IMeshBuffer* mb = m->getMeshBuffer(i);
...
driver->drawIndexedTriangleList((video::S3DVertex*)mb->getVertices(), mb->getVertexCount(), mb->getIndices(), mb->getIndexCount()/ 3);
I think that maybe the driver could have a drawMeshBuffer(IMeshBuffer) and the IMeshBuffer a "mode" attribute telling how the vertices are organized (strips, fans, plain indexes), then things like opengl's VBO could be implemented more easily.

tkz :)
and sorry my bad english.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Hm, that's right. A good idea would be for example to implement the drawing in the base class (Null-device), calling the drawing methods. Already on my Todo-list. :)
Post Reply