Nav Link On

iPhone Dev Forums > General Development > OpenGL ES Development > Texture : Bad colors

Reply

 

LinkBack Thread Tools Display Modes
Old 08-19-2008, 12:23 AM   #1 (permalink)
Junior Member
Default Avatar
 
Join Date: Aug 2008
Location: France
Posts: 8
Default Texture : Bad colors

Hello,

I'm new in the OpenGL ES development, and I make little tests with the simulator. I have not iPhone.

I make a project, for try a rotating textured cube. The textured cube is working, but the textures do not correctly displayed, with bad colors.

When I launch the Apple's example ("Crash Landing"), the problem is same :



The example's ReadMe say : " Simply build the sample using
Xcode and run it on the device. (This project hasn't yet been updated to run in the simulator.)"

What is this update to running correctly ?

Thanks
Eddy71 is offline   Reply With Quote
Old 08-19-2008, 05:45 AM   #2 (permalink)
Member
Default Avatar
 
Join Date: Aug 2008
Location: main(int argc, void **argp)
Posts: 72
Send a message via AIM to A_Nub Send a message via MSN to A_Nub
Default

Hmm, it works fine for me in the simulator and on my iPhone, have you tried it on the device?

I cant quite say whats wrong. Looks like a palette corruption.

Also check the actual textures they themselves may be messed up due to improper extraction.
__________________
Quote:
Originally Posted by Xfacter
Amirite? I knew iwasrite.
A_Nub is offline   Reply With Quote
Old 08-19-2008, 08:59 AM   #3 (permalink)
Junior Member
Default Avatar
 
Join Date: Aug 2008
Location: France
Posts: 8
Default

No, I don't have iPhone for testing.

But with workaround, I have installed the iPhone SDK on a PPC G4 Mac, maybe an incompatibility problem ?

Yet, the GLSprite example work fine.

But when I modify the texture "Sprite.png" of the GLSprite example, with a red rectangle in the texture, I have a strange problem : The originals colors of the texture are good, but the rectangle is not red, but clear blue color.

I don't understand ? Why this texture work partially, and the modification is corrupted ??
Eddy71 is offline   Reply With Quote
Old 08-19-2008, 01:46 PM   #4 (permalink)
Member
Default Avatar
 
Join Date: Aug 2008
Location: main(int argc, void **argp)
Posts: 72
Send a message via AIM to A_Nub Send a message via MSN to A_Nub
Default

Yeah I would say that its probably something to do with that ;) Well IM not 100% sure but it seems that it may be possible that the OpenGL apple uses to emulate the ES may supersede that of which your gfx card supports. So when calling certain functions they may point to no were or somewhere that causes memory corruption.

There isnt an exact way to pinpoint the problem since you are on an unsupported machine. Sorry to be the bearer of bad news
__________________
Quote:
Originally Posted by Xfacter
Amirite? I knew iwasrite.
A_Nub is offline   Reply With Quote
Old 08-20-2008, 10:32 AM   #5 (permalink)
Junior Member
Default Avatar
 
Join Date: Aug 2008
Location: France
Posts: 8
Default

Yes, no issue with the simulator on my G4, yet the Cocoa Touch apps run perfectly, only OpenGL ES simulation is corrupted.

I have subscribed to the Developper Program, and I wait my certificate. I buy an iPod Touch to making my tests.

I have found a workaround in the Apple's forum discussion, to making certificate and code signature working on a PPC. I hope it will operate, otherwise I will need to buy an Intel machine, but not immediatly: :\

Last edited by Eddy71; 08-20-2008 at 10:34 AM.
Eddy71 is offline   Reply With Quote
Old 08-27-2008, 12:58 AM   #6 (permalink)
Junior Member
Default Avatar
 
Join Date: Aug 2008
Location: France
Posts: 8
Default

The PPC codesign workaround... work fine !

Now I can really test my code on the iPod Touch
Eddy71 is offline   Reply With Quote
Old 01-11-2009, 10:38 PM   #7 (permalink)
Junior Member
Default Avatar
 
Join Date: Jan 2009
Posts: 1
Default

Quote:
Originally Posted by Eddy71 View Post
No, I don't have iPhone for testing.

But with workaround, I have installed the iPhone SDK on a PPC G4 Mac, maybe an incompatibility problem ?
I've seen the same thing on a PPC machine with Crash Landing. It also occurs in other apps that use textures.

Probably an endian issue? Has anyone got a solution to this?
Fraser is offline   Reply With Quote
Old 02-27-2009, 03:47 PM   #8 (permalink)
Junior Member
Default Avatar
 
Join Date: Feb 2009
Posts: 3
Default

I have juste posted a related question in the SDK forum.
Since I also encountered the same problem (using 2D textures, and noticed that colors were wrong on Simulator and fine on Device), I guess that the response to this is an endianess problem.
I confirm that this will probably be ok on the device.
Roger_Rabbit is offline   Reply With Quote
Old 05-19-2009, 12:36 PM   #9 (permalink)
Junior Member
Default Avatar
 
Join Date: May 2009
Posts: 1
Unhappy Anyone fixed this yet?

Hi,

I'm going cheap for the moment, as I am still learning. I have the same palette issue on G4 with 2.2.1 iphone SDK. Has anyone found a solution to this problem? I've looked throughout the code to no avail.

I've been trying the tutorials from 71 squared, and iPhoneDev groups but anything with an OpenGL ES render mehtod seems to get the colours all wacky.

The alpha blend(normal) eg. (s, 1-s), clearColour (black) etc is all okay, but I still have a blue background and blue filter across all my sprites. Very annoying, would love some assistance.

Cheers!
chubbyspandex is offline   Reply With Quote
Reply

iPhone Dev Forums > General Development > OpenGL ES Development


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC1