Opened 15 years ago
Closed 8 years ago
#4807 closed defect (obsolete)
wglMakeCurrent fails when 3D acceleration is enabled
Reported by: | Burns Boaz | Owned by: | |
---|---|---|---|
Component: | 3D support | Version: | VirtualBox 3.0.4 |
Keywords: | OpenGL 3D acceleration | Cc: | |
Guest type: | other | Host type: | other |
Description (last modified by )
I'm trying to get a commercial visualization product running on a Windows XP32 (sp2) guest hosted by either Windows Vista64 or Windows 7. The render/paint method for a canvas is basically:
enableTheContext()
renderWhatNeedsRendering()
swapBuffers()
disableTheContext()
The method that enables the context first saves away the current rendering and device contexts by calling wglGetCurrentContext() and wglGetCurrentDC(); then it calls wglMakeCurrent to make the canvas's context current. This call to wglMakeCurrent succeeds.
However, when the disable context method is called after rendering, which tries to restore the context previously saved by the enable method, wglMakeCurrent fails.
All of this happens very soon after app startup, so it appears to crash almost immediately. However, since I can't debug the low-level code, I can't say for certain if the problem occurs on the first rendering pass, or very soon thereafter.
If the app is run outside of vbox - or if the app is run in vbox w/o 3D acceleration enabled - everything works dandy. (Obviously if run in vbox w/o 3D acceleration it is very slow).
A couple of possibilities come to mind for reasons why this issue occurs:
1) There's a good chance that on the first rendering pass the previous context is NULL; maybe your implementation of wglMakeCurrent is not handling a NULL context properly.
2) A threading issue. There's some small chance that the previous context is from a different thread. Are these vbox drivers threadsafe?
One other interesting tidbit from our internally generated log file (which may or may not be useful): right before the app crashes, the following is logged: OpenGL Warning: No pincher, please call crStateSetCurrentPointers() in your SPU
Attachments (1)
Change History (4)
by , 15 years ago
comment:1 by , 15 years ago
comment:3 by , 8 years ago
Description: | modified (diff) |
---|---|
Resolution: | → obsolete |
Status: | new → closed |
Please reopen if still relevant with a recent VirtualBox release.
There had been lots of changes to the related code, could you retry if problem still exists with latest VirtualBox.