On Raspberry Pi 2 opengl-es2 driver renders my 32-bit textures in 16 bit, which creates ugly color stripes.
I found that Open GL ES2 doesn’t support 32 bit color by default.
Later I found the following topic:
people there say that using GL_IMG_texture_format_BGRA8888 extension allows to render in 32 bit color.
However I couldn’t find anything related to that in SDL2 opengl es2 renderer code.
Are there any plans to enable this extension in SDL to support 32 bit color on Raspberry Pi?
Also, have anybody tried this extension on raspberry pi, does it really work as expected and gives real 32-bit output?
I’m running in Raspbian on a Raspberry Pi 2. (I haven’t tried a 1 or
0.) I originally started in Wheezy, but upgraded to Jessie a month
ago. I did have to bump up the GPU memory. I think I’m at 128M now.
Jessie seems to need more than Wheezy.
I actually just made a video which included the Pi:
I’m using a pretty stock SDL program, using the 2D renderer. It’s
derived from the happy face example or test. I also got SDL_gpu
working on the Pi.
In either case, I don’t think I called any color depth APIs so
whatever the defaults are I guess.On 2/19/16, mr_tawan <mr_tawan at hotmail.com> wrote:
How did you run your SDL apps on Pi ? Via rasbian ??
Apparently there are two possibilities - either I’m using SDL2 in a really wrong way, or SDL2 just doesn’t support 32-bit color for OpenGL ES/2 on Raspberry Pi.
My guess is the latter.
It’s pretty sad, because I really like the API model of SDL, also it’s multi-platform, covers pretty much all I need, etc.
I hope this situation will soon improve.
I’ll most likely still use SDL2 to handle input and possibly image load / TTF, but this 16 bit color limitation is too bad to keep using it as the graphics library.
Ok, so basically you have a SDL_Renderer and one or more textures. You render them using SDL_RenderCopy(), and it results in banding, right ?
Have you tried running the same code on the PC ? What does the output look like ?
Here’s a simple program and image I tried on both raspberry pi and my Ubuntu box (meerkat).
Ubuntu shows as expected 32 bit color, while running it on my Raspberry pi 2 results in color degradation.
The Pi backend is OpenGL ES. I think the default for iOS and probably
Android were 565. So I’m not that surprised Pi would be the same.
-EricOn 2/19/16, bamirov wrote:
mr_tawan wrote:
Ok, so basically you have a SDL_Renderer and one or more textures. You
render them using SDL_RenderCopy(), and it results in banding, right ?
Have you tried running the same code on the PC ? What does the output look
like ?
Here’s a simple program and image I tried on both raspberry pi and my Ubuntu
box (meerkat).
Ubuntu shows as expected 32 bit color, while running it on my Raspberry pi 2
results in color degradation.