Questions tagged [glfw]

GLFW is a free, Open Source, multi-platform library for opening a window, creating an OpenGL context and managing input. It is easy to integrate into existing applications and does not lay claim to the main loop. GLFW is written in C and has native support for Windows, Mac OS X and many Unix-like systems using the X Window System, such as Linux and FreeBSD. GLFW is licensed under the zlib/libpng license.

What is GLFW?

GLFW is an Open Source, multi-platform library for creating windows with OpenGL or OpenGL ES contexts and managing input. It is easy to integrate into existing applications and does not lay claim to the main loop.

GLFW is written in C and has native support for Windows, Mac OS X and many Unix-like systems using the X Window System, such as Linux and FreeBSD.

GLFW is licensed under the zlib/libpng license.

Features

  • Easy to use API in the style of the OpenGL APIs
  • Gives you a window and OpenGL context with two function calls
  • Explicit support for MSAA and OpenGL 3.2+, including profiles and flags
  • Keyboard, mouse, joystick and time input
  • Input can be either polled or delivered via callbacks
  • Basic Unicode character input
  • Supports both static and dynamic linking
  • Open Source with a liberal OSI-certified license
  • Makefiles or project files for most popular C/C++ compilers
  • Examples and comprehensive documentation

Documentation

  • The documentation contains a tutorial, guides on the different areas of the API, compilation and linking guides, a reference manual and a guide for migrating from older versions of the API.

Ressources

2371 questions
0
votes
1 answer

Trying to implement model batching for opengl not sure why it's not showing anything

I am trying to implement model and sprite batching for a game engine I am working on, trying to test it on GUI Renderer but can't get any results, errors or anything drawing to the screen am I doing something wrong I will link the Github page for…
0
votes
0 answers

Cannot render triangle on screen

I've been trying to render a triangle in my window in lwjgl using opengl but so far with no success. I've even followed a guide (https://lwjglgamedev.gitbooks.io/3d-game-development-with-lwjgl/content/chapter04/chapter4.html) but the triangle isn't…
0
votes
0 answers

How to listen for device changes on a GLFW application?

How exactly do I use this callback function to my glfw app? LRESULT CALLBACK WindowProc( HWND hwnd, // handle to window UINT uMsg, // WM_DEVICECHANGE WPARAM wParam, // device-change event LPARAM lParam // event-specific…
Salty
  • 21
  • 4
0
votes
1 answer

I cannot access some openGL functions

When I attempt to generate a buffer by executing the glGenBuffer() function - no function like that is found. Some functions are still working, and from what I see most do work, for instance the following code works perfectly: #include…
IHaydot
  • 13
  • 3
0
votes
0 answers

Linking opengl in cmake

I'm trying to link opengl32 to my project through cmake. I tried set(LIBS "opengl32.dll" "${CMAKE_CURRENT_SOURCE_DIR}/vendor/GLFW/include") target_link_libraries(${PROJECT_NAME} ${LIBS}) but when I tried to run the program, it gives me unresolved…
Thomas
  • 169
  • 10
0
votes
0 answers

GLFW texture rendering issue

I am new with GLFW. I tried to display a texture based on a tested example code. The example comes from: https://www.glfw.org/docs/3.3/quick.html That renders a rotating colorful triangle. I modified the code based on this page:…
0
votes
1 answer

Imgui create pop up box removing the grayed out focus screen

when creating a pop up modal in ImGui, I noticed that there is a grey overlay that appears over the rest of the application (to put the focus on the pop up I think). However, I am wondering if there is a way for me to remove that gray overlay screen…
Megan Darcy
  • 530
  • 5
  • 15
0
votes
0 answers

Error while building GLFW using CMake and Visual Studio 2019 on Windows

I have been configuring GLFW API by its source code using CMake and visual studio 19 on windows 10 for my project. I am getting a build error /W3: No such file or directory gcc.exe. I have installed MinGW using command choco install mingw -y and…
Avi
  • 310
  • 2
  • 4
  • 16
0
votes
0 answers

C++ trigger function when pointer unassigned/dealocated

I am writing some code to wrap some GLFW objects. I have a private shared_ptr field on my class. GLFW has methods such as glfwDestroyWindow, which I use as glfwDestroyWindow(_windowPtr.get()), since the library is a C library. I am…
0
votes
1 answer

Segmentation Fault with glViewport (openGL C++ programming with GLFW and GLAD)

1) Problem summary: I am following exactly the tutorials on LearnOpenGL dot com. My program is crashing (with a segmentation fault) whenever glViewport is being called. How can I have it not crash while calling glViewport according to the code shown…
0
votes
0 answers

CMake Error Using GLFW and GLAD: Found Relative Path While Evaluating Link Directories

I have been attempting to play around with C and OpenGL and am currently attempting to write a simple Snake program using these two libraries. Although I am on Windows, I prefer not to use Visual Studio and so am currently building my project with…
ComedicChimera
  • 466
  • 1
  • 4
  • 15
0
votes
1 answer

Project link error while trying to build GLEW project, despite library (glew32.a) seems to be fine

I have an issue linking my OpenGL project using Cmake. To use OpenGL extensions, I downloaded the prebuilt GLEW library binaries. But after building my project, I`ve got a warning: skipping incompatible C:/Users/.../lib when searching for…
0
votes
1 answer

Unable to link 'GLFW' in Visual Studio in #include

I am trying to include #include to create a window in OpenGL, but am getting this error, Error (active) E1696 cannot open source file "GLFW/glfw3.h" OpenGL E:\OpenGL\src\Application.cpp 1 Error image Included Directory…
0
votes
0 answers

how to draw a cursor in glfw while getting mouse input?

I have a program using glfw for window management and opengl for rendering. The program works on Windows and linux, and eventually Mac OSX so I want any solution to be portable. glfw seems to either support a cursor, or getting full mouse input but…
Dov
  • 8,000
  • 8
  • 46
  • 75
0
votes
0 answers

Using GLFW in a C++ project (VS Code): linker command failed with exit code 1

The problem seems to come from the failure of the executable to be linked to libglfw.3.3.dylib file. I downloaded glfw via homebrew and included the directory path (/opt/homebrew/lib) for the file in c_cpp_properties.json and tasks.json as the…
Xi Liu
  • 559
  • 9
  • 18
1 2 3
99
100