[fixed]draw3DTriangle wireframe problem

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
xiotex
Posts: 3
Joined: Mon Jun 01, 2009 12:48 pm

[fixed]draw3DTriangle wireframe problem

Post by xiotex »

I am just using irrlicht for the first time and so far I am very impressed by its ease of use. I have used many commercial and in-house engines and so far this one has been the quickest to get running.

So, onto my problem:

I am running on osx with the OpenGL driver and when I try to draw a 3D triangle using:

Code: Select all

	SMaterial m; 
	m.Lighting = false; 
	m.Wireframe = false;
	CEngine::GetDriver()->setMaterial(m); 
	CEngine::GetDriver()->setTransform(video::ETS_WORLD, core::matrix4()); 	
			CEngine::GetDriver()->draw3DTriangle(t1, flag2 ? sColour1 : sColour2);

(t1 are my verts which were set up earlier)

the triangles draw as they should except they are wireframe? Is this the expected behaviour of draw3DTriangle?
xiotex
Posts: 3
Joined: Mon Jun 01, 2009 12:48 pm

Post by xiotex »

Ah, it seems that function is not implemented in the OpenGL driver - it defaults to the NULL driver.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, the docs are wrong, though. As they say that a filled triangle is drawn, which is not. Better set up a small vertex array and an index array, and call drawIndexedTriangle
xiotex
Posts: 3
Joined: Mon Jun 01, 2009 12:48 pm

Post by xiotex »

I just used a mesh object in the end. Worked out better for performance overall so not such a big problem.

I really like this engine - so damn easy to use.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

Should we fix the docs or the method here?
I'm thinking it's better to fix the method, as the material can decide whether to draw in wireframe or not.
Added a bug regarding this anyway.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply