From 364bc01c6bca965b5faac3a7fcba254a79191c53 Mon Sep 17 00:00:00 2001 From: ZtRXR Date: Fri, 28 Jun 2024 22:03:15 +0800 Subject: [PATCH] update --- CMakeLists.txt | 3 ++- glew | 1 - src/test_window.cpp | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) delete mode 160000 glew diff --git a/CMakeLists.txt b/CMakeLists.txt index 59d7038..9ebaa8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,8 @@ find_package(pybind11 CONFIG REQUIRED) pybind11_add_module(${PROJECT_NAME} ${SRC}) -add_subdirectory(glfw) +add_subdirectory( ${PROJECT_SOURCE_DIR}/glew/build/cmake ) +add_subdirectory( ${PROJECT_SOURCE_DIR}/glfw ) target_link_libraries(${PROJECT_NAME} PRIVATE glfw) find_package(OpenGl REQUIRED) target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include) diff --git a/glew b/glew deleted file mode 160000 index b323ebf..0000000 --- a/glew +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b323ebf9adeae6a3f26f91277d4f62df509037fc diff --git a/src/test_window.cpp b/src/test_window.cpp index fead158..f828e74 100644 --- a/src/test_window.cpp +++ b/src/test_window.cpp @@ -27,6 +27,12 @@ int tests::glfw_window(unsigned width,unsigned height, std::string title) /* Render here */ glClear(GL_COLOR_BUFFER_BIT); + glBegin(GL_TRIANGLES); + glVertex2f(-0.5f,-0.5f); + glVertex2f(0.0f,0.5f); + glVertex2f(0.5f,-0.5f); + glEnd(); + /* Swap front and back buffers */ glfwSwapBuffers(window);