Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaced example files with larger CMake-based example.
- Loading branch information
Showing
244 changed files
with
52,085 additions
and
1,096 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,27 @@ | ||
|
||
cmake_minimum_required(VERSION 2.8) | ||
project(minimal) | ||
|
||
find_package(PythonInterp REQUIRED) | ||
find_package(OpenGL REQUIRED) | ||
|
||
find_library(GLFW_LIBRARIES glfw) | ||
|
||
include_directories("${PROJECT_BINARY_DIR}/generated") | ||
|
||
add_custom_command(OUTPUT "${PROJECT_BINARY_DIR}/generated/flextGL.h" "${PROJECT_BINARY_DIR}/generated/flextGL.c" | ||
COMMAND ${PYTHON_EXECUTABLE} "${PROJECT_SOURCE_DIR}/../flextGLgen.py" -Dgenerated -Tglfw ${PROJECT_SOURCE_DIR}/profile.txt | ||
DEPENDS ${PROJECT_SOURCE_DIR}/profile.txt | ||
${PROJECT_SOURCE_DIR}/../flextGLgen.py | ||
${PROJECT_SOURCE_DIR}/../flext.py | ||
${PROJECT_SOURCE_DIR}/../templates/glfw/flextGL.h.template | ||
${PROJECT_SOURCE_DIR}/../templates/glfw/flextGL.c.template) | ||
|
||
|
||
add_executable(minimal minimal.cpp mesh.cpp utility.cpp generated/flextGL.c) | ||
target_link_libraries(minimal ${OPENGL_LIBRARIES} ${GLFW_LIBRARIES} ${GLEW_LIBRARIES}) | ||
|
||
add_custom_command(TARGET minimal COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
"${PROJECT_SOURCE_DIR}/minimal.frag" $<TARGET_FILE_DIR:minimal>) | ||
add_custom_command(TARGET minimal COMMAND ${CMAKE_COMMAND} -E copy_if_different | ||
"${PROJECT_SOURCE_DIR}/minimal.vert" $<TARGET_FILE_DIR:minimal>) |
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,29 @@ | ||
#ifndef COMMON_HH | ||
#define COMMON_HH | ||
|
||
#include <flextGL.h> | ||
#include <GL/glfw.h> | ||
|
||
#include "glm/glm.hpp" | ||
#include "glm/ext.hpp" | ||
|
||
|
||
using glm::vec3; | ||
using glm::mat3; | ||
using glm::vec4; | ||
using glm::mat4; | ||
|
||
#include <iostream> | ||
#include <string> | ||
#include <cstdlib> | ||
|
||
using std::string; | ||
using std::cerr; | ||
using std::cout; | ||
using std::endl; | ||
|
||
using std::exit; | ||
|
||
#include "utility.hpp" | ||
|
||
#endif |
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,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2005 - 2012 G-Truc Creation | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
Oops, something went wrong.