This commit is contained in:
ZtRXR 2024-06-28 22:03:15 +08:00
parent 7bd2dbe179
commit 364bc01c6b
3 changed files with 8 additions and 2 deletions

View File

@ -7,7 +7,8 @@ find_package(pybind11 CONFIG REQUIRED)
pybind11_add_module(${PROJECT_NAME} ${SRC}) 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) target_link_libraries(${PROJECT_NAME} PRIVATE glfw)
find_package(OpenGl REQUIRED) find_package(OpenGl REQUIRED)
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include) target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCE_DIR}/include)

1
glew

@ -1 +0,0 @@
Subproject commit b323ebf9adeae6a3f26f91277d4f62df509037fc

View File

@ -27,6 +27,12 @@ int tests::glfw_window(unsigned width,unsigned height, std::string title)
/* Render here */ /* Render here */
glClear(GL_COLOR_BUFFER_BIT); 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 */ /* Swap front and back buffers */
glfwSwapBuffers(window); glfwSwapBuffers(window);