-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Added vendor includes and libs to the repo to make it easily ru…
…nnable
- Loading branch information
Showing
553 changed files
with
141,098 additions
and
903 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 |
---|---|---|
@@ -1,15 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.0.0) | ||
cmake_minimum_required(VERSION 3.5.0) | ||
project(ictc-modeling VERSION 0.1.0) | ||
|
||
if(MSVC) | ||
add_compile_options(/W4) | ||
else() | ||
add_compile_options(-Wall -Wextra -Wpedantic -Weffc++) | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS 1) | ||
|
||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Debug) | ||
endif() | ||
|
||
add_executable(ictc-modeling main.cpp IndexBuffer.cpp VertexBuffer.cpp VertexArray.cpp Shader.cpp Renderer.cpp Texture.cpp Camera.cpp Mesh.cpp Model.cpp CubeMap.cpp stb_image.cpp) | ||
add_compile_options(-Wall -Wextra -Wpedantic -Weffc++) | ||
|
||
|
||
file(GLOB src_files CONFIGURE_DEPENDS "*.cpp") | ||
add_executable(ictc-modeling ${src_files}) | ||
|
||
target_include_directories(ictc-modeling PRIVATE includes) | ||
target_link_libraries(ictc-modeling PRIVATE GLEW glfw GL X11 dl assimp) | ||
target_include_directories(ictc-modeling SYSTEM PRIVATE vendor_includes) | ||
|
||
target_link_directories(ictc-modeling PRIVATE vendor_libs) | ||
target_link_libraries(ictc-modeling PRIVATE GLEW glfw GL assimp) | ||
|
||
target_compile_features(ictc-modeling PRIVATE cxx_auto_type) | ||
target_compile_features(ictc-modeling PRIVATE cxx_nullptr) | ||
target_compile_features(ictc-modeling PRIVATE cxx_range_for) |
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
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
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,9 +1,7 @@ | ||
#include "IndexBuffer.hpp" | ||
|
||
IndexBuffer::IndexBuffer(const unsigned int *data, const unsigned int count) | ||
: m_Count(count) | ||
{ | ||
glGenBuffers(1, &m_RendererID); | ||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_RendererID); | ||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, count * sizeof(unsigned int), data, GL_STATIC_DRAW); | ||
: m_Count(count), m_RendererID(generateRendererID()) { | ||
glBufferData(GL_ELEMENT_ARRAY_BUFFER, count * sizeof(unsigned int), data, | ||
GL_STATIC_DRAW); | ||
} |
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
Oops, something went wrong.