diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index d20f5f20109..fb965847acb 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -362,6 +362,9 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar } ENTER_GL(); + + glGetIntegerv(GL_AUX_BUFFERS, &ret->aux_buffers); + TRACE("Setting up the screen\n"); /* Clear the screen */ glClearColor(1.0, 0.0, 0.0, 0.0); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c5944603466..8e1e24af740 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2157,7 +2157,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR case ORM_BACKBUFFER: { - if(GL_LIMITS(aux_buffers) > 0) { + if(This->activeContext->aux_buffers > 0) { TRACE("Using auxilliary buffer for offscreen rendering\n"); This->offscreenBuffer = GL_AUX0; } else { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 4a9bbedc55f..320456c38c8 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -724,10 +724,6 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { gl_info->max_pointsize = gl_floatv[1]; TRACE_(d3d_caps)("Maximum point size support - max point size=%f\n", gl_floatv[1]); - glGetIntegerv(GL_AUX_BUFFERS, &gl_max); - gl_info->max_aux_buffers = gl_max; - TRACE_(d3d_caps)("Offscreen rendering support - number of aux buffers=%d\n", gl_max); - /* Parse the gl supported features, in theory enabling parts of our code appropriately */ GL_Extensions = (const char *) glGetString(GL_EXTENSIONS); TRACE_(d3d_caps)("GL_Extensions reported:\n"); diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 3eeaaa34d41..90a05d115db 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2757,10 +2757,10 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine /* Try to use an aux buffer for drawing the rectangle. This way it doesn't need restoring. * This way we don't have to wait for the 2nd readback to finish to leave this function. */ - if(GL_LIMITS(aux_buffers) >= 2) { + if(myDevice->activeContext->aux_buffers >= 2) { /* Got more than one aux buffer? Use the 2nd aux buffer */ drawBuffer = GL_AUX1; - } else if((swapchain || myDevice->offscreenBuffer == GL_BACK) && GL_LIMITS(aux_buffers) >= 1) { + } else if((swapchain || myDevice->offscreenBuffer == GL_BACK) && myDevice->activeContext->aux_buffers >= 1) { /* Only one aux buffer, but it isn't used (Onscreen rendering, or non-aux orm)? Use it! */ drawBuffer = GL_AUX0; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 652d86df40e..19ad58d9bf0 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -620,6 +620,7 @@ struct WineD3DContext { HDC hdc; HPBUFFERARB pbuffer; BOOL isPBuffer; + GLint aux_buffers; }; typedef enum ContextUsage { diff --git a/include/wine/wined3d_gl.h b/include/wine/wined3d_gl.h index 43d82e070f5..02432dbc0c8 100644 --- a/include/wine/wined3d_gl.h +++ b/include/wine/wined3d_gl.h @@ -3824,7 +3824,6 @@ typedef struct _WineD3D_GL_Info { float max_pointsize, max_pointsizemin; UINT max_blends; UINT max_anisotropy; - UINT max_aux_buffers; UINT max_glsl_varyings; float max_shininess;