-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
window flickering when using "glEnable( GL_SCISSOR_TEST );" #807
Comments
i figured out that it works when i use glDisable( GL_SCISSOR_TEST ); before ImGui_ImplGlfwGL3_NewFrame(); and reset it to glEnable( GL_SCISSOR_TEST ); after. I assume ImGui_ImplGlfwGL3_NewFrame(); doesn't restore some states not correctly or I'm using something wrongly, I'll further investigate. |
Hello @VisComKreiser and sorry for my late answer. I'm not sure I understand your problem. The
So that would overwrite your scissor rectangle (4 float) if you had one in place. Is that the problem you are having? We could potentially save and restore the actual scissor rectangle, adding:
Would that fix your issue? |
Thanks for your answer, I was just wondering why it wasn't present in the ImGui_ImplGlfwGL3_RenderDrawLists function where the viewport is restored in this manner. Thanks for your help and the great library! Making research much more comfortable. |
Sorry, just to clarify, was that your problem? Did adding those lines fix it for you? |
Yes, that was exactly my problem and it is solved now. I added it in "void ImGui_ImplGlfwGL3_RenderDrawLists(ImDrawData* draw_data)" directly under the glViewport call, the check for GL_SCISSOR_TEST itself is already there, see your sample code as it is now in my project: .... |
If you want the scissor region as the actual GL_SCISSOR_BOX, your code you postet would maybe fit better to the example. I just hat the whole window covered all the time, so I can use the same values as for glViewport. |
Added code. |
Thanks for your help and the extension! I appreciate it. |
I am using GLFW and GLEW in my OpenGL application and tried to integrate imgui.
The setup works fine but my window starts flickering when using "glEnable( GL_SCISSOR_TEST );" at the beginning where i set up all my states
I tried it also in the GLFW example from the repository and the same effect occurs.
Is there an issue with the double buffering or is glEnable( GL_SCISSOR_TEST ); not compatible to use with imgui?
Thanks for your help!
The text was updated successfully, but these errors were encountered: