-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling GL_LIGHTING with freeglut+opengl2 makes the ui components black #1996
Comments
Don’t enable lighting while rendering imgui with this setup? You can still enable it elsewhere.
|
my project requires lighting, how do I exclude imgui ui components from the global glEnable(GL_LIGHTING) state in freeglut + legacy opengl? |
Simply disable lighting while rendering imgui, then enable it.
…On Thu, Aug 2, 2018 at 1:13 PM EldarZ ***@***.***> wrote:
my project requires lighting, how do I exclude imgui ui components from
the global glEnable(GL_LIGHTING) state in freeglut + legacy opengl?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1996 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEQ_Ry8WrcXbDvkATl6nEkOCMUYkGoRdks5uMtC9gaJpZM4VrnuC>
.
|
right... I just wrapped ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData()); with disable and enable lighting, sorry about the newbie question. Thanks!! |
…IAL to increase compatibility with legacy OpenGL applications. (#1996)
No worry @EldarZ . As it turns out, our rendering back-end aim to explicitly enable/disable all the OpenGL states they needs, then restoring the changes when it finish rendering. It's just tricky to do it exhaustively for OpenGL. So few people actually use those legacy OpenGL features and you are the first person to report something with GL_LIGHTING conflicting so imgui_impl_opengl2.cpp didn't explicitly disable it. I've know pushed a change to disable GL_LIGHTING and GL_COLOR_MATERIAL so it should work even if you don't disable it on your end. |
@ocornut great!, awesome library! 👍 |
Version/Branch of Dear ImGui:
1.63 WIP
Back-end file/Renderer/OS:
Nvidia 1060
Back-ends: imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
OS: Win10
Compiler: VS2017
My Issue/Question:
I'm running the freeglut + opengl2 example, I used it to integrate imgui to my existing project, written in opengl 1.1 (unfortunately this version is required), whenever I enable GL_LIGHTING the ui components turn to black, I googled this issue + searched this repository's issues, but got nothing.
To my understanding this is because there's no glMaterial definition to the ui component, but I'm not sure how to fix it.
Is this a known issue with opengl? I have't seen any lighting related code in imgui to maybe override it.
Standalone, minimal, complete and verifiable example:
Screenshots/Video
The text was updated successfully, but these errors were encountered: