Changeset 10717

Show
Ignore:
Timestamp:
11/04/09 18:26:59 (5 years ago)
Author:
robert
Message:

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

Location:
OpenSceneGraph/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/CMakeLists.txt

    r10712 r10717  
    138138    ADD_SUBDIRECTORY(osgwidgetwindow) 
    139139 
    140 IF(NOT OSG_GLES2_AVAILABLE AND NOT OSG_GLES2_AVAILABLE AND NOT OSG_GL3_AVAILABLE) 
     140IF(NOT OSG_GLES1_AVAILABLE AND NOT OSG_GLES2_AVAILABLE AND NOT OSG_GL3_AVAILABLE) 
    141141    ADD_SUBDIRECTORY(osgscreencapture) 
    142142    ADD_SUBDIRECTORY(osgmotionblur) 
  • OpenSceneGraph/trunk/include/osg/GL

    r10710 r10717  
    1616 
    1717#include <osg/Config> 
     18#include <osg/Export> 
    1819 
    1920#ifndef WIN32 
     
    162163#endif 
    163164 
    164 #ifdef OSG_GLES1_AVAILABLE 
    165     inline void glColor4ubv(const GLubyte* c) { glColor4ub(c[0], c[1], c[2], c[3]); } 
    166     inline void glColor3fv(const GLfloat* c) { glColor4f(c[0], c[1], c[2], 1.0f); } 
    167     inline void glColor4fv(const GLfloat* c) { glColor4f(c[0], c[1], c[2], c[3]); } 
    168     inline void glColor3dv(const GLdouble* c) { glColor4f(c[0], c[1], c[2], 1.0f); } 
    169     inline void glColor4dv(const GLdouble* c) { glColor4f(c[0], c[1], c[2], c[3]); } 
    170  
    171     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); } 
    172     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); } 
    173     inline void glNormal3fv(const GLfloat* n) { glNormal3f(n[0], n[1], n[3]); } 
    174     inline void glNormal3dv(const GLdouble* n) { glNormal3f(n[0], n[1], n[3]); } 
    175 #endif 
    176  
    177165#endif  // __osgGL_h 
  • OpenSceneGraph/trunk/src/osg/ArrayDispatchers.cpp

    r10691 r10717  
    1818#include <osg/io_utils> 
    1919 
     20 
    2021namespace osg 
    2122{ 
     23 
     24inline void glColor4ubv(const GLubyte* c) { glColor4ub(c[0], c[1], c[2], c[3]); } 
     25inline void glColor3fv(const GLfloat* c) { glColor4f(c[0], c[1], c[2], 1.0f); } 
     26inline void glColor4fv(const GLfloat* c) { glColor4f(c[0], c[1], c[2], c[3]); } 
     27inline void glColor3dv(const GLdouble* c) { glColor4f(c[0], c[1], c[2], 1.0f); } 
     28inline void glColor4dv(const GLdouble* c) { glColor4f(c[0], c[1], c[2], c[3]); } 
     29 
     30inline 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); } 
     31inline 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); } 
     32inline void glNormal3fv(const GLfloat* n) { glNormal3f(n[0], n[1], n[3]); } 
     33inline void glNormal3dv(const GLdouble* n) { glNormal3f(n[0], n[1], n[3]); } 
    2234 
    2335template<typename T>