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

learn more… | top users | synonyms

1
vote
1answer
45 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
43 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
90 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
67 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
99 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 ...
1
vote
1answer
92 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
62 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
62 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 ...
0
votes
1answer
76 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 ...
0
votes
1answer
71 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
39 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
256 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
1answer
372 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
177 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
106 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
239 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
620 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
238 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
242 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
250 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
80 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
344 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): ...
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); ...
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
1answer
182 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
783 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
598 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 ...
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
636 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
597 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 ...
1
vote
1answer
1k 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 ...
6
votes
2answers
7k 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 creating a standard window looks ...