ENTER_GL and ActivateContext question

Alexander Dorofeyev alexd4 at inbox.lv
Mon Dec 10 11:39:49 CST 2007


Hello.

I was recently experimenting with a fix that involved ActivateContext and needed 
  to figure out whether it is ok if ActivateContext is called inside 
ENTER_GL()... LEAVE_GL() (also if recursive ENTER_GL is ok). At first I tried to 
look for example code in wined3d/surface.c, which seemed to indicate this is ok, 
because it obviously seems to happen in one or few places. Then I found this

http://bugs.winehq.org/show_bug.cgi?id=9810

from which it seems it is sort of a bug(?). Can any of 3d guys here clarify this 
matter - how bad is ActivateContext between ENTER_GL/LEAVE_GL and recursive 
ENTER_GL, does it definitely need to be avoided and should things like this

     ENTER_GL();
     ...
     IWineD3DSurface_BindTexture();
     ...
     LEAVE_GL();

(BindTexture does ActivateContext and ENTER_GL)

be changed to something like

ENTER_GL()
...
LEAVE_GL()

IWineD3DSurface_BindTexture();

ENTER_GL()
...
LEAVE_GL()

and submitted as patch if I find it?



More information about the wine-devel mailing list