ENTER_GL and ActivateContext question
Stefan Dösinger
stefan at codeweavers.com
Sat Dec 15 11:06:43 CST 2007
Am Samstag, 15. Dezember 2007 12:19:36 schrieb Alexander Dorofeyev:
> This seems to be specific to front buffer. Maybe
> glFlush really should be called in BltOverride (or clearing subroutine) if
> the target is front buffer?
Yes, glFlush() has to be called when writing to the front buffer. SwapBuffers
does an implicit flush, so for the back buffer you don't have to do anything,
but the front buffer needs a glFlush(). It isn't there yet, so it should be
added.
Your patch looks quite good, but you should remove the original code from
IWineD3DDeviceImpl_Clear() and make it call ClearSurface() as well.
The fbo activation you moved is a different problem. It needs to be fixed as
well, but it is not as easy as swapping the calls :-( . Essentially,
ActivateContext has to be called before the fbo setup, due to multithreading
concerns. On the other hand, some things ActivateContext does fail if an fbo
is active, so fbos must be set before activatecontext. Essentially we'll have
to move fbo setup into ActivateContext, but this has some implications on
multiple render targets and depth stencil swapping which need more
investigation. OpenGL driver limitations play a role here as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20071215/3cd80dd2/attachment.pgp
More information about the wine-devel
mailing list