39 cpu_vec_xyzw Ambient, Diffuse, Specular, Emission;
42 inline void TellRendererMaterialChanged()
44 GLContext.CurMaterialChanged();
50 void SetAmbient(cpu_vec_xyzw ambient)
53 TellRendererMaterialChanged();
55 void SetDiffuse(cpu_vec_xyzw diffuse)
58 TellRendererMaterialChanged();
60 void SetSpecular(cpu_vec_xyzw specular);
61 void SetEmission(cpu_vec_xyzw emission)
64 TellRendererMaterialChanged();
66 void SetShininess(
float shine)
69 TellRendererMaterialChanged();
72 inline cpu_vec_xyzw GetAmbient()
const {
return Ambient; }
73 inline cpu_vec_xyzw GetDiffuse()
const {
return Diffuse; }
74 inline cpu_vec_xyzw GetSpecular()
const {
return Specular; }
75 inline cpu_vec_xyzw GetEmission()
const {
return Emission; }
76 inline float GetShininess()
const {
return Shininess; }
78 void LightsHaveSpecular();
82 inline void TellRendererMaterialChanged()
84 GLContext.CurMaterialChanged();
93 void SetAmbient(cpu_vec_xyzw ambient);
94 void SetDiffuse(cpu_vec_xyzw diffuse);
95 void SetSpecular(cpu_vec_xyzw specular);
96 void SetEmission(cpu_vec_xyzw emission);
97 void SetShininess(
float shine);
107 cpu_vec_xyzw CurColor;
108 GLenum ColorMaterialMode;
109 bool UseColorMaterial;
115 , ImmMaterial(context)
116 , DListMaterial(context)
117 , CurMaterial(&ImmMaterial)
118 , CurColor(1, 1, 1, 1)
119 , ColorMaterialMode(GL_AMBIENT_AND_DIFFUSE)
120 , UseColorMaterial(
false)
123 ImmMaterial.SetDiffuse(cpu_vec_xyzw(0.8f, 0.8f, 0.8f, 1.0f));
126 CMaterial& GetCurMaterial() {
return *CurMaterial; }
129 cpu_vec_xyzw GetCurColor()
const {
return CurColor; }
130 GLenum GetColorMaterialMode()
const {
return ColorMaterialMode; }
131 bool GetColorMaterialEnabled()
const {
return UseColorMaterial; }
133 void Color(cpu_vec_xyzw color);
134 void SetUseColorMaterial(
bool yesNo);
135 void SetColorMaterialMode(GLenum mode);
139 CurMaterial = &DListMaterial;
144 CurMaterial = &ImmMaterial;