mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-10 19:03:30 +00:00
SDL alpha bleeds into the imgui windows #2873
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#2873
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version: 1.73 (17300)
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_opengl3.cpp + imgui_impl_sdl.cpp
Compiler: Visual Studio 2019 (MSVC)
Operating System: Windows 10 Home (1809)
My Issue/Question:
When setting windows opacity for an sdl window then the opacity is transferred through the imgui windows. I am using only the examples from the github examples folder
Result

The expected result is just the imgui windows to be opaque
NOTE
This issue is the sdl equivalent for #2764 but the solutions that have worked there do not work here. See the examples
Standalone, minimal, complete and verifiable example:
These are the options that i tried from the examples in the repository
All the variants from imgui_impl_opengl3.cpp
function ImGui_ImplOpenGL3_SetupRenderState
glEnable(GL_BLEND); //glBlendEquation(GL_FUNC_ADD); glBlendEquationSeparate(GL_FUNC_ADD, GL_MAX); glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);glEnable(GL_BLEND); //glBlendEquation(GL_FUNC_ADD); glBlendEquationSeparate(GL_FUNC_ADD, GL_MAX); glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);glEnable(GL_BLEND); glBlendEquation(GL_FUNC_ADD); //glBlendEquationSeparate(GL_FUNC_ADD, GL_MAX); //glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);glEnable(GL_BLEND); glBlendEquation(GL_FUNC_ADD); //glBlendEquationSeparate(GL_FUNC_ADD, GL_MAX); glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA); //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);In the main.cpp
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8); SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags); SDL_GLContext gl_context = SDL_GL_CreateContext(window); SDL_SetWindowOpacity(window, 0.8f);Any help with this issue is welcome.
Thank you.
Linking to #2764, #2693 in case they may be related (note, haven't checked the issue in details at all).
Hello @RosculescuCiprian
Went through a bunch of backends and examples yesterday.
Fixed this with
bda12e5and6a161b8(we have 7 open issues related to this).