-
Notifications
You must be signed in to change notification settings - Fork 48
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
wglMakeCurrent Very Slow #56
Comments
Hi there. Thanks for the report.
Theoretically, we should not need the NULL call, and I guess doing a check like you suggest could be a good idea. |
At the time I was trying 64x64, with TIGR_2X, and only one window. I'm not sure what to make of my performance tests. TIGR_AUTO did not make a difference if the drawing code is fast (just drawing a simple circle with tigrCircle), but when I added in the 'blur' effect from the examples, tigrUpdate takes 0 ms and the drawing (a simple circle, blurred) takes 25 ms. |
Thank you for tigr! I've been having a lot of fun with it.
One thing I'm having trouble with though is that I have been finding that the call to wglMakeCurrent on Windows is very slow, ~10-15 ms.
I would really like to use tigr for some GUIs at work (small, no dependencies, and responsive!), but I would like the application to not take so much time just to draw.
I have not been able to figure out the root cause here: there are forum threads discussing similar problems, even similar slow downs, but it is not at all clear what is wrong.
I tried to avoid the call to wglMakeCurrent by comparing wglGetCurrentContext and the hglrc field of GLStuff, but I'm not clear enough on the design to know which calls might be omitted if we are already in the current context.
Do you have any thoughts about this? The lines I'm looking at are:
tigr/src/tigr_win.c
Line 210 in ff7307a
and especially
tigr/src/tigr_win.c
Line 215 in ff7307a
which seems to be what is causing the slow down.
Thank you!
The text was updated successfully, but these errors were encountered: