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.
This is ok because it checks for null pointers, however it might be better to check the result of getMesh which might fail more easily. Which file format do you use?
file formats are one md2 file and a bunch of 3ds files.
Oops, I cut some of the stuff out by accident, but if it is a md2 object it won't setMaterialTexture() as the texture in the 3ds file is already mapped to the object.
if (n==22) then actor[n].node->setMaterialTexture("red.bmp")...,
Now that I look at it again, the MD2 mapping is working, it is the 3ds objects that have gone white.
I need to examine this more and will do a little later. Any more suggestions would be helpful tho, thanks.
Loaded mesh: data\floor.3ds
Needed 0ms to create OctTreeTriangleSelector.(1 nodes, 12 polys)
Unknown percentage chunk in 3Ds file.
Loaded mesh: data\redframe.3ds
Needed 0ms to create OctTreeTriangleSelector.(1 nodes, 64 polys)
Unknown percentage chunk in 3Ds file.
Loaded mesh: data\greenframe.3ds
Needed 0ms to create OctTreeTriangleSelector.(1 nodes, 64 polys)
Unknown percentage chunk in 3Ds file.
I don't get the message 'Unknown percentage chunk in 3Ds file' in the previous version. I am using Anim8or to export the models with textures to 3ds files, <EDIT> I just tried Blender, it is still white.
I'm experiencing the same thing - however, it works fine on my home computer - an Athon 2100 running a Geforce 2 MX 400 (try to keep the laughter to minimum) but everything is white (except the shadows) on the computers at my University - a P4 3ghz running Intel onboard graphics.
I didn't modify the code at all between tests (used OpenGL on both).
Actually, I just ran it now to find out what graphics drivers the uni computers use, and its working fine now. However, I'm on different computers to the ones I was using last time, and I think the graphics cards are different in this room.
I'm just using the standard Sydney model and terrain for my test.
Same no textures bug here (in windows). It seems to only be in OGL. I also see a definite slow down in the examples (OGL and DX).You've drastically changed something. Irr 1.0 still works fine. Something that might be related is the titlebar shows OGL ver 1.5 in Irr1.0 and OGLv1.1.2 in Irr 1.1.
drarem wrote:I change to the 1.1 version and recompile, everything in my project lacks texture and is now white. Any ideas?
Do all the pre-compiled OGL examples work perfectly for you?
The title bar showed a fixed string in previous versions, now it uses the actual version thing returned from OpenGL
All things work pretty well here, both for Windows and Linux and all drivers. I'm constantly checking against version 1.0 binaries and did not encounter any slow-down. And also no white textures with the examples, only for some 3ds files from the net.
Please post your driver versions, gfx card, OS, etc. And also the console output (which usually contains driver versions already). One thing changed for OpenGL is introduction of automatic mipmap generation which requires an extension check and otherwise manually created mipmaps. Maybe try to update your driver to get a better OpenGL version.
If I save the model as a .X using Lithunwrap, the texture shows up.
No one else is having problems with this?
I have latest nvidia driver 91.33 beta, win xp service pack 2, 3.02Ghz w/HT, my opengl drivers should be up to date.
The console output I get is:
Loaded mesh: data\floor.3ds
Needed 0ms to create OctTreeTriangleSelector.(1 nodes, 12 polys)
Unknown percentage chunk in 3Ds file.
To make a file with a bad chunk, just load up anim8or or blender, make a mesh and texture it, export it to a folder as .3DS along with the texture file to try to load it.
I have fixed a problem with the 3ds loader in one of the latest svn revisions which was differently defined in the 3ds standard, but now works for those models which did not load correctly for me. You might want to give this change a try.
BTW: I'll move this to bug report, replacing your second post.
Update your OpenGL driver. Using the older code requires lots of texture conversions and will also prevent other things to work properly. Although Irrlicht is said to require OpenGL 1.5 it shoudl suffice to use versions 1.2 or up.