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…
Observer pattern in C++11
Posted in C++ | Tags: C++11, gof patterns, observer, observer pattern, pattern, pattern implementation
Debugging OpenGL part 3 – using 3rd party debug tools
There 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.
Posted in C++, OpenGL, WebGL | Tags: debugging, debugging tools
Debugging OpenGL part 2 – using glDebugMessageCallback()
The 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.
Debugging OpenGL part 1 – using glGetError()
I’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…
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”).
Posted in C++, Game development, OpenGL | Tags: Qt