initial work for GL_ARB_texture_compression
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: config.h,v 1.13 2000/05/07 20:41:30 brianp Exp $ */
|
/* $Id: config.h,v 1.14 2000/05/23 20:10:49 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -122,6 +122,10 @@
|
|||||||
#define MAX_CONVOLUTION_WIDTH 5
|
#define MAX_CONVOLUTION_WIDTH 5
|
||||||
#define MAX_CONVOLUTION_HEIGHT 5
|
#define MAX_CONVOLUTION_HEIGHT 5
|
||||||
|
|
||||||
|
/* GL_ARB_texture_compression */
|
||||||
|
#define MAX_COMPRESSED_TEXTURE_FORMATS 25
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa-specific parameters
|
* Mesa-specific parameters
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: context.c,v 1.66 2000/05/22 16:33:20 brianp Exp $ */
|
/* $Id: context.c,v 1.67 2000/05/23 20:10:49 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -722,6 +722,7 @@ init_attrib_groups( GLcontext *ctx )
|
|||||||
ctx->Const.MaxColorTableSize = MAX_COLOR_TABLE_SIZE;
|
ctx->Const.MaxColorTableSize = MAX_COLOR_TABLE_SIZE;
|
||||||
ctx->Const.MaxConvolutionWidth = MAX_CONVOLUTION_WIDTH;
|
ctx->Const.MaxConvolutionWidth = MAX_CONVOLUTION_WIDTH;
|
||||||
ctx->Const.MaxConvolutionHeight = MAX_CONVOLUTION_HEIGHT;
|
ctx->Const.MaxConvolutionHeight = MAX_CONVOLUTION_HEIGHT;
|
||||||
|
ctx->Const.NumCompressedTextureFormats = 0;
|
||||||
|
|
||||||
/* Modelview matrix */
|
/* Modelview matrix */
|
||||||
gl_matrix_ctr( &ctx->ModelView );
|
gl_matrix_ctr( &ctx->ModelView );
|
||||||
@@ -900,11 +901,12 @@ init_attrib_groups( GLcontext *ctx )
|
|||||||
ctx->Hint.LineSmooth = GL_DONT_CARE;
|
ctx->Hint.LineSmooth = GL_DONT_CARE;
|
||||||
ctx->Hint.PolygonSmooth = GL_DONT_CARE;
|
ctx->Hint.PolygonSmooth = GL_DONT_CARE;
|
||||||
ctx->Hint.Fog = GL_DONT_CARE;
|
ctx->Hint.Fog = GL_DONT_CARE;
|
||||||
|
|
||||||
ctx->Hint.AllowDrawWin = GL_TRUE;
|
ctx->Hint.AllowDrawWin = GL_TRUE;
|
||||||
ctx->Hint.AllowDrawFrg = GL_TRUE;
|
ctx->Hint.AllowDrawFrg = GL_TRUE;
|
||||||
ctx->Hint.AllowDrawMem = GL_TRUE;
|
ctx->Hint.AllowDrawMem = GL_TRUE;
|
||||||
ctx->Hint.StrictLighting = GL_TRUE;
|
ctx->Hint.StrictLighting = GL_TRUE;
|
||||||
|
ctx->Hint.ClipVolumeClipping = GL_DONT_CARE;
|
||||||
|
ctx->Hint.TextureCompression = GL_DONT_CARE;
|
||||||
|
|
||||||
/* Histogram group */
|
/* Histogram group */
|
||||||
ctx->Histogram.Width = 0;
|
ctx->Histogram.Width = 0;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: dlist.c,v 1.39 2000/05/19 13:12:29 brianp Exp $ */
|
/* $Id: dlist.c,v 1.40 2000/05/23 20:10:49 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -3559,6 +3559,8 @@ static void save_ClientActiveTextureARB( GLenum target )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* GL_ARB_transpose_matrix */
|
||||||
|
|
||||||
static void save_LoadTransposeMatrixdARB( const GLdouble m[16] )
|
static void save_LoadTransposeMatrixdARB( const GLdouble m[16] )
|
||||||
{
|
{
|
||||||
GLdouble tm[16];
|
GLdouble tm[16];
|
||||||
@@ -3606,6 +3608,62 @@ static void save_PixelTexGenSGIX(GLenum mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* GL_ARB_texture_compression */
|
||||||
|
static void
|
||||||
|
save_CompressedTexImage1DARB(GLenum target, GLint level,
|
||||||
|
GLenum internalformat, GLsizei width,
|
||||||
|
GLint border, GLsizei imageSize,
|
||||||
|
const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
save_CompressedTexImage2DARB(GLenum target, GLint level,
|
||||||
|
GLenum internalformat, GLsizei width,
|
||||||
|
GLsizei height, GLint border, GLsizei imageSize,
|
||||||
|
const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
save_CompressedTexImage3DARB(GLenum target, GLint level,
|
||||||
|
GLenum internalformat, GLsizei width,
|
||||||
|
GLsizei height, GLsizei depth, GLint border,
|
||||||
|
GLsizei imageSize, const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
|
||||||
|
GLsizei width, GLenum format,
|
||||||
|
GLsizei imageSize, const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
|
||||||
|
GLint yoffset, GLsizei width, GLsizei height,
|
||||||
|
GLenum format, GLsizei imageSize,
|
||||||
|
const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
|
||||||
|
GLint yoffset, GLint zoffset, GLsizei width,
|
||||||
|
GLsizei height, GLsizei depth, GLenum format,
|
||||||
|
GLsizei imageSize, const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* GL_SGIS_pixel_texture */
|
||||||
|
|
||||||
static void save_PixelTexGenParameteriSGIS(GLenum target, GLint value)
|
static void save_PixelTexGenParameteriSGIS(GLenum target, GLint value)
|
||||||
{
|
{
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
@@ -5181,6 +5239,14 @@ _mesa_init_dlist_table( struct _glapi_table *table )
|
|||||||
table->MultTransposeMatrixdARB = save_MultTransposeMatrixdARB;
|
table->MultTransposeMatrixdARB = save_MultTransposeMatrixdARB;
|
||||||
table->MultTransposeMatrixfARB = save_MultTransposeMatrixfARB;
|
table->MultTransposeMatrixfARB = save_MultTransposeMatrixfARB;
|
||||||
|
|
||||||
|
/* ARB 12. GL_ARB_texture_compression */
|
||||||
|
table->CompressedTexImage3DARB = save_CompressedTexImage3DARB;
|
||||||
|
table->CompressedTexImage2DARB = save_CompressedTexImage2DARB;
|
||||||
|
table->CompressedTexImage1DARB = save_CompressedTexImage1DARB;
|
||||||
|
table->CompressedTexSubImage3DARB = save_CompressedTexSubImage3DARB;
|
||||||
|
table->CompressedTexSubImage2DARB = save_CompressedTexSubImage2DARB;
|
||||||
|
table->CompressedTexSubImage1DARB = save_CompressedTexSubImage1DARB;
|
||||||
|
table->GetCompressedTexImageARB = _mesa_GetCompressedTexImageARB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: extensions.c,v 1.27 2000/05/22 18:46:52 brianp Exp $ */
|
/* $Id: extensions.c,v 1.28 2000/05/23 20:10:49 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -51,6 +51,7 @@ struct extension {
|
|||||||
static struct { int enabled; const char *name; } default_extensions[] = {
|
static struct { int enabled; const char *name; } default_extensions[] = {
|
||||||
{ DEFAULT_OFF, "GL_ARB_imaging" }, /* in progress */
|
{ DEFAULT_OFF, "GL_ARB_imaging" }, /* in progress */
|
||||||
{ DEFAULT_ON, "GL_ARB_multitexture" },
|
{ DEFAULT_ON, "GL_ARB_multitexture" },
|
||||||
|
{ DEFAULT_OFF, "GL_ARB_texture_compression" }, /* in progress */
|
||||||
{ DEFAULT_OFF, "GL_ARB_texture_cube_map" }, /* in progress */
|
{ DEFAULT_OFF, "GL_ARB_texture_cube_map" }, /* in progress */
|
||||||
{ ALWAYS_ENABLED, "GL_ARB_tranpose_matrix" },
|
{ ALWAYS_ENABLED, "GL_ARB_tranpose_matrix" },
|
||||||
{ ALWAYS_ENABLED, "GL_EXT_abgr" },
|
{ ALWAYS_ENABLED, "GL_EXT_abgr" },
|
||||||
@@ -101,6 +102,7 @@ update_extension_flags( GLcontext *ctx )
|
|||||||
ctx->Extensions.HaveTextureLodBias = gl_extension_is_enabled(ctx, "GL_EXT_texture_lod_bias");
|
ctx->Extensions.HaveTextureLodBias = gl_extension_is_enabled(ctx, "GL_EXT_texture_lod_bias");
|
||||||
ctx->Extensions.HaveHpOcclusionTest = gl_extension_is_enabled(ctx, "GL_HP_occlusion_test");
|
ctx->Extensions.HaveHpOcclusionTest = gl_extension_is_enabled(ctx, "GL_HP_occlusion_test");
|
||||||
ctx->Extensions.HaveTextureCubeMap = gl_extension_is_enabled(ctx, "GL_ARB_texture_cube_map");
|
ctx->Extensions.HaveTextureCubeMap = gl_extension_is_enabled(ctx, "GL_ARB_texture_cube_map");
|
||||||
|
ctx->Extensions.HaveTextureCompression = gl_extension_is_enabled(ctx, "GL_ARB_texture_compression");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: get.c,v 1.28 2000/05/23 17:14:49 brianp Exp $ */
|
/* $Id: get.c,v 1.29 2000/05/23 20:10:49 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -974,6 +974,31 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
|
|||||||
gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
|
gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* GL_ARB_texture_compression */
|
||||||
|
case GL_TEXTURE_COMPRESSION_HINT_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
*params = INT_TO_BOOL(ctx->Hint.TextureCompression);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
|
||||||
|
break;
|
||||||
|
case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
*params = INT_TO_BOOL(ctx->Const.NumCompressedTextureFormats);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
|
||||||
|
break;
|
||||||
|
case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
GLuint i;
|
||||||
|
for (i = 0; i < ctx->Const.NumCompressedTextureFormats; i++)
|
||||||
|
params[i] = INT_TO_BOOL(ctx->Const.CompressedTextureFormats[i]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
|
||||||
|
break;
|
||||||
|
|
||||||
/* GL_PGI_misc_hints */
|
/* GL_PGI_misc_hints */
|
||||||
case GL_STRICT_DEPTHFUNC_HINT_PGI:
|
case GL_STRICT_DEPTHFUNC_HINT_PGI:
|
||||||
*params = ENUM_TO_BOOL(GL_NICEST);
|
*params = ENUM_TO_BOOL(GL_NICEST);
|
||||||
@@ -2092,6 +2117,31 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
|
|||||||
gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
|
gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* GL_ARB_texture_compression */
|
||||||
|
case GL_TEXTURE_COMPRESSION_HINT_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
*params = (GLdouble) ctx->Hint.TextureCompression;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
|
||||||
|
break;
|
||||||
|
case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
*params = (GLdouble) ctx->Const.NumCompressedTextureFormats;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
|
||||||
|
break;
|
||||||
|
case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
GLuint i;
|
||||||
|
for (i = 0; i < ctx->Const.NumCompressedTextureFormats; i++)
|
||||||
|
params[i] = (GLdouble) ctx->Const.CompressedTextureFormats[i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
|
||||||
|
break;
|
||||||
|
|
||||||
/* GL_PGI_misc_hints */
|
/* GL_PGI_misc_hints */
|
||||||
case GL_STRICT_DEPTHFUNC_HINT_PGI:
|
case GL_STRICT_DEPTHFUNC_HINT_PGI:
|
||||||
*params = ENUM_TO_DOUBLE(GL_NICEST);
|
*params = ENUM_TO_DOUBLE(GL_NICEST);
|
||||||
@@ -3209,6 +3259,31 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
|
|||||||
gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
|
gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* GL_ARB_texture_compression */
|
||||||
|
case GL_TEXTURE_COMPRESSION_HINT_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
*params = (GLfloat) ctx->Hint.TextureCompression;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
|
||||||
|
break;
|
||||||
|
case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
*params = (GLfloat) ctx->Const.NumCompressedTextureFormats;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
|
||||||
|
break;
|
||||||
|
case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
GLuint i;
|
||||||
|
for (i = 0; i < ctx->Const.NumCompressedTextureFormats; i++)
|
||||||
|
params[i] = (GLfloat) ctx->Const.CompressedTextureFormats[i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
|
||||||
|
break;
|
||||||
|
|
||||||
/* GL_PGI_misc_hints */
|
/* GL_PGI_misc_hints */
|
||||||
case GL_STRICT_DEPTHFUNC_HINT_PGI:
|
case GL_STRICT_DEPTHFUNC_HINT_PGI:
|
||||||
*params = ENUM_TO_FLOAT(GL_NICEST);
|
*params = ENUM_TO_FLOAT(GL_NICEST);
|
||||||
@@ -4300,6 +4375,31 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
|
|||||||
gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
|
gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* GL_ARB_texture_compression */
|
||||||
|
case GL_TEXTURE_COMPRESSION_HINT_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
*params = (GLint) ctx->Hint.TextureCompression;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
|
||||||
|
break;
|
||||||
|
case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
*params = (GLint) ctx->Const.NumCompressedTextureFormats;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
|
||||||
|
break;
|
||||||
|
case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
GLuint i;
|
||||||
|
for (i = 0; i < ctx->Const.NumCompressedTextureFormats; i++)
|
||||||
|
params[i] = (GLint) ctx->Const.CompressedTextureFormats[i];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
|
||||||
|
break;
|
||||||
|
|
||||||
/* GL_PGI_misc_hints */
|
/* GL_PGI_misc_hints */
|
||||||
case GL_STRICT_DEPTHFUNC_HINT_PGI:
|
case GL_STRICT_DEPTHFUNC_HINT_PGI:
|
||||||
*params = (GL_NICEST);
|
*params = (GL_NICEST);
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: hint.c,v 1.3 2000/04/10 15:52:26 brianp Exp $ */
|
/* $Id: hint.c,v 1.4 2000/05/23 20:10:50 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -121,13 +121,23 @@ _mesa_try_Hint( GLcontext *ctx, GLenum target, GLenum mode )
|
|||||||
case GL_NATIVE_GRAPHICS_HANDLE_PGI:
|
case GL_NATIVE_GRAPHICS_HANDLE_PGI:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* GL_EXT_clip_volume_hint */
|
/* GL_EXT_clip_volume_hint */
|
||||||
case GL_CLIP_VOLUME_CLIPPING_HINT_EXT:
|
case GL_CLIP_VOLUME_CLIPPING_HINT_EXT:
|
||||||
ctx->Hint.ClipVolumeClipping = mode;
|
ctx->Hint.ClipVolumeClipping = mode;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* GL_ARB_texture_compression */
|
||||||
|
case GL_TEXTURE_COMPRESSION_HINT_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
ctx->Hint.TextureCompression = mode;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glHint(target)");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
gl_error( ctx, GL_INVALID_ENUM, "glHint(target)" );
|
gl_error(ctx, GL_INVALID_ENUM, "glHint(target)");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: state.c,v 1.12 2000/05/10 22:36:05 brianp Exp $ */
|
/* $Id: state.c,v 1.13 2000/05/23 20:10:50 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -641,9 +641,20 @@ _mesa_init_exec_table(struct _glapi_table *exec)
|
|||||||
exec->LoadTransposeMatrixfARB = _mesa_LoadTransposeMatrixfARB;
|
exec->LoadTransposeMatrixfARB = _mesa_LoadTransposeMatrixfARB;
|
||||||
exec->MultTransposeMatrixdARB = _mesa_MultTransposeMatrixdARB;
|
exec->MultTransposeMatrixdARB = _mesa_MultTransposeMatrixdARB;
|
||||||
exec->MultTransposeMatrixfARB = _mesa_MultTransposeMatrixfARB;
|
exec->MultTransposeMatrixfARB = _mesa_MultTransposeMatrixfARB;
|
||||||
|
|
||||||
|
/* ARB 12. GL_ARB_texture_compression */
|
||||||
|
exec->CompressedTexImage3DARB = _mesa_CompressedTexImage3DARB;
|
||||||
|
exec->CompressedTexImage2DARB = _mesa_CompressedTexImage2DARB;
|
||||||
|
exec->CompressedTexImage1DARB = _mesa_CompressedTexImage1DARB;
|
||||||
|
exec->CompressedTexSubImage3DARB = _mesa_CompressedTexSubImage3DARB;
|
||||||
|
exec->CompressedTexSubImage2DARB = _mesa_CompressedTexSubImage2DARB;
|
||||||
|
exec->CompressedTexSubImage1DARB = _mesa_CompressedTexSubImage1DARB;
|
||||||
|
exec->GetCompressedTexImageARB = _mesa_GetCompressedTexImageARB;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
/***** State update logic *****/
|
/***** State update logic *****/
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
@@ -2369,3 +2369,63 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_CompressedTexImage1DARB(GLenum target, GLint level,
|
||||||
|
GLenum internalformat, GLsizei width,
|
||||||
|
GLint border, GLsizei imageSize,
|
||||||
|
const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_CompressedTexImage2DARB(GLenum target, GLint level,
|
||||||
|
GLenum internalformat, GLsizei width,
|
||||||
|
GLsizei height, GLint border, GLsizei imageSize,
|
||||||
|
const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_CompressedTexImage3DARB(GLenum target, GLint level,
|
||||||
|
GLenum internalformat, GLsizei width,
|
||||||
|
GLsizei height, GLsizei depth, GLint border,
|
||||||
|
GLsizei imageSize, const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
|
||||||
|
GLsizei width, GLenum format,
|
||||||
|
GLsizei imageSize, const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
|
||||||
|
GLint yoffset, GLsizei width, GLsizei height,
|
||||||
|
GLenum format, GLsizei imageSize,
|
||||||
|
const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
|
||||||
|
GLint yoffset, GLint zoffset, GLsizei width,
|
||||||
|
GLsizei height, GLsizei depth, GLenum format,
|
||||||
|
GLsizei imageSize, const GLvoid *data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_mesa_GetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: teximage.h,v 1.8 2000/05/23 17:14:49 brianp Exp $ */
|
/* $Id: teximage.h,v 1.9 2000/05/23 20:10:50 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -145,5 +145,47 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
|
|||||||
GLint xoffset, GLint yoffset, GLint zoffset,
|
GLint xoffset, GLint yoffset, GLint zoffset,
|
||||||
GLint x, GLint y, GLsizei width, GLsizei height );
|
GLint x, GLint y, GLsizei width, GLsizei height );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_CompressedTexImage1DARB(GLenum target, GLint level,
|
||||||
|
GLenum internalformat, GLsizei width,
|
||||||
|
GLint border, GLsizei imageSize,
|
||||||
|
const GLvoid *data);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_CompressedTexImage2DARB(GLenum target, GLint level,
|
||||||
|
GLenum internalformat, GLsizei width,
|
||||||
|
GLsizei height, GLint border, GLsizei imageSize,
|
||||||
|
const GLvoid *data);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_CompressedTexImage3DARB(GLenum target, GLint level,
|
||||||
|
GLenum internalformat, GLsizei width,
|
||||||
|
GLsizei height, GLsizei depth, GLint border,
|
||||||
|
GLsizei imageSize, const GLvoid *data);
|
||||||
|
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
|
||||||
|
GLsizei width, GLenum format,
|
||||||
|
GLsizei imageSize, const GLvoid *data);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
|
||||||
|
GLint yoffset, GLsizei width, GLsizei height,
|
||||||
|
GLenum format, GLsizei imageSize,
|
||||||
|
const GLvoid *data);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
|
||||||
|
GLint yoffset, GLint zoffset, GLsizei width,
|
||||||
|
GLsizei height, GLsizei depth, GLenum format,
|
||||||
|
GLsizei imageSize, const GLvoid *data);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
_mesa_GetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: texstate.c,v 1.12 2000/05/23 17:14:49 brianp Exp $ */
|
/* $Id: texstate.c,v 1.13 2000/05/23 20:10:50 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -463,6 +463,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
|
|||||||
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
|
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
|
||||||
const struct gl_texture_image *img = NULL;
|
const struct gl_texture_image *img = NULL;
|
||||||
GLuint dimensions;
|
GLuint dimensions;
|
||||||
|
GLboolean isProxy;
|
||||||
|
|
||||||
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetTexLevelParameter");
|
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetTexLevelParameter");
|
||||||
|
|
||||||
@@ -486,6 +487,11 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isProxy = (target == GL_PROXY_TEXTURE_1D) ||
|
||||||
|
(target == GL_PROXY_TEXTURE_2D) ||
|
||||||
|
(target == GL_PROXY_TEXTURE_3D) ||
|
||||||
|
(target == GL_PROXY_TEXTURE_CUBE_MAP_ARB);
|
||||||
|
|
||||||
switch (pname) {
|
switch (pname) {
|
||||||
case GL_TEXTURE_WIDTH:
|
case GL_TEXTURE_WIDTH:
|
||||||
*params = img->Width;
|
*params = img->Width;
|
||||||
@@ -535,9 +541,31 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
|
|||||||
case GL_TEXTURE_INDEX_SIZE_EXT:
|
case GL_TEXTURE_INDEX_SIZE_EXT:
|
||||||
*params = img->IndexBits;
|
*params = img->IndexBits;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* GL_ARB_texture_compression */
|
||||||
|
case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
if (img->IsCompressed && !isProxy)
|
||||||
|
*params = img->CompressedSize;
|
||||||
|
else
|
||||||
|
gl_error(ctx, GL_INVALID_OPERATION,
|
||||||
|
"glGetTexLevelParameter[if]v(pname)");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
case GL_TEXTURE_COMPRESSED_ARB:
|
||||||
|
if (ctx->Extensions.HaveTextureCompression) {
|
||||||
|
*params = (GLint) img->IsCompressed;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
gl_error( ctx, GL_INVALID_ENUM,
|
gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)");
|
||||||
"glGetTexLevelParameter[if]v(pname)" );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user