Category : glfw

I wanto add glfw dependency by cmake in CLion but i get weird error, this is the CMakeLists.txt cmake_minimum_required(VERSION 3.17) project(hello_gl) set(CMAKE_CXX_STANDARD 14) find_package(glfw3 3.3 REQUIRED) target_link_libraries(hello_gl glfw) add_executable(hello_gl main.cpp) CMake Error at CMakeLists.txt:8 (target_link_libraries): Cannot specify link libraries for target "hello_gl" which is not built by this project. This is the error I get? ..

Read more

I’m not sure where problem is. Though, I have two modes in my application. By pressing "R" – key the modes are switching. The application-class is responsible for the entire app’s demeanor. It contains the private member, the mode-flag (rotation_mode). In the key handling method I set this flag to the opposite value if the ..

Read more

I’m trying to set a different color to each point in an OpenGL application, for that i have constructed 2 float std::vectors called, vertex_position_data and vertex_color_data, respectively representing x,y,z and r,g,b. coordinates: 0.9996775489540122 0.8108964808511072 0.9943463478468979 rgb: 0.317364987841259 0.620614750460882 0.54 With it, i did: unsigned int vertexArrayID; unsigned int vertex_bufferID; unsigned int color_bufferID; glGenVertexArrays(1, &vertexArrayID); glBindVertexArray(vertexArrayID); ..

Read more

I am having trouble using GLFW on my mac. I am currently using cmake and visual studio code on MacOS Catalina 10.15.7. My latest effort for GLFW in my CMakeLists.txt file looks like this: set(GLFW_DIR ${VENDOR_DIR}/GLFW) set(GLFW_BUILD_DOCS OFF CACHE BOOL "GLFW lib only") set(GLFW_INSTALL OFF CACHE BOOL "GLFW lib only") add_subdirectory(${GLFW_DIR}) target_include_directories(Engine PRIVATE ${GLFW_DIR}/include) target_link_directories(Engine ..

Read more

ERROR Hello Everyone, I´m still on my journey of creating my first c++ OpenGL app, and have stumbled into another problem, this time I followed the Tutorial of LearnOpenGL.com with my own alterations After finishing the Hello Triangle Tutorial I´ve ran into the problem, that my Triangle won´t render. I do have a different class ..

Read more