When texture alpha between 1.0~0.0 In Raspiberry, I will watch my Desktop

Started by asail0712, September 14, 2015, 02:39:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


When I  blend texture in Raspiberry with

gh_renderer.set_blending_factors(BLEND_FACTOR_SRC_ALPHA, BLEND_FACTOR_ONE_MINUS_SRC_ALPHA); // 2 & 5

If texture's alpha isn't 1.0 or 0.0, I will watch my desktop in my texture on my screen.
How can I avoid desktop to show at my texture when my texture'alpha is between 1.0 ~ 0.0?


This is something I explain at the end of this post:

The rendering is directly done on the same framebuffer than the desktop, that could explain why alpha blending makes the desktop to appear.
Currently I didn't find a way to fix it.

I your find a RPi demo somewhere on the web that uses alpha blending, let me know.


There is a RPi demo "drawing_letters_with_mouse"
If you modify code at line 168
gh_gpu_program.uniform4f(texture_prog, "color", p._r, p._g, p._b, 1)
gh_gpu_program.uniform4f(texture_prog, "color", p._r, p._g, p._b, 0.5)

When you click your left buttom, You will find a magical situation.
You can watch your desktop through letter whatever your bg color in GLSLHacker


Yes I know, this demo is included in the code sample pack. What I meant is if you find an OpenGL ES demo with blending for RPi on another website, let me know  ;)