Show
Ignore:
Timestamp:
10/06/10 16:44:52 (4 years ago)
Author:
robert
Message:

Copied libutil and libtess implementations in form Mesa 7.9/src/glu into the src/osg/glu,
changed extensions from .c to .cpp and got compiling as C files as part of the osg core library.

Updated and cleaned up the rest of the OSG to use the new internal GLU.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/CMakeLists.txt

    r11788 r11817  
    304304OPTION(OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION "Set to ON to use the ref_ptr<> T* operator() output conversion. " ON) 
    305305 
    306 OPTION(OSG_GLU_AVAILABLE "Set to OFF to disable use of OpenGL GLU library." ${OPENGL_GLU_FOUND}) 
    307306OPTION(OSG_GL1_AVAILABLE "Set to OFF to disable use of OpenGL 1.x functions library." ON) 
    308307OPTION(OSG_GL2_AVAILABLE "Set to OFF to disable use of OpenGL 2.x functions library." ON) 
     
    443442ENDIF(BUILD_OSG_EXAMPLES) 
    444443 
    445  
    446  
    447  
    448  
    449  
    450 # 
    451 # Test to determine if we want the "tripledot" form of the GLU tesselator callback. 
    452 # 
    453 IF(NOT DEFAULT_GLU_TESS_CALLBACK_TRIPLEDOT) 
    454     IF(WIN32 OR CMAKE_SYSTEM_NAME MATCHES "Linux") 
    455  
    456         # Skip the compile check for platforms that never need the variable 
    457         # form. 
    458         SET(DEFAULT_GLU_TESS_CALLBACK_TRIPLEDOT false) 
    459  
    460     ELSE() 
    461  
    462         # For other platforms perform the check 
    463         INCLUDE(CheckCXXSourceCompiles) 
    464         SET(CMAKE_REQUIRED_DEFINITIONS -DGLU_TESS_CALLBACK_TRIPLEDOT) 
    465         SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/include ${GLUT_INCLUDE_DIR} ${GL_INCLUDE_DIR}) 
    466         SET(CMAKE_REQUIRED_LIBRARIES ${GLUT_LIBRARY} ${GL_LIBRARY}) 
    467         CHECK_CXX_SOURCE_COMPILES( 
    468             "#include <osg/GL> 
    469             #include <osg/GLU> 
    470             static void testcb(GLvoid *, void*) { } 
    471             int main() { 
    472                GLUtesselator *t = gluNewTess(); 
    473                gluTessCallback(t, GLU_TESS_VERTEX_DATA, (GLU_TESS_CALLBACK) testcb); 
    474                return 0; 
    475             }" 
    476             GLU_Tesselator_Needs_Variable_Parameter_Callback_Convention_Failure_Means_No) 
    477         SET(DEFAULT_GLU_TESS_CALLBACK_TRIPLEDOT 
    478             ${GLU_Tesselator_Needs_Variable_Parameter_Callback_Convention_Failure_Means_No}) 
    479  
    480     ENDIF() 
    481 ENDIF() 
    482  
    483 OPTION(OSG_GLU_TESS_CALLBACK_TRIPLEDOT "Set to ON to build with variable parameter (...) version of GLU tesselator callback" ${DEFAULT_GLU_TESS_CALLBACK_TRIPLEDOT}) 
    484 IF(OSG_GLU_TESS_CALLBACK_TRIPLEDOT) 
    485     ADD_DEFINITIONS(-DGLU_TESS_CALLBACK_TRIPLEDOT) 
    486 ENDIF(OSG_GLU_TESS_CALLBACK_TRIPLEDOT) 
    487444 
    488445# Platform specific: