XBOX textures messed up

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
exal
Posts: 60
Joined: Tue Feb 24, 2004 9:05 am

XBOX textures messed up

Post by exal »

Hi guys

I have adapted irrlicht to run on the xbox. The problem i am having is that the textures get messed up. I can't figure out if it something in the devicedependent creation of dx8 textures or if it's the file reader.

The header for files seem to be correctly read height, width, pix depth etc.

Also pk3 levels and 3ds files are read, displayed and animated correctly which leads me to think that the file reader is probably ok.

The exact same error is also displayed on bmp, tga and jpg files.

So is here an expert on this here that can try the code out and get this to work?

You can find the code at ftp://exal.no-ip.com
login: trader
password: trader

The code is in trader 2005 and you should use the irrlicht.sln. Watch out for the paths in the sln and vcproj if you get unable to load project.

Ps. if anyone want's to play a little unfinished asteroids please take that project to :)
mm765
Posts: 172
Joined: Fri May 28, 2004 10:12 am

Post by mm765 »

post some screenshots of the texture as it should be displayed and the texture as it is displayed.
exal
Posts: 60
Joined: Tue Feb 24, 2004 9:05 am

Post by exal »

I will post it when I get home. But this is how it looks on a 4*4 texture

Original
----
----
----
XXXX

After load
----
----
--XX
--XX

Original
X---
-X--
--X-
-----

After load
---X
----
----
X--X

Any ideas?
exal
Posts: 60
Joined: Tue Feb 24, 2004 9:05 am

Post by exal »

From what I have found the xbox normally read .xpr files which is bundled with the bundler tool in the xdk.

So to get the .xpr texture loader working it needs a rewrite of the texture loader for that purpose.

But since you can great a texture surface it should be possible to use the normal copyToTexture() function. But this seems to fail because irrlicht doesn't retain the texture format. It tries to copy a 32 bit texture to a 16 bit texture which is kind of strange since the image is correctly identified as 32 bit.
Post Reply