Stefan Dösinger : wined3d: Store the number of aux buffers in the gl limits structure.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Mar 6 16:13:19 CST 2007
Module: wine
Branch: master
Commit: 5f05906f3b6a1ccb3e4673b2901aed15a3a435e4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5f05906f3b6a1ccb3e4673b2901aed15a3a435e4
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Sun Mar 4 23:29:28 2007 +0100
wined3d: Store the number of aux buffers in the gl limits structure.
---
dlls/wined3d/device.c | 5 +----
dlls/wined3d/directx.c | 4 ++++
include/wine/wined3d_gl.h | 1 +
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index af28e96..6a78b23 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1730,10 +1730,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface, WINED3DPR
case ORM_BACKBUFFER:
{
- GLint auxBuffers;
- glGetIntegerv(GL_AUX_BUFFERS, &auxBuffers);
- TRACE("Got %d aux buffers\n", auxBuffers);
- if(auxBuffers > 0) {
+ if(GL_LIMITS(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 d3ce06f..c464fbe 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -546,6 +546,10 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display) {
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/include/wine/wined3d_gl.h b/include/wine/wined3d_gl.h
index 7af8c98..4f85461 100644
--- a/include/wine/wined3d_gl.h
+++ b/include/wine/wined3d_gl.h
@@ -1875,6 +1875,7 @@ typedef struct _WineD3D_GL_Info {
float max_pointsize;
UINT max_blends;
UINT max_anisotropy;
+ UINT max_aux_buffers;
unsigned max_vshader_constantsF;
unsigned max_pshader_constantsF;
More information about the wine-cvs
mailing list