Show
Ignore:
Timestamp:
10/07/09 21:42:32 (5 years ago)
Author:
robert
Message:

Introduced optional build against the GLU library, using optional compile paths to enable/disable GLU related function.

To toggle the use of the GLU library adjust the OSG_GLU_AVAILABLE variable via ccmake . or CMakeSetup.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osg/State.cpp

    r10601 r10611  
    983983    if (errorNo!=GL_NO_ERROR) 
    984984    { 
     985#ifdef OSG_GLU_AVAILABLE 
    985986        const char* error = (char*)gluErrorString(errorNo); 
    986987        if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '" << error<<"'"; 
    987988        else       osg::notify(WARN)<<"Warning: detected OpenGL error number 0x" << std::hex << errorNo << std::dec; 
    988  
     989#else 
     990        osg::notify(WARN)<<"Warning: detected OpenGL error number 0x" << std::hex << errorNo << std::dec; 
     991#endif 
    989992        if (str) osg::notify(WARN)<<" at "<<str<< std::endl; 
    990993        else     osg::notify(WARN)<<" in osg::State."<< std::endl; 
     
    10001003    if (errorNo!=GL_NO_ERROR) 
    10011004    { 
     1005#ifdef OSG_GLU_AVAILABLE 
    10021006        const char* error = (char*)gluErrorString(errorNo); 
    10031007        if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '"<< error <<"' after applying GLMode 0x"<<hex<<mode<<dec<< std::endl; 
    10041008        else       osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying GLMode 0x"<<hex<<mode<<dec<< std::endl; 
    1005  
     1009#else 
     1010        osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying GLMode 0x"<<hex<<mode<<dec<< std::endl; 
     1011#endif 
    10061012        return true; 
    10071013    } 
     
    10141020    if (errorNo!=GL_NO_ERROR) 
    10151021    { 
     1022#ifdef OSG_GLU_AVAILABLE 
    10161023        const char* error = (char*)gluErrorString(errorNo); 
    10171024        if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '"<< error <<"' after applying attribute "<<attribute->className()<<" "<<attribute<< std::endl; 
    10181025        else       osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying attribute "<<attribute->className()<<" "<<attribute<< std::dec << std::endl; 
     1026#else 
     1027        osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying attribute "<<attribute->className()<<" "<<attribute<< std::dec << std::endl; 
     1028#endif 
    10191029 
    10201030        return true;