Irrlicht 1.5 project on 1.7.1 shows textures as white

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
blizuke
Posts: 8
Joined: Sun Jul 18, 2010 9:51 am

Irrlicht 1.5 project on 1.7.1 shows textures as white

Post by blizuke »

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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

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.
blackMasoon
Posts: 149
Joined: Wed Sep 09, 2009 4:57 pm
Contact:

Post by blackMasoon »

Could You show how do You use those textures in the code?
blizuke
Posts: 8
Joined: Sun Jul 18, 2010 9:51 am

Found it

Post by blizuke »

I found the problem.

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());
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.
Last edited by blizuke on Sun Jul 18, 2010 9:47 pm, edited 3 times in total.
blizuke
Posts: 8
Joined: Sun Jul 18, 2010 9:51 am

Post by blizuke »

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.
It is a custom-assembled mesh/meshbuffer.

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.

:-)
Post Reply