wined3d: Get a GL context before creating a PBO.

This commit is contained in:
Stefan Dösinger 2008-08-15 16:45:51 -05:00 committed by Alexandre Julliard
parent ba58adaaf6
commit 6c87a66355
1 changed files with 3 additions and 0 deletions

View File

@ -955,6 +955,9 @@ static void surface_prepare_system_memory(IWineD3DSurfaceImpl *This) {
*/
if(GL_SUPPORT(ARB_PIXEL_BUFFER_OBJECT) && (This->Flags & SFLAG_DYNLOCK) && !(This->Flags & (SFLAG_PBO | SFLAG_CONVERTED | SFLAG_NONPOW2)) && (This->resource.pool != WINED3DPOOL_SYSTEMMEM)) {
GLenum error;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
ENTER_GL();
GL_EXTCALL(glGenBuffersARB(1, &This->pbo));