Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenlight.h
Go to the documentation of this file.
00001 00006 /* 00007 * Mesa 3-D graphics library 00008 * Version: 3.5 00009 * 00010 * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. 00011 * 00012 * Permission is hereby granted, free of charge, to any person obtaining a 00013 * copy of this software and associated documentation files (the "Software"), 00014 * to deal in the Software without restriction, including without limitation 00015 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00016 * and/or sell copies of the Software, and to permit persons to whom the 00017 * Software is furnished to do so, subject to the following conditions: 00018 * 00019 * The above copyright notice and this permission notice shall be included 00020 * in all copies or substantial portions of the Software. 00021 * 00022 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00023 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00024 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00025 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00026 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00027 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00028 */ 00029 00030 00031 #ifndef LIGHT_H 00032 #define LIGHT_H 00033 00034 00035 #include "mtypes.h" 00036 00037 extern void GLAPIENTRY 00038 _mesa_ShadeModel( GLenum mode ); 00039 00040 #if _HAVE_FULL_GL 00041 extern void GLAPIENTRY 00042 _mesa_ColorMaterial( GLenum face, GLenum mode ); 00043 00044 extern void GLAPIENTRY 00045 _mesa_Lightf( GLenum light, GLenum pname, GLfloat param ); 00046 00047 extern void GLAPIENTRY 00048 _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params ); 00049 00050 extern void GLAPIENTRY 00051 _mesa_Lightiv( GLenum light, GLenum pname, const GLint *params ); 00052 00053 extern void GLAPIENTRY 00054 _mesa_Lighti( GLenum light, GLenum pname, GLint param ); 00055 00056 extern void GLAPIENTRY 00057 _mesa_LightModelf( GLenum pname, GLfloat param ); 00058 00059 extern void GLAPIENTRY 00060 _mesa_LightModelfv( GLenum pname, const GLfloat *params ); 00061 00062 extern void GLAPIENTRY 00063 _mesa_LightModeli( GLenum pname, GLint param ); 00064 00065 extern void GLAPIENTRY 00066 _mesa_LightModeliv( GLenum pname, const GLint *params ); 00067 00068 extern void GLAPIENTRY 00069 _mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params ); 00070 00071 extern void GLAPIENTRY 00072 _mesa_GetLightiv( GLenum light, GLenum pname, GLint *params ); 00073 00074 extern void GLAPIENTRY 00075 _mesa_GetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); 00076 00077 extern void GLAPIENTRY 00078 _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params ); 00079 00080 00081 extern void 00082 _mesa_light(GLcontext *ctx, GLuint lnum, GLenum pname, const GLfloat *params); 00083 00084 00085 /* Lerp between adjacent values in the f(x) lookup table, giving a 00086 * continuous function, with adequeate overall accuracy. (Though 00087 * still pretty good compared to a straight lookup). 00088 * Result should be a GLfloat. 00089 */ 00090 #define GET_SHINE_TAB_ENTRY( table, dp, result ) \ 00091 do { \ 00092 struct gl_shine_tab *_tab = table; \ 00093 float f = (dp * (SHINE_TABLE_SIZE-1)); \ 00094 int k = (int) f; \ 00095 if (k < 0 /* gcc may cast an overflow float value to negative int value*/ \ 00096 || k > SHINE_TABLE_SIZE-2) \ 00097 result = (GLfloat) _mesa_pow( dp, _tab->shininess ); \ 00098 else \ 00099 result = _tab->tab[k] + (f-k)*(_tab->tab[k+1]-_tab->tab[k]); \ 00100 } while (0) 00101 00102 00103 extern GLuint _mesa_material_bitmask( GLcontext *ctx, 00104 GLenum face, GLenum pname, 00105 GLuint legal, 00106 const char * ); 00107 00108 extern void _mesa_invalidate_spot_exp_table( struct gl_light *l ); 00109 00110 extern void _mesa_invalidate_shine_table( GLcontext *ctx, GLuint i ); 00111 00112 extern void _mesa_validate_all_lighting_tables( GLcontext *ctx ); 00113 00114 extern void _mesa_update_lighting( GLcontext *ctx ); 00115 00116 extern void _mesa_update_tnl_spaces( GLcontext *ctx, GLuint new_state ); 00117 00118 extern void _mesa_update_material( GLcontext *ctx, 00119 GLuint bitmask ); 00120 00121 extern void _mesa_copy_materials( struct gl_material *dst, 00122 const struct gl_material *src, 00123 GLuint bitmask ); 00124 00125 extern void _mesa_update_color_material( GLcontext *ctx, 00126 const GLfloat rgba[4] ); 00127 00128 extern void _mesa_init_lighting( GLcontext *ctx ); 00129 00130 extern void _mesa_free_lighting_data( GLcontext *ctx ); 00131 00132 extern void _mesa_allow_light_in_model( GLcontext *ctx, GLboolean flag ); 00133 00134 #else 00135 #define _mesa_update_color_material( c, r ) ((void)0) 00136 #define _mesa_validate_all_lighting_tables( c ) ((void)0) 00137 #define _mesa_invalidate_spot_exp_table( l ) ((void)0) 00138 #define _mesa_material_bitmask( c, f, p, l, s ) 0 00139 #define _mesa_init_lighting( c ) ((void)0) 00140 #define _mesa_free_lighting_data( c ) ((void)0) 00141 #define _mesa_update_lighting( c ) ((void)0) 00142 #define _mesa_update_tnl_spaces( c, n ) ((void)0) 00143 #define GET_SHINE_TAB_ENTRY( table, dp, result ) ((result)=0) 00144 #endif 00145 00146 #endif Generated on Sun May 27 2012 04:20:20 for ReactOS by
1.7.6.1
|