Questions tagged [glfw]

GLFW is a cross-platform library for creating and interacting with windows with an OpenGL context.

Filter by
Sorted by
Tagged with
0 votes
1 answer
124 views

How to design an EventBus(guided by the pub/sub pattern)

I'm working on my game engine, and was faced with the fact, that i don't know how properly design an event system. As a pattern i choose Pub/Sub with an event bus, but i don't know where i should '...
qulop's user avatar
  • 3
1 vote
0 answers
56 views

Why opengl code in a lib doesn't renderer?

I am experimenting with opengl using c99 on windows and vs 2022 i tried to create an window using glfw in one project and put a function that supposed to generate a texture in another project that is ...
Abn Alsrag's user avatar
5 votes
3 answers
877 views

How to install game with dependencies on Linux?

I am creating a game using C and some libraries. I wish to not require my users to download anything but the game as most games are self contained. What is the usual process for compiling and ...
Lead Vaxeral's user avatar
0 votes
1 answer
97 views

Force even window dimensions

Force even resolution window I am using GLFW/glfw3 OpenGL to write 2D games. Some of my shaders have artifacts that only appear when the window size has an odd value. Eg 1201 by 1024 creates artifacts....
Blindman67's user avatar
0 votes
0 answers
341 views

ImGui docking window flickers when dragged out

I'm having problems when every time my ImGui docking window is dragged out it starts to flicker and malfunctions. Is there any ways I can get rid of this problem? Thank you! ...
Mohammed Alamairy's user avatar
0 votes
0 answers
115 views

Rotate game object to the mouse pointer

I am making a game from scratch using OpenGl and GLFW. Since my motivation is to learn computer graphics, I am using my own explicit math functions for rotation and translation. My current rotation ...
Anmol Chauhan's user avatar
0 votes
1 answer
382 views

Python GLFW and PyOpenGL: How to update a VBO from a thread while rendering at the same time

I'm really new to this community. I'm sorry for any mistakes in advance.I'm making a game like minecraft with GLFW and OpenGL. The problem is, I just can't render a VBO while I update it from another ...
N3RDIUM's user avatar
  • 53
0 votes
1 answer
687 views

Why does speed times delta-time give slow movement?

I'm using glfw's glfwGetTime() function to calculate my time between frames i.e deltaT but when I multiply my desired movement ...
Andrew Graham's user avatar
0 votes
0 answers
544 views

How to properly terminate an openGL application?

I use GLFW in C++. I close my application the following way: ...
Gergely Bertalan's user avatar
2 votes
0 answers
212 views

why is reported screen size smaller than display size with GLFW full screen window

I'm using GLFW to create a full screen GL application. I'm running it on my Ubuntu 20.04 laptop that has a typical 1920:1080 display, at least that's the screen resolution reported under Settings->...
user256552's user avatar
0 votes
1 answer
409 views

Why is my OpenGL code not rendering anything?

I have been following the LearnOpenGL Hello Triangle tutorial, and nothing is rendering except the clear color. Any help finding what is wrong would be appreciated. Using LWJGL 3.2.3 OpenGL and GLFW ...
avalonbox's user avatar
1 vote
2 answers
406 views

Why would I want to set a minimal OpenGL version before creating the context?

Typical GLFW applications have these lines after glfwInit(): ...
user avatar
0 votes
1 answer
550 views

set model to transparent where texture is transparent

I finally got around to applying textures to my game, and I noticed that the areas that are transparent on the .png of the texture are not transparent on the actual model.It is illustrated in the ...
Aubrey Champagne's user avatar
0 votes
0 answers
43 views

Having trouble with 2d projection (Opengl)

I need to change the normalize coords from -1 to 1 to the width and height of my application. The reason why I want to change the normalize coords is because i think it would be a easier set position ...
user avatar
0 votes
1 answer
57 views

Memory Usage Issue with declared variables (when swapping between states)

So my problem is that When I make a Shader variable and I swap between mainmenustate and gamestate really fast I notice my memory usage increase alot but as soon I switch my Shader varaible into a ...
user avatar
0 votes
1 answer
757 views

text rendering artifact when rendering in 3D opengl GLfW

Main.cpp ...
user avatar
0 votes
0 answers
73 views

GLFW Problem "The driver does not appear to support OpenGL"

I am trying to learn OpenGL & GLFW , when I run this simple project I get error ID : "65542" with the message "The driver does not appear to support OpenGL". My graphics card ...
0x00001F's user avatar
0 votes
1 answer
97 views

Does swap buffer with vsynch guarantee synchronization?

I was wondering if I could assume that all buffer related GPU operations such as: glDrawElements glBufferData glSubBufferData glUnmapBuffer are guaranteed to be completed after swap buffer is ...
Lake's user avatar
  • 143
3 votes
0 answers
139 views

Access GLFW functions from DLL

My game uses DLLs as mods. Players can write DLLs which can render, play audio, print to console, etc. This works fine, however when I try to access GLFW functions, they don't seem to work properly. <...
J4S's user avatar
  • 153
0 votes
1 answer
1k views

glfw resizing causing image scaling

I have a quad rendered that extends from the top left of the window to with width of the window that is also 64 pixels high. When I resize the window, from its initial size, the quad and text scales ...
ChocoMan's user avatar
  • 741
0 votes
1 answer
610 views

Stuttery camera with mouse movement

I'm implementing a framerate independent FPS camera and I'm having a problem with jerky camera. The camera is smooth if I translate it or if I make it rotate at a fixed rate, but as soon as I start to ...
Karlovsky120's user avatar
0 votes
1 answer
180 views

LWJGL GLFW hangs on native glfwInit call

For the past months I've been working on creating my own game engine for personal use in LWJGL using pieces here and there, especially from developer ThinMatrix's rightfully credited code, to learn as ...
Kai's user avatar
  • 101
0 votes
1 answer
187 views

Parts of OpenGL rendering area missing/transparent until resize

I am having a weird transparency issue when running my game in windowed mode. Parts of the window, left and top parts in normal window mode, right and bottom when in maximised window, become ...
exuvo's user avatar
  • 1
1 vote
0 answers
153 views

Transform the mouse coordinates to the GLSL plane

I am creating a 2D map editor in C ++ with GLFW. I want move and drag entities with the mouse, but I have a problem, the mouse coords are in the window size range (1200, 720) and the entity is in the ...
Steback's user avatar
  • 11
1 vote
0 answers
92 views

Subtract a circle on a rectangle - OpenGL

I am writing a game using GLFW, GLEW, GLM and Bullet3 in C++. Its a Maze with holes. I am doing the floor with rectangles (wich is 2 GL_TRIANGLES). I want to make some woles (circles), to the ball ...
David Pires's user avatar
0 votes
1 answer
2k views

glfwCreateWindow function returning NULL

I am working on creating a game engine using GLFW. To begin, I set up a window class in C++ to test how making a window works. For some reason, when I call the glfwCreateWindow function, it returns ...
The Digital Odyssey's user avatar
1 vote
1 answer
3k views

How to render in a imGui Window

I am learning OpenGL by glfw3 lib and I am using imgui to make a interesting application. However, I can not render what I want in a imgui window. I searched google and get below link: Render in a ...
syses's user avatar
  • 11
0 votes
1 answer
1k views

Building a flexible GLFW Event handling system (for beginners)

The 2017 Thread "How to improve my input handling in GLFW?" is brilliant! Exactly my question and what seems like some great solutions. However "Tyyppi_77" is hard for me to understand as a ...
RabbitAGoGo's user avatar
0 votes
1 answer
647 views

Debug in OpenGL & GLFW (version >= 4.3)

I try enable debug system in OpenGL with helps debug output in OpenGL version >= 4.3. My code: ...
Range's user avatar
  • 159
0 votes
0 answers
1k views

OpenGL viewport is stretched

For this project I am using GLFW, glad and glm. My window looks like this: The dimensions of the window are correct, but the viewport is stretched, making my square into a rectangle. How do I use a ...
egordiac's user avatar
0 votes
1 answer
289 views

GLFW window becomes unresponsive when asking for input!

I am trying to write a simple C++ game using OpenGL. In my render loop i ask for text based input from the user but this causes the GLFW window to become unresponsive. I suspect that this happens ...
Lorenc Bushi's user avatar
2 votes
1 answer
868 views

JWJGL Multi-threading to separate update and render

Introduction: I am currently designing a game in Java using the LWJGL 3.0, with Gradle. I have quite an advanced knowledge on multi-threading, and I am aware how GLFW does/doesn't implement multi-...
Kris Rice's user avatar
  • 193
0 votes
1 answer
900 views

Set / Get UserPointer - What Do They Do?

I see a lot of talk about glfwGetWindowUserPointer() and glfwSetWindowUserPointer() but I can't for the life of me understand what these functions actually do. From http://discourse.glfw.org/t/what-...
Ryan Walter's user avatar
0 votes
1 answer
154 views

OpenGL 2D Game Render Help

I just recently started using C++ and OpenGL and I am running into an issue. I am not totally sure what I am doing so could you please tell me what I am doing wrong and what I could improve? Here is ...
WolfHybrid23's user avatar
0 votes
1 answer
518 views

Unresolved external symbol linker errors when including stb_image.h

I get the following errors: LNK2019 unresolved external symbol _stbi_load referenced in function _main LNK2019 unresolved ...
Mani Kiran's user avatar
1 vote
2 answers
1k views

Wrong FPS calculations in GLFW game

In my game loop, ...
Kotauskas's user avatar
  • 121
0 votes
2 answers
417 views

Full-screen window hangs when debug break or crash (Windows/GLFW/Cocos2D)

I run into an issue if my game application becomes unresponsive when running in fullscreen on Windows. This mostly applies when I want to use breakpoints in Visual Studio, however if the application ...
stands2reason's user avatar
0 votes
0 answers
606 views

Flickering / tearing with glfwSwapBuffers

I recently separated my logic and rendering threads to fix this problem: GLFW window freezes on title bar hold/drag This means the logic and rendering are no longer running in lock-step as they were ...
Dan's user avatar
  • 255
1 vote
0 answers
1k views

Multiple Viewports/Windows Dear IMGUI c++

How do I use IMGUI with multiple GLFW windows? I know Dear IMGUI already has a virtual viewport system going in the viewport branch but I found that to be lacking a bit on how to use this new system. ...
Matthew's user avatar
  • 135
3 votes
1 answer
898 views

How can I tell in code if vsync is disabled on desktop PC?

My game needs to behave differently to get the best performance if the user disables vsync globally (basically, I need to change the scheduling on my housekeeping operations). Is there a graphics ...
Andy Krouwel's user avatar
1 vote
1 answer
776 views

Problem with rotation a camera with the mouse OPENGL GLFW

I am trying to move my camera with my mouse, I can translate it juste by changing the current position of my camera, but when I want to move my forward vector and my up vector of my camera it doesnt ...
Soof Benzaii's user avatar
3 votes
2 answers
7k views

Unresolved external symbol _glad_XXX

I am relatively new to C++ but I have a few years of java experience. I decided to try to make a game with C++, In contrast with the handful of games i have written in Java with lwjgl. I am having a ...
Andrew's user avatar
  • 33
1 vote
1 answer
1k views

Cannot open include file: 'linmath.h'

I have set up GLFW and GLAD in Visual Studio 2017 as follows: I created in C: directory folder GLFW-GLAD, and put in there, "glfw" (Windows pre-compiled binaries, 32-bit Windows binaries) as well "...
George Theodosiou's user avatar
1 vote
1 answer
694 views

Drawing many separate lines using mouse OpenGL(GLFW/glad)

So, in order to draw a line, I track the coordinates of the mouse, then I add them to the array and capture it as GL_LINE_STRIP_ADJACENCY. However, for example, I completed drawing a line1 at P1 and ...
adziri's user avatar
  • 113
0 votes
1 answer
2k views

GLFW - Camera rotation system

I need to make a camera rotation system similar to the one here http://madebyevan.com/webgl-path-tracing/ To rotate, press the Left mouse button and drag. So far I figured a basic idea of how this ...
gallickgunner's user avatar
0 votes
1 answer
813 views

How to scale-to-fit OGL viewport to GLFW window?

Say my window is 1280x720. I want to render my stuff to lower resolution and then stretch it to window. I've tried this: glViewport(0, 0, 1280 / 2, 720 / 2); ...
user1378398's user avatar
1 vote
1 answer
996 views

Cross-platform GLFW build with CMake

I know this is probably a popular question and can be very vague, so I'm going to be as specific as possible. I don't really know how to even form this question to be able to search Google, so I came ...
Dave's user avatar
  • 125
1 vote
1 answer
933 views

GLFW shift key not behvaing like other keys

I am using GLFW 3.2.1 Currently I am implementing a camera. For the vertical controls I am using space to go up and shift to go down. For all other keys, pressing the key results in the section of ...
Makogan's user avatar
  • 261
2 votes
1 answer
1k views

Unintended stuttering when moving camera

I am using opengl and GLFW to make a rendering engine. Things work per se, but there is some weird flickering happening when I move the camera. Due the nature of the problem I need to link a ...
Makogan's user avatar
  • 261
0 votes
1 answer
64 views

GLFW- Help implementing glBufferedData

Good Morning, I've been trying to learn some OpenGL by following the tutorials on learnopengl.com and I've hit a bit of a snag. I'm trying to implement the same functionality as the "Hello Triangle" ...
Jacob Hughes's user avatar