Skip to content
Snippets Groups Projects
Commit 96c80d13 authored by BATON Theau's avatar BATON Theau
Browse files

Window resizing

parent 9c36372b
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
assets/textures/Cube_Black.png

282 B

assets/textures/Cube_Brown.png

282 B

assets/textures/Cube_Light_Red.png

282 B

assets/textures/Cube_Red2.png

282 B

......@@ -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();
}
......
......@@ -83,7 +83,6 @@ int main(int argc, const char * argv[]) {
++y;
}
if(id != 0) {
switch (id % 4) {
case 1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment