wined3d: Store the number of aux buffers in the context.
This commit is contained in:
parent
71e9455b73
commit
67e0943ba3
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -620,6 +620,7 @@ struct WineD3DContext {
|
|||
HDC hdc;
|
||||
HPBUFFERARB pbuffer;
|
||||
BOOL isPBuffer;
|
||||
GLint aux_buffers;
|
||||
};
|
||||
|
||||
typedef enum ContextUsage {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue