00001 #ifndef OIV_SHADER_STATE_H 00002 #define OIV_SHADER_STATE_H 00003 00011 /*****************************************************************************/ 00012 // Constants 00013 00017 int OivMaxLights(); 00018 00022 int OivMaxClipPlanes(); 00023 00027 int OivMaxTextureCoordinates(); 00028 00032 int OivMaxTextureUnits(); 00033 00034 /*****************************************************************************/ 00035 // Transforms 00036 00041 mat4 OivModelMatrix(); 00042 00047 mat4 OivModelMatrixInverse(); 00048 00053 mat4 OivViewMatrix(); 00054 00059 mat4 OivViewMatrixInverse(); 00060 00066 mat4 OivModelViewMatrix(); 00067 00072 mat4 OivModelViewMatrixInverse(); 00073 00079 mat3 OivNormalMatrix(); 00080 00085 mat4 OivProjectionMatrix(); 00086 00091 mat4 OivProjectionMatrixInverse(); 00092 00098 mat4 OivModelViewProjectionMatrix(); 00099 00105 mat4 OivTextureMatrix(int unit); 00106 00111 vec2 OivViewportSize(); 00112 00116 vec2 OivViewVolumeSize(); 00117 00118 #define OIV_PROJECTION_TYPE_ORTHO 0 00119 #define OIV_PROJECTION_TYPE_PERSPECTIVE 1 00120 00124 int OivViewProjectionType(); 00125 00126 /*****************************************************************************/ 00127 // Lighting 00128 00133 bool OivHasLighting(); 00134 00139 bool OivHasTwoSidedLighting(); 00140 00145 bool OivHasPerPixelLighting(); 00146 00151 bool OivHasColorMaterial(); 00152 00157 vec4 OivGlobalAmbient(); 00158 00166 bool OivLightSourceEnabled(int id); 00167 00168 #define OIV_LIGHT_TYPE_NONE 0 00169 #define OIV_LIGHT_TYPE_POINT 1 00170 #define OIV_LIGHT_TYPE_SPOT 2 00171 #define OIV_LIGHT_TYPE_DIRECTIONAL 3 00172 00178 int OivLightSourceType(int id); 00179 00187 vec4 OivLightSourcePosition(int id); 00188 00196 vec3 OivLightSourceSpotDirection(int id); 00197 00205 float OivLightSourceSpotExponent(int id); 00206 00214 float OivLightSourceSpotCutoff(int id); 00215 00223 float OivLightSourceSpotCosCutoff(int id); 00224 00232 vec4 OivLightSourceAmbient(int id); 00233 00241 vec4 OivLightSourceDiffuse(int id); 00242 00250 vec4 OivLightSourceSpecular(int id); 00251 00259 float OivLightSourceConstantAttenuation(int id); 00260 00268 float OivLightSourceLinearAttenuation(int id); 00269 00277 float OivLightSourceQuadraticAttenuation(int id); 00278 00279 int OivMaxLightId(); 00280 00281 /*****************************************************************************/ 00282 // Material 00283 00288 vec4 OivFrontMaterialAmbient(); 00289 00294 vec4 OivFrontMaterialDiffuse(); 00295 00300 vec4 OivFrontMaterialSpecular(); 00301 00306 vec4 OivFrontMaterialEmissive(); 00307 00312 float OivFrontMaterialShininess(); 00313 00320 vec4 OivBackMaterialAmbient(); 00321 00328 vec4 OivBackMaterialDiffuse(); 00329 00336 vec4 OivBackMaterialSpecular(); 00337 00344 vec4 OivBackMaterialEmissive(); 00345 00352 float OivBackMaterialShininess(); 00353 00360 vec4 OivFrontSceneColor(); 00361 00367 vec4 OivFrontLightProductAmbient(int id); 00368 00374 vec4 OivFrontLightProductDiffuse(int id); 00375 00381 vec4 OivFrontLightProductSpecular(int id); 00382 00390 vec4 OivBackLightProductAmbient(int id); 00391 00399 vec4 OivBackLightProductDiffuse(int id); 00400 00408 vec4 OivBackLightProductSpecular(int id); 00409 00410 /*****************************************************************************/ 00411 // Clip planes 00412 00418 bool OivClipPlaneEnabled(int id); 00419 00425 vec4 OivClipPlane(int id); 00426 00427 00428 /*****************************************************************************/ 00429 // Fog parameters 00430 00435 vec4 OivFogColor(); 00436 00437 00442 float OivFogDensity(); 00443 00444 00449 float OivFogStart(); 00450 00451 00456 float OivFogEnd(); 00457 00458 00463 float OivFogScale(); 00464 00469 int OivFogType(); 00470 00475 vec4 OivObjectPlaneS(int i); 00476 00481 vec4 OivObjectPlaneT(int i); 00482 00487 vec4 OivObjectPlaneR(int i); 00488 00493 vec4 OivObjectPlaneQ(int i); 00494 00495 #endif /* OIV_SHADER_STATE_H */ 00496