Android device displays everything in purple tones |
Android device displays everything in purple tones |
Reto Schneider
Guest
|
On 26.02.2015 18:22, Limanima wrote:
Yes: https://bugzilla.libsdl.org/show_bug.cgi?id=2291 And it is not yet resolved. Regards, Reto _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Re: Android device displays everything in purple tones |
Limanima
|
Ok thanks. At least I have some clues of what is going on. |
|||||||||||||||
|
SiPlus
|
IT'S NOT PURPLE, IT'S WHITE AND GOLD!!!
Anyway, try changing #if __ANDROID__ to #ifdef __ANDROID__ in src/video/SDL_egl.c. It's possible that the NDK simply defines __ANDROID__ instead of setting it to 1 (I'm not exactly sure about this, but another macro, ANDROID, is defined by NDK-Build with -DANDROID, not -DANDROID=1). |
|||||||||||
|
Limanima
|
I don't think that will solve the problem. It's seems to be a render target problem. |
|||||||||||||
|
SiPlus
|
Actually yes, I just tried, __ANDROID__ is set to 1. |
|||||||||||||||
|
Limanima
|
Sorry, I've checked the code and you may actually be right. I'm going to try that. Maybe this should be fixed in the head? |
|||||||||||||||||
|
Limanima
|
I forced a compile error in the piece of code and the compiler reports the error. That code is compiling in Android. That's not the problem after all. |
|||||||||||||||||
|
Limanima
|
I did this (like Hak Matsuda suggested in the bugzilla entry): SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 6); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); After creating the rendering and it solved the problem on the faulting device. It doesn't seem to have broken the other devices. |
|||||||||||||||||||
|
Limanima
|
Correction to the previous post: it's not AFTER, it's BEFORE creating the renderer. |
|||||||||||||||||||||
|
Android device displays everything in purple tones |
slvn
|
From what I remember, setting 565 is a workaround, because it will choose indirectly a different "egl-configuration".
But that's the best thing to do currently. I spend some time to help in this ticket and the problem as I understandood it, is:Â - the device S3 provides many egl-configurations. - the application is in landscape and choose/request an egl-configuration. At first, the selected "egl-config" seems correct (regarding colors, depth, etc.), but, in fact,when running, the application appears to be bad (red screen problem). Can you tell if you hardware device is a S3 ? and if you application is also landscape ? Another issue that happens to me is this one: https://bugzilla.libsdl.org/show_bug.cgi?id=2774 The application is landscape. The java layer calls incorrectly "onSurfaceChanged()" with (width, height) instead of (height, width). Then the screen is distorded. But it is only problematic with some egl-configurations and some device. You may want to try the path attached in this ticket. Please, tell if you try it and the result ! On Tue, Mar 3, 2015 at 1:00 PM, Limanima wrote:
-- Sylvain Becker |
|||||||||||||
|
Re: Android device displays everything in purple tones |
Limanima
|
It is an S3 but my application is in portait not in landscape (not my phone). I've never experienced the distorted issue in my phone (Galaxy Fresh) nor the red screen problem. |
|||||||||||||
|
Re: Android device displays everything in purple tones |
Limanima
|
I also confirm that this workaround fixed another issue in an Samsung S2 where the game was running very slow. Now it is running smoothly. |
|||||||||||||||
|