I wonder if anyone could help me with the following, please?
I graciously received one person's small project for Irrlicht 1.5, and it compiled and ran fine.
However as I'm wishing to integrate it with my project, which uses 1.7.1, I made the required modifications to get it to compile (mainly stuff like changing core::dimension2d<s32> to core::dimension2d<u32> for functions that expect it), when running it, the following problem came up:
All the textures render as white. It says on the console that it loads them OK.
I tried to search for a couple of hours if there were any guides for migrating from 1.5, or if anyone else had similar problems, but have found none.
Would anyone have any ideas, please? I understand it may be impossible to answer without checking the code, but perhaps someone knows what has changed in the versions and could tell straight away?
If anyone would need to look at the code to help, which would be very much appreciated and kind, I can give you the link to D/L it.
Thank-you.
P.S. Using the software/Burningsvideo renderer 1.7.1 displays the textures okay, but not using OpenGL or DX9.
Irrlicht 1.5 project on 1.7.1 shows textures as white
-
blackMasoon
- Posts: 149
- Joined: Wed Sep 09, 2009 4:57 pm
- Contact:
Found it
I found the problem.
The project code written for 1.5 had the following:-
When I commented out the 'FogEnable' setting, it worked.
The getAtlasTexture() wraps the results from driver->getTexture(), in case you might ask what's in there.
Perhaps this may be of use to anyone else using code written for 1.5 that might suffer from the same difference when using it on 1.7.1.
The project code written for 1.5 had the following:-
Code: Select all
meshBuffer = new scene::SMeshBuffer;
meshBuffer->setHardwareMappingHint(scene::EHM_DYNAMIC,scene::EBT_VERTEX_AND_INDEX);
mesh = new scene::SMesh;
mesh->addMeshBuffer(meshBuffer);
node = smgr->addMeshSceneNode(mesh, NULL, -1);
video::SMaterial& mat(node->getMaterial(0));
mat.AmbientColor.set(255, 0, 0, 0);
mat.DiffuseColor.set(255, 255, 255, 255);
mat.EmissiveColor.set(255, 64, 64, 64);
mat.SpecularColor.set(255, 0, 0, 0);
mat.Shininess = 0.0f;
mat.FogEnable = true;
mat.Lighting = true;
mat.Wireframe = false;
mat.setTexture(0, textureAtlas->getAtlasTexture());
The getAtlasTexture() wraps the results from driver->getTexture(), in case you might ask what's in there.
Perhaps this may be of use to anyone else using code written for 1.5 that might suffer from the same difference when using it on 1.7.1.
Last edited by blizuke on Sun Jul 18, 2010 9:47 pm, edited 3 times in total.
It is a custom-assembled mesh/meshbuffer.hybrid wrote:Do you use custom scene nodes? These tend to compile wrongly due to signature changes. After that, some virtual methods are not properly linked anymore.
I managed to pinpoint the offending setting. But I don't yet know enough of Irrlicht's workings to see why it did that.
Main thing it works now, though.