Tag Info

Hot answers tagged

7

I'm not sure about common practices, but lacking a glfwToggleFullscreen, this seems one way to toggle fullscreen mode: // On input handling, check if F11 is down. if ( glfwGetKey( GLFW_KEY_F11 ) ) { // Toggle fullscreen flag. fullscreen = !fullscreen; // Close the current window. glfwCloseWindow(); // Renew calls to ...


5

There was a SIGGRAPH 2011 course on antialiasing in games, which will probably give you far more information about many more types of AA than you really want. :) When you run a typical PC game and in the options it gives you a choice of "2X, 4X, or 8X" antialiasing, it's referring to multisample antialiasing, MSAA. This stores super-resolution frame ...


4

Well, the amount of time that passes between frames is highly dependent on the hardware rendering your scene. If the machine just isn't strong enough, there's no way to enforce a fixed frame-rate. However, GLFW DOES allow for very precise time MEASUREMENT (and glut does not), and therefore you can use it to make sure your frame rate is not too FAST. Too slow ...


4

glfwinit() isn't actually creating a valid context. glfwopenwindow should do that, but I suspect you're passing invalid parameters. You should check the return of glfwopenwindow (and glfwinit()) to ensure that it's successfully creating a context. This thread also mentions creating a context manually, supposedly without window creation.


3

Unfortunately, desktop hardware is not designed for "real time" applications, where "real time" is defined as "thing X has to happen exactly at N". As computers get faster, we're edging closer to that goal, but at the same time the devices try to do more and more things at the same time. In other words - while your graphics hardware may be capable of ...


3

This is the NVidia manual to their Optimus, the driver which is responsible of switching between integrated GPU and NVidia GPU. From a quick look, it seems they describe how to set the default GPU for a program. I haven't tried it yet though.


3

You can see from the source code that glfwCreateWindow returns a null pointer in only a few circumstances (as of this writing). GLFW is not initialized at all (_GLFW_REQUIRE_INIT_OR_RETURN(NULL); on line 137). The width or height you specify for the window is zero or negative. The context configuration (controlled by you via the window hints, checked via ...


3

These flags allow you to specify the formatting of your color target, and depth stencil buffers that are a part of the final frame buffer. The color target is typically formatted in a R8G8B8A8 format, providing 8 bits of precision for each color, and the alpha channel. This gives a total of 32 bits. The final two flags specify formatting for the depth ...


2

Thanks to @DaleyPaley I was able to figure this out. The problem lay in my code to figure out the camera vectors Right, Up, and Back. I was just using some code that I found online, and once I started showing the actual camera placement and vectors from the perspective of a hardcoded camera, I could tell that the vectors being produced by Right, Up, and Back ...


2

This is usually solved by changing glfwSetInputMode with GLFW_CURSOR from GLFW_CURSOR_HIDDEN to GLFW_CURSOR_DISABLED. The behavior differences are due to the differences in OS APIs that GLFW uses and how they interact with the windowing system. In the documentation, it says that DISABLED should be used for 3D camera controls, and HIDDEN should be used when ...


1

Going into the NVidia control panel by whatever method (From the"Change Default Graphics Processor" link on the "Run With Graphics Processor" menu is how I got there). This will give you the option to change the graphics processor per application: Or globally: For your particular case, I'd try adding a program setting for cmake, and, failing that, change ...


1

The problem with the obj format is that it isn't standardised. So you'll see some that use clockwise winding (not good for a naive implementation in OpenGL) some that use counter-clockwise winding (not good for a naive implementation in DirectX) plus all other kinds of quirks that are vendor-dependent (eg. triangles vs quads as primitives). The most usual ...


1

There is a good documentation on Wikipedia. The format is made by Wavefront, you'll find lot more information online with this name. This is the Wikipedia article. Basically, v means vertex position, vt means texture coordinate and vn means vertex normal. f defines indices of a face. It isn't that easy to draw *.obj models in a modern way, since their ...


1

What I think happens is that a unicode int gets passed when you have your Czech layout. (What I'm not sure is how the int get's passed as a char . . .) If you use xev in the terminal, a window will pop out and input info will print in your terminal when you click/move/drag keys or your mouse. This is a good way to check what the difference between '1' in ...


1

You have no view or projection matrix, so your view volume is a cube 2 units wide and 2 units high and centred on the origin. Coincidentally, you are drawing a cube that is 2 units wide and 2 units high and centred on the origin. So your cube is getting draw just on the outside edge the view volume. Draw a smaller cube (use +/-0.5f for vertex coords) and ...


1

I'd suggest looking at the implementation of SFML, which fluently switches between fullscreen and windowed on Windows, Mac and Linux. SFAIK it doesn't use GLFW, but perhaps similar principles apply.



Only top voted, non community-wiki answers of a minimum length are eligible