Posted by: Morten Nobel-Jørgensen | August 24, 2013

Observer pattern in C++11

Observer pattern is one of the classic GoF patterns. Its main motivation is to allow objects to communicate without a hardcoded coupling – in other words to keep the coupling of objects low. I’ll here discus an implementation in C++ using some the new features of C++11 (especially function objects). Read More…

Posted by: Morten Nobel-Jørgensen | March 10, 2013

Debugging OpenGL part 3 – using 3rd party debug tools

admin-ajaxThere exists a number of tools useful for performance profiling and debugging OpenGL. I’ll here give a short description of such program and how they are used.

An OpenGL program is a program linked with the OpenGL library, which is responsible for communicating with the graphics-card through the driver.

Read More…

Posted by: Morten Nobel-Jørgensen | February 17, 2013

Debugging OpenGL part 2 – using glDebugMessageCallback()

OpenGL DebuggingThe traditional way to debug OpenGL is to insert glGetError() after each OpenGL function call as described in the previous blog post Debugging OpenGL part 1 – using glGetError(). Using glGetError is both cumbersome and time consuming. One of the new features in OpenGL 4.3 is the ability to get a callback whenever an OpenGL-related error occur. In this blog I’ll give a short introduction to how to use this new functionality using FreeGLUT and GLEW.

Read More…

Posted by: Morten Nobel-Jørgensen | January 29, 2013

Debugging OpenGL part 1 – using glGetError()

OpenGL-debuggingI’ll here describe how to debug OpenGL using the glGetError() function in OpenGL 3.x core profile or higher where the gluErrorString() is no longer available. Read More…

Posted by: Morten Nobel-Jørgensen | November 25, 2012

Cross-platform desktop OpenGL 3.2 using Qt 4.8

There exists quite a few platform abstraction libraries which allow you to create an OpenGL context. Most of these wrappers (FreeGLUT, GLFW, SDL) are small libraries that only supports the most basic stuff such as simple event loops and mouse/keyboard input. This is great if you want to create a 2D or 3D game without any advanced GUI elements. If you on the other hand want to create a program mixing GUI elements with 3D context (for instance a level editor or a model viewer) you need a more powerful library such as Qt (pronounced “cute”).

Read More…

« Newer Posts - Older Posts »