| 1 |
/** |
| 2 |
* \file texstate.h |
| 3 |
* Texture state management. |
| 4 |
*/ |
| 5 |
|
| 6 |
/* |
| 7 |
* Mesa 3-D graphics library |
| 8 |
* Version: 5.1 |
| 9 |
* |
| 10 |
* Copyright (C) 1999-2002 Brian Paul All Rights Reserved. |
| 11 |
* |
| 12 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 13 |
* copy of this software and associated documentation files (the "Software"), |
| 14 |
* to deal in the Software without restriction, including without limitation |
| 15 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 16 |
* and/or sell copies of the Software, and to permit persons to whom the |
| 17 |
* Software is furnished to do so, subject to the following conditions: |
| 18 |
* |
| 19 |
* The above copyright notice and this permission notice shall be included |
| 20 |
* in all copies or substantial portions of the Software. |
| 21 |
* |
| 22 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 23 |
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 24 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 25 |
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
| 26 |
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 27 |
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 28 |
*/ |
| 29 |
|
| 30 |
|
| 31 |
#ifndef TEXSTATE_H |
| 32 |
#define TEXSTATE_H |
| 33 |
|
| 34 |
|
| 35 |
#include "mtypes.h" |
| 36 |
|
| 37 |
|
| 38 |
extern void |
| 39 |
_mesa_copy_texture_state( const GLcontext *src, GLcontext *dst ); |
| 40 |
|
| 41 |
extern void |
| 42 |
_mesa_print_texunit_state( GLcontext *ctx, GLuint unit ); |
| 43 |
|
| 44 |
|
| 45 |
/** |
| 46 |
* \name Called from API |
| 47 |
*/ |
| 48 |
/*@{*/ |
| 49 |
|
| 50 |
extern void GLAPIENTRY |
| 51 |
_mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); |
| 52 |
|
| 53 |
extern void GLAPIENTRY |
| 54 |
_mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params ); |
| 55 |
|
| 56 |
extern void GLAPIENTRY |
| 57 |
_mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); |
| 58 |
|
| 59 |
extern void GLAPIENTRY |
| 60 |
_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); |
| 61 |
|
| 62 |
extern void GLAPIENTRY |
| 63 |
_mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ); |
| 64 |
|
| 65 |
extern void GLAPIENTRY |
| 66 |
_mesa_GetTexLevelParameterfv( GLenum target, GLint level, |
| 67 |
GLenum pname, GLfloat *params ); |
| 68 |
|
| 69 |
extern void GLAPIENTRY |
| 70 |
_mesa_GetTexLevelParameteriv( GLenum target, GLint level, |
| 71 |
GLenum pname, GLint *params ); |
| 72 |
|
| 73 |
extern void GLAPIENTRY |
| 74 |
_mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params ); |
| 75 |
|
| 76 |
extern void GLAPIENTRY |
| 77 |
_mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ); |
| 78 |
|
| 79 |
|
| 80 |
extern void GLAPIENTRY |
| 81 |
_mesa_TexEnvf( GLenum target, GLenum pname, GLfloat param ); |
| 82 |
|
| 83 |
extern void GLAPIENTRY |
| 84 |
_mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ); |
| 85 |
|
| 86 |
extern void GLAPIENTRY |
| 87 |
_mesa_TexEnvi( GLenum target, GLenum pname, GLint param ); |
| 88 |
|
| 89 |
extern void GLAPIENTRY |
| 90 |
_mesa_TexEnviv( GLenum target, GLenum pname, const GLint *param ); |
| 91 |
|
| 92 |
|
| 93 |
extern void GLAPIENTRY |
| 94 |
_mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params ); |
| 95 |
|
| 96 |
extern void GLAPIENTRY |
| 97 |
_mesa_TexParameterf( GLenum target, GLenum pname, GLfloat param ); |
| 98 |
|
| 99 |
|
| 100 |
extern void GLAPIENTRY |
| 101 |
_mesa_TexParameteri( GLenum target, GLenum pname, GLint param ); |
| 102 |
|
| 103 |
extern void GLAPIENTRY |
| 104 |
_mesa_TexParameteriv( GLenum target, GLenum pname, const GLint *params ); |
| 105 |
|
| 106 |
|
| 107 |
extern void GLAPIENTRY |
| 108 |
_mesa_TexGend( GLenum coord, GLenum pname, GLdouble param ); |
| 109 |
|
| 110 |
extern void GLAPIENTRY |
| 111 |
_mesa_TexGendv( GLenum coord, GLenum pname, const GLdouble *params ); |
| 112 |
|
| 113 |
extern void GLAPIENTRY |
| 114 |
_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ); |
| 115 |
|
| 116 |
extern void GLAPIENTRY |
| 117 |
_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); |
| 118 |
|
| 119 |
extern void GLAPIENTRY |
| 120 |
_mesa_TexGeni( GLenum coord, GLenum pname, GLint param ); |
| 121 |
|
| 122 |
extern void GLAPIENTRY |
| 123 |
_mesa_TexGeniv( GLenum coord, GLenum pname, const GLint *params ); |
| 124 |
|
| 125 |
|
| 126 |
/* |
| 127 |
* GL_ARB_multitexture |
| 128 |
*/ |
| 129 |
extern void GLAPIENTRY |
| 130 |
_mesa_ActiveTextureARB( GLenum target ); |
| 131 |
|
| 132 |
extern void GLAPIENTRY |
| 133 |
_mesa_ClientActiveTextureARB( GLenum target ); |
| 134 |
|
| 135 |
|
| 136 |
/* |
| 137 |
* Pixel Texture Extensions |
| 138 |
*/ |
| 139 |
|
| 140 |
extern void GLAPIENTRY |
| 141 |
_mesa_PixelTexGenSGIX(GLenum mode); |
| 142 |
|
| 143 |
extern void GLAPIENTRY |
| 144 |
_mesa_PixelTexGenParameterfSGIS(GLenum target, GLfloat value); |
| 145 |
|
| 146 |
#ifdef VMS |
| 147 |
#define _mesa_PixelTexGenParameterfvSGIS _mesa_PixelTexGenParameterfv |
| 148 |
#endif |
| 149 |
extern void GLAPIENTRY |
| 150 |
_mesa_PixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value); |
| 151 |
|
| 152 |
extern void GLAPIENTRY |
| 153 |
_mesa_PixelTexGenParameteriSGIS(GLenum target, GLint value); |
| 154 |
|
| 155 |
#ifdef VMS |
| 156 |
#define _mesa_PixelTexGenParameterivSGIS _mesa_PixelTexGenParameteriv |
| 157 |
#endif |
| 158 |
extern void GLAPIENTRY |
| 159 |
_mesa_PixelTexGenParameterivSGIS(GLenum target, const GLint *value); |
| 160 |
|
| 161 |
#ifdef VMS |
| 162 |
#define _mesa_GetPixelTexGenParameterfvSGIS _mesa_GetPixelTexGenParameterfv |
| 163 |
#endif |
| 164 |
extern void GLAPIENTRY |
| 165 |
_mesa_GetPixelTexGenParameterfvSGIS(GLenum target, GLfloat *value); |
| 166 |
|
| 167 |
#ifdef VMS |
| 168 |
#define _mesa_GetPixelTexGenParameterivSGIS _mesa_GetPixelTexGenParameteriv |
| 169 |
#endif |
| 170 |
extern void GLAPIENTRY |
| 171 |
_mesa_GetPixelTexGenParameterivSGIS(GLenum target, GLint *value); |
| 172 |
|
| 173 |
/*@}*/ |
| 174 |
|
| 175 |
|
| 176 |
/** |
| 177 |
* \name Initialization, state maintenance |
| 178 |
*/ |
| 179 |
/*@{*/ |
| 180 |
|
| 181 |
extern void |
| 182 |
_mesa_update_texture( GLcontext *ctx, GLuint new_state ); |
| 183 |
|
| 184 |
extern GLboolean |
| 185 |
_mesa_init_texture( GLcontext *ctx ); |
| 186 |
|
| 187 |
extern void |
| 188 |
_mesa_free_texture_data( GLcontext *ctx ); |
| 189 |
|
| 190 |
/*@}*/ |
| 191 |
|
| 192 |
#endif |