diff --git a/wrap/gl/space.h b/wrap/gl/space.h index 90e8dd03..1ddd4565 100644 --- a/wrap/gl/space.h +++ b/wrap/gl/space.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.2 2004/05/13 23:44:47 ponchio + --> + Revision 1.1 2004/04/05 11:56:14 cignoni First working version! @@ -33,12 +36,12 @@ First working version! #ifndef VCG_GL_SPACE_H #define VCG_GL_SPACE_H +// Please note that this file assume that you have already included your +// gl-extension wrapping utility, and that therefore all the extension symbol are already defined. + #include #include -#ifdef WIN32 -#include -#endif -#include +#include namespace vcg { @@ -72,5 +75,13 @@ namespace vcg { inline void glScale(Point3 const & p) { glScalef(p.X(),p.Y(),p.Z());} inline void glScale(Point3 const & p){ glScaled(p.X(),p.Y(),p.Z());} + inline void glColor(Color4b const & c) { glColor4ubv(c.V());} + inline void glClearColor(Color4b const &c) { ::glClearColor(float(c[0])/255.0f,float(c[1])/255.0f,float(c[2])/255.0f,1.0f);} + inline void glLight(GLenum light, GLenum pname, Color4b const & c) { + static float cf[4]; + cf[0]=float(cf[0]/255.0); cf[1]=float(c[1]/255.0); cf[2]=float(c[2]/255.0); cf[3]=float(c[3]/255.0); + glLightfv(light,pname,cf); + } + }//namespace #endif