Skip to content
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

Problem with displaying windows in OS X #2195

Closed
BrutPitt opened this issue Nov 18, 2018 · 6 comments
Closed

Problem with displaying windows in OS X #2195

BrutPitt opened this issue Nov 18, 2018 · 6 comments
Labels

Comments

@BrutPitt
Copy link

BrutPitt commented Nov 18, 2018

Version/Branch of Dear ImGui:

1.66 WIP (actual master 50c43d1)
(No problem with 1.66 version before of ImguiDragFlags in DragBehavior: I refer to the change I remember)

Back-end file/Renderer/OS:

Back-ends: imgui_impl_GLFW.cpp + imgui_impl_opengl3.cpp
Renderer: OpenGL (for now tested only with AMD RX 480)
OS: OSX 10.14 (no problem Linux and Window)

My Issue/Question:
The contents of the window, "disappear": is simplest to view it on the animate gif, attached.
It seems almost a "viewports" problem, though I'm not using that feature (in that circumstance)
Is only the visualization: widgets work even if they are not displayed

This issue appear only in OSX (tested only on 10.14, and only on RX 480).
No problem in Linux and Windows

I tested also the last "viewports" release: same problem.
In that circumstance the window that leaves the main viewport remains "always" in the same condition in which it was just before leaving the main viewport (e.g. partially drawn) , and it stays in that condition, in any position on the desktop.
The "viewports" release works fine in Windows, not yet tested in Linux.

Screenshots/Video

My application
mov1

Same behavior also with a simplest application that I use for test/develop my widgets, with imgui_demo inside:

mov2

Thanks,
Michele

@BrutPitt BrutPitt changed the title Problem with displayng windows in OS X Problem with displaying windows in OS X Nov 18, 2018
@ocornut
Copy link
Owner

ocornut commented Nov 18, 2018

Hello,

Looks like we possible broke something with:
f52f0a5

Could you tell what are the value of the two new variables added?

@BrutPitt
Copy link
Author

BrutPitt commented Nov 18, 2018

Ciao.
It could actually be this!
OS X supports only OpenGL 4.1 (OpenGL have been deprecated in OS X 10.14)
I try it

@BrutPitt
Copy link
Author

clip_origin_lower_left = 0 -> always
last_clip_origin = 1 -> always

Used printf

@BrutPitt
Copy link
Author

BrutPitt commented Nov 18, 2018

Adding...

If I force:
glScissor((int)clip_rect.x, (int)(fb_height - clip_rect.w), (int)(clip_rect.z - clip_rect.x), (int)(clip_rect.w - clip_rect.y));
(selected with clip_origin_lower_left == true)

Instead of:
glScissor((int)clip_rect.x, (int)clip_rect.y, (int)clip_rect.z, (int)clip_rect.w);
(selected with clip_origin_lower_left == false)

All works fine.

Edit:
And more...

It seems only a OS X problem: not of openGL 4.5.
I tested it forcing a 4.1 GL context in Windows and Linux and works fine.

@ocornut ocornut added the bug label Nov 20, 2018
ocornut added a commit that referenced this issue Nov 21, 2018
… glGetIntegerv(GL_CLIP_ORIGIN is not honored properly. (#2186, #2195) Fix f52f0a5
@ocornut
Copy link
Owner

ocornut commented Nov 21, 2018

Thanks for your feedback.
I should have pushed a fix now, could you confirm it is working out for you?

@BrutPitt
Copy link
Author

Yes, I confirm that it works: there seems to be no more problems.
Thank you

@ocornut ocornut closed this as completed Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants