Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygentexgen.c
Go to the documentation of this file.
00001 /* 00002 * Mesa 3-D graphics library 00003 * Version: 7.1 00004 * 00005 * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. 00006 * 00007 * Permission is hereby granted, free of charge, to any person obtaining a 00008 * copy of this software and associated documentation files (the "Software"), 00009 * to deal in the Software without restriction, including without limitation 00010 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00011 * and/or sell copies of the Software, and to permit persons to whom the 00012 * Software is furnished to do so, subject to the following conditions: 00013 * 00014 * The above copyright notice and this permission notice shall be included 00015 * in all copies or substantial portions of the Software. 00016 * 00017 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00018 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00019 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00020 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00021 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00022 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00023 */ 00024 00032 #include "main/glheader.h" 00033 #include "main/context.h" 00034 #include "main/enums.h" 00035 #include "main/macros.h" 00036 #include "main/texgen.h" 00037 #include "math/m_xform.h" 00038 00039 00040 00041 void GLAPIENTRY 00042 _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params ) 00043 { 00044 GET_CURRENT_CONTEXT(ctx); 00045 struct gl_texture_unit *texUnit; 00046 ASSERT_OUTSIDE_BEGIN_END(ctx); 00047 00048 if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE)) 00049 _mesa_debug(ctx, "glTexGen %s %s %.1f(%s)...\n", 00050 _mesa_lookup_enum_by_nr(coord), 00051 _mesa_lookup_enum_by_nr(pname), 00052 *params, 00053 _mesa_lookup_enum_by_nr((GLenum) (GLint) *params)); 00054 00055 if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { 00056 _mesa_error(ctx, GL_INVALID_OPERATION, "glTexGen(current unit)"); 00057 return; 00058 } 00059 00060 texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; 00061 00062 switch (coord) { 00063 case GL_S: 00064 if (pname==GL_TEXTURE_GEN_MODE) { 00065 GLenum mode = (GLenum) (GLint) *params; 00066 GLbitfield bits; 00067 switch (mode) { 00068 case GL_OBJECT_LINEAR: 00069 bits = TEXGEN_OBJ_LINEAR; 00070 break; 00071 case GL_EYE_LINEAR: 00072 bits = TEXGEN_EYE_LINEAR; 00073 break; 00074 case GL_REFLECTION_MAP_NV: 00075 bits = TEXGEN_REFLECTION_MAP_NV; 00076 break; 00077 case GL_NORMAL_MAP_NV: 00078 bits = TEXGEN_NORMAL_MAP_NV; 00079 break; 00080 case GL_SPHERE_MAP: 00081 bits = TEXGEN_SPHERE_MAP; 00082 break; 00083 default: 00084 _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); 00085 return; 00086 } 00087 if (texUnit->GenModeS == mode) 00088 return; 00089 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00090 texUnit->GenModeS = mode; 00091 texUnit->_GenBitS = bits; 00092 } 00093 else if (pname==GL_OBJECT_PLANE) { 00094 if (TEST_EQ_4V(texUnit->ObjectPlaneS, params)) 00095 return; 00096 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00097 COPY_4FV(texUnit->ObjectPlaneS, params); 00098 } 00099 else if (pname==GL_EYE_PLANE) { 00100 GLfloat tmp[4]; 00101 /* Transform plane equation by the inverse modelview matrix */ 00102 if (_math_matrix_is_dirty(ctx->ModelviewMatrixStack.Top)) { 00103 _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); 00104 } 00105 _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv ); 00106 if (TEST_EQ_4V(texUnit->EyePlaneS, tmp)) 00107 return; 00108 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00109 COPY_4FV(texUnit->EyePlaneS, tmp); 00110 } 00111 else { 00112 _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); 00113 return; 00114 } 00115 break; 00116 case GL_T: 00117 if (pname==GL_TEXTURE_GEN_MODE) { 00118 GLenum mode = (GLenum) (GLint) *params; 00119 GLbitfield bitt; 00120 switch (mode) { 00121 case GL_OBJECT_LINEAR: 00122 bitt = TEXGEN_OBJ_LINEAR; 00123 break; 00124 case GL_EYE_LINEAR: 00125 bitt = TEXGEN_EYE_LINEAR; 00126 break; 00127 case GL_REFLECTION_MAP_NV: 00128 bitt = TEXGEN_REFLECTION_MAP_NV; 00129 break; 00130 case GL_NORMAL_MAP_NV: 00131 bitt = TEXGEN_NORMAL_MAP_NV; 00132 break; 00133 case GL_SPHERE_MAP: 00134 bitt = TEXGEN_SPHERE_MAP; 00135 break; 00136 default: 00137 _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); 00138 return; 00139 } 00140 if (texUnit->GenModeT == mode) 00141 return; 00142 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00143 texUnit->GenModeT = mode; 00144 texUnit->_GenBitT = bitt; 00145 } 00146 else if (pname==GL_OBJECT_PLANE) { 00147 if (TEST_EQ_4V(texUnit->ObjectPlaneT, params)) 00148 return; 00149 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00150 COPY_4FV(texUnit->ObjectPlaneT, params); 00151 } 00152 else if (pname==GL_EYE_PLANE) { 00153 GLfloat tmp[4]; 00154 /* Transform plane equation by the inverse modelview matrix */ 00155 if (_math_matrix_is_dirty(ctx->ModelviewMatrixStack.Top)) { 00156 _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); 00157 } 00158 _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv ); 00159 if (TEST_EQ_4V(texUnit->EyePlaneT, tmp)) 00160 return; 00161 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00162 COPY_4FV(texUnit->EyePlaneT, tmp); 00163 } 00164 else { 00165 _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); 00166 return; 00167 } 00168 break; 00169 case GL_R: 00170 if (pname==GL_TEXTURE_GEN_MODE) { 00171 GLenum mode = (GLenum) (GLint) *params; 00172 GLbitfield bitr; 00173 switch (mode) { 00174 case GL_OBJECT_LINEAR: 00175 bitr = TEXGEN_OBJ_LINEAR; 00176 break; 00177 case GL_REFLECTION_MAP_NV: 00178 bitr = TEXGEN_REFLECTION_MAP_NV; 00179 break; 00180 case GL_NORMAL_MAP_NV: 00181 bitr = TEXGEN_NORMAL_MAP_NV; 00182 break; 00183 case GL_EYE_LINEAR: 00184 bitr = TEXGEN_EYE_LINEAR; 00185 break; 00186 default: 00187 _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); 00188 return; 00189 } 00190 if (texUnit->GenModeR == mode) 00191 return; 00192 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00193 texUnit->GenModeR = mode; 00194 texUnit->_GenBitR = bitr; 00195 } 00196 else if (pname==GL_OBJECT_PLANE) { 00197 if (TEST_EQ_4V(texUnit->ObjectPlaneR, params)) 00198 return; 00199 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00200 COPY_4FV(texUnit->ObjectPlaneR, params); 00201 } 00202 else if (pname==GL_EYE_PLANE) { 00203 GLfloat tmp[4]; 00204 /* Transform plane equation by the inverse modelview matrix */ 00205 if (_math_matrix_is_dirty(ctx->ModelviewMatrixStack.Top)) { 00206 _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); 00207 } 00208 _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv ); 00209 if (TEST_EQ_4V(texUnit->EyePlaneR, tmp)) 00210 return; 00211 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00212 COPY_4FV(texUnit->EyePlaneR, tmp); 00213 } 00214 else { 00215 _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); 00216 return; 00217 } 00218 break; 00219 case GL_Q: 00220 if (pname==GL_TEXTURE_GEN_MODE) { 00221 GLenum mode = (GLenum) (GLint) *params; 00222 GLbitfield bitq; 00223 switch (mode) { 00224 case GL_OBJECT_LINEAR: 00225 bitq = TEXGEN_OBJ_LINEAR; 00226 break; 00227 case GL_EYE_LINEAR: 00228 bitq = TEXGEN_EYE_LINEAR; 00229 break; 00230 default: 00231 _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" ); 00232 return; 00233 } 00234 if (texUnit->GenModeQ == mode) 00235 return; 00236 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00237 texUnit->GenModeQ = mode; 00238 texUnit->_GenBitQ = bitq; 00239 } 00240 else if (pname==GL_OBJECT_PLANE) { 00241 if (TEST_EQ_4V(texUnit->ObjectPlaneQ, params)) 00242 return; 00243 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00244 COPY_4FV(texUnit->ObjectPlaneQ, params); 00245 } 00246 else if (pname==GL_EYE_PLANE) { 00247 GLfloat tmp[4]; 00248 /* Transform plane equation by the inverse modelview matrix */ 00249 if (_math_matrix_is_dirty(ctx->ModelviewMatrixStack.Top)) { 00250 _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); 00251 } 00252 _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv ); 00253 if (TEST_EQ_4V(texUnit->EyePlaneQ, tmp)) 00254 return; 00255 FLUSH_VERTICES(ctx, _NEW_TEXTURE); 00256 COPY_4FV(texUnit->EyePlaneQ, tmp); 00257 } 00258 else { 00259 _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(pname)" ); 00260 return; 00261 } 00262 break; 00263 default: 00264 _mesa_error( ctx, GL_INVALID_ENUM, "glTexGenfv(coord)" ); 00265 return; 00266 } 00267 00268 if (ctx->Driver.TexGen) 00269 ctx->Driver.TexGen( ctx, coord, pname, params ); 00270 } 00271 00272 00273 void GLAPIENTRY 00274 _mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params ) 00275 { 00276 GLfloat p[4]; 00277 p[0] = (GLfloat) params[0]; 00278 if (pname == GL_TEXTURE_GEN_MODE) { 00279 p[1] = p[2] = p[3] = 0.0F; 00280 } 00281 else { 00282 p[1] = (GLfloat) params[1]; 00283 p[2] = (GLfloat) params[2]; 00284 p[3] = (GLfloat) params[3]; 00285 } 00286 _mesa_TexGenfv(coord, pname, p); 00287 } 00288 00289 00290 void GLAPIENTRY 00291 _mesa_TexGend(GLenum coord, GLenum pname, GLdouble param ) 00292 { 00293 GLfloat p = (GLfloat) param; 00294 _mesa_TexGenfv( coord, pname, &p ); 00295 } 00296 00297 00298 void GLAPIENTRY 00299 _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params ) 00300 { 00301 GLfloat p[4]; 00302 p[0] = (GLfloat) params[0]; 00303 if (pname == GL_TEXTURE_GEN_MODE) { 00304 p[1] = p[2] = p[3] = 0.0F; 00305 } 00306 else { 00307 p[1] = (GLfloat) params[1]; 00308 p[2] = (GLfloat) params[2]; 00309 p[3] = (GLfloat) params[3]; 00310 } 00311 _mesa_TexGenfv( coord, pname, p ); 00312 } 00313 00314 00315 void GLAPIENTRY 00316 _mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ) 00317 { 00318 _mesa_TexGenfv(coord, pname, ¶m); 00319 } 00320 00321 00322 void GLAPIENTRY 00323 _mesa_TexGeni( GLenum coord, GLenum pname, GLint param ) 00324 { 00325 _mesa_TexGeniv( coord, pname, ¶m ); 00326 } 00327 00328 00329 00330 void GLAPIENTRY 00331 _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) 00332 { 00333 const struct gl_texture_unit *texUnit; 00334 GET_CURRENT_CONTEXT(ctx); 00335 ASSERT_OUTSIDE_BEGIN_END(ctx); 00336 00337 if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { 00338 _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexGendv(current unit)"); 00339 return; 00340 } 00341 00342 texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; 00343 00344 switch (coord) { 00345 case GL_S: 00346 if (pname==GL_TEXTURE_GEN_MODE) { 00347 params[0] = ENUM_TO_DOUBLE(texUnit->GenModeS); 00348 } 00349 else if (pname==GL_OBJECT_PLANE) { 00350 COPY_4V( params, texUnit->ObjectPlaneS ); 00351 } 00352 else if (pname==GL_EYE_PLANE) { 00353 COPY_4V( params, texUnit->EyePlaneS ); 00354 } 00355 else { 00356 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); 00357 return; 00358 } 00359 break; 00360 case GL_T: 00361 if (pname==GL_TEXTURE_GEN_MODE) { 00362 params[0] = ENUM_TO_DOUBLE(texUnit->GenModeT); 00363 } 00364 else if (pname==GL_OBJECT_PLANE) { 00365 COPY_4V( params, texUnit->ObjectPlaneT ); 00366 } 00367 else if (pname==GL_EYE_PLANE) { 00368 COPY_4V( params, texUnit->EyePlaneT ); 00369 } 00370 else { 00371 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); 00372 return; 00373 } 00374 break; 00375 case GL_R: 00376 if (pname==GL_TEXTURE_GEN_MODE) { 00377 params[0] = ENUM_TO_DOUBLE(texUnit->GenModeR); 00378 } 00379 else if (pname==GL_OBJECT_PLANE) { 00380 COPY_4V( params, texUnit->ObjectPlaneR ); 00381 } 00382 else if (pname==GL_EYE_PLANE) { 00383 COPY_4V( params, texUnit->EyePlaneR ); 00384 } 00385 else { 00386 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); 00387 return; 00388 } 00389 break; 00390 case GL_Q: 00391 if (pname==GL_TEXTURE_GEN_MODE) { 00392 params[0] = ENUM_TO_DOUBLE(texUnit->GenModeQ); 00393 } 00394 else if (pname==GL_OBJECT_PLANE) { 00395 COPY_4V( params, texUnit->ObjectPlaneQ ); 00396 } 00397 else if (pname==GL_EYE_PLANE) { 00398 COPY_4V( params, texUnit->EyePlaneQ ); 00399 } 00400 else { 00401 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(pname)" ); 00402 return; 00403 } 00404 break; 00405 default: 00406 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGendv(coord)" ); 00407 return; 00408 } 00409 } 00410 00411 00412 00413 void GLAPIENTRY 00414 _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) 00415 { 00416 const struct gl_texture_unit *texUnit; 00417 GET_CURRENT_CONTEXT(ctx); 00418 ASSERT_OUTSIDE_BEGIN_END(ctx); 00419 00420 if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { 00421 _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexGenfv(current unit)"); 00422 return; 00423 } 00424 00425 texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; 00426 00427 switch (coord) { 00428 case GL_S: 00429 if (pname==GL_TEXTURE_GEN_MODE) { 00430 params[0] = ENUM_TO_FLOAT(texUnit->GenModeS); 00431 } 00432 else if (pname==GL_OBJECT_PLANE) { 00433 COPY_4V( params, texUnit->ObjectPlaneS ); 00434 } 00435 else if (pname==GL_EYE_PLANE) { 00436 COPY_4V( params, texUnit->EyePlaneS ); 00437 } 00438 else { 00439 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); 00440 return; 00441 } 00442 break; 00443 case GL_T: 00444 if (pname==GL_TEXTURE_GEN_MODE) { 00445 params[0] = ENUM_TO_FLOAT(texUnit->GenModeT); 00446 } 00447 else if (pname==GL_OBJECT_PLANE) { 00448 COPY_4V( params, texUnit->ObjectPlaneT ); 00449 } 00450 else if (pname==GL_EYE_PLANE) { 00451 COPY_4V( params, texUnit->EyePlaneT ); 00452 } 00453 else { 00454 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); 00455 return; 00456 } 00457 break; 00458 case GL_R: 00459 if (pname==GL_TEXTURE_GEN_MODE) { 00460 params[0] = ENUM_TO_FLOAT(texUnit->GenModeR); 00461 } 00462 else if (pname==GL_OBJECT_PLANE) { 00463 COPY_4V( params, texUnit->ObjectPlaneR ); 00464 } 00465 else if (pname==GL_EYE_PLANE) { 00466 COPY_4V( params, texUnit->EyePlaneR ); 00467 } 00468 else { 00469 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); 00470 return; 00471 } 00472 break; 00473 case GL_Q: 00474 if (pname==GL_TEXTURE_GEN_MODE) { 00475 params[0] = ENUM_TO_FLOAT(texUnit->GenModeQ); 00476 } 00477 else if (pname==GL_OBJECT_PLANE) { 00478 COPY_4V( params, texUnit->ObjectPlaneQ ); 00479 } 00480 else if (pname==GL_EYE_PLANE) { 00481 COPY_4V( params, texUnit->EyePlaneQ ); 00482 } 00483 else { 00484 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(pname)" ); 00485 return; 00486 } 00487 break; 00488 default: 00489 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGenfv(coord)" ); 00490 return; 00491 } 00492 } 00493 00494 00495 00496 void GLAPIENTRY 00497 _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params ) 00498 { 00499 const struct gl_texture_unit *texUnit; 00500 GET_CURRENT_CONTEXT(ctx); 00501 ASSERT_OUTSIDE_BEGIN_END(ctx); 00502 00503 if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { 00504 _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexGeniv(current unit)"); 00505 return; 00506 } 00507 00508 texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; 00509 00510 switch (coord) { 00511 case GL_S: 00512 if (pname==GL_TEXTURE_GEN_MODE) { 00513 params[0] = texUnit->GenModeS; 00514 } 00515 else if (pname==GL_OBJECT_PLANE) { 00516 params[0] = (GLint) texUnit->ObjectPlaneS[0]; 00517 params[1] = (GLint) texUnit->ObjectPlaneS[1]; 00518 params[2] = (GLint) texUnit->ObjectPlaneS[2]; 00519 params[3] = (GLint) texUnit->ObjectPlaneS[3]; 00520 } 00521 else if (pname==GL_EYE_PLANE) { 00522 params[0] = (GLint) texUnit->EyePlaneS[0]; 00523 params[1] = (GLint) texUnit->EyePlaneS[1]; 00524 params[2] = (GLint) texUnit->EyePlaneS[2]; 00525 params[3] = (GLint) texUnit->EyePlaneS[3]; 00526 } 00527 else { 00528 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); 00529 return; 00530 } 00531 break; 00532 case GL_T: 00533 if (pname==GL_TEXTURE_GEN_MODE) { 00534 params[0] = texUnit->GenModeT; 00535 } 00536 else if (pname==GL_OBJECT_PLANE) { 00537 params[0] = (GLint) texUnit->ObjectPlaneT[0]; 00538 params[1] = (GLint) texUnit->ObjectPlaneT[1]; 00539 params[2] = (GLint) texUnit->ObjectPlaneT[2]; 00540 params[3] = (GLint) texUnit->ObjectPlaneT[3]; 00541 } 00542 else if (pname==GL_EYE_PLANE) { 00543 params[0] = (GLint) texUnit->EyePlaneT[0]; 00544 params[1] = (GLint) texUnit->EyePlaneT[1]; 00545 params[2] = (GLint) texUnit->EyePlaneT[2]; 00546 params[3] = (GLint) texUnit->EyePlaneT[3]; 00547 } 00548 else { 00549 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); 00550 return; 00551 } 00552 break; 00553 case GL_R: 00554 if (pname==GL_TEXTURE_GEN_MODE) { 00555 params[0] = texUnit->GenModeR; 00556 } 00557 else if (pname==GL_OBJECT_PLANE) { 00558 params[0] = (GLint) texUnit->ObjectPlaneR[0]; 00559 params[1] = (GLint) texUnit->ObjectPlaneR[1]; 00560 params[2] = (GLint) texUnit->ObjectPlaneR[2]; 00561 params[3] = (GLint) texUnit->ObjectPlaneR[3]; 00562 } 00563 else if (pname==GL_EYE_PLANE) { 00564 params[0] = (GLint) texUnit->EyePlaneR[0]; 00565 params[1] = (GLint) texUnit->EyePlaneR[1]; 00566 params[2] = (GLint) texUnit->EyePlaneR[2]; 00567 params[3] = (GLint) texUnit->EyePlaneR[3]; 00568 } 00569 else { 00570 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); 00571 return; 00572 } 00573 break; 00574 case GL_Q: 00575 if (pname==GL_TEXTURE_GEN_MODE) { 00576 params[0] = texUnit->GenModeQ; 00577 } 00578 else if (pname==GL_OBJECT_PLANE) { 00579 params[0] = (GLint) texUnit->ObjectPlaneQ[0]; 00580 params[1] = (GLint) texUnit->ObjectPlaneQ[1]; 00581 params[2] = (GLint) texUnit->ObjectPlaneQ[2]; 00582 params[3] = (GLint) texUnit->ObjectPlaneQ[3]; 00583 } 00584 else if (pname==GL_EYE_PLANE) { 00585 params[0] = (GLint) texUnit->EyePlaneQ[0]; 00586 params[1] = (GLint) texUnit->EyePlaneQ[1]; 00587 params[2] = (GLint) texUnit->EyePlaneQ[2]; 00588 params[3] = (GLint) texUnit->EyePlaneQ[3]; 00589 } 00590 else { 00591 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(pname)" ); 00592 return; 00593 } 00594 break; 00595 default: 00596 _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexGeniv(coord)" ); 00597 return; 00598 } 00599 } 00600 00601 Generated on Fri May 25 2012 04:18:38 for ReactOS by
1.7.6.1
|