diff --git a/CMakelists.txt b/CMakelists.txt index ed662f71a8362be1f10ef677eb3c8ad91233b921..2de7e4f48d328208dc9c2562ce80b1536c03bc65 100644 --- a/CMakelists.txt +++ b/CMakelists.txt @@ -24,7 +24,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) if(WIN32) option(CMAKE_TOOLCHAIN_FILE "C:/vcpkg/vcpkg/scripts/buildsystems/vcpkg.cmake") elseif(UNIX) - #option(CMAKE_TOOLCHAIN_FILE "/amuhome/b20017738/Bureau/vcpkg/scripts/buildsystems/vcpkg.cmake") + option(CMAKE_TOOLCHAIN_FILE "/amuhome/b20017738/Bureau/vcpkg/scripts/buildsystems/vcpkg.cmake") endif() #============================================================== @@ -59,9 +59,9 @@ set_property(TARGET ${CURRENT_TARGET} PROPERTY RUNTIME_OUTPUT_DIRECTORY $<1:${CM target_include_directories(${CURRENT_TARGET} PRIVATE ${INCLUDE}) -#list(APPEND CMAKE_PREFIX_PATH "/amuhome/b20017738/Bureau/vcpkg/packages/glew_x64-linux") -#list(APPEND CMAKE_PREFIX_PATH "/amuhome/b20017738/Bureau/vcpkg/packages/glm_x64-linux") -#list(APPEND CMAKE_PREFIX_PATH "/amuhome/b20017738/Bureau/vcpkg/packages/imgui_x64-linux") +list(APPEND CMAKE_PREFIX_PATH "/amuhome/b20017738/Bureau/vcpkg/packages/glew_x64-linux") +list(APPEND CMAKE_PREFIX_PATH "/amuhome/b20017738/Bureau/vcpkg/packages/glm_x64-linux") +list(APPEND CMAKE_PREFIX_PATH "/amuhome/b20017738/Bureau/vcpkg/packages/imgui_x64-linux") find_package(glfw3 REQUIRED) find_package(GLEW REQUIRED) diff --git a/assets/textures/Cube_Black.png b/assets/textures/Cube_Black.png new file mode 100644 index 0000000000000000000000000000000000000000..c16e826571abf5b30be7c3365d62b1b8c8538ab0 Binary files /dev/null and b/assets/textures/Cube_Black.png differ diff --git a/assets/textures/Cube_Brown.png b/assets/textures/Cube_Brown.png new file mode 100644 index 0000000000000000000000000000000000000000..020f8148945580c16561cc7b2b95e763ff718ffa Binary files /dev/null and b/assets/textures/Cube_Brown.png differ diff --git a/assets/textures/Cube_Light_Red.png b/assets/textures/Cube_Light_Red.png new file mode 100644 index 0000000000000000000000000000000000000000..19358f477e5c40c303c41af9a48e25a12bfe1616 Binary files /dev/null and b/assets/textures/Cube_Light_Red.png differ diff --git a/assets/textures/Cube_Red2.png b/assets/textures/Cube_Red2.png new file mode 100644 index 0000000000000000000000000000000000000000..56f33155d5b904a8d0f2fec48a951ee55433a741 Binary files /dev/null and b/assets/textures/Cube_Red2.png differ diff --git a/source/engine/graphics/front/engine/Engine.cpp b/source/engine/graphics/front/engine/Engine.cpp index f5e4b127a70c0cc5b46954e7919742152cacdb88..46822d920f44bb954dc7f1898649a7a5721c03b8 100644 --- a/source/engine/graphics/front/engine/Engine.cpp +++ b/source/engine/graphics/front/engine/Engine.cpp @@ -57,14 +57,18 @@ namespace megu { if(this->_window.isOpen()) { // Draw Layers TextureArray textures; + for(auto & [priority, layer] : this->_layers) { if(!layer.get()->empty()) { + const glm::vec2 & dimension = layer->renderer().dimension(); + glViewport(0, 0, static_cast<GLsizei>(dimension.x), static_cast<GLsizei>(dimension.y)); textures.push_back(layer->draw(this->_window, textures)); } } // Merge Textures FrameBuffer::BindDefaultFrameBuffer(); + glViewport(0, 0, static_cast<GLsizei>(this->_window.width()), static_cast<GLsizei>(this->_window.height())); this->_renderer.render(this->_window, this->_group, textures); this->_window.swapBuffers(); } diff --git a/source/main.cpp b/source/main.cpp index cc854ff9fa54e1fd7040536f22e2a5be82628810..c4abc5e6ec3f81f70f782650f1d9db4e5a4acf95 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -83,7 +83,6 @@ int main(int argc, const char * argv[]) { ++y; } - if(id != 0) { switch (id % 4) { case 1: