I've been working with a class to draw 2d lines with images.
The following is render from debug build of a 2d line image turning class I've built and the lower image is release build ( which is the desired).
Have I forgotten to set something for the release build?
The top image is the desired output, but neither release build of irrlicht ( fast or precise floating point) matches the debug output!
If I turn lighting on it goes black. What am I missing?
[SOLVED] Release Material issue ?
[SOLVED] Release Material issue ?
Last edited by caburfoot on Sat Dec 10, 2011 6:31 pm, edited 1 time in total.
Re: Release Material issue ?
Realized that I didn't mention:
On Windoze
Irr 1.7.2
VS2010
Here's the mat initialization:
mat.Wireframe = false;
mat.Lighting = false;
mat.FrontfaceCulling = false;
mat.BackfaceCulling = true;
mat.setFlag(irr::video::EMF_ZBUFFER, false);
mat.AntiAliasing = video::EAAM_OFF;
mat.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
mat.ZWriteEnable = false;
mat.Lighting = false;
mat.MaterialTypeParam = mat.MaterialTypeParam2 = 0;
The debug output is correct and desirable, the release output is 'huh'?
Tried using both the Irrlicht release with float precision and float fast
On Windoze
Irr 1.7.2
VS2010
Here's the mat initialization:
mat.Wireframe = false;
mat.Lighting = false;
mat.FrontfaceCulling = false;
mat.BackfaceCulling = true;
mat.setFlag(irr::video::EMF_ZBUFFER, false);
mat.AntiAliasing = video::EAAM_OFF;
mat.MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
mat.ZWriteEnable = false;
mat.Lighting = false;
mat.MaterialTypeParam = mat.MaterialTypeParam2 = 0;
The debug output is correct and desirable, the release output is 'huh'?
Tried using both the Irrlicht release with float precision and float fast
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Release Material issue ?
Are the two pictures both without lighting? You mention that it turns black if you turn on lighting. This seems correct, unless you have a light and proper normals defined. Most important question: Which driver are you using?
Re: Release Material issue ?
Oh, this is with the OpenGL driver.
It's destined for 2d for a while.
The pics are two shots - the upper one is the expected input with a debug build.
I'm going to try making some release Irrlicht libs with different optimizations and see if that makes a diff
Lighting IS off for both as don't won't any lighting effects at this point.
It's destined for 2d for a while.
The pics are two shots - the upper one is the expected input with a debug build.
I'm going to try making some release Irrlicht libs with different optimizations and see if that makes a diff
Lighting IS off for both as don't won't any lighting effects at this point.
Re: Release Material issue ?
you should try to reduce at minimum debug code. usually when you have a release version wich is very different from a debug version (for example using too many #ifdef _DEBUG or similiar) you increase chances that something goes wrong. Try to look again at your debugging code if any. Then download again irrlicht and build again your project to see if this still happens.
Using different code for debugging is not a very good idea (especially with visual studio wich has very good debugging features wich also let you to look directly at values of variables at runtime) but some times is needed and you have to be very carefull.
Using different code for debugging is not a very good idea (especially with visual studio wich has very good debugging features wich also let you to look directly at values of variables at runtime) but some times is needed and you have to be very carefull.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Re: Release Material issue ?
Well ( ), maybe I should have posted this to BeginnersHelp!
Some idiot didn't EXPLICITLY set the S3DVertex colors and normals!
So in the release build they appear to be randomly assigned, but in Debug they are set ( Color = 0xcd, 0xcd, 0xcd, 0xcd, Normal = 0,0,0)
Thanks for the thoughts.
You guys REALLY help make Irrlicht ROCK!
Some idiot didn't EXPLICITLY set the S3DVertex colors and normals!
So in the release build they appear to be randomly assigned, but in Debug they are set ( Color = 0xcd, 0xcd, 0xcd, 0xcd, Normal = 0,0,0)
Thanks for the thoughts.
You guys REALLY help make Irrlicht ROCK!
Re: [SOLVED] Release Material issue ?
A recomendation, don't pass (0,0,0) as the normal of the vertices. If you need a normal, (0,0,1) is the right choice, because it points towards the screen, so, it should always be visible, and the backface culling will work as expected, (0,0,0) is the same as saying "undefined" normal, it can't be normalized, and will always return 0 to the lighting equation, resulting in black renders, if you used lights any time in the future.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt