// Disk.cpp: implementation of the CDisk class.
//
//////////////////////////////////////////////////////////////////////
#include "Disk.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
void errorCallback(GLenum errorCode)
{
const GLubyte *estring;
estring = gluErrorString(errorCode);
pApp->pLog->Log("Quadric Error: %s\n", estring);
}
CDisk::CDisk()
{
// create Quadric
qobj = gluNewQuadric();
if (qobj == 0)
{
pApp->pLog->Log("Couldn't create memory for CDisk Quadratic");
return;
}
}
CDisk::~CDisk()
{
if (qobj)
gluDeleteQuadric(qobj);
}
void CDisk::Draw()
{
glPushMatrix();
glTranslatef(pos_x, pos_y, pos_z);
glRotatef(90, -1.0f, .0f, .0f);
glColor3f(0.3f, 0.3f, 0.3f);
gluCylinder(qobj,0.2f,0.2f,0.2f,32,32);
glPopMatrix();
}