don't make the eye sphere a global object

This commit is contained in:
Stephen Birarda 2013-03-28 11:36:41 -07:00
parent 846ba80c10
commit d2a8da890f
2 changed files with 5 additions and 3 deletions

View file

@ -38,8 +38,6 @@ vector<unsigned char> iris_texture;
unsigned int iris_texture_width = 512;
unsigned int iris_texture_height = 256;
GLUquadric *sphere = gluNewQuadric();
Head::Head()
{
position = glm::vec3(0,0,0);
@ -80,6 +78,8 @@ Head::Head()
browAudioLift = 0.0;
noise = 0;
sphere = NULL;
hand = new Hand(glm::vec3(skinColor[0], skinColor[1], skinColor[2]));
if (iris_texture.size() == 0) {
@ -140,7 +140,7 @@ Head::Head(const Head &otherHead) {
}
Head::~Head() {
if (sphere) {
if (sphere != NULL) {
gluDeleteQuadric(sphere);
}
}

View file

@ -130,6 +130,8 @@ class Head : public AgentData {
int eyeContact;
eyeContactTargets eyeContactTarget;
GLUquadric *sphere;
void readSensors();
float renderYaw, renderPitch; // Pitch from view frustum when this is own head.