-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
38 changed files
with
16 additions
and
1,100 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,3 @@ | ||
[submodule "engine"] | ||
path = engine | ||
url = [email protected]:mohlek/opengl_engine.git |
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 |
---|---|---|
@@ -1,90 +1,11 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
PROJECT(MEDIEVAL_SOMETHING) | ||
|
||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") | ||
file(GLOB_RECURSE src_medieval "src/*.cpp") | ||
|
||
set(SOURCE | ||
src/engine/Window.cpp | ||
src/engine/Buffer.cpp | ||
src/engine/VertexArrayObject.cpp | ||
src/engine/Object.cpp | ||
src/engine/Camera.cpp | ||
src/engine/shader/ShaderLoader.cpp | ||
src/engine/shader/Shader.cpp | ||
src/engine/shader/ShaderProgram.cpp | ||
src/engine/model/3ds/Model3DS.cpp | ||
src/shader/MainShader.cpp | ||
src/main.cpp | ||
) | ||
add_subdirectory(engine/) | ||
|
||
set(SHADERS | ||
src/shader/main.frag | ||
src/shader/main.vert | ||
) | ||
add_executable(medievalSomething ${src_medieval}) | ||
|
||
set(RESOURCES | ||
resource/dragon.3ds | ||
) | ||
|
||
######################################################### | ||
# FIND OpenGL | ||
######################################################### | ||
find_package(OpenGL REQUIRED) | ||
include_directories(${OPENGL_INCLUDE_DIRS}) | ||
link_directories(${OPENGL_LIBRARY_DIRS}) | ||
add_definitions(${OPENGL_DEFINITIONS}) | ||
if(NOT OPENGL_FOUND) | ||
message(ERROR " OpenGL not found!") | ||
endif(NOT OPENGL_FOUND) | ||
|
||
######################################################### | ||
# FIND GLEW | ||
######################################################### | ||
find_package(GLEW REQUIRED) | ||
include_directories(${GLEW_INCLUDE_DIRS}) | ||
link_directories(${GLEW_LIBRARY_DIRS}) | ||
add_definitions(${GLEW_DEFINITIONS}) | ||
if(NOT GLEW_FOUND) | ||
message(ERROR " GLEW not found!") | ||
endif(NOT GLEW_FOUND) | ||
|
||
######################################################### | ||
# FIND GLFW | ||
######################################################### | ||
find_package(PkgConfig REQUIRED) | ||
pkg_search_module(GLFW REQUIRED glfw3) | ||
# find_package(glfw3 3.2 REQUIRED) | ||
include_directories(${GLFW_INCLUDE_DIRS}) | ||
link_directories(${GLFW_LIBRARY_DIRS}) | ||
add_definitions(${GLDFW_DEFINITIONS}) | ||
if(NOT GLFW_FOUND) | ||
message(ERROR " GLFW not found!") | ||
endif(NOT GLFW_FOUND) | ||
|
||
######################################################## | ||
# FIND LIB3DS | ||
######################################################## | ||
find_package(Lib3ds) | ||
include_directories(${LIB3DS_INCLUDE_DIRS}) | ||
link_directories(${LIB3DS_LIBRARY_DIRS}) | ||
if(NOT LIB3DS_FOUND) | ||
message(ERROR " LIB3DS not found!") | ||
endif(NOT LIB3DS_FOUND) | ||
|
||
|
||
######################################################## | ||
# COPY SHADER | ||
######################################################## | ||
|
||
foreach(SHADER ${SHADERS}) | ||
message(STATUS "copy shader " ${SHADER}) | ||
file(COPY ${SHADER} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/shader/) | ||
endforeach(SHADER) | ||
|
||
message(STATUS "copy resources") | ||
file(COPY ${RESOURCES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/resource/) | ||
|
||
add_executable(medievalSomething ${SOURCE}) | ||
|
||
target_link_libraries(medievalSomething ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLFW_LIBRARIES} ${LIB3DS_LIBRARY}) | ||
target_link_libraries(medievalSomething engine) |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.