Moved glColor/glNormal definitions for GLES1.x from include/osg/GL to src/osg/ArrayDispatchers.cpp to avoid import/export issues on functions.

Fixed typo of GLES1 in disabling the build of OpenGL1.x/2.x specific examples
This commit is contained in:
Robert Osfield
2009-11-04 17:26:59 +00:00
parent 90d3c710c4
commit d7d6d2b215
3 changed files with 14 additions and 14 deletions

View File

@@ -17,9 +17,21 @@
#include <osg/Notify>
#include <osg/io_utils>
namespace osg
{
inline void glColor4ubv(const GLubyte* c) { glColor4ub(c[0], c[1], c[2], c[3]); }
inline void glColor3fv(const GLfloat* c) { glColor4f(c[0], c[1], c[2], 1.0f); }
inline void glColor4fv(const GLfloat* c) { glColor4f(c[0], c[1], c[2], c[3]); }
inline void glColor3dv(const GLdouble* c) { glColor4f(c[0], c[1], c[2], 1.0f); }
inline void glColor4dv(const GLdouble* c) { glColor4f(c[0], c[1], c[2], c[3]); }
inline void glNormal3bv(const GLbyte* n) { const float div = 1.0f/128.0f; glNormal3f(float(n[0])*div, float(n[1])*div, float(n[3])*div); }
inline void glNormal3sv(const GLshort* n) { const float div = 1.0f/32768.0f; glNormal3f(float(n[0])*div, float(n[1])*div, float(n[3])*div); }
inline void glNormal3fv(const GLfloat* n) { glNormal3f(n[0], n[1], n[3]); }
inline void glNormal3dv(const GLdouble* n) { glNormal3f(n[0], n[1], n[3]); }
template<typename T>
class TemplateAttributeDispatch : public AttributeDispatch
{