fix a typo in Program::Uniform()

This commit is contained in:
Paolo Cignoni 2008-10-15 09:28:15 +00:00
parent 64ce68dac0
commit a3dbc3168b
2 changed files with 10 additions and 10 deletions

View File

@ -502,13 +502,13 @@ public:
glUniform4f(loc, x, y, z, w); glUniform4f(loc, x, y, z, w);
} }
void Uniform(const char * name, const vcg::Point3f& p) void Uniform(const char * name, const vcg::Point2f& p)
{ {
const GLint loc = glGetUniformLocation(this->objectID, name); const GLint loc = glGetUniformLocation(this->objectID, name);
glUniform2fv(loc, 1, p.V()); glUniform2fv(loc, 1, p.V());
} }
void Uniform(const char * name, const vcg::Point2f& p) void Uniform(const char * name, const vcg::Point3f& p)
{ {
const GLint loc = glGetUniformLocation(this->objectID, name); const GLint loc = glGetUniformLocation(this->objectID, name);
glUniform3fv(loc, 1, p.V()); glUniform3fv(loc, 1, p.V());

View File

@ -649,15 +649,15 @@ void DrawPoints()
// Perfect case, no deleted stuff, // Perfect case, no deleted stuff,
// draw the vertices using vertex arrays // draw the vertices using vertex arrays
if (nm==NMPerVert) if (nm==NMPerVert)
{ {
glEnableClientState (GL_NORMAL_ARRAY); glEnableClientState (GL_NORMAL_ARRAY);
glNormalPointer(GL_FLOAT,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->N()[0])); glNormalPointer(GL_FLOAT,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->N()[0]));
} }
if (cm==CMPerVert) if (cm==CMPerVert)
{ {
glEnableClientState (GL_COLOR_ARRAY); glEnableClientState (GL_COLOR_ARRAY);
glColorPointer(4,GL_UNSIGNED_BYTE,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->C()[0])); glColorPointer(4,GL_UNSIGNED_BYTE,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->C()[0]));
} }
glEnableClientState (GL_VERTEX_ARRAY); glEnableClientState (GL_VERTEX_ARRAY);
glVertexPointer(3,GL_FLOAT,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->P()[0])); glVertexPointer(3,GL_FLOAT,sizeof(typename MESH_TYPE::VertexType),&(m->vert.begin()->P()[0]));