diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 334261809..000000000 --- a/.gitmodules +++ /dev/null @@ -1,33 +0,0 @@ -[submodule "external/embree"] - path = external/embree - url = https://github.com/embree/embree.git -[submodule "external/cgal"] - path = external/cgal - url = https://github.com/CGAL/cgal.git -[submodule "external/tetgen"] - path = external/tetgen - url = https://github.com/libigl/tetgen.git -[submodule "external/triangle"] - path = external/triangle - url = https://github.com/libigl/triangle.git -[submodule "external/tinyxml2"] - path = external/tinyxml2 - url = https://github.com/leethomason/tinyxml2.git -[submodule "external/CoMISo"] - path = external/CoMISo - url = https://github.com/libigl/CoMISo.git -[submodule "external/cork"] - path = external/cork - url = https://github.com/libigl/cork.git -[submodule "external/imgui"] - path = external/imgui/imgui - url = https://github.com/ocornut/imgui.git -[submodule "external/glfw"] - path = external/glfw - url = https://github.com/glfw/glfw.git -[submodule "external/eigen"] - path = external/eigen - url = https://github.com/eigenteam/eigen-git-mirror.git -[submodule "external/pybind11"] - path = external/pybind11 - url = https://github.com/pybind/pybind11 diff --git a/shared/cmake/CXXFeatures.cmake b/cmake/CXXFeatures.cmake similarity index 100% rename from shared/cmake/CXXFeatures.cmake rename to cmake/CXXFeatures.cmake diff --git a/shared/cmake/DownloadProject.CMakeLists.cmake.in b/cmake/DownloadProject.CMakeLists.cmake.in similarity index 100% rename from shared/cmake/DownloadProject.CMakeLists.cmake.in rename to cmake/DownloadProject.CMakeLists.cmake.in diff --git a/shared/cmake/DownloadProject.cmake b/cmake/DownloadProject.cmake similarity index 100% rename from shared/cmake/DownloadProject.cmake rename to cmake/DownloadProject.cmake diff --git a/shared/cmake/FindCORK.cmake b/cmake/FindCORK.cmake similarity index 100% rename from shared/cmake/FindCORK.cmake rename to cmake/FindCORK.cmake diff --git a/shared/cmake/FindMATLAB.cmake b/cmake/FindMATLAB.cmake similarity index 100% rename from shared/cmake/FindMATLAB.cmake rename to cmake/FindMATLAB.cmake diff --git a/shared/cmake/FindMOSEK.cmake b/cmake/FindMOSEK.cmake similarity index 100% rename from shared/cmake/FindMOSEK.cmake rename to cmake/FindMOSEK.cmake diff --git a/cmake/LibiglDownloadExternal.cmake b/cmake/LibiglDownloadExternal.cmake new file mode 100644 index 000000000..56082ce9b --- /dev/null +++ b/cmake/LibiglDownloadExternal.cmake @@ -0,0 +1,109 @@ +################################################################################ +include(DownloadProject) + +# Shortcut function +function(igl_download_project name) + download_project( + PROJ ${name} + SOURCE_DIR ${LIBIGL_EXTERNAL}/${name} + DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/${name} + QUIET + ${ARGN} + ) +endfunction() + +################################################################################ + +## CGAL +function(igl_download_cgal) + igl_download_project(cgal + GIT_REPOSITORY https://github.com/libigl/cgal.git + GIT_TAG f7c3c8212b56c0d6dae63787efc99093f4383415 + ) +endfunction() + +## CoMISo +function(igl_download_comiso) + igl_download_project(CoMISo + GIT_REPOSITORY https://github.com/libigl/CoMISo.git + GIT_TAG fea3ee0ba7d42ee3eca202d484e4fad855e4d6aa + ) +endfunction() + +## Cork +function(igl_download_cork) + igl_download_project(cork + GIT_REPOSITORY https://github.com/libigl/cork.git + GIT_TAG 27ad8a285838f5a480d856429e39d3d56d4338f9 + ) +endfunction() + +## Eigen +function(igl_download_eigen) + igl_download_project(eigen + URL http://bitbucket.org/eigen/eigen/get/3.2.10.tar.gz + URL_MD5 8ad10ac703a78143a4062c9bda9d8fd3 + ) +endfunction() + +## Embree +function(igl_download_embree) + igl_download_project(embree + URL https://github.com/embree/embree/archive/v2.17.4.tar.gz + URL_MD5 2038f3216b1d626e87453aee72c470e5 + # GIT_REPOSITORY https://github.com/embree/embree.git + # GIT_TAG cb61322db3bb7082caed21913ad14869b436fe78 + ) +endfunction() + +## GLFW +function(igl_download_glfw) + igl_download_project(glfw + GIT_REPOSITORY https://github.com/glfw/glfw.git + GIT_TAG 58cc4b2c5c2c9a245e09451437dd6f5af4d60c84 + ) +endfunction() + +## ImGui +function(igl_download_imgui) + download_project( + PROJ imgui + SOURCE_DIR ${LIBIGL_EXTERNAL}/imgui/imgui + DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/${name} + GIT_REPOSITORY https://github.com/ocornut/imgui.git + GIT_TAG bc6ac8b2aee0614debd940e45bc9cd0d9b355c86 + ) +endfunction() + +## pybind11 +function(igl_download_pybind11) + igl_download_project(pybind11 + GIT_REPOSITORY https://github.com/pybind/pybind11.git + GIT_TAG 2d0507db43cd5a117f7843e053b17dffca114107 + ) +endfunction() + +## TetGen +function(igl_download_tetgen) + igl_download_project(tetgen + GIT_REPOSITORY https://github.com/libigl/tetgen.git + GIT_TAG d2dcc33cb8551f16e302c8130ce12fa52992cd09 + ) +endfunction() + +## TinyXML +function(igl_download_tinyxml2) + igl_download_project(tinyxml2 + GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git + GIT_TAG d175e9de0be0d4db75d0a8cf065599a435a87eb6 + ) +endfunction() + +## Triangle +function(igl_download_triangle) + igl_download_project(triangle + GIT_REPOSITORY https://github.com/libigl/triangle.git + GIT_TAG d6761dd691e2e1318c83bf7773fea88d9437464a + ) +endfunction() + diff --git a/shared/cmake/libigl-config.cmake.in b/cmake/libigl-config.cmake.in similarity index 100% rename from shared/cmake/libigl-config.cmake.in rename to cmake/libigl-config.cmake.in diff --git a/shared/cmake/libigl.cmake b/cmake/libigl.cmake similarity index 91% rename from shared/cmake/libigl.cmake rename to cmake/libigl.cmake index 6728f0fc8..855f4458e 100644 --- a/shared/cmake/libigl.cmake +++ b/cmake/libigl.cmake @@ -27,17 +27,15 @@ find_package(OpenGL) # --> OPENGL_FOUND ### Available options ### option(LIBIGL_USE_STATIC_LIBRARY "Use libigl as static library" ON) -option(LIBIGL_WITH_ANTTWEAKBAR "Use AntTweakBar" OFF) option(LIBIGL_WITH_CGAL "Use CGAL" ON) option(LIBIGL_WITH_COMISO "Use CoMiso" ON) option(LIBIGL_WITH_CORK "Use Cork" OFF) option(LIBIGL_WITH_EMBREE "Use Embree" OFF) -option(LIBIGL_WITH_LIM "Use LIM" ON) option(LIBIGL_WITH_MATLAB "Use Matlab" "${Matlab_FOUND}") option(LIBIGL_WITH_MOSEK "Use MOSEK" "${MOSEK_FOUND}") option(LIBIGL_WITH_OPENGL "Use OpenGL" "${OPENGL_FOUND}") option(LIBIGL_WITH_OPENGL_GLFW "Use GLFW" "${OPENGL_FOUND}") -option(LIBIGL_WITH_OPENGL_GLFW_IMGUI "Use ImGui" ON) +option(LIBIGL_WITH_OPENGL_GLFW_IMGUI "Use ImGui" "${OPENGL_FOUND}") option(LIBIGL_WITH_PNG "Use PNG" ON) option(LIBIGL_WITH_TETGEN "Use Tetgen" ON) option(LIBIGL_WITH_TRIANGLE "Use Triangle" ON) @@ -52,7 +50,7 @@ endif() ################################################################################ ### Configuration -set(LIBIGL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../..") +set(LIBIGL_ROOT "${CMAKE_CURRENT_LIST_DIR}/..") set(LIBIGL_SOURCE_DIR "${LIBIGL_ROOT}/include") set(LIBIGL_EXTERNAL "${LIBIGL_ROOT}/external") @@ -63,6 +61,10 @@ else() set(IGL_SCOPE INTERFACE) endif() +# Download and update 3rdparty libraries +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +include(LibiglDownloadExternal) + ################################################################################ ### IGL Common ################################################################################ @@ -86,6 +88,9 @@ target_compile_features(igl_common INTERFACE ${CXX11_FEATURES}) if(MSVC) # Enable parallel compilation for Visual Studio target_compile_options(igl_common INTERFACE /MP /bigobj) + if(LIBIGL_WITH_CGAL) + target_compile_options(igl_common INTERFACE "/MD$<$:d>") + endif() endif() if(BUILD_SHARED_LIBS) @@ -98,7 +103,8 @@ if(TARGET Eigen3::Eigen) # If an imported target already exists, use it target_link_libraries(igl_common INTERFACE Eigen3::Eigen) else() - target_include_directories(igl_common SYSTEM INTERFACE + igl_download_eigen() + target_include_directories(igl_common SYSTEM INTERFACE $ $ ) @@ -110,20 +116,6 @@ target_link_libraries(igl_common INTERFACE ${CMAKE_THREAD_LIBS_INIT}) ################################################################################ -include(DownloadProject) - -# Shortcut function -function(igl_download_project name) - download_project( - PROJ ${name} - SOURCE_DIR ${LIBIGL_EXTERNAL}/${name} - DOWNLOAD_DIR ${LIBIGL_EXTERNAL}/.cache/${name} - ${ARGN} - ) -endfunction() - -################################################################################ - ## CGAL dependencies on Windows: GMP & MPFR function(igl_download_cgal_deps) if(WIN32) @@ -175,7 +167,6 @@ function(compile_igl_module module_dir) set_property(TARGET ${module_libname} PROPERTY EXPORT_NAME igl::${module_name}) endfunction() - ################################################################################ ### IGL Core ################################################################################ @@ -187,18 +178,6 @@ if(LIBIGL_USE_STATIC_LIBRARY) endif() compile_igl_module("core" ${SOURCES_IGL}) -################################################################################ -## Compile the AntTweakBar part ### -if(LIBIGL_WITH_ANTTWEAKBAR) - set(ANTTWEAKBAR_DIR "${LIBIGL_EXTERNAL}/AntTweakBar") - if(NOT TARGET AntTweakBar) - add_subdirectory("${ANTTWEAKBAR_DIR}" AntTweakBar) - endif() - compile_igl_module("anttweakbar") - target_link_libraries(igl_anttweakbar ${IGL_SCOPE} AntTweakBar) - target_include_directories(igl_anttweakbar ${IGL_SCOPE} "${ANTTWEAKBAR_DIR}/include") -endif() - ################################################################################ ### Compile the CGAL part ### if(LIBIGL_WITH_CGAL) @@ -253,6 +232,7 @@ endfunction() if(LIBIGL_WITH_COMISO) compile_igl_module("comiso") if(NOT TARGET CoMISo) + igl_download_comiso() add_subdirectory("${LIBIGL_EXTERNAL}/CoMISo" CoMISo) endif() target_link_libraries(igl_comiso ${IGL_SCOPE} CoMISo) @@ -265,6 +245,7 @@ if(LIBIGL_WITH_CORK) if(NOT TARGET cork) # call this "lib-cork" instead of "cork", otherwise cmake gets confused about # "cork" executable + igl_download_cork() add_subdirectory("${CORK_DIR}" "lib-cork") endif() compile_igl_module("cork") @@ -293,6 +274,7 @@ if(LIBIGL_WITH_EMBREE) endif() if(NOT TARGET embree) + igl_download_embree() add_subdirectory("${EMBREE_DIR}" "embree") endif() @@ -312,18 +294,6 @@ if(LIBIGL_WITH_EMBREE) endif() endif() -################################################################################ -### Compile the lim part ### -if(LIBIGL_WITH_LIM) - set(LIM_DIR "${LIBIGL_EXTERNAL}/lim") - if(NOT TARGET lim) - add_subdirectory("${LIM_DIR}" "lim") - endif() - compile_igl_module("lim") - target_link_libraries(igl_lim ${IGL_SCOPE} lim) - target_include_directories(igl_lim ${IGL_SCOPE} ${LIM_DIR}) -endif() - ################################################################################ ### Compile the matlab part ### if(LIBIGL_WITH_MATLAB) @@ -370,6 +340,7 @@ if(LIBIGL_WITH_OPENGL_GLFW) set(GLFW_BUILD_TESTS OFF CACHE BOOL " " FORCE) set(GLFW_BUILD_DOCS OFF CACHE BOOL " " FORCE) set(GLFW_INSTALL OFF CACHE BOOL " " FORCE) + igl_download_glfw() add_subdirectory(${LIBIGL_EXTERNAL}/glfw glfw) endif() target_link_libraries(igl_opengl_glfw ${IGL_SCOPE} igl_opengl glfw) @@ -383,6 +354,7 @@ if(LIBIGL_WITH_OPENGL_GLFW_IMGUI) # ImGui module compile_igl_module("opengl/glfw/imgui") if(NOT TARGET imgui) + igl_download_imgui() add_subdirectory(${LIBIGL_EXTERNAL}/imgui imgui) endif() target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui) @@ -409,6 +381,7 @@ endif() if(LIBIGL_WITH_TETGEN) set(TETGEN_DIR "${LIBIGL_EXTERNAL}/tetgen") if(NOT TARGET tetgen) + igl_download_tetgen() add_subdirectory("${TETGEN_DIR}" "tetgen") endif() compile_igl_module("tetgen") @@ -421,6 +394,7 @@ endif() if(LIBIGL_WITH_TRIANGLE) set(TRIANGLE_DIR "${LIBIGL_EXTERNAL}/triangle") if(NOT TARGET triangle) + igl_download_triangle() add_subdirectory("${TRIANGLE_DIR}" "triangle") endif() compile_igl_module("triangle") @@ -433,7 +407,9 @@ endif() if(LIBIGL_WITH_XML) set(TINYXML2_DIR "${LIBIGL_EXTERNAL}/tinyxml2") if(NOT TARGET tinyxml2) + igl_download_tinyxml2() add_library(tinyxml2 STATIC ${TINYXML2_DIR}/tinyxml2.cpp ${TINYXML2_DIR}/tinyxml2.h) + target_include_directories(tinyxml2 PUBLIC ${TINYXML2_DIR}) set_target_properties(tinyxml2 PROPERTIES COMPILE_DEFINITIONS "TINYXML2_EXPORT" VERSION "3.0.0" diff --git a/external/AntTweakBar/AntTweakBar_Doc.url b/external/AntTweakBar/AntTweakBar_Doc.url deleted file mode 100644 index 3c8bd4534..000000000 --- a/external/AntTweakBar/AntTweakBar_Doc.url +++ /dev/null @@ -1,7 +0,0 @@ -[InternetShortcut] -URL=http://anttweakbar.sourceforge.net/doc -Modified=C043A0DCA0FFC801E7 -HotKey=0 -IDList= -[{000214A0-0000-0000-C000-000000000046}] -Prop3=19,2 diff --git a/external/AntTweakBar/CMakeLists.txt b/external/AntTweakBar/CMakeLists.txt deleted file mode 100644 index 7c5aae62c..000000000 --- a/external/AntTweakBar/CMakeLists.txt +++ /dev/null @@ -1,41 +0,0 @@ -cmake_minimum_required(VERSION 3.1) - -add_library(AntTweakBar STATIC - # C source files - src/TwEventGLFW.c - src/TwEventGLUT.c - src/TwEventSDL.c - src/TwEventSDL12.c - src/TwEventSDL13.c - - # C++ source files - src/LoadOGL.cpp - src/LoadOGLCore.cpp - src/TwBar.cpp - src/TwColors.cpp - src/TwEventSFML.cpp - src/TwFonts.cpp - src/TwMgr.cpp - src/TwOpenGL.cpp - src/TwOpenGLCore.cpp - src/TwPrecomp.cpp -) - -# These are probably needed for windows/Linux, should append if windows/Linux -# src/TwEventWin.c -# src/TwEventX11.c -# src/TwDirect3D10.cpp -# src/TwDirect3D11.cpp -# src/TwDirect3D9.cpp - -target_include_directories(AntTweakBar PUBLIC include) - -if(APPLE) - set_target_properties( - AntTweakBar - PROPERTIES - COMPILE_FLAGS - "-fPIC -fno-strict-aliasing -x objective-c++") - target_compile_definitions( - AntTweakBar PUBLIC _MACOSX __PLACEMENT_NEW_INLINE) -endif() diff --git a/external/AntTweakBar/ChangeLog.txt b/external/AntTweakBar/ChangeLog.txt deleted file mode 100644 index e34167a33..000000000 --- a/external/AntTweakBar/ChangeLog.txt +++ /dev/null @@ -1,226 +0,0 @@ ---- AntTweakBar library change log --- - -* Version 1.16 (2013/03/21) - - - Moved AntTweakBar documentation to sourceforge, available at: - http://anttweakbar.sourceforge.net/doc - - AntTweakBar source code repository is now on sourceforge too at: - http://sourceforge.net/projects/anttweakbar - - Fixed several issues with the core profile on OSX 10.8 (Thanks to - Christoph G., George P. and Robert H. for their help). - - Fixed unwanted repeated key pressed (Thanks to Alec J. for the patch). - - Added Visual Studio 2012 projects to the repository. - - Memory representation of std::string has changed again with Visual Studio - 2012. Handled it. - - Modified Linux and OSX Makefiles to build also static version of the library - in addition to dynamic library (Thanks to Luigi R.). - - Fonts can be scaled globally through the "fontscaling" parameter, may be - useful for high density display (Suggested by Eric RH.). - - Fixed compilation issue with different system locale (Reported by Arnaud M.) - -* Version 1.15 (2012/07/22) - - - Added support for OpenGL Core Profile (3.2 and higher); it is enabled by - setting the TwGraphAPI parameter of the TwInit function to TW_OPENGL_CORE - (Thanks to Oystein E. and Arnaud M. for their contribution). - - Added a simple example that uses OpenGL Core Profile and SDL; see - TwGLCoreSDL.c . - - Added helper function TwEventX11 to handle native X11 events (Thanks to - Greg P. for the code). - - Added builtin fixed-width font for tweak bars; it is enabled through - the fontstyle bar parameter; it is not resizable (Thanks to Jay D. for - the font). - - Store and restore states of OpenGL vertex attribute arrays (Thanks to - Jerry J. and Eduard B.). - - Fixed memory access violation caused by the popup bar (Thanks to Matthias R. - for reporting it). - - Added code to overcome issue caused by the memory representation change - of std::string that occurs between Visual Studio 2008 and 2010. - -* Version 1.14 (2011/03/26) - - - Added 64 bit version of the library. - - Added multiple windows support (Inspired by comments and code from Evan F. - and Ivo H.) - - Better MacOSX support (Thanks to Alexis DH., Fabrice N., Diederick H., - Alec J.). - - Improved readability of overlapped transparent bars. Content of overlapped - regions is clipped and not drawn. This behavior can be disabled using - the bar parameter "overlap". - - Added support for Direct3D11 (Thanks to Jorge H., Lukasz M., Se1zen). - - Added an example based on DirectX 11. - - Added support for SDL 1.3 integration in addition to SDL 1.2. - ABI modification: TwEventSDL takes SDL version as an additional parameter. - - Added support for SFML 1.6 integration. - - Added support for GLFW 2.7 integration in addition to GLFW 2.6. This may - imply changing the calling convention of event callbacks. Can be done by - defining GLFW_CDECL before including AntTweakBar.h if needed. - - Added function TwKeyTest that checks if a key event would be processed by - AntTweakBar but without processing it. Needed to fix bad handling report of - WM_KEYUP and WM_KEYDOWN in TwEventWin (Thanks to Ryan DB. for reporting it). - - Added check sign for vars of type boolean. - - Added new bar parameter "buttonalign" to center or left-align buttons - (Suggested by Michael R.). - - Allowed values column width to be adjusted to fit its content. This is done - by setting the bar parameter valueswidth=fit (Requested by Koshmaar and - Michael R.). The user can also click in the left or right area near the - value width slider to fit column content. - - Added new helper function TwDefineEnumFromString to ease the defining of an - enum through a string of comma-separated enum values (Thanks to Bruno L. - for the suggestion and code). - - Fixed compilation issues with gcc4 (missing includes, warnings). - - Fixes for the fedora package maintained by Sean Middleditch. - - Fixed rotation widget display and interaction issues when the library is - compiled with gcc -O3 (Thanks to Ares L. for reporting this). - - Fixed SDL key event SDLK_RETURN handling after a bar is minimized (Thanks - to Sean M. for reporting this). - - Fixed issue with SDL_ShowCursor (Thanks to Hugues M. for reporting it). - - Fixed DirectX10 resource issue. - - Store and restore GL_TEXTURE_COORD_ARRAY state (Thanks to Jerry J. for - reporting this). - - Fixed mouse click repetition issue with passive event loop (Thanks to - Bruno L. for reporting it). - - Fixed issue with mouse button event when glut windows doesn't have focus - (Thanks to Scott J. for the fix). - - Reset enum content each time the var parameter "enum" is set using TwDefine - or TwSetParam (Following Carsten W. and Sulaiman remarks). - - Fixed memory corruption when more than one std_string are defined in a - custom struct (Thanks to Sulaiman for reporting it). - - Fixed mouse position issue with Direct3D9 fullscreen mode in TwSimpleDX9 - (Thanks to Paolo S. for pointing this out). - - Fixed ignored double-click in TwEvenWin (Thanks to H. Seungho for this). - -* Version 1.13 (2009/04/19) - - - Now compiles on Mac OSX (Many thanks to Evan F. for rewriting the OS - specific code, and to Tyler S. and Konstantin L. for their feedback). - - Added functions TwGetBarCount, TwGetBarByIndex, TwGetBarByName, - TwRefreshBar. - - Fixed bug related to var of type TW_TYPE_STDSTRING on Windows: Microsoft - implementation of std::string does not have the same size in Debug and - Release mode (hidden member added for debugging), which caused a crash when - mixing the Release version of AntTweakBar with a program compiled in Debug - mode (Thanks to Minh D. for reporting it). - - Added function TwGetParam and TwSetParam to allow access to the parameters - defining the behavior of bars and variables. - - Changed the bar/var parameters without value (like "show"/"hide") to - parameters with value ("visible=true or false") to be compatible with the - new TwGetParam and TwSetParam functions (the old syntax is still kept - for backward compatibility). - - Arrow keys and Return key can now be used to navigate and tweak values. - - Bars can now be moved partly outside of the window. They can still be - constrained to be fully contained in the window by setting the parameter - "contained=true". - - Added another way to move a bar by pressing mouse middle button in the bar. - -* Version 1.12 (2008/09/27) - - - Added new var types TW_TYPE_QUAT* and TW_TYPE_DIR* allowing for the - interactive tweaking of rotations (through quaternions) and 3D vectors - (directions). - - Better management of transparent tweak bars. New bar parameters added: - alpha=n text=dark/light. - - Default color scheme changed (now transparent by default). To reactivate the - previous scheme, call TwDefine("GLOBAL colorscheme=0") before creating bars. - - Added paramters to manage the bar behavior: resizable, movable, iconifiable, - fontresizable, alwaystop, alwaysbottom, visible, iconified (following - Jeppe F. B. feedback). - - Added functions TwSetBottomBar and TwGetBottomBar. - - The library can now be recompiled without requiring to install GLUT, GLFW - and SDL. - - New var parameters arrow, arrowcolor, axisx, axusy, axisz and showval added - for quaternion and direction types. - - Msvc specific keyword removed from PrefTimer (thanks to Tim J. for pointing - this out). - - Fixed bug related to popup behavior when the help bar is visible. - - GL_TEXTURE_RECTANGLE_ARB/EXT state is now saved and restored by TwDraw - (thanks to Cyril C. for suggesting this). - - glBlendFunc and glBlendEquationEXT are now saved and restored by TwDraw - (thanks to Sebastion B. for reporting the problem). - - Fixed bug related cursor visibility state with SDL (Thanks to Jeppe F. B. - for reporting it). - -* Version 1.11 (2007/12/10) - - - Now DirectX10 is also supported in addition to OpenGL and DirectX9. - Initialization of AntTweakBar with DX10: TwInit(TW_DIRECT3D10, d3d10Device). - - A new example that uses DirectX10 has been added: see TwSimpleDX10 in the - examples directory. - - Recap for string variables added to the doc. See - http://anttweakbar.sourceforge.net/doc/tools:anttweakbar:varstring - - An example that illustrates the use of the different types of string - variables has been added. See TwString in the examples directory. - - Added some code for multi-thread safety (thanks to Daniel 'DrUiD' B. for - the tip). - - Cleanup of the Help bar. Now only variables having help are displayed in - the Help bar. - - Function TwHandleErrors documented. - - Separators don't require a name anymore. - - Var parameter 'order' becomes 'colororder', and its values become 'rgba' and - 'argb' (order=ogl and order=dx still exist but are deprecated). - - A small icon added for variables of type bool. - - Function TwCopyCDStringToLibrary added. - - The keyword 'GLOBAL' has been added for TwDefine commands that don't apply - to a specific tweak bar (suggested by Koshmaar). - - TwEventWin32 becomes TwEventWin (a #define has been added to keep - compatibility with previous applications). - - TwWindowSize(0,0) now releases graphics resources allocated by AntTweakBar - (may be useful for Direct3D applications, before resizing for instance). - - A wrong assert removed from TwMgr.cpp (thanks to Chris W. for reporting it). - - Some slight cosmetic changes (again). - -* Version 1.10 (2007/08/31) - - - Variable values can now also be entered and edited via keyboard input - (implementation based on modifications made by Laury M., thank you Laury). - - Variables of type string are now handled: 3 types of string added - TW_TYPE_CSSTRING, TW_TYPE_CDSTRING and TW_STDSTRING. - - Text selection and copy/paste added. - - Position of bar icons is modifiable (cf. TwBar paramters iconPos, iconAlign - and iconMargin). - - Separators can be added in a bar (TwAddSeparator). - - OpenGL: states related to 3D textures and multitexturing are now saved and - restored by TwDraw (thanks to Dylan D. for pointing this out). - - Selected element of a listbox now highlighted. - - ReadOnly and ReadWrite behavior of buttons revisited. - - Documentation improved (examples for TwType, new functions documented,...). - - Some slight cosmetic changes. - -* Version 1.05 (2007/03/01) - - - Listbox and rotoslider buttons added. - - Icon resources (AntTweakBar.rc) no more required for static linkage (thanks - to Joe C. for pointing this out). - - Fixed a rotoslider precision problem when mouse button is released. - -* Version 1.04 (2006/12/16) - - - OpenGL: Vertex buffer object state and Vertex/fragment program and object - states are now reset and restored by TwDraw (thanks to Dylan D. and Siva K. - for pointing this out). - - Fixed problem that occurs when an initialized variable of type float/double - is displayed. - -* Version 1.03 (2006/10/28) - - - Medium font antialiased. - - Now also compiles on 64 bits x86 platform (thanks to Herling G. for this). - - Slight changes to avoid visual 8 secure crt warnings. - - Corrected behaviour if min/max values are not defined. - - Modif to avoid looping to max value when reaching zero with unsigned types. - - Min/max/step parameters for type TW_TYPE_CHAR now read ascii codes (not - characters). - - Added FPU precision control (because DirectX changes it). - - Fixed problem that occurs when the lib is initialized/uninitialized more - than once (thanks Lukasz P. for reporting it). - - Distribution follows Savannah's recommendations. - -* Version 1.02 (2006/09/27) - - - Library sources released. - -* Version 1.01 (2006/09/14) - - - First official release. - - \ No newline at end of file diff --git a/external/AntTweakBar/Clean.bat b/external/AntTweakBar/Clean.bat deleted file mode 100644 index 3e0196e00..000000000 --- a/external/AntTweakBar/Clean.bat +++ /dev/null @@ -1,23 +0,0 @@ -RMDIR /S /Q src\debug32 -RMDIR /S /Q src\debug64 -RMDIR /S /Q src\release32 -RMDIR /S /Q src\release64 -RMDIR /S /Q src\ipch -CD src -DEL *.ncb *.aps *.o *.bak *.user *.sdf -DEL /A:h *.suo -CD .. -RMDIR /S /Q lib\debug -RMDIR /S /Q examples\debug32 -RMDIR /S /Q examples\debug64 -RMDIR /S /Q examples\tmp -DEL lib\*.exp -CD examples -DEL *.ncb *.aps *.o *.bak *.user *.sdf -DEL /A:h *.suo -DEL /S BuildLog.htm -CD .. - -PAUSE - - diff --git a/external/AntTweakBar/License.txt b/external/AntTweakBar/License.txt deleted file mode 100644 index 4f6d9ca19..000000000 --- a/external/AntTweakBar/License.txt +++ /dev/null @@ -1,22 +0,0 @@ ---- AntTweakBar license --- - -Copyright (C) 2005-2013 Philippe Decaudin - -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the -use of this software. - -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject to -the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim -that you wrote the original software. If you use this software in a product, -an acknowledgment in the product documentation would be appreciated but is not -required. - -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. - diff --git a/external/AntTweakBar/Readme.txt b/external/AntTweakBar/Readme.txt deleted file mode 100644 index 7d555e83f..000000000 --- a/external/AntTweakBar/Readme.txt +++ /dev/null @@ -1,15 +0,0 @@ -AntTweakBar development library -------------------------------- - - -AntTweakBar is a small and easy-to-use C/C++ library that allows programmers -to quickly add a light and intuitive GUI into OpenGL and DirectX based -graphic programs to interactively tweak parameters. - -This package includes the development version of the AntTweakBar library -for Windows, GNU/Linux and OSX, and some program examples (sources + binaries). - -For installation and documentation please refer to: -http://anttweakbar.sourceforge.net/doc - - diff --git a/external/AntTweakBar/examples/Examples_VS2008.sln b/external/AntTweakBar/examples/Examples_VS2008.sln deleted file mode 100644 index 6f92d974e..000000000 --- a/external/AntTweakBar/examples/Examples_VS2008.sln +++ /dev/null @@ -1,123 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwCopyDLL", "TwCopyDLL.vcproj", "{AB180E0E-0EFA-4AD4-8F08-4492D144D963}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleGLFW", "TwSimpleGLFW.vcproj", "{29C096AF-172E-4A36-A1FE-E15B259D6834}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleGLUT", "TwSimpleGLUT.vcproj", "{CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleSDL", "TwSimpleSDL.vcproj", "{3B516919-D0DA-43CE-820E-8306368F605B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleDX9", "TwSimpleDX9.vcproj", "{6B414E54-701C-4ED3-9034-F5CD7BFC3451}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwAdvanced1", "TwAdvanced1.vcproj", "{008D1CEC-1586-4C89-B524-DF15D9605163}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwString", "TwString.vcproj", "{29C097AF-176E-4C36-A12E-E15B250D6835}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleDX10", "TwSimpleDX10.vcproj", "{6B412E54-70AC-40D3-903F-F5CD73FC3D51}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleDX11", "TwSimpleDX11.vcproj", "{6D417E54-50AC-40D3-913A-35CD73F93D51}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwDualGLUT", "TwDualGLUT.vcproj", "{DC6C7BF1-5AF3-295F-9385-C51E003A2856}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwGLCoreSDL", "TwGLCoreSDL.vcproj", "{3B5FCA22-D015-499E-8211-830ABC8F605B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleSFML", "TwSimpleSFML.vcproj", "{AA613E00-5339-4B87-9285-A53EFF3C9AB9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Debug|Win32.ActiveCfg = Debug|Win32 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Debug|Win32.Build.0 = Debug|Win32 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Debug|x64.ActiveCfg = Debug|x64 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Debug|x64.Build.0 = Debug|x64 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Release|Win32.ActiveCfg = Release|Win32 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Release|Win32.Build.0 = Release|Win32 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Release|x64.ActiveCfg = Release|x64 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Release|x64.Build.0 = Release|x64 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Debug|Win32.ActiveCfg = Debug|Win32 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Debug|Win32.Build.0 = Debug|Win32 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Debug|x64.ActiveCfg = Debug|x64 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Release|Win32.ActiveCfg = Release|Win32 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Release|Win32.Build.0 = Release|Win32 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Release|x64.ActiveCfg = Release|x64 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Debug|Win32.Build.0 = Debug|Win32 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Debug|x64.ActiveCfg = Debug|x64 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Debug|x64.Build.0 = Debug|x64 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Release|Win32.ActiveCfg = Release|Win32 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Release|Win32.Build.0 = Release|Win32 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Release|x64.ActiveCfg = Release|x64 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Release|x64.Build.0 = Release|x64 - {3B516919-D0DA-43CE-820E-8306368F605B}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B516919-D0DA-43CE-820E-8306368F605B}.Debug|Win32.Build.0 = Debug|Win32 - {3B516919-D0DA-43CE-820E-8306368F605B}.Debug|x64.ActiveCfg = Debug|x64 - {3B516919-D0DA-43CE-820E-8306368F605B}.Release|Win32.ActiveCfg = Release|Win32 - {3B516919-D0DA-43CE-820E-8306368F605B}.Release|Win32.Build.0 = Release|Win32 - {3B516919-D0DA-43CE-820E-8306368F605B}.Release|x64.ActiveCfg = Release|x64 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Debug|Win32.Build.0 = Debug|Win32 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Debug|x64.ActiveCfg = Debug|x64 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Debug|x64.Build.0 = Debug|x64 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Release|Win32.ActiveCfg = Release|Win32 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Release|Win32.Build.0 = Release|Win32 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Release|x64.ActiveCfg = Release|x64 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Release|x64.Build.0 = Release|x64 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Debug|Win32.ActiveCfg = Debug|Win32 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Debug|Win32.Build.0 = Debug|Win32 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Debug|x64.ActiveCfg = Debug|x64 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Release|Win32.ActiveCfg = Release|Win32 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Release|Win32.Build.0 = Release|Win32 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Release|x64.ActiveCfg = Release|x64 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Debug|Win32.ActiveCfg = Debug|Win32 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Debug|Win32.Build.0 = Debug|Win32 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Debug|x64.ActiveCfg = Debug|x64 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Release|Win32.ActiveCfg = Release|Win32 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Release|Win32.Build.0 = Release|Win32 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Release|x64.ActiveCfg = Release|x64 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Debug|Win32.Build.0 = Debug|Win32 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Debug|x64.ActiveCfg = Debug|x64 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Debug|x64.Build.0 = Debug|x64 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Release|Win32.ActiveCfg = Release|Win32 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Release|Win32.Build.0 = Release|Win32 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Release|x64.ActiveCfg = Release|x64 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Release|x64.Build.0 = Release|x64 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Debug|Win32.ActiveCfg = Debug|Win32 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Debug|Win32.Build.0 = Debug|Win32 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Debug|x64.ActiveCfg = Debug|x64 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Debug|x64.Build.0 = Debug|x64 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Release|Win32.ActiveCfg = Release|Win32 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Release|Win32.Build.0 = Release|Win32 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Release|x64.ActiveCfg = Release|x64 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Release|x64.Build.0 = Release|x64 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Debug|Win32.ActiveCfg = Debug|Win32 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Debug|Win32.Build.0 = Debug|Win32 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Debug|x64.ActiveCfg = Debug|x64 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Debug|x64.Build.0 = Debug|x64 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Release|Win32.ActiveCfg = Release|Win32 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Release|Win32.Build.0 = Release|Win32 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Release|x64.ActiveCfg = Release|x64 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Release|x64.Build.0 = Release|x64 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Debug|Win32.Build.0 = Debug|Win32 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Debug|x64.ActiveCfg = Debug|x64 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Release|Win32.ActiveCfg = Release|Win32 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Release|Win32.Build.0 = Release|Win32 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Release|x64.ActiveCfg = Release|x64 - {AA613E00-5339-4B87-9285-A53EFF3C9AB9}.Debug|Win32.ActiveCfg = Debug|Win32 - {AA613E00-5339-4B87-9285-A53EFF3C9AB9}.Debug|Win32.Build.0 = Debug|Win32 - {AA613E00-5339-4B87-9285-A53EFF3C9AB9}.Debug|x64.ActiveCfg = Debug|x64 - {AA613E00-5339-4B87-9285-A53EFF3C9AB9}.Release|Win32.ActiveCfg = Release|Win32 - {AA613E00-5339-4B87-9285-A53EFF3C9AB9}.Release|Win32.Build.0 = Release|Win32 - {AA613E00-5339-4B87-9285-A53EFF3C9AB9}.Release|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/external/AntTweakBar/examples/Examples_VS2012.sln b/external/AntTweakBar/examples/Examples_VS2012.sln deleted file mode 100644 index 61ed394b6..000000000 --- a/external/AntTweakBar/examples/Examples_VS2012.sln +++ /dev/null @@ -1,115 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2012 for Windows Desktop -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwCopyDLL", "TwCopyDLL.vcxproj", "{AB180E0E-0EFA-4AD4-8F08-4492D144D963}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleGLFW", "TwSimpleGLFW.vcxproj", "{29C096AF-172E-4A36-A1FE-E15B259D6834}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleGLUT", "TwSimpleGLUT.vcxproj", "{CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleSDL", "TwSimpleSDL.vcxproj", "{3B516919-D0DA-43CE-820E-8306368F605B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleDX9", "TwSimpleDX9.vcxproj", "{6B414E54-701C-4ED3-9034-F5CD7BFC3451}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwAdvanced1", "TwAdvanced1.vcxproj", "{008D1CEC-1586-4C89-B524-DF15D9605163}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwString", "TwString.vcxproj", "{29C097AF-176E-4C36-A12E-E15B250D6835}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleDX10", "TwSimpleDX10.vcxproj", "{6B412E54-70AC-40D3-903F-F5CD73FC3D51}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwSimpleDX11", "TwSimpleDX11.vcxproj", "{6D417E54-50AC-40D3-913A-35CD73F93D51}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwDualGLUT", "TwDualGLUT.vcxproj", "{DC6C7BF1-5AF3-295F-9385-C51E003A2856}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TwGLCoreSDL", "TwGLCoreSDL.vcxproj", "{3B5FCA22-D015-499E-8211-830ABC8F605B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Debug|Win32.ActiveCfg = Debug|Win32 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Debug|Win32.Build.0 = Debug|Win32 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Debug|x64.ActiveCfg = Debug|x64 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Debug|x64.Build.0 = Debug|x64 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Release|Win32.ActiveCfg = Release|Win32 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Release|Win32.Build.0 = Release|Win32 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Release|x64.ActiveCfg = Release|x64 - {AB180E0E-0EFA-4AD4-8F08-4492D144D963}.Release|x64.Build.0 = Release|x64 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Debug|Win32.ActiveCfg = Debug|Win32 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Debug|Win32.Build.0 = Debug|Win32 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Debug|x64.ActiveCfg = Debug|x64 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Release|Win32.ActiveCfg = Release|Win32 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Release|Win32.Build.0 = Release|Win32 - {29C096AF-172E-4A36-A1FE-E15B259D6834}.Release|x64.ActiveCfg = Release|x64 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Debug|Win32.Build.0 = Debug|Win32 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Debug|x64.ActiveCfg = Debug|x64 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Debug|x64.Build.0 = Debug|x64 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Release|Win32.ActiveCfg = Release|Win32 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Release|Win32.Build.0 = Release|Win32 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Release|x64.ActiveCfg = Release|x64 - {CC6C3AFD-5DD9-498F-9184-C53E663C2ABF}.Release|x64.Build.0 = Release|x64 - {3B516919-D0DA-43CE-820E-8306368F605B}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B516919-D0DA-43CE-820E-8306368F605B}.Debug|Win32.Build.0 = Debug|Win32 - {3B516919-D0DA-43CE-820E-8306368F605B}.Debug|x64.ActiveCfg = Debug|x64 - {3B516919-D0DA-43CE-820E-8306368F605B}.Release|Win32.ActiveCfg = Release|Win32 - {3B516919-D0DA-43CE-820E-8306368F605B}.Release|Win32.Build.0 = Release|Win32 - {3B516919-D0DA-43CE-820E-8306368F605B}.Release|x64.ActiveCfg = Release|x64 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Debug|Win32.Build.0 = Debug|Win32 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Debug|x64.ActiveCfg = Debug|x64 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Debug|x64.Build.0 = Debug|x64 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Release|Win32.ActiveCfg = Release|Win32 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Release|Win32.Build.0 = Release|Win32 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Release|x64.ActiveCfg = Release|x64 - {6B414E54-701C-4ED3-9034-F5CD7BFC3451}.Release|x64.Build.0 = Release|x64 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Debug|Win32.ActiveCfg = Debug|Win32 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Debug|Win32.Build.0 = Debug|Win32 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Debug|x64.ActiveCfg = Debug|x64 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Release|Win32.ActiveCfg = Release|Win32 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Release|Win32.Build.0 = Release|Win32 - {008D1CEC-1586-4C89-B524-DF15D9605163}.Release|x64.ActiveCfg = Release|x64 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Debug|Win32.ActiveCfg = Debug|Win32 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Debug|Win32.Build.0 = Debug|Win32 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Debug|x64.ActiveCfg = Debug|x64 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Release|Win32.ActiveCfg = Release|Win32 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Release|Win32.Build.0 = Release|Win32 - {29C097AF-176E-4C36-A12E-E15B250D6835}.Release|x64.ActiveCfg = Release|x64 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Debug|Win32.ActiveCfg = Debug|Win32 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Debug|Win32.Build.0 = Debug|Win32 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Debug|x64.ActiveCfg = Debug|x64 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Debug|x64.Build.0 = Debug|x64 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Release|Win32.ActiveCfg = Release|Win32 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Release|Win32.Build.0 = Release|Win32 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Release|x64.ActiveCfg = Release|x64 - {6B412E54-70AC-40D3-903F-F5CD73FC3D51}.Release|x64.Build.0 = Release|x64 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Debug|Win32.ActiveCfg = Debug|Win32 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Debug|Win32.Build.0 = Debug|Win32 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Debug|x64.ActiveCfg = Debug|x64 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Debug|x64.Build.0 = Debug|x64 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Release|Win32.ActiveCfg = Release|Win32 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Release|Win32.Build.0 = Release|Win32 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Release|x64.ActiveCfg = Release|x64 - {6D417E54-50AC-40D3-913A-35CD73F93D51}.Release|x64.Build.0 = Release|x64 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Debug|Win32.ActiveCfg = Debug|Win32 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Debug|Win32.Build.0 = Debug|Win32 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Debug|x64.ActiveCfg = Debug|x64 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Debug|x64.Build.0 = Debug|x64 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Release|Win32.ActiveCfg = Release|Win32 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Release|Win32.Build.0 = Release|Win32 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Release|x64.ActiveCfg = Release|x64 - {DC6C7BF1-5AF3-295F-9385-C51E003A2856}.Release|x64.Build.0 = Release|x64 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Debug|Win32.Build.0 = Debug|Win32 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Debug|x64.ActiveCfg = Debug|x64 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Release|Win32.ActiveCfg = Release|Win32 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Release|Win32.Build.0 = Release|Win32 - {3B5FCA22-D015-499E-8211-830ABC8F605B}.Release|x64.ActiveCfg = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/external/AntTweakBar/examples/Makefile b/external/AntTweakBar/examples/Makefile deleted file mode 100644 index 33b58b5c2..000000000 --- a/external/AntTweakBar/examples/Makefile +++ /dev/null @@ -1,104 +0,0 @@ -####### Compiler, tools and options - - -#---- Release -CXXCFG = -O3 -LFLAGS = -L../lib -OUT_DIR = bin64 -#---- Debug -#CXXCFG = -g -D_DEBUG -#LFLAGS = -Wl -L../lib/debug64 -#OUT_DIR = debug64 - - -CXX = g++ -CXXFLAGS = $(CXXCFG) -Wall -fno-strict-aliasing -INCPATH = -I../include -I/usr/local/include -I/usr/X11R6/include -I/usr/include -LIBS = -L/usr/X11R6/lib -lAntTweakBar -lGL -lGLU -lX11 -lXext -lXmu -lXrandr -lpthread -lm - -DEL_FILE = rm -f -DEL_DIR = rmdir -NO_STDERR = 2> /dev/null -EXP_SH = '\#!/bin/sh' -EXP_PATH = 'export LD_LIBRARY_PATH=`dirname $$0`/../../lib ; $$0.out' - -####### Files - - -SRC_FILES = TwSimpleGLFW.c TwSimpleGLUT.c TwSimpleSDL.c TwAdvanced1.cpp TwString.cpp TwDualGLUT.c - - -####### Build rules - - -#first: depend all -first: all - -all: Makefile $(SRC_FILES) - - @echo "===== Build TwSimpleGLUT ====" - $(CXX) $(CXXFLAGS) $(INCPATH) TwSimpleGLUT.c $(LFLAGS) -lglut $(LIBS) -o $(OUT_DIR)/TwSimpleGLUT.out - @echo $(EXP_SH) > $(OUT_DIR)/TwSimpleGLUT - @echo $(EXP_PATH) >> $(OUT_DIR)/TwSimpleGLUT - @chmod +x $(OUT_DIR)/TwSimpleGLUT - @echo "To execute the example, run " $(OUT_DIR)/TwSimpleGLUT - - @echo "===== Build TwSimpleSDL ====" - $(CXX) $(CXXFLAGS) $(INCPATH) TwSimpleSDL.c $(LFLAGS) -lSDL $(LIBS) -o $(OUT_DIR)/TwSimpleSDL.out - @echo $(EXP_SH) > $(OUT_DIR)/TwSimpleSDL - @echo $(EXP_PATH) >> $(OUT_DIR)/TwSimpleSDL - @chmod +x $(OUT_DIR)/TwSimpleSDL - @echo "To execute the example, run " $(OUT_DIR)/TwSimpleSDL - - @echo "===== Build TwSimpleGLFW ====" - $(CXX) $(CXXFLAGS) $(INCPATH) TwSimpleGLFW.c $(LFLAGS) -lglfw $(LIBS) -o $(OUT_DIR)/TwSimpleGLFW.out - @echo $(EXP_SH) > $(OUT_DIR)/TwSimpleGLFW - @echo $(EXP_PATH) >> $(OUT_DIR)/TwSimpleGLFW - @chmod +x $(OUT_DIR)/TwSimpleGLFW - @echo "To execute the example, run " $(OUT_DIR)/TwSimpleGLFW - - @echo "===== Build TwDualGLUT ====" - $(CXX) $(CXXFLAGS) $(INCPATH) TwDualGLUT.c $(LFLAGS) -lglut $(LIBS) -o $(OUT_DIR)/TwDualGLUT.out - @echo $(EXP_SH) > $(OUT_DIR)/TwDualGLUT - @echo $(EXP_PATH) >> $(OUT_DIR)/TwDualGLUT - @chmod +x $(OUT_DIR)/TwDualGLUT - @echo "To execute the example, run " $(OUT_DIR)/TwDualGLUT - - @echo "===== Build TwAdvanced1 ====" - $(CXX) $(CXXFLAGS) $(INCPATH) TwAdvanced1.cpp $(LFLAGS) -lglfw $(LIBS) -o $(OUT_DIR)/TwAdvanced1.out - @echo $(EXP_SH) > $(OUT_DIR)/TwAdvanced1 - @echo $(EXP_PATH) >> $(OUT_DIR)/TwAdvanced1 - @chmod +x $(OUT_DIR)/TwAdvanced1 - @echo "To execute the example, run " $(OUT_DIR)/TwAdvanced1 - - @echo "===== Build TwString ====" - $(CXX) $(CXXFLAGS) $(INCPATH) TwString.cpp $(LFLAGS) -lglut $(LIBS) -o $(OUT_DIR)/TwString.out - @echo $(EXP_SH) > $(OUT_DIR)/TwString - @echo $(EXP_PATH) >> $(OUT_DIR)/TwString - @chmod +x $(OUT_DIR)/TwString - @echo "To execute the example, run " $(OUT_DIR)/TwString - -# append dependencies to this Makefile -#depend: -# @echo "===== Make dependencies =====" -# makedepend -Y -# makedepend -a -Y -- $(CXXFLAGS) $(INCPATH) -- $(SRC_FILES) $(NO_STDERR) - - -# clean temporary files -clean: - @echo "===== Clean =====" - -$(DEL_FILE) *.o - -$(DEL_FILE) *~ core *.core *.stackdump - -$(DEL_FILE) debug64/* - -$(DEL_DIR) debug64 - - -####### DEPENDENCIES - -TwSimpleGLFW.o: ../include/AntTweakBar.h -TwSimpleGLUT.o: ../include/AntTweakBar.h -TwDualGLUT.o: ../include/AntTweakBar.h -TwSimpleSDL.o: ../include/AntTweakBar.h -TwAdvanced1.o: ../include/AntTweakBar.h -TwString.o: ../include/AntTweakBar.h diff --git a/external/AntTweakBar/examples/Makefile.osx b/external/AntTweakBar/examples/Makefile.osx deleted file mode 100644 index 79a0f54a8..000000000 --- a/external/AntTweakBar/examples/Makefile.osx +++ /dev/null @@ -1,100 +0,0 @@ -####### Compiler, tools and options - - -#---- Release -CXXCFG = -O3 -LFLAGS = -L../lib -OUT_DIR = bin64 -#---- Debug -#CXXCFG = -g -D_DEBUG -#LFLAGS = -Wl -L../lib/debug64 -#OUT_DIR = debug64 - - -#BASE = /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks -CXX = g++ -CXXFLAGS = $(CXXCFG) -Wall -fno-strict-aliasing -D_MACOSX -INCPATH = -I../include -I/usr/local/include -I/usr/X11R6/include -I/usr/include -#-I$(BASE)/OpenGL.framework/Headers/ -I$(BASE)/AppKit.framework/Headers/ - -LIBS = ../lib/libAntTweakBar.dylib -lpthread -lm -framework AppKit -framework OpenGL - -DEL_FILE = rm -f -DEL_DIR = rmdir -NO_STDERR = 2> /dev/null -EXP_PATH = 'export DYLD_LIBRARY_PATH=`dirname $$0`/../../lib ; $$0.out' - - -####### Files - - -SRC_FILES = TwSimpleGLUT.c TwSimpleSDL.c TwSimpleGLFW.c TwAdvanced1.cpp TwString.cpp TwDualGLUT.c TwGLCoreSDL.c - - -####### Build rules - - -#first: depend all -first: all - -all: Makefile $(SRC_FILES) - - @echo "===== Build TwSimpleGLUT ====" - $(CXX) $(CXXFLAGS) $(INCPATH) -I$(BASE)/GLUT.framework/Headers/ TwSimpleGLUT.c $(LFLAGS) $(LIBS) -framework GLUT -o $(OUT_DIR)/TwSimpleGLUT.out - @echo $(EXP_PATH) > $(OUT_DIR)/TwSimpleGLUT - @chmod +x $(OUT_DIR)/TwSimpleGLUT - @echo "To execute the example, run " $(OUT_DIR)/TwSimpleGLUT - - @echo "===== Build TwDualGLUT ====" - $(CXX) $(CXXFLAGS) $(INCPATH) -I$(BASE)/GLUT.framework/Headers/ TwDualGLUT.c $(LFLAGS) $(LIBS) -framework GLUT -o $(OUT_DIR)/TwDualGLUT.out - @echo $(EXP_PATH) > $(OUT_DIR)/TwDualGLUT - @chmod +x $(OUT_DIR)/TwDualGLUT - @echo "To execute the example, run " $(OUT_DIR)/TwDualGLUT - - @echo "===== Build TwString ====" - $(CXX) $(CXXFLAGS) $(INCPATH) -I$(BASE)/GLUT.framework/Headers/ TwString.cpp $(LFLAGS) $(LIBS) -framework GLUT -o $(OUT_DIR)/TwString.out - @echo $(EXP_PATH) > $(OUT_DIR)/TwString - @chmod +x $(OUT_DIR)/TwString - @echo "To execute the example, run " $(OUT_DIR)/TwString - -# @echo "===== Build TwSimpleSDL ====" -# $(CXX) $(CXXFLAGS) $(INCPATH) -I$(BASE)/SDL.framework/Headers/ TwSimpleSDL.c $(LFLAGS) -framework SDL $(LIBS) -o $(OUT_DIR)/TwSimpleSDL.out -# @echo $(EXP_PATH) > $(OUT_DIR)/TwSimpleSDL -# @chmod +x $(OUT_DIR)/TwSimpleSDL - -# @echo "===== Build TwSimpleGLFW ====" -# $(CXX) $(CXXFLAGS) $(INCPATH) TwSimpleGLFW.c $(LFLAGS) -lglfw -framework AGL -framework Carbon $(LIBS) -o $(OUT_DIR)/TwSimpleGLFW.out -# @echo $(EXP_PATH) > $(OUT_DIR)/TwSimpleGLFW -# @chmod +x $(OUT_DIR)/TwSimpleGLFW - -# @echo "===== Build TwAdvanced1 ====" -# $(CXX) $(CXXFLAGS) $(INCPATH) TwAdvanced1.cpp $(LFLAGS) -lglfw -framework AGL -framework Carbon $(LIBS) -o $(OUT_DIR)/TwAdvanced1.out -# @echo $(EXP_PATH) > $(OUT_DIR)/TwAdvanced1 -# @chmod +x $(OUT_DIR)/TwSimpleAdvanced1 - - -# append dependencies to this Makefile -#depend: -# @echo "===== Make dependencies =====" -# makedepend -Y -# makedepend -a -Y -- $(CXXFLAGS) $(INCPATH) -- $(SRC_FILES) $(NO_STDERR) - - -# clean temporary files -clean: - @echo "===== Clean =====" - -$(DEL_FILE) *.o - -$(DEL_FILE) *~ core *.core *.stackdump - -$(DEL_FILE) debug64/* - -$(DEL_DIR) debug64 - - -####### DEPENDENCIES - -TwSimpleGLFW.o: ../include/AntTweakBar.h -TwSimpleGLUT.o: ../include/AntTweakBar.h -TwDualGLUT.o: ../include/AntTweakBar.h -TwSimpleSDL.o: ../include/AntTweakBar.h -TwAdvanced1.o: ../include/AntTweakBar.h -TwString.o: ../include/AntTweakBar.h -TwGLCoreSDL.o: ../include/AntTweakBar.h diff --git a/external/AntTweakBar/examples/Readme.txt b/external/AntTweakBar/examples/Readme.txt deleted file mode 100644 index 64362ef31..000000000 --- a/external/AntTweakBar/examples/Readme.txt +++ /dev/null @@ -1,26 +0,0 @@ -Compiled versions of the examples for 32-bit and 64-bit systems can be found in -the examples/bin32 and examples/bin64 directories. - -Under GNU/Linux and OSX, you may need to rebuild the library and the examples. -To do so, under GNU/Linux, open a terminal, go in the src directory and type -make, then go in the examples directory and type make. Under OSX do the same -but type make -f Makefile.osx instead of make. - -To recompile the examples you also need the following external libraries -(for convenience Windows versions are included in the examples directory). - -- GLFW : http://www.glfw.org - -- GLUT : http://opengl.org/resources/libraries/glut - the windows version can be found at - http://www.xmission.com/~nate/glut.html - -- SDL : http://www.libsdl.org - -- SFML : http://www.sfml-dev.org - -- DirectX SDK if you want to recompile the Windows library & DX examples - http://msdn.microsoft.com/directx - The path to the DirectX shader compiler fxc.exe (included in the DirectX SDK) - must be listed in the VC++ directories. - diff --git a/external/AntTweakBar/examples/SDL-1.3.lib b/external/AntTweakBar/examples/SDL-1.3.lib deleted file mode 100644 index 004e07593..000000000 Binary files a/external/AntTweakBar/examples/SDL-1.3.lib and /dev/null differ diff --git a/external/AntTweakBar/examples/SDL.lib b/external/AntTweakBar/examples/SDL.lib deleted file mode 100644 index 131fb1c51..000000000 Binary files a/external/AntTweakBar/examples/SDL.lib and /dev/null differ diff --git a/external/AntTweakBar/examples/TwAdvanced1.cpp b/external/AntTweakBar/examples/TwAdvanced1.cpp deleted file mode 100644 index ae214d149..000000000 --- a/external/AntTweakBar/examples/TwAdvanced1.cpp +++ /dev/null @@ -1,737 +0,0 @@ -// --------------------------------------------------------------------------- -// -// @file TwAdvanced1.cpp -// @brief An example showing many features of AntTweakBar, -// including variable accessed by callbacks and -// the definition of a custom structure type. -// It also uses OpenGL and GLFW windowing system -// but could be easily adapted to other frameworks. -// -// AntTweakBar: http://anttweakbar.sourceforge.net/doc -// OpenGL: http://www.opengl.org -// GLFW: http://www.glfw.org -// -// -// This example draws a simple scene that can be re-tessellated -// interactively, and illuminated dynamically by an adjustable -// number of moving lights. -// -// -// @author Philippe Decaudin -// @date 2006/05/20 -// -// --------------------------------------------------------------------------- - -#include - -#define GLFW_DLL // use GLFW as a dynamically linked library -#include "glfw.h" - -#include -#include -#include -#include -#if !defined(_WIN32) && !defined(_WIN64) -# define _snprintf snprintf -#endif - -const float FLOAT_2PI = 6.283185307f; // 2*PI - - -// Light structure: embeds light parameters -struct Light -{ - bool Active; // light On or Off - float Pos[4]; // light position (in homogeneous coordinates, ie. Pos[4]=1) - float Color[4]; // light color (no alpha, ie. Color[4]=1) - float Radius; // radius of the light influence area - float Dist0, Angle0, Height0, Speed0; // light initial cylindrical coordinates and speed - char Name[4]; // light short name (will be named "1", "2", "3",...) - enum AnimMode { ANIM_FIXED, ANIM_BOUNCE, ANIM_ROTATE, ANIM_COMBINED }; - AnimMode Animation; // light animation mode -}; - - -// Class that describes the scene and its methods -class Scene -{ -public: - bool Wireframe; // draw scene in wireframe or filled - int Subdiv; // number of subdivisions used to tessellate the scene - int NumLights; // number of dynamic lights - float BgColor0[3], BgColor1[3]; // top and bottom background colors - float Ambient; // scene ambient factor - float Reflection; // ground plane reflection factor (0=no reflection, 1=full reflection) - double RotYAngle; // rotation angle of the scene around its Y axis (in degree) - enum RotMode { ROT_OFF, ROT_CW, ROT_CCW }; - RotMode Rotation; // scene rotation mode (off, clockwise, counter-clockwise) - - Scene(); // constructor - ~Scene(); // destructor - void Init(bool changeLightPos); // (re)initialize the scene - void Draw() const; // draw scene - void Update(double time); // move lights - -private: - void CreateBar(); // create a tweak bar for lights - - // Some drawing subroutines - void DrawSubdivPlaneY(float xMin, float xMax, float y, float zMin, float zMax, int xSubdiv, int zSubdiv) const; - void DrawSubdivCylinderY(float xCenter, float yBottom, float zCenter, float height, float radiusBottom, float radiusTop, int sideSubdiv, int ySubdiv) const; - void DrawSubdivHaloZ(float x, float y, float z, float radius, int subdiv) const; - void DrawHalos(bool reflected) const; - - GLuint objList, groundList, haloList; // OpenGL display list IDs - int maxLights; // maximum number of dynamic lights allowed by the graphic card - Light * lights; // array of lights - TwBar * lightsBar; // pointer to the tweak bar for lights created by CreateBar() -}; - - -// Constructor -Scene::Scene() -{ - // Set scene members. - // The scene will be created by Scene::Init( ) - Wireframe = false; - Subdiv = 20; - NumLights = 0; - BgColor0[0] = 0.9f; - BgColor0[1] = 0.0f; - BgColor0[2] = 0.0f; - BgColor1[0] = 0.3f; - BgColor1[1] = 0.0f; - BgColor1[2] = 0.0f; - Ambient = 0.2f; - Reflection = 0.5f; - RotYAngle = 0; - Rotation = ROT_CCW; - objList = 0; - groundList = 0; - haloList = 0; - maxLights = 0; - lights = NULL; - lightsBar = NULL; -} - - -// Destructor -Scene::~Scene() -{ - // delete all lights - if( lights ) - delete[] lights; -} - - -// Create the scene, and (re)initialize lights if changeLights is true -void Scene::Init(bool changeLights) -{ - // Get the max number of lights allowed by the graphic card - glGetIntegerv(GL_MAX_LIGHTS, &maxLights); - if( maxLights>16 ) - maxLights = 16; - - // Create the lights array - if( lights==NULL && maxLights>0 ) - { - lights = new Light[maxLights]; - NumLights = 3; // default number of lights - if( NumLights>maxLights ) - NumLights = maxLights; - changeLights = true; // force lights initialization - - // Create a tweak bar for lights - CreateBar(); - } - - // (Re)initialize lights if needed (uses random values) - if( changeLights ) - for(int i=0; ilights[i].Color[1]) ? 1.0f-lights[i].Color[1] : 1.0f-lights[i].Color[0]; - lights[i].Color[3] = 1; - lights[i].Active = true; - } - - // Initialize some OpenGL states - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glEnable(GL_DEPTH_TEST); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glEnable(GL_LIGHTING); - glEnable(GL_CULL_FACE); - glEnable(GL_NORMALIZE); - glEnable(GL_COLOR_MATERIAL); - glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); - glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE); - - // Create objects display list using the current Subdiv parameter to control the tessellation - if( objList>0 ) - glDeleteLists(objList, 1); // delete previously created display list - objList = glGenLists(1); - glNewList(objList, GL_COMPILE); - DrawSubdivCylinderY(-0.9f, 0, -0.9f, 1.4f, 0.15f, 0.12f, Subdiv/2+8, Subdiv); - DrawSubdivCylinderY(+0.9f, 0, -0.9f, 1.4f, 0.15f, 0.12f, Subdiv/2+8, Subdiv); - DrawSubdivCylinderY(+0.9f, 0, +0.9f, 1.4f, 0.15f, 0.12f, Subdiv/2+8, Subdiv); - DrawSubdivCylinderY(-0.9f, 0, +0.9f, 1.4f, 0.15f, 0.12f, Subdiv/2+8, Subdiv); - DrawSubdivCylinderY(0, 0, 0, 0.4f, 0.5f, 0.3f, Subdiv+16, Subdiv/8+1); - DrawSubdivCylinderY(0, 0.4f, 0, 0.05f, 0.3f, 0.0f, Subdiv+16, Subdiv/16+1); - glEndList(); - - // Create ground display list - if( groundList>0 ) - glDeleteLists(groundList, 1); // delete previously created display list - groundList = glGenLists(1); - glNewList(groundList, GL_COMPILE); - DrawSubdivPlaneY(-1.2f, 1.2f, 0, -1.2f, 1.2f, (3*Subdiv)/2, (3*Subdiv)/2); - glEndList(); - - // Create display list to draw light halos - if( haloList>0 ) - glDeleteLists(haloList, 1); // delete previously created display list - haloList = glGenLists(1); - glNewList(haloList, GL_COMPILE); - DrawSubdivHaloZ(0, 0, 0, 1, 32); - glEndList(); -} - - -// Callback function associated to the 'Change lights' button of the lights tweak bar. -void TW_CALL ReinitCB(void *clientData) -{ - Scene *scene = static_cast(clientData); // scene pointer is stored in clientData - scene->Init(true); // re-initialize the scene -} - - -// Create a tweak bar for lights. -// New enum type and struct type are defined and used by this bar. -void Scene::CreateBar() -{ - // Create a new tweak bar and change its label, position and transparency - lightsBar = TwNewBar("Lights"); - TwDefine(" Lights label='Lights TweakBar' position='580 16' alpha=0 help='Use this bar to edit the lights in the scene.' "); - - // Add a variable of type int to control the number of lights - TwAddVarRW(lightsBar, "NumLights", TW_TYPE_INT32, &NumLights, - " label='Number of lights' keyIncr=l keyDecr=L help='Changes the number of lights in the scene.' "); - - // Set the NumLights min value (=0) and max value (depends on the user graphic card) - int zero = 0; - TwSetParam(lightsBar, "NumLights", "min", TW_PARAM_INT32, 1, &zero); - TwSetParam(lightsBar, "NumLights", "max", TW_PARAM_INT32, 1, &maxLights); - // Note, TwDefine could also have been used for that pupose like this: - // char def[256]; - // _snprintf(def, 255, "Lights/NumLights min=0 max=%d", maxLights); - // TwDefine(def); // min and max are defined using a definition string - - - // Add a button to re-initialize the lights; this button calls the ReinitCB callback function - TwAddButton(lightsBar, "Reinit", ReinitCB, this, - " label='Change lights' key=c help='Random changes of lights parameters.' "); - - // Define a new enum type for the tweak bar - TwEnumVal modeEV[] = // array used to describe the Scene::AnimMode enum values - { - { Light::ANIM_FIXED, "Fixed" }, - { Light::ANIM_BOUNCE, "Bounce" }, - { Light::ANIM_ROTATE, "Rotate" }, - { Light::ANIM_COMBINED, "Combined" } - }; - TwType modeType = TwDefineEnum("Mode", modeEV, 4); // create a new TwType associated to the enum defined by the modeEV array - - // Define a new struct type: light variables are embedded in this structure - TwStructMember lightMembers[] = // array used to describe tweakable variables of the Light structure - { - { "Active", TW_TYPE_BOOLCPP, offsetof(Light, Active), " help='Enable/disable the light.' " }, // Light::Active is a C++ boolean value - { "Color", TW_TYPE_COLOR4F, offsetof(Light, Color), " noalpha help='Light color.' " }, // Light::Color is represented by 4 floats, but alpha channel should be ignored - { "Radius", TW_TYPE_FLOAT, offsetof(Light, Radius), " min=0 max=4 step=0.02 help='Light radius.' " }, - { "Animation", modeType, offsetof(Light, Animation), " help='Change the animation mode.' " }, // use the enum 'modeType' created before to tweak the Light::Animation variable - { "Speed", TW_TYPE_FLOAT, offsetof(Light, Speed0), " readonly=true help='Light moving speed.' " } // Light::Speed is made read-only - }; - TwType lightType = TwDefineStruct("Light", lightMembers, 5, sizeof(Light), NULL, NULL); // create a new TwType associated to the struct defined by the lightMembers array - - // Use the newly created 'lightType' to add variables associated with lights - for(int i=0; i