im trying to do something here but that error shows up i really have no idea how to get it done right i tried to put all the variables in the Figure.h as GLfloat instead of just float and the same error keeps appearing any idea? here is my Figure.h
Class Figure
{
public:
Figure(float x,float y,float z);
void Parameters(float x,float y,float z);
void Draw();
float paramx(){
return x1;
}
float paramy(){
return y1;
}
float paramz(){
return z1;
}
protected:
private:
float x1,y1,z1;
list <Figure> m_vertices;
};
and here is my .cpp the one giving me all the trouble >.<
Figure::Figure(float x,float y,float z){
this->x1=x;
this->y1=y;
this->z1=z;
}
void Figure::Parameters(float x,float y,float z)
{
m_vertices.push_back(Figure(x, y, z));
}
void Figure::Draw()
{
list<Figure>::iterator p = m_vertices.begin();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
gluLookAt(0.0,0.0,4.0,0.0,0.0,0.0,0.0,1.0,0.0);
glBegin(GL_TRIANGLES);
while(p != m_vertices.end()){
glNormal3f(p->paramx,p->paramy,p->paramz);
glVertex3f(p->paramx,p->paramy,p->paramz);
p++;
}
glEnd();
}
Supposedly the problem is at glNormal3f and glVertex3f any help would be REALLY appreciated thank you very much