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
24
votes
1answer
1k views

My game seems to be incompatible with recording software. What could be causing this?

I've just finished a little Game-Dev project for university and I need to record a video to accompany my submission (just in case they can't get my source to work). Basically my game doesn't work at ...
13
votes
2answers
10k views

How can I associate a key_callback with a wrapper class instance?

I'm trying to wrap my GLFW3 calls into a single class: ...
9
votes
2answers
8k views

How can I forward GLFW's keyboard input to another object?

I'm having trouble trying to execute keyboard events in a another class with GLFW3. The problem I'm having is that GLFW3 uses a static function for input as shown: ...
7
votes
2answers
12k views

How to set to fullscreen in GLFW3?

In the version 2.7 everything was pretty simple: glfwOpenWindow(Width, Height, 8, 8, 8, 8, 24, 0, isFullscr ? GLFW_FULLSCREEN : GLFW_WINDOW); But in version 3.x ...
6
votes
2answers
12k views

Toggle Fullscreen at Runtime

Using the library GLFW, I can create a fullscreen window using this line of code. glfwOpenWindow(Width, Height, 8, 8, 8, 8, 24, 0, GLFW_FULLSCREEN); The line for ...
6
votes
3answers
18k views

Why does my machine render OpenGL using my onboard chipset instead of my graphics card?

I'm following an OpenGL tutorial series at opengl-tutorial.org, but have run into a problem: The following lines: ...
6
votes
1answer
817 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 ...
5
votes
2answers
3k views

Setting Window Icon Using GLFW (LWJGL 3)

What's the best, cross platform, way of setting the window icon using LWJGL 3? I have a PNG image and would like to set it to the icon present in my dock (OS X) or the application bar (Linux).
4
votes
3answers
4k 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 "...
4
votes
1answer
504 views

What is causing my default libraries to conflict with OpenGL extensions?

So I'm currently following the tutorial for creating OpenGL programs on learnopengl.com,so I'm using GLFW, GLEW and the base library for OpenGL. However, when I go to build my code, I get a warning ...
4
votes
1answer
3k views

GLFW3 multiple windows

I'm trying to use GLFW3 to develop VJing application. So basic idea is use two windows: 1st window for fullscreen projection on secondary monitor (basically projector) 2nd window for (hopefully) ...
3
votes
2answers
5k views

Frame timing for GLFW versus GLUT

I need a library which ensures me that the timing between frames are more constant as possible during an experiment of visual psychophics. This is usually done synchronizing the refresh rate of the ...
3
votes
1answer
6k views

Why would creating a GLFW 3 window return null?

For some reason after calling 'glfwCreateWindow' I get back NULL as the return value. I'm initializing GLFW beforehand with 'glfwInit' and while searching for a ...
3
votes
1answer
465 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 ...
3
votes
3answers
142 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 ...
3
votes
1answer
508 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 ...
3
votes
0answers
131 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 ...
3
votes
0answers
124 views

Understanding callbacks for connecting/disconnecting controller

I am using glfw and let's say I track controllers with a simple struct: ...
2
votes
2answers
9k 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?
2
votes
2answers
4k 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 ...
2
votes
1answer
1k views

Kinds of anti aliasing? [closed]

I'm looking into the newer OpenGL's with GLFW, but I'm stuck in a decision. What kind of anti aliasing is the best, or something that makes it look real, not "real". I don't want the picture blurred, ...
2
votes
1answer
11k views

How to find monitor resolution with glfw3?

For a while now, I have been playing around with making a game using OpenGL, and glfw3. I have been perfectly happy to create windows at my native resolution of 1920x1080. I'm getting to the point ...
2
votes
1answer
8k views

Why does glGetString returns a NULL string

I am trying my hands at GLFW library. I have written a basic program to get OpenGL renderer and vendor string. Here is the code ...
2
votes
1answer
630 views

GLFW mouselook under OSX

I'm continuing to port an OpenGL app from Visual Studio 2012 to XCode 5. The only major issue I'm having is mouselook. It "doesn't work" under OSX (Mavericks). Here's the (pseudocode): Pre-update,...
2
votes
1answer
372 views

What is the purpose of bitdepth for the several components of the framebuffer in glfwWindowHint function of GLFW3?

I would like to know what are the following "framebuffer related hints" of GLFW3 function glfwWindowHint : GLFW_RED_BITS GLFW_GREEN_BITS GLFW_BLUE_BITS GLFW_ALPHA_BITS GLFW_DEPTH_BITS ...
2
votes
1answer
259 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 ...
2
votes
1answer
232 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 ...
2
votes
1answer
444 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 ...
2
votes
1answer
60 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 ...
2
votes
0answers
281 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
1answer
1k 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 ...
2
votes
1answer
117 views

Invalid GLSL on some machines

I'm writing a game engine using OpenGL 4.3 using gcc 5, mainly to teach myself graphics programming. Initial development was on my Surface Pro 3 using mingw-w64 and worked like a charm. I've decided ...
1
vote
1answer
2k views

Why won't my vertex buffer render in GLFW3?

I have started to try to learn OpenGL, and I decided to use GLFW to assist in window creation. The problem is, since GLFW3 is so new, there are no tutorials on it or how to use it with modern OpenGL (...
1
vote
2answers
1k views

GLFW / OpenGL location and size in pixels

I'm using GLFW to create a little game. (and by little, I mean: small, nonprofit) After a while of puzzling, I found out that this draws a texture (from an image, for instance) to the screen: (the ...
1
vote
1answer
236 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 ...
1
vote
1answer
608 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 ...
1
vote
1answer
383 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 ...
1
vote
2answers
818 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
913 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 ...
1
vote
2answers
314 views

Wrong FPS calculations in GLFW game

In my game loop, ...
1
vote
1answer
556 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 ...
1
vote
1answer
648 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 ...
1
vote
1answer
152 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
397 views

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

Is it possible to easly transform existing glut/glew to GLFW API?
1
vote
1answer
2k 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
vote
2answers
1k views

Runtime resolution changing with GLFW3

I've been trying to figure out the correct method for changing the resolution/fullscreen state of a GLFW window for a while now, but after searching all I found were references of how to do it with ...
1
vote
1answer
293 views

GLFW3. Destroying and create new window results in a black window

I am trying to write a fullscreen toggle handler and running into an issue. In order to change between fullscreen and windowed I need to destroy the current window and create a new one with the '...
1
vote
1answer
2k views

C++ OpenGL wireframe cube rendering blank

I'm just trying to draw a bunch of lines that make up a "cube". I can't for the life of me figure out why this is producing a black screen. The debugger does not break at any point. I'm sure it's a ...
1
vote
0answers
60 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 ...
1
vote
0answers
37 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 ...