-
Notifications
You must be signed in to change notification settings - Fork 53
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
OpenGL modernization #66
Conversation
One issue that is still outstanding: #66 (comment). @kanye-quest, do you have a specific reason for those changes? Unless I'm missing something, I think we need to revert back to the explicit synchronous window re-drawing. |
I can't actually remember why I made that change; I'll see if I can change the |
The window content is not dynamically updated while resizing the window. It will be nice to fix that. |
Looking at the code of |
If I understand correctly, the main issue is that when a screenshot is requested via a character key sequence, we only want the commands up to that point to be executed and displayed; but with SendExposeEvent, MyExpose is only called after the entire character key sequence is processed. I think we can achieve this asynchronously by exiting out of the event loop in SdlWindow early if a screenshot command has been queued. Then the |
@v-dobrev, I made some changes to switch from The original reason I changed it to |
Is there a reason not to do the swap inside |
GLVis is idle -- only for X11, for now, with placeholders for Cocoa on Mac. When using non-X11 subsystem, use SDL_WaitEvent() in the event loop instead of generating pauses with SDL_WaitEventTimeout(). In this case the GLVis communication thread will "wake up" the main thread by sending it a user-defined SDL event. Re-enable the screensaver since SDL disables it by default. When using the X11 subsystem, disable the XInput extension events since they are generated even outside the GLVis window.
lib/sdl_mac.m
Outdated
void GLVis_Cocoa_WaitEvent() | ||
{ @autoreleasepool | ||
{ | ||
[NSApp nextEventMatchingMask:NSEventMaskAny |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
@v-dobrev and @kanye-quest -- are we all set for merging today from your perspective? |
{ | ||
SDL_Event e; | ||
static bool useIdle = false; | ||
if (SDL_PollEvent(&e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@v-dobrev, I think we need to go back to while (SDL_PollEvent(&e))
here - there's noticeable response lag introduced when moving with mouse on a remote X11 connection to LC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should block today's merge though.
Hi @v-dobrev , with commit fc9276b the broke build for me on OpenSUSE and current MFEM master.
I think this error is due to fc9276b#diff-65fa73f3701f40e95286291d439656a479415073bf5cb2bcb81c80e19d9b235bR16-R24 pulling in some X11 macros. |
until the queue is empty or another type event is processed. This helps improve mouse-drag lag over remote ssh connections.
The latest pull seems to be working fine for me too |
Modernizes the OpenGL API usage of GLVis. Highlights:
Miscellaneous improvements: