-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cf88c76
Showing
1,956 changed files
with
408,320 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Cruft | ||
.DS_Store | ||
|
||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
image: registry.gitlab.com/cs184/clothsim_internal | ||
variables: | ||
GIT_SUBMODULE_STRATEGY: recursive | ||
|
||
stages: | ||
- build | ||
|
||
clothsim: | ||
stage: build | ||
script: | ||
- mkdir build | ||
- cd build | ||
- cmake .. | ||
- make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "ext/nanogui"] | ||
path = ext/nanogui | ||
url = https://github.com/wjakob/nanogui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(CGL) | ||
|
||
#------------------------------------------------------------------------------- | ||
# Build options | ||
#------------------------------------------------------------------------------- | ||
option(CGL_BUILD_DEBUG "Build for debug" OFF) | ||
option(CGL_BUILD_SHARED "Build shared libraries" OFF) | ||
option(CGL_BUILD_DOCS "Build documentation" OFF) | ||
option(CGL_BUILD_TESTS "Build tests programs" OFF) | ||
option(CGL_BUILD_EXAMPLES "Build examples" OFF) | ||
|
||
#------------------------------------------------------------------------------- | ||
# CMake modules | ||
#------------------------------------------------------------------------------- | ||
list(APPEND CMAKE_MODULE_PATH "${CGL_SOURCE_DIR}/cmake/modules/") | ||
|
||
#------------------------------------------------------------------------------- | ||
# CGL paths | ||
#------------------------------------------------------------------------------- | ||
set(CGL_INCLUDE_DIRS "${CGL_SOURCE_DIR}/include") | ||
|
||
#------------------------------------------------------------------------------- | ||
# Platform-specific settings | ||
#------------------------------------------------------------------------------- | ||
|
||
################### | ||
# Building on OSX # | ||
################### | ||
if(APPLE) | ||
|
||
# Clang only | ||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "CLANG") | ||
|
||
# OSX Framework dependencies | ||
if(NOT CGL_BUILD_SHARED) | ||
include_directories( "/System/Library/Frameworks" ) | ||
find_library (COCOA_LIBRARIES Cocoa) | ||
find_library (IOKIT_LIBRARIES IOkit) | ||
find_library (COREVIDEO_LIBRARIES CoreVideo) | ||
endif() | ||
|
||
# Clang configuration | ||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") | ||
|
||
set(CLANG_CXX_FLAGS "-std=c++11 -m64") | ||
|
||
if(CGL_BUILD_DEBUG) | ||
set(CMAKE_BUILD_TYPE Debug) | ||
else(CGL_BUILD_DEBUG) | ||
set(CLANG_CXX_FLAGS "${CLANG_CXX_FLAGS} -O3") | ||
set(CLANG_CXX_FLAGS "${CLANG_CXX_FLAGS} -funroll-loops") | ||
set(CLANG_CXX_FLAGS "${CLANG_CXX_FLAGS} -Wno-narrowing") | ||
set(CLANG_CXX_FLAGS "${CLANG_CXX_FLAGS} -Wno-deprecated-register") | ||
endif(CGL_BUILD_DEBUG) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CLANG_CXX_FLAGS}") | ||
|
||
endif() | ||
|
||
# GCC configuration | ||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
|
||
set(GCC_CXX_FLAGS "-std=gnu++11 -m64") | ||
|
||
if(CGL_BUILD_DEBUG) | ||
set(CMAKE_BUILD_TYPE Debug) | ||
else(CGL_BUILD_DEBUG) | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -O3") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -fopenmp") | ||
endif(CGL_BUILD_DEBUG) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_CXX_FLAGS}") | ||
|
||
endif() | ||
|
||
endif() | ||
|
||
endif(APPLE) | ||
|
||
################## | ||
# Build on Linux # | ||
################## | ||
set(LINUX UNIX AND NOT APPLE) | ||
if(LINUX) | ||
|
||
# GCC only | ||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
|
||
set(GCC_CXX_FLAGS "-std=gnu++11 -m64") | ||
|
||
# X11 Dependencies | ||
if(NOT CGL_BUILD_SHARED) | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lXi") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lXxf86vm") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lXinerama") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lXcursor") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lXfixes") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lXrandr") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lXext") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lXrender") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lX11") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lpthread") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lxcb") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -lXau") | ||
endif() | ||
|
||
# Debug configuration | ||
if(CGL_BUILD_DEBUG) | ||
set(CMAKE_BUILD_TYPE Debug) | ||
else(CGL_BUILD_DEBUG) | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -O3") | ||
set(GCC_CXX_FLAGS "${GCC_CXX_FLAGS} -fopenmp") | ||
endif(CGL_BUILD_DEBUG) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_CXX_FLAGS}") | ||
|
||
endif() | ||
|
||
endif(LINUX) | ||
|
||
#################### | ||
# Build on Windows # | ||
#################### | ||
if(WIN32) | ||
|
||
if(MSVC) | ||
|
||
set(MSVC_CXX_FLAGS "-std=gnu++11") | ||
|
||
if(CGL_BUILD_DEBUG) | ||
set(CMAKE_BUILD_TYPE Debug) | ||
else(CGL_BUILD_DEBUG) | ||
endif(CGL_BUILD_DEBUG) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSVC_CXX_FLAGS}") | ||
|
||
endif(MSVC) | ||
|
||
if(MINGW) | ||
|
||
set(MSVC_CXX_FLAGS "-std=gnu++11") | ||
|
||
if(CGL_BUILD_DEBUG) | ||
set(CMAKE_BUILD_TYPE Debug) | ||
else(CGL_BUILD_DEBUG) | ||
endif(CGL_BUILD_DEBUG) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSVC_CXX_FLAGS}") | ||
|
||
endif(MINGW) | ||
|
||
endif(WIN32) | ||
|
||
#------------------------------------------------------------------------------- | ||
# Find dependencies | ||
#------------------------------------------------------------------------------- | ||
|
||
# Required packages | ||
find_package(Freetype REQUIRED) | ||
|
||
|
||
#------------------------------------------------------------------------------- | ||
# Set definitions | ||
#------------------------------------------------------------------------------- | ||
add_definitions(${NANOGUI_EXTRA_DEFS}) | ||
|
||
#------------------------------------------------------------------------------- | ||
# Set include directories | ||
#------------------------------------------------------------------------------- | ||
include_directories( | ||
${CGL_INCLUDE_DIRS} | ||
${FREETYPE_INCLUDE_DIRS} | ||
${NANOGUI_EXTRA_INCS} | ||
) | ||
|
||
#------------------------------------------------------------------------------- | ||
# Set link directories | ||
#------------------------------------------------------------------------------- | ||
link_directories( | ||
${FREETYPE_LIBRARY_DIRS} | ||
) | ||
|
||
#------------------------------------------------------------------------------- | ||
# Add subdirectories | ||
#------------------------------------------------------------------------------- | ||
|
||
# CGL library source directory | ||
add_subdirectory(src) | ||
|
||
# CGL tests source directory | ||
if(CGL_BUILD_TESTS) | ||
add_subdirectory(tests) | ||
endif() | ||
|
||
# CGL exmaples source directory | ||
if(CGL_BUILD_EXAMPLES) | ||
add_subdirectory(examples) | ||
endif() | ||
|
||
# CGL documentation directory | ||
if(CGL_BUILD_DOCS) | ||
find_package(DOXYGEN) | ||
if(DOXYGEN_FOUND AND CGL_BUILD_DOCS) | ||
add_subdirectory(docs) | ||
endif() | ||
endif() | ||
|
||
#------------------------------------------------------------------------------- | ||
# Packing | ||
#------------------------------------------------------------------------------- | ||
|
||
# Install settings | ||
set(CMAKE_INSTALL_PREFIX "${CGL_SOURCE_DIR}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# CGL Library | ||
Designed to build simple graphics applications for 15-462 : Computer Graphics | ||
|
||
The library provides basic vector operations, takes care of OpenGL context creation, window event handling, and an on-screen text display interface using freetype. The library is designed to provide a simple interface for building graphics applications and is used in 15-462 assignments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
link_libraries(CGL) | ||
|
||
include_directories("${PROJECT_SOURCE_DIR}/include") | ||
|
||
link_libraries( | ||
glfw ${GLFW_LIBRARIES} | ||
glew ${GLEW_LIBRARIES} | ||
${OPENGL_LIBRARIES} | ||
${FREETYPE_LIBRARIES} | ||
) | ||
|
||
add_executable(triangle triangle.cpp) | ||
add_executable(text text.cpp) | ||
add_executable(event event.cpp) | ||
add_executable(template template.cpp) | ||
|
||
# Install examples | ||
install(TARGETS triangle DESTINATION bin/examples) |
Oops, something went wrong.