In this example show how simple it is to use MSAA (Multi Sampling Anti Aliasing). MSAA differs from FSAA by antialiasing at the pixel, where FSAA renders a huge texture and down-samples it. MSAA is not a perfect antialiasing method, but it does do a good job and it is for the most part support on almost all graphic-cards today.
We create two spheres; a high detailed and a low detailed polygon version. By adding these two spheres to an osg::Lod we can specify the range that these spheres should be visible. In our example the high detailed is visible when close to the camera and when we move far enough away the osg::Lod will switch to the low detailed version.
In this example we demonstrate how to add basic lighting to your scene. We do this in our example by creating a light source that is directional and has a direction going from right to left.
The osg::HeightField allows us to smoothly integrate between different height points. In this example we create a simple plasma field and use the data generated as height points for the osg::HeightField.
This example shows how to create a visual grid with text characters in each cell. This object was created to be used on certain type of scopes.
We will create a simple scope (M99) with a crosshair that includes tickmarks. Using the SigmaUtil this is very easy and requires very little coding.
Using the SigmaUtil library you can easily add a grid to your scene with just a couple of lines of code.
Using basically the same code from the example “Geometry” and by supply texture coordinates, we can now easily set an image to be used as a texture for our geometry.
The usual way of getting geometry is by loading it, but sometimes you might need to create it manually for special cases. In this example we create a simple triangle and color each vertex with red, green and blue.
We create a grid of spheres to demonstrate the fog being applied.