Draw3D functions and skyboxes problem [SOLVED]

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Rytz
Posts: 249
Joined: Wed Oct 25, 2006 6:05 am
Location: IL, USA
Contact:

Draw3D functions and skyboxes problem [SOLVED]

Post by Rytz »

I had Draw3DTriangle working correctly in a smaller test program that didn't use any skyboxes. Now that I moved that some code over to a different project with a skybox in the scene, the color is not being applied to the drawing. What's being drawn is actually the skybox.

Image

I tried a crapload of different things from changing the material settings and trying different transformation state but nothing seems to work.

The original code that worked for me was from what I found on the forums (from Vitek I believe) for doing the transformation and using non-lighted material:

Code: Select all

    video::SMaterial m;
    core::matrix4 mtrxTemp;
    m.Lighting = false;
    mtrxTemp.setTranslation(core::vector3df(0, 0, 0));

    device->getVideoDriver()->setTransform(video::ETS_WORLD, mtrxTemp);
    device->getVideoDriver()->setMaterial(m);

    ...

    device->getVideoDriver()->draw3DTriangle(parameters_here);
Any thoughts? I hope I'm not missing something totally obvious.
Last edited by Rytz on Sun Jun 29, 2008 10:26 am, edited 1 time in total.
Image
OnyxIdol
Posts: 10
Joined: Sat Jun 14, 2008 9:06 pm
Location: Germany

Post by OnyxIdol »

Hmm, I think when You create a new matrix it isnt necessary to explicitly set the translation to 0|0|0, since the new Matrix is an identity Matrix that already has a zero translation.

I don't understand what You mean with "the color is not being applied.." Does that mean that only the wireframe shows, as in the screenshot or does it mean something else?
Rytz
Posts: 249
Joined: Wed Oct 25, 2006 6:05 am
Location: IL, USA
Contact:

Post by Rytz »

OnyxIdol wrote:Hmm, I think when You create a new matrix it isnt necessary to explicitly set the translation to 0|0|0, since the new Matrix is an identity Matrix that already has a zero translation.

I don't understand what You mean with "the color is not being applied.." Does that mean that only the wireframe shows, as in the screenshot or does it mean something else?
Thanks for the reply.

I want the "lines" or "triangles" to be drawn as a solid color (green) but from what I see they are being drawn with the skybox graphic instead and without regards to the textures that are around.

What you see in the picture is actually draw3DTriangle() drawing using the skybox background instead of a solid color. Well that's what I want anyway.
Image
Rytz
Posts: 249
Joined: Wed Oct 25, 2006 6:05 am
Location: IL, USA
Contact:

Post by Rytz »

Problem solved... I had to move my drawing function after getSceneManager()->drawAll().

:P.
Image
Post Reply