diff options
author | Brian Paul <[email protected]> | 2001-03-26 19:42:40 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-03-26 19:42:40 +0000 |
commit | 2bb04cad14f5edd9e2657a1122ceeb1fb468f4a9 (patch) | |
tree | 3ccdd22150911fffac3a40a069c8a29b043cb0db /src/mesa/main/texstate.c | |
parent | 425fea1c346438f1c60a768514e74f655f05417a (diff) |
added GL_ARB_texture_border_clamp
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r-- | src/mesa/main/texstate.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 438ba6f142f..93d12e71915 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -1,4 +1,4 @@ -/* $Id: texstate.c,v 1.38 2001/03/22 04:54:58 brianp Exp $ */ +/* $Id: texstate.c,v 1.39 2001/03/26 19:42:40 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -63,6 +63,10 @@ #define GL_DOT3_RGBA_ARB 0x86AF #endif +/* XXX this is temporary, until GL/glext.h is updated. */ +#ifndef GL_CLAMP_TO_BORDER_ARB +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif /**********************************************************************/ @@ -722,8 +726,11 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) case GL_TEXTURE_WRAP_S: if (texObj->WrapS == eparam) return; - - if (eparam==GL_CLAMP || eparam==GL_REPEAT || eparam==GL_CLAMP_TO_EDGE) { + if (eparam==GL_CLAMP || + eparam==GL_REPEAT || + eparam==GL_CLAMP_TO_EDGE || + (eparam == GL_CLAMP_TO_BORDER_ARB && + ctx->Extensions.ARB_texture_border_clamp)) { texObj->WrapS = eparam; } else { @@ -734,8 +741,11 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) case GL_TEXTURE_WRAP_T: if (texObj->WrapT == eparam) return; - - if (eparam==GL_CLAMP || eparam==GL_REPEAT || eparam==GL_CLAMP_TO_EDGE) { + if (eparam==GL_CLAMP || + eparam==GL_REPEAT || + eparam==GL_CLAMP_TO_EDGE || + (eparam == GL_CLAMP_TO_BORDER_ARB && + ctx->Extensions.ARB_texture_border_clamp)) { texObj->WrapT = eparam; } else { @@ -746,8 +756,11 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ) case GL_TEXTURE_WRAP_R_EXT: if (texObj->WrapR == eparam) return; - - if (eparam==GL_CLAMP || eparam==GL_REPEAT || eparam==GL_CLAMP_TO_EDGE) { + if (eparam==GL_CLAMP || + eparam==GL_REPEAT || + eparam==GL_CLAMP_TO_EDGE || + (eparam == GL_CLAMP_TO_BORDER_ARB && + ctx->Extensions.ARB_texture_border_clamp)) { texObj->WrapR = eparam; } else { |