This is how I draw a triangle in opengl, How do I do this same operation using irrlicht? I can't figure it out. It seems like it is easier to load a model then to draw a triangle? lol
well, that's kind of the point of a rendering engine, not having to build geometry manually
So yes, it's actually easier to load a model instead of manually defining vertices/indices to draw a triangle, as it should be (not that it's impossible of course)
macron12388 wrote:The tutorials explain how to do this.
Ok so is it the custom scene node tutorial that I should use to draw my own primitives?
Thanks
Pretty much. There might be some more obscure, closer to the OpenGL backend methods, but you should pass meshes to the scene manager as an ISceneNode derived object so it can do things like occluding, octree, and other rendering optimizations with it.
For mesh creation we also have example 23 (or somewhere near), which really creates a mesh instead of passing the raw data as in the custom scene node. This will make the optimization possibilities much simpler.
For single triangles you can also use draw3DTriangle, but that will become very slow with just a few triangles already.