SymbiSoft / mosync

Automatically exported from code.google.com/p/mosync
0 stars 0 forks source link

iOS maOpenGLTexImage2D wrong colors when size is power of two #1059

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Calling maOpenGLTexImage2D on iOS with texture with width and height equal to 
power of two.

What is the expected output? What do you see instead?
Red and blue are swaped.

What version of the product are you using? On what operating system?
MoSync-110302-0946 for windows
XCode 3.2.5

Please provide any additional information below.
In file runtimes\cpp\platforms\iphone\Classes\impl\SyscallImpl.mm in function 
int maOpenGLTexImage2D(MAHandle image) change:
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, img->width, img->height, 0, GL_RGBA, 
GL_UNSIGNED_BYTE, img->data);
to
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, img->width, img->height, 0, GL_BGRA, 
GL_UNSIGNED_BYTE, img->data);

Original issue reported on code.google.com by sku...@sageteam.eu on 6 Mar 2011 at 9:28

GoogleCodeExporter commented 8 years ago

Original comment by abi.waqa...@gtempaccount.com on 7 Mar 2011 at 10:19

GoogleCodeExporter commented 8 years ago
Wouldn't it be possible to fix this one? It's just one constant to change and 
it would really help with testing opengl applications on iphones/ipads.

Original comment by sku...@sageteam.eu on 12 May 2011 at 1:04