Added cast for mac compiling
This commit is contained in:
parent
fdaddf0e79
commit
13a26e1b89
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.7 2005/10/13 08:32:26 cignoni
|
||||||
|
Added glscale(scalar) and corrected bug in glscale(point2)
|
||||||
|
|
||||||
Revision 1.6 2005/06/30 10:17:04 ganovelli
|
Revision 1.6 2005/06/30 10:17:04 ganovelli
|
||||||
added draw plane
|
added draw plane
|
||||||
|
|
||||||
|
@ -63,11 +66,11 @@ namespace vcg {
|
||||||
inline void glScale(float const & p){ glScalef(p,p,p);}
|
inline void glScale(float const & p){ glScalef(p,p,p);}
|
||||||
inline void glScale(double const & p){ glScaled(p,p,p);}
|
inline void glScale(double const & p){ glScaled(p,p,p);}
|
||||||
|
|
||||||
inline void glVertex(Point2<int> const & p) { glVertex2iv(p.V());}
|
inline void glVertex(Point2<int> const & p) { glVertex2iv((const GLint*)p.V());}
|
||||||
inline void glVertex(Point2<short> const & p) { glVertex2sv(p.V());}
|
inline void glVertex(Point2<short> const & p) { glVertex2sv(p.V());}
|
||||||
inline void glVertex(Point2<float> const & p) { glVertex2fv(p.V());}
|
inline void glVertex(Point2<float> const & p) { glVertex2fv(p.V());}
|
||||||
inline void glVertex(Point2<double> const & p){ glVertex2dv(p.V());}
|
inline void glVertex(Point2<double> const & p){ glVertex2dv(p.V());}
|
||||||
inline void glTexCoord(Point2<int> const & p) { glTexCoord2iv(p.V());}
|
inline void glTexCoord(Point2<int> const & p) { glTexCoord2iv((const GLint*)p.V());}
|
||||||
inline void glTexCoord(Point2<short> const & p) { glTexCoord2sv(p.V());}
|
inline void glTexCoord(Point2<short> const & p) { glTexCoord2sv(p.V());}
|
||||||
inline void glTexCoord(Point2<float> const & p) { glTexCoord2fv(p.V());}
|
inline void glTexCoord(Point2<float> const & p) { glTexCoord2fv(p.V());}
|
||||||
inline void glTexCoord(Point2<double> const & p){ glTexCoord2dv(p.V());}
|
inline void glTexCoord(Point2<double> const & p){ glTexCoord2dv(p.V());}
|
||||||
|
@ -76,15 +79,15 @@ namespace vcg {
|
||||||
inline void glScale(Point2<float> const & p) { glScalef(p[0],p[1],1.0);}
|
inline void glScale(Point2<float> const & p) { glScalef(p[0],p[1],1.0);}
|
||||||
inline void glScale(Point2<double> const & p){ glScaled(p[0],p[1],1.0);}
|
inline void glScale(Point2<double> const & p){ glScaled(p[0],p[1],1.0);}
|
||||||
|
|
||||||
inline void glVertex(Point3<int> const & p) { glVertex3iv(p.V());}
|
inline void glVertex(Point3<int> const & p) { glVertex3iv((const GLint*)p.V());}
|
||||||
inline void glVertex(Point3<short> const & p) { glVertex3sv(p.V());}
|
inline void glVertex(Point3<short> const & p) { glVertex3sv(p.V());}
|
||||||
inline void glVertex(Point3<float> const & p) { glVertex3fv(p.V());}
|
inline void glVertex(Point3<float> const & p) { glVertex3fv(p.V());}
|
||||||
inline void glVertex(Point3<double> const & p){ glVertex3dv(p.V());}
|
inline void glVertex(Point3<double> const & p){ glVertex3dv(p.V());}
|
||||||
inline void glNormal(Point3<int> const & p) { glNormal3iv(p.V());}
|
inline void glNormal(Point3<int> const & p) { glNormal3iv((const GLint*)p.V());}
|
||||||
inline void glNormal(Point3<short> const & p) { glNormal3sv(p.V());}
|
inline void glNormal(Point3<short> const & p) { glNormal3sv(p.V());}
|
||||||
inline void glNormal(Point3<float> const & p) { glNormal3fv(p.V());}
|
inline void glNormal(Point3<float> const & p) { glNormal3fv(p.V());}
|
||||||
inline void glNormal(Point3<double> const & p){ glNormal3dv(p.V());}
|
inline void glNormal(Point3<double> const & p){ glNormal3dv(p.V());}
|
||||||
inline void glTexCoord(Point3<int> const & p) { glTexCoord3iv(p.V());}
|
inline void glTexCoord(Point3<int> const & p) { glTexCoord3iv((const GLint*)p.V());}
|
||||||
inline void glTexCoord(Point3<short> const & p) { glTexCoord3sv(p.V());}
|
inline void glTexCoord(Point3<short> const & p) { glTexCoord3sv(p.V());}
|
||||||
inline void glTexCoord(Point3<float> const & p) { glTexCoord3fv(p.V());}
|
inline void glTexCoord(Point3<float> const & p) { glTexCoord3fv(p.V());}
|
||||||
inline void glTexCoord(Point3<double> const & p){ glTexCoord3dv(p.V());}
|
inline void glTexCoord(Point3<double> const & p){ glTexCoord3dv(p.V());}
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.22 2006/12/12 11:06:58 cignoni
|
||||||
|
Slightly changed the colormaterial mode for the flatwire
|
||||||
|
|
||||||
Revision 1.21 2006/10/14 16:26:26 ponchio
|
Revision 1.21 2006/10/14 16:26:26 ponchio
|
||||||
Aggiunti un paio di typename... al solito.
|
Aggiunti un paio di typename... al solito.
|
||||||
|
|
||||||
|
@ -249,7 +252,7 @@ void Update(/*Change c=CHAll*/)
|
||||||
|
|
||||||
if(h&HNUseVBO){
|
if(h&HNUseVBO){
|
||||||
if(!glIsBuffer(b[1]))
|
if(!glIsBuffer(b[1]))
|
||||||
glGenBuffers(2,b);
|
glGenBuffers(2,(GLuint*)b);
|
||||||
glBindBuffer(GL_ARRAY_BUFFER,b[0]);
|
glBindBuffer(GL_ARRAY_BUFFER,b[0]);
|
||||||
glBufferData(GL_ARRAY_BUFFER_ARB, m->vn * sizeof(typename MESH_TYPE::VertexType),
|
glBufferData(GL_ARRAY_BUFFER_ARB, m->vn * sizeof(typename MESH_TYPE::VertexType),
|
||||||
(char *)&(m->vert[0].P()), GL_STATIC_DRAW_ARB);
|
(char *)&(m->vert[0].P()), GL_STATIC_DRAW_ARB);
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.14 2005/10/15 15:23:32 ponchio
|
||||||
|
Fixed viewport<->window coordinate change for the z. (z = 2*z -1 now)
|
||||||
|
Accordingly to gluUnproject documentation.
|
||||||
|
|
||||||
Revision 1.13 2005/02/11 11:53:18 tommyfranken
|
Revision 1.13 2005/02/11 11:53:18 tommyfranken
|
||||||
changed pointf to point<t> in ViewLineFromWindow
|
changed pointf to point<t> in ViewLineFromWindow
|
||||||
|
|
||||||
|
@ -144,7 +148,7 @@ template <class T> void View<T>::GetView() {
|
||||||
model.Import(Matrix44d(m));
|
model.Import(Matrix44d(m));
|
||||||
Transpose(model);
|
Transpose(model);
|
||||||
|
|
||||||
glGetIntegerv(GL_VIEWPORT, viewport);
|
glGetIntegerv(GL_VIEWPORT, (GLint*)viewport);
|
||||||
|
|
||||||
matrix = proj*model;
|
matrix = proj*model;
|
||||||
inverse = matrix;
|
inverse = matrix;
|
||||||
|
|
Loading…
Reference in New Issue