MCPcopy Create free account
hub / github.com/OGRECave/ogre / setMaterialDiffuse

Method setMaterialDiffuse

RenderSystems/GL/src/OgreGLStateCacheManager.cpp:447–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445 }
446
447 void GLStateCacheManager::setMaterialDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
448 {
449#ifdef OGRE_ENABLE_STATE_CACHE
450 if((mDiffuse[0] != r) ||
451 (mDiffuse[1] != g) ||
452 (mDiffuse[2] != b) ||
453 (mDiffuse[3] != a))
454#endif
455 {
456 mDiffuse[0] = r;
457 mDiffuse[1] = g;
458 mDiffuse[2] = b;
459 mDiffuse[3] = a;
460
461 glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, &mDiffuse[0]);
462 }
463 }
464
465 void GLStateCacheManager::setMaterialAmbient(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
466 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected