Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [glfw]

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

1
vote
0answers
19 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. ...
2
votes
1answer
61 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 ...
1
vote
1answer
40 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 ...
0
votes
1answer
112 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 ...
0
votes
1answer
83 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 "...
1
vote
1answer
93 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 ...
0
votes
0answers
61 views

Why isn't this data being passed on?

I've made an Input class with a method which returns a boolean array of a total of 1024 keys. This array is then passed on as an argument of the Update() function of every GameObject-inherited class ...
0
votes
1answer
191 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 ...
0
votes
1answer
84 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); ...
1
vote
1answer
224 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 ...
0
votes
0answers
76 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 ...
1
vote
1answer
86 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 ...
0
votes
1answer
31 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" ...
0
votes
0answers
50 views

Unable to link to glfw properly

I'm trying to create a glfw application on windows 10 using VC++ 2017 compiler. I built the glfw library using this compiler but when trying to run it with my batch file I keep getting 'unresolved ...
1
vote
0answers
184 views

How to properly separate render thread from logic thread?

I am not asking about parallelization of physics and so on stuff with parallel_for() like stuff. I've managed to have separate rendering thread from logic thread, ...
2
votes
0answers
109 views

timing rendering to monitor screen update

I have an application with a very light rendering loop, taking a predictable and small time to execute. Right now, I have two solutions. The first solution uses Vsync: after a screen update, my ...
1
vote
1answer
308 views

Modifying GLFW callbacks

I'm currently using Imgui for the GUI part of my OpenGL/C++ engine with the GLFW binding. The problem is though that this binding has encapsulated the input callbacks in a global .cpp file which makes ...
2
votes
0answers
69 views

Understanding callbacks for connecting/disconnecting controller

I am using glfw and let's say I track controllers with a simple struct: ...
4
votes
3answers
2k views

How to improve my input handling in GLFW?

Currently I'm busy working on a game engine. I have my own window class with GLFW functionalities. Currently, I have a very primitive way to handle input in my class: It is not fast, and not "...
1
vote
1answer
261 views

How to abstract GLFW from my rendering library?

I would like to split my game engine in different libraries, so it is easier to maintain, however i have one problem: for example the window creation is handled by GLFW, so I encapsulated it into a ...
0
votes
2answers
2k views

Getting error when following learnopengl.com “Hello Window” Tutorial; how can I fix them?

I am not sure what to do, I have added the include / lib files in the IDE include / lib folders. But I am getting these errors. Someone please help me! What am I doing wrong? Do I need to add some ...
1
vote
0answers
252 views

Detecting keys presses between keyboard layouts, operating systems and javascript

I've recently encountered a few headaches when I tried to detect key presses for a custom game engine to supports Windows, MacOS, Linux, and WebGL. Naive approach: At first I naively thought that ...
0
votes
1answer
239 views

Getting choppy, jumpy animation

Hey I'm trying to get a smooth animation for my player movement. Earlier I changed my frames to render at fixed time(1/60 sec). Well that makes my player now run at a constant speed but the animation ...
6
votes
1answer
308 views

How can I execute GLFW fullsceen in a secondary monitor (Xorg)?

I am currently learning GLFW using C++. I have found many tutorials on initializing windows, but not many on initializing full screen, and next to nothing on initializing full screen on a secondary ...
2
votes
1answer
315 views

In OpenGL, what does it mean to make a context current?

I have a few questions : 1 - What does it mean to make a context current? Does it mean that all subsequent OpenGL calls will apply to that context/window? 2 - With GLFW3, how to use multiple windows ...
0
votes
1answer
196 views

C++ glGenBuffers does not return proper VBOID when called in thread [closed]

I'm currently learning to properly use multithreading in C++ in combination with OpenGL and GLFW, and I encounter a strange bug in my application. I'm generating a procedurally generated terrain in a ...
1
vote
1answer
74 views

How can I enhance this keyboard handler class (remove global variables)

I would like to enhance my keyboard class to be more tight and encapsulated. The first issue I've addressed is Singleton design pattern. I've done this as follows: ...
1
vote
1answer
222 views

Transform existing C++ OpenGL project from glut/glew to GLFW

Is it possible to easly transform existing glut/glew to GLFW API?
0
votes
1answer
222 views

How does glfw handle input?

GLFW is clearly an OpenGL framework, which means we are working with graphics card. How input gets handled then?Seems like it handles all of the controllers on our system, not only graphics card.
1
vote
1answer
626 views

GLFW window freezes on title bar hold/drag

I am making a C++ program with Opengl and GLFW for window and input handling. The program is updated with the main loop by delta time which is calculated by subtracting new frame start time with old ...
-1
votes
1answer
541 views

What is the difference between OpenGL, SDL, DirectX, GLFW, GLUE?

I have not work with graphics yet but I'd like to know its concepts at some high level overview. I was told that OpenGL and DirectX are somehow programmed into my graphics card, and I can use GLFW, ...
0
votes
2answers
389 views

glm::perspective isn't working?

So I'm learning how to make games and program, and while trying to setup a projection camera using GLM in GFLW, this line of code refuses to work and I can't figuire out why. The code is in the image ...
1
vote
2answers
4k views

How to calculate fps in GLFW?

Just letting you guys know before anything I'm a beginner at programming. I am just wondering how I should go about calculating the fps using GLFW?
1
vote
1answer
1k views

GL how to look at the center of the viewport

I'm using GLFW3 and OpenGL to visualize measurements from an IMU that I have. I've gotten the simple cube example working and I can rotate it successfully with quaternions that I've input. However ...
-1
votes
1answer
235 views

2D collision not working

I'm new to game programming and my first project is a platformer. All things are going well, I draw the map, got the scrolling working, there's only one problem. I can't get the collision to work, I ...
0
votes
1answer
209 views

Bare-bones OpenGL game engine crashing 1/6 of the time with GLFW/GLEW

I am currently writing an OpenGL game engine, in which I am currently experiencing a crash every 1 out of 6 times. The error message with Visual Studio 2015 is: Exception thrown at 0x545579C6 (...
1
vote
1answer
265 views

Why my images always change color when I use glDrawPixels?

I am doing a exercise for the college, where I need load a file 'ppm' but any picture does not load with correct colors. I tried change parameter of glDrawPixels, glBlendFunc, but nothing change for ...
0
votes
1answer
122 views

GLFW VBO in World Space

Last year I wrote a basic 3D game for one of my modules using freeglut. Everything was fine and dandy because I used the deprecated immediate-mode of drawing things (glBegin, glVertex, glEnd) for ...
0
votes
1answer
85 views

Disable Ubuntu shortcuts

On Ubuntu when capturing keyboard input with GLFW some keys like LEFT ALT are not passed to my window. Instead some desktop functionality is triggered like the ...
0
votes
1answer
155 views

Mac OSX GLFW Fullscreen Crash

Whenever I run my code to make a fullscreen GLFW window, it crashes. Here is the code: ...
1
vote
2answers
504 views

Should I link GLFW and GLEW into my engine directly?

I want to write my own (simple) game engine with OpenGL. I use GLEW and GLFW and so far linked it successfully. Should the engine or the respective game (which depends on the engine) include GLFW ...
1
vote
1answer
417 views

OpenGL nothing being drawn to screen

I am following the book 'OpenGL SuperBible' and am trying to run one of the first examples of drawing a point to the screen, bit instead of using there lib, im using GLFW. I'm not sure where I am ...
3
votes
3answers
131 views

LWJGL version problems

Is it possible to create VAO's while my computer doesn't support openGL 3.0 or higher? I managed to create a vertex buffer object and draw a rectangle. But then I changed my lwjgl libraries to the ...
0
votes
1answer
327 views

Some OpenGL code not working, but some is

I'm just starting out using GLEW and GLFW in a C++ project for my rendering code, but I'm having trouble actually getting anything to render. I know OpenGL is working in some capacity, because I am ...
1
vote
0answers
148 views

How to create a second Window in OpenGL/GLFW

I would like to have 2 windows. 1 for display purposes and one for settings / buttons (for example to change the color of the background in my main display). How would I go about having a second ...
2
votes
1answer
54 views

Normals showing unexpected results

I am making a game in c++ with opengl and glm and was working on my terrain when this happend : as it appears it is renderering just the way i planned it, but my question was, how do i make it appear ...
0
votes
1answer
66 views

Terrain not rendering like it should be

i was following this tutorial here: https://www.youtube.com/watch?v=yNYwZMmgTJk, in which i was translating from Java to C++ to generate a terrain, and stumbled across this issue: As it appears, it ...
0
votes
2answers
135 views

How can I better structure my code to reduce coupling between input and graphics?

I've been working through a few OpenGL tutorials, and decided to give myself the exercise of trying to draw a grid, with the added requirement of being able to press the ...
1
vote
0answers
183 views

Memory leak with glfwSetWindowTitle? [closed]

I am using GLFW for a game, and I have a function which allows me to set the window title. ...
3
votes
1answer
411 views

OpenGL App not setting cursor position appropriately

I have written a small application using OpenGL, and have implemented some rudimentary camera controls. Unfortunately, I cannot get the application to set my cursor position correctly. The cursor is ...