aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Reveman <[email protected]>2006-04-11 12:21:48 +0000
committerDavid Reveman <[email protected]>2006-04-11 12:21:48 +0000
commitba23f699f03e45a7519cb41cc853deba686ff8d9 (patch)
treee6426b2c7c47e82fc95caf22fb9d148245978119
parentea2b71106178280903935f784de8abdabd1ab50f (diff)
FBConfig support for EXT_tfp
-rw-r--r--include/GL/internal/glcore.h18
-rw-r--r--src/glx/x11/glxext.c15
-rw-r--r--src/mesa/drivers/dri/common/glcontextmodes.c36
3 files changed, 68 insertions, 1 deletions
diff --git a/include/GL/internal/glcore.h b/include/GL/internal/glcore.h
index 48748d91e8f..b2224b753ec 100644
--- a/include/GL/internal/glcore.h
+++ b/include/GL/internal/glcore.h
@@ -137,6 +137,13 @@ typedef struct __GLcontextModesRec {
GLint swapMethod;
GLint screen;
+
+ /* EXT_texture_from_pixmap */
+ GLint bindToTextureRgb;
+ GLint bindToTextureRgba;
+ GLint bindToMipmapTexture;
+ GLint bindToTextureTargets;
+ GLint yInverted;
} __GLcontextModes;
/* Several fields of __GLcontextModes can take these as values. Since
@@ -166,6 +173,17 @@ typedef struct __GLcontextModesRec {
#define GLX_PIXMAP_BIT 0x00000002
#define GLX_PBUFFER_BIT 0x00000004
+#define GLX_Y_INVERTED_EXT 0x6009
+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x600A
+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x600B
+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x600C
+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x600D
+
+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
+
+
/************************************************************************/
/*
diff --git a/src/glx/x11/glxext.c b/src/glx/x11/glxext.c
index 14d5ffa4f96..d687a6f5ba9 100644
--- a/src/glx/x11/glxext.c
+++ b/src/glx/x11/glxext.c
@@ -595,6 +595,21 @@ __glXInitializeVisualConfigFromTags( __GLcontextModes *config, int count,
case GLX_SAMPLES_SGIS:
config->samples = *bp++;
break;
+ case GLX_BIND_TO_TEXTURE_RGB_EXT:
+ config->bindToTextureRgb = *bp++;
+ break;
+ case GLX_BIND_TO_TEXTURE_RGBA_EXT:
+ config->bindToTextureRgba = *bp++;
+ break;
+ case GLX_BIND_TO_MIPMAP_TEXTURE_EXT:
+ config->bindToMipmapTexture = *bp++;
+ break;
+ case GLX_BIND_TO_TEXTURE_TARGETS_EXT:
+ config->bindToTextureTargets = *bp++;
+ break;
+ case GLX_Y_INVERTED_EXT:
+ config->yInverted = *bp++;
+ break;
case None:
i = count;
break;
diff --git a/src/mesa/drivers/dri/common/glcontextmodes.c b/src/mesa/drivers/dri/common/glcontextmodes.c
index f9e6715fcd2..edb04463f61 100644
--- a/src/mesa/drivers/dri/common/glcontextmodes.c
+++ b/src/mesa/drivers/dri/common/glcontextmodes.c
@@ -182,6 +182,15 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
mode->transparentIndex = config->transparentIndex;
mode->swapMethod = GLX_SWAP_UNDEFINED_OML;
+
+ mode->bindToTextureRgb = (mode->rgbMode) ? GL_TRUE : GL_FALSE;
+ mode->bindToTextureRgba = (mode->rgbMode && mode->alphaBits) ?
+ GL_TRUE : GL_FALSE;
+ mode->bindToMipmapTexture = mode->rgbMode ? GL_TRUE : GL_FALSE;
+ mode->bindToTextureTargets = mode->rgbMode ?
+ GLX_TEXTURE_1D_BIT_EXT | GLX_TEXTURE_2D_BIT_EXT |
+ GLX_TEXTURE_RECTANGLE_BIT_EXT : 0;
+ mode->yInverted = GL_FALSE;
}
@@ -313,6 +322,21 @@ _gl_get_context_mode_data(const __GLcontextModes *mode, int attribute,
case GLX_SAMPLES_SGIS:
*value_return = mode->samples;
return 0;
+ case GLX_BIND_TO_TEXTURE_RGB_EXT:
+ *value_return = mode->bindToTextureRgb;
+ return 0;
+ case GLX_BIND_TO_TEXTURE_RGBA_EXT:
+ *value_return = mode->bindToTextureRgba;
+ return 0;
+ case GLX_BIND_TO_MIPMAP_TEXTURE_EXT:
+ *value_return = mode->bindToMipmapTexture;
+ return 0;
+ case GLX_BIND_TO_TEXTURE_TARGETS_EXT:
+ *value_return = mode->bindToTextureTargets;
+ return 0;
+ case GLX_Y_INVERTED_EXT:
+ *value_return = mode->yInverted;
+ return 0;
/* Applications are NOT allowed to query GLX_VISUAL_SELECT_GROUP_SGIX.
* It is ONLY for communication between the GLX client and the GLX
@@ -383,6 +407,11 @@ _gl_context_modes_create( unsigned count, size_t minimum_size )
(*next)->xRenderable = GLX_DONT_CARE;
(*next)->fbconfigID = GLX_DONT_CARE;
(*next)->swapMethod = GLX_SWAP_UNDEFINED_OML;
+ (*next)->bindToTextureRgb = GLX_DONT_CARE;
+ (*next)->bindToTextureRgba = GLX_DONT_CARE;
+ (*next)->bindToMipmapTexture = GLX_DONT_CARE;
+ (*next)->bindToTextureTargets = 0;
+ (*next)->yInverted = GLX_DONT_CARE;
next = & ((*next)->next);
}
@@ -495,5 +524,10 @@ _gl_context_modes_are_same( const __GLcontextModes * a,
(a->maxPbufferPixels == b->maxPbufferPixels) &&
(a->optimalPbufferWidth == b->optimalPbufferWidth) &&
(a->optimalPbufferHeight == b->optimalPbufferHeight) &&
- (a->swapMethod == b->swapMethod) );
+ (a->swapMethod == b->swapMethod) &&
+ (a->bindToTextureRgb == b->bindToTextureRgb) &&
+ (a->bindToTextureRgba == b->bindToTextureRgba) &&
+ (a->bindToMipmapTexture == b->bindToMipmapTexture) &&
+ (a->bindToTextureTargets == b->bindToTextureTargets) &&
+ (a->yInverted == b->yInverted) );
}