I'm trying to do something here, but this error shows I do not really know how to fix it Figure all the variables in HT, just as the GL float instead of the float and the same error keeps on releasing any idea? Here is my picture H
class shape {public: Figure (float x, float y, float z); Zero parameter (float x, float y, float z); Zero draw (); Float paramx () {return x1; } Float parameter () {return y1; } Float promas () {return z1; } Conserved: Private: Float x1, y1, z1; List & lt; Figure & gt; M_vertices; };
And this is mine. CPP is what gives me all the trouble>.
Figure: Figure (float x, float y, float z) {it-> X1 = x; This- & gt; Y1 = y; This- & gt; Z1 = z; } Nil Figure: parameter (float x, float y, float z) {m_vertices.push_back (Figure (X, Y, Z)); } Zero Figure :: Draw () {List & lt; Figure & gt; :: iterator p = m_vertices.begin (); Gluclease (GL_Collo_B_BFFER_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-> paramix, p-> parameter, p-> overrun;); GlVertex3f (p-> paramx, p-> paramy, p-> paramz); P ++; } Glend (); }
The problem is believed to be on glNormal3f and glVertex3f, any help would be appreciated a lot thank you
You need the call functions:
glNormal3f (p-> Paramax (), P- & Gt; Paramy (), P-> Paraaj ()); GlVertex3f (P-> Paramix (), P-> Paramy (), P-> Paraaj ());
Comments
Post a Comment