-----------------------------------------------------------------------------
| 1187 | } |
| 1188 | //----------------------------------------------------------------------------- |
| 1189 | void GLRenderSystem::_setSurfaceTracking(TrackVertexColourType tracking) |
| 1190 | { |
| 1191 | |
| 1192 | // Track vertex colour |
| 1193 | if(tracking != TVC_NONE) |
| 1194 | { |
| 1195 | GLenum gt = GL_DIFFUSE; |
| 1196 | // There are actually 15 different combinations for tracking, of which |
| 1197 | // GL only supports the most used 5. This means that we have to do some |
| 1198 | // magic to find the best match. NOTE: |
| 1199 | // GL_AMBIENT_AND_DIFFUSE != GL_AMBIENT | GL__DIFFUSE |
| 1200 | if(tracking & TVC_AMBIENT) |
| 1201 | { |
| 1202 | if(tracking & TVC_DIFFUSE) |
| 1203 | { |
| 1204 | gt = GL_AMBIENT_AND_DIFFUSE; |
| 1205 | } |
| 1206 | else |
| 1207 | { |
| 1208 | gt = GL_AMBIENT; |
| 1209 | } |
| 1210 | } |
| 1211 | else if(tracking & TVC_DIFFUSE) |
| 1212 | { |
| 1213 | gt = GL_DIFFUSE; |
| 1214 | } |
| 1215 | else if(tracking & TVC_SPECULAR) |
| 1216 | { |
| 1217 | gt = GL_SPECULAR; |
| 1218 | } |
| 1219 | else if(tracking & TVC_EMISSIVE) |
| 1220 | { |
| 1221 | gt = GL_EMISSION; |
| 1222 | } |
| 1223 | glColorMaterial(GL_FRONT_AND_BACK, gt); |
| 1224 | |
| 1225 | mStateCacheManager->setEnabled(GL_COLOR_MATERIAL, true); |
| 1226 | } |
| 1227 | else |
| 1228 | { |
| 1229 | mStateCacheManager->setEnabled(GL_COLOR_MATERIAL, false); |
| 1230 | } |
| 1231 | } |
| 1232 | //----------------------------------------------------------------------------- |
| 1233 | void GLRenderSystem::_setPointParameters(bool attenuationEnabled, Real minSize, Real maxSize) |
| 1234 | { |
nothing calls this directly
no test coverage detected