OpenGL Demos and Tests

This page contains various downloads related to Project Magnum. You will find small OpenGL demos together with their source, the framework and all necessary3rd-party libraries. Note that you will need the Magnum Framework and 3rd party libraries for all demos in order to compile them yourself.

Model Viewer

This small application is a small and fast stand-alone 3d model viewer using per pixel Phong shading (where available).

Currently the viewer can read 3DS, IFS, OFF, PLY and OBJ files. MD2, MD3 and MDS files are supported, but no material is mapped and animations won't be played.

The complete rendering is done as usual with OpenGL. The source code to this demo is included in the framework, so there is no separate download available.

Picking

This small application was created in order to test the new picking functionality in Magnum.

The complete picking algorithm is a pure C++ software based solution without using the OpenGL picking API. This makes picking a bit more complicated but is more portable and allows an easy culling of objects that cannot be hit by a ray. And I guess it is fast enough.

This demo also features the newly integrated support for transparent meshes, as seen at the cockpit of the airplane.

Spheres

This small demo was created as a test of the new OpenGL EXT_framebuffer_object extensions which allows direct rendering into textures. The demo also supports the old-style texture copy method for graphics hardware or drivers that don't support the new extension.

But you need an OpenGL 2.0 compliant graphics card anyways, because the demo uses GLslang shaders for reflections.

Soapfilm

This demo tries to imitate the behaviour of a soapfilm in a flexible wireframe. The enclosing wireframe is modeled by interpolating trigonometric polynomials, while the soapfilm itself uses the same relaxation technique as also used for cloth simulations. The surface is rendered using a GLSL vertex and fragment shader that takes into account one pointlight and the reflectivity of the soapfilm as a function of the angle between the surface normal and the eye vector.

Requirements: This demo requires an OpenGL 2.0 compliant graphics cards with appropriate drivers installed. Currently it is tested on an NVidia Geforce FX and on an ATI Radeon 9800.

SceneTest

This is a test of simple scene graph functionality and of the frustum culling algorithm, which uses a dynmic octree for intersection tests. Again the model used in this test is freely available at Meshfactory.

Features:

A 3ds model is loaded and inserted into the scene graph which is then rendered in the window. You can easily add additional instances of the model, and see that only the really visible models will be rendered. You can also select to optimize the model, which will increase the performance noteably. You can also optimizie the model which should increase the performance (although the demo is locked at 25 frames per second).

Spring Test

This demo is about a cloth simulation using a simple spring systems. Spring systems are an easy physical concept for simulation of cloths, gels and other materials. They can even be used for some optimisation problems and allow very complex setups while the simulation steps (relaxations) are still easy to implement and perform very fast.

This implementation is very general and allows the setting of gravity and damping and the application of external forces to single nodes, which even can have different weights. The physics simulation is implemented separately from the visualisation subsystem

Intersection Test

The foruth demo is about intersection tests of simple boxes. Currently the corresponding routines are implemented for axis aligned cubes, axis aligned boxes and oriented boxes. You can place the boxes at random places and see if they intersect. Nothing really exciting, just a test of some code that will be used later for frustum culling.

This demo also contains a new class used to visualize simple geometric objects like boxes, lines etc. Spheres are still missing but will come soon, too.

SceneTest

The third download is a very simple test of some basic features of the scene graph architecture plus of the optimizer. Again the model used in this test is freely available at Meshfactory.

Features:

A 3ds model is loaded and inserted into the scene graph which is then rendered in the window. You can easily add additional instances of the model (and see the performance drop). You can also select to optimize the model, which will increase the performance noteably.

3DS Loader Test

The second download is a simple test of the 3DS Loader demonstrated at a model which is freely available at Meshfactory. Of course all 3D routines heavily use OpenGL for display.

Features:

A simple 3DS model is loaded together with its textures and displayed at a framerate of 20 frames per second. You can move the model using your mouse and buttons.

Gui3D Test

As a first download, a package has been built demonstrating some the basic features of a graphical user environment built on top of OpenGL.

Features:

The whole client area of the window is an OpenGL buffer and is redrawn at 20 frames per second. As you move the mouse over the buttons, their state is changing to "hover" and the colour changes. The same is true when you finally press a button. All font rendering is done with freetype.