If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I want to use .jpg as texture file

I changed the code and used dwarf.rttex for texture and it has started working fine.
But in my case i have to use .jpg for texture file.

But when i use .jpg as texture file i am not getting the texture binded properly.
So can you tell me that why is it happening and what is the solution to use .jpg file for texture.
.jpg works fine on windows as a texture.

I just tested it on the device and it works - I suspect the .jpg is not actually in your final android .apk.

Open the .apk with Winzip or 7zip and look in assets/game and make sure it's there. (Plop it in directly if it isn't and test on the device again)

The update_media.bat file (called by androids build.bat) that builds the media kills the bin/media directory and rebuilds it, stripping out the .jpg files and building .rttex versions instead. You'll probably need to modify that.

Although, I'd really like to know why you didn't get a "file not found" error if that is the case... hrm.

Can there be some other issue also? Or it can be because of Android latest version 2.3.2?

Hmm, sorry I'm not sure, I don't get this behavior here. Maybe I'll have more info after I get newer devices to test with...

Couple of ideas to get more info though:

Make sure the make file uses the _DEBUG option (check the make file and uncomment the debug part, and comment the release part) so it will also check for gl errors.

Try running it using the Android Emulator. It's slow, but it works and does 3d ok and can give more interesting errors sometimes. You could setup a 2.2 and 2.3.2 device and check if there is a difference.

dwarf.jpg is 512X512, but if you're testing with another image, make sure it's a power of 2 to be safe. (.rttex files fix this for you, which could hide that kind of problem..)

I'll try to add info on using vsrename to clone projects to the wiki soon...

I'll try to give it a look later, got hit with some work that can't wait..

I can't think of any reason why you can't jump straight to a 3d scene and have it work, maybe needs some small tweak somewhere. A work around would be to load the 2d menu, wait 20 ms or so, then load the 3d menu?

Also in the log it shows ".apk not found at the start" - which seemed weird. Maybe it's a false error though, as it couldn't even load the models on android if that wasn't mounted right.