#include <shadermanager.h>
Public Types | |
| enum | { DiffuseTexture = 0x01, SpecularTexture = 0x02, NormalTexture = 0x04, NightTexture = 0x08, SpecularInDiffuseAlpha = 0x10, RingShadowTexture = 0x20 } |
| enum | { DiffuseModel = 0, SpecularModel = 1, RingIllumModel = 2 } |
Public Member Functions | |
| unsigned int | getShadowCountForLight (unsigned int) const |
| bool | hasShadowsForLight (unsigned int) const |
| void | setShadowCountForLight (unsigned int, unsigned int) |
| ShaderProperties () | |
| bool | usesFragmentLighting () const |
| bool | usesShadows () const |
Public Attributes | |
| unsigned short | lightModel |
| unsigned short | nLights |
| unsigned short | shadowCounts |
| unsigned short | texUsage |
|
|
Definition at line 27 of file shadermanager.h. 00028 {
00029 DiffuseTexture = 0x01,
00030 SpecularTexture = 0x02,
00031 NormalTexture = 0x04,
00032 NightTexture = 0x08,
00033 SpecularInDiffuseAlpha = 0x10,
00034 RingShadowTexture = 0x20,
00035 };
|
|
|
Definition at line 37 of file shadermanager.h. 00038 {
00039 DiffuseModel = 0,
00040 SpecularModel = 1,
00041 RingIllumModel = 2,
00042 };
|
|
|
Definition at line 44 of file shadermanager.cpp. 00044 : 00045 nLights(0), 00046 texUsage(0), 00047 lightModel(DiffuseModel), 00048 shadowCounts(0) 00049 { 00050 }
|
|
|
Definition at line 74 of file shadermanager.cpp. References shadowCounts. Referenced by hasShadowsForLight(). 00075 {
00076 return (shadowCounts >> i * 2) & 3;
00077 }
|
|
|
Definition at line 94 of file shadermanager.cpp. References getShadowCountForLight(), RingShadowTexture, and texUsage. 00095 {
00096 assert(light < MaxShaderLights);
00097 return ((getShadowCountForLight(light) != 0) ||
00098 (texUsage & RingShadowTexture));
00099 }
|
|
||||||||||||
|
Definition at line 81 of file shadermanager.cpp. References shadowCounts. Referenced by GLSL_RenderContext::makeCurrent(), renderClouds_GLSL(), renderRings_GLSL(), and renderSphere_GLSL(). 00082 {
00083 assert(n < MaxShaderShadows);
00084 assert(light < MaxShaderLights);
00085 if (n <= MaxShaderShadows && light < MaxShaderLights)
00086 {
00087 shadowCounts &= ~(3 << light * 2);
00088 shadowCounts |= n << light * 2;
00089 }
00090 }
|
|
|
Definition at line 64 of file shadermanager.cpp. References NormalTexture, and texUsage. 00065 {
00066 if ((texUsage & NormalTexture) != 0)
00067 return true;
00068 else
00069 return false;
00070 }
|
|
|
Definition at line 54 of file shadermanager.cpp. References RingShadowTexture, shadowCounts, and texUsage. 00055 {
00056 if ((texUsage & RingShadowTexture) != 0 || shadowCounts != 0)
00057 return true;
00058 else
00059 return false;
00060 }
|
|
|
Definition at line 47 of file shadermanager.h. Referenced by GLSL_RenderContext::makeCurrent(), renderRings_GLSL(), and renderSphere_GLSL(). |
|
|
Definition at line 45 of file shadermanager.h. Referenced by GLSL_RenderContext::makeCurrent(), renderClouds_GLSL(), renderRings_GLSL(), and renderSphere_GLSL(). |
|
|
Definition at line 50 of file shadermanager.h. Referenced by getShadowCountForLight(), GLSL_RenderContext::makeCurrent(), renderClouds_GLSL(), renderSphere_GLSL(), setShadowCountForLight(), and usesShadows(). |
|
|
Definition at line 46 of file shadermanager.h. Referenced by hasShadowsForLight(), GLSL_RenderContext::makeCurrent(), renderClouds_GLSL(), renderRings_GLSL(), renderSphere_GLSL(), usesFragmentLighting(), and usesShadows(). |
1.4.1