Commit 6c87a663 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Get a GL context before creating a PBO.

parent ba58adaa
...@@ -955,6 +955,9 @@ static void surface_prepare_system_memory(IWineD3DSurfaceImpl *This) { ...@@ -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)) { 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; GLenum error;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
ENTER_GL(); ENTER_GL();
GL_EXTCALL(glGenBuffersARB(1, &This->pbo)); GL_EXTCALL(glGenBuffersARB(1, &This->pbo));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment