imGui with Transparent Window (GLFW)

Hello,

i have activated the Transparent mode of GLFW.

i have a fbo blitted in the background of the app, imgui is on top.

i would like to define the alpha of the window corresponding to the alpha of the fbo.

he work like a charm, but when i set the alpha value to 1.
Imgui completly ignore that.

when i said imgui, i speak about the renderer on GLFW ( provided in example driectory)

I thinck its due to the blending but i dont know how i can correct that :

Here with alpha < 1 (the renderer is ok with that)

when alpha is 1 on my fbo, the renderer is affected a little bit, but we continue to see visual studio behind the app, also see the color widget (alpha is 100 but we see transparent background) :

Thanks

finally i got the solution.

found here : https://stackoverflow.com/questions/17224879/opengl-alpha-blending-issue-blending-ignored-maybe

i have replaced the func

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)

by

glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE)

in the function “ImGui_ImplOpenGL3_SetupRenderState”

here the result :

mayeb he can be usefull for other peoples :slight_smile:

1 Like