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

learn more… | top users | synonyms (1)

0
votes
1answer
17 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
42 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
44 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
47 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 ...
0
votes
1answer
45 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
92 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 - and + keys to change the ...
1
vote
0answers
69 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. // PROBLEM WITH INCREASING MEMORY USAGE void WindowSystem::setTitle( const string & title ) {...
0
votes
0answers
111 views

A 2D card game using OpenGL

I am creating a 2d card game. I have written the low-level functions, game logic, game algorithms in C++. I now have to create a graphics layer that the player can interact with. This just has to be ...
2
votes
1answer
105 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 ...
0
votes
2answers
44 views

Cannot get mask with multiple textures to work

I am trying to render three textures: Background, Black/White Foreground Mask and Foreground. I have used this OpenGL - mask with multiple textures, but I cannot get it to work. I only get the last ...
0
votes
1answer
72 views

LWJGL3 Input for single press of keyboard

I am making a game with lwjgl and GLFW and am having a hard time figuring out how to check for a single press on the keyboard.
3
votes
1answer
67 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 ...
1
vote
1answer
59 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 ...
0
votes
1answer
81 views

GLFW Fullscreen OS X in LWJGL 3

How does one create a fullscreen window properly in OS X from the code, instead of just expanding into the current desktop? I am referring to the sort of fullscreen window that one gets when the top-...
0
votes
1answer
74 views

How to make a triangle pixellated with GLFW?

How can one make a triangle look pixelated without modifying the size of the window in GLFW3? Preferably, I'd like to accomplish this without the use of shaders. For example, by setting the size of ...
0
votes
0answers
40 views

GLFW - Selecting an OpenGL Context before showing the window

I want to know how i can select an opengl context before displaying the window I have two different machines. One is opengl 3.1 and the other is opengl 3.3. I want to be able to select the context ...
0
votes
1answer
274 views

Can't draw lines in 2D space with GLFW and OpenGL

I'm trying to draw a grid in 2D space using GLFW and OpenGL but for some reason I only get this on the screen: Here's my code: #include <GLFW/glfw3.h> #include <stdlib.h> #include <...
3
votes
2answers
428 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).
0
votes
0answers
189 views

GLFW - Event Polling System

I need some help on design. I'm making an event polling system, where a window is notified of events as they happen. I handle events at a system level in my GLFW backend, by using callbacks. ...
0
votes
0answers
114 views

GLFW/LWJGL black screen flicker issue

Im having a problem with creating a borderless fullscreen window in LWJGL using GLFW. It creates the (in this case black - as intended) window, however when the focus changes (f.e. tabbing int/out), ...
1
vote
2answers
247 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 ...
0
votes
0answers
655 views

How to toggle fullscreen with lwjgl

I'm using glfw in lwjgl-3 to try to create a toggleFullscreen method. However it always gives me errors. I saw this question Toggle Fullscreen at Runtime but it didn't help because glfwOpenWindow() ...
-4
votes
1answer
253 views

Licensing and commercial game development [closed]

I am thinking about developing my game and have a few questions. I am going to use these softwares and libraries : OpenGL, Visual Studio Express, GLFW. I have publishing and selling my game in plans. ...
1
vote
2answers
256 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
0answers
267 views

Compiling glfw application mingw [closed]

I am trying to compile a glfw application on mingw. I am using 64 bit windows and 32bit mingw compiler And I have downloaded 32 bit binaries from http://www.glfw.org/download.html I am trying do by ...
0
votes
0answers
83 views

Game loop not functioning correctly

I'm working on a game loop in C++ using OpenGL and GLFW and it works like expected (I think), except when I'm focused in the window the FPS drops to 1fps (or 1000ms per frame) but when I'm not focused ...
0
votes
1answer
75 views

How can I ensure GLFW callback events only happen once in the main loop?

The problem is that the mouse and keyboard events can be triggered before the main loop(in which the program starts to render and update content) takes place. In the program if the moues button is ...
0
votes
1answer
2k views

How do I set a background image in OpenGL/GLFW?

I'm writing a simple 2D game with C++ and OpenGL/GLFW, and my current step is to create a menu. I finished with buttons, but I think it looks a little bit boring (with only 4 buttons and a black ...
2
votes
1answer
350 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,...
1
vote
1answer
133 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 '...
0
votes
1answer
159 views

OpenGL +SFML + GLFW3

I'am maybe asking a stupid question, but can we mix OpenGl + SMFL and add to it some GLFW in the same SFML window ?
4
votes
2answers
3k 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: glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(...
5
votes
2answers
3k 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: static UI u; ... ... static void ...
-2
votes
1answer
168 views

Why OpenGL X and Z axis got inverted sometimes?

I'm having some troubles with my game code. I'm developing a Voxel Engine and everything is fine, but sometimes (like 30% of times) when I build and run my project, the X and Z axis got inverted (I ...
2
votes
0answers
931 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) ...
0
votes
1answer
1k views

Texture Won't Load in OpenGL

I've started trying to make a 2D game in C++ using OpenGL, and I'm using SOIL as the imaging loading library. The problem is, I've been trying to get a simple 64x64 image of a red square to open and ...
0
votes
1answer
1k 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 solution tried setting '...
0
votes
1answer
3k 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 ...
1
vote
0answers
1k views

Creating a new GLFW window and re-using the old context causes crash

I am using GLFW 3.0.2 and when I want to switch the application to fullscreen, I create a new window and intend to use the OpenGL context of the old window so I don't have to reload all the meshes, ...
3
votes
1answer
4k 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 there is no place where i can ...
6
votes
2answers
4k 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: class WindowManager { private: GLFWwindow* window_; GLFWmonitor* monitor_; Keyboard* keyboard_; ... } And I'm trying to setup a ...
1
vote
1answer
1k 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
1answer
186 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 ...
-1
votes
2answers
1k views

Need help drawing obj file! [closed]

I'm using GLFW and I want to draw a obj file. How are they drawn? I know how to draw 3D in OpenGL but when I open the obj file I see "v"s, "vn"s, "f"s, "vt"s, what are these? I don't know how to read ...
22
votes
1answer
792 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 ...
0
votes
1answer
603 views

gluLookAt strange behavior implementing camera

I'm having a super tough time trying to implement what I thought would be a very straightforward problem. I'm trying to demonstrate a free camera that can move forward/back, strafe left/right, fly up/...
2
votes
1answer
5k 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 #include <GL/glew.h> #include <GL/glfw.h> #include <...
0
votes
1answer
647 views

Problem with GLFW input

I am using GLFW for the input in my game. I just started learning it and I have encountered a problem. The problem is the input, I have a callback function, where I check for keypresses. I want the ...
2
votes
1answer
610 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
2answers
4k 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 ...