simplified per stephens code review

This commit is contained in:
Philip Rosedale 2013-05-24 12:04:17 -07:00
parent 17c898c151
commit 8b5901d904
2 changed files with 3 additions and 4 deletions

View file

@ -57,7 +57,8 @@ Head::Head() :
_bodyRotation(0.0f, 0.0f, 0.0f),
_headRotation(0.0f, 0.0f, 0.0f),
_renderLookatVectors(false),
_mohawkExists(false)
_mohawkTriangleFan(NULL),
_mohawkColors(NULL)
{
}
@ -210,11 +211,10 @@ void Head::createMohawk() {
_mohawkColors[i] = randFloat() * basicColor;
}
_mohawkExists = true;
}
void Head::renderMohawk() {
if (!_mohawkExists) {
if (!_mohawkTriangleFan) {
createMohawk();
} else {
glPushMatrix();

View file

@ -83,7 +83,6 @@ private:
bool _renderLookatVectors;
glm::vec3* _mohawkTriangleFan;
glm::vec3* _mohawkColors;
bool _mohawkExists;
// private methods
void createMohawk();