Home Articles Tutorials Resources About
Code snippets   Last update: July 20 2006

High resolution timer with demo project
This project contains a selfcontained version of the SDK SampleFramework timer in the Timer.cs file, which you can add to your own projects out of the box. Check out the Form1.cs file for the code needed to retrieve the time from the timer.

» Download this resource
 
Using clipping planes with HLSL
Clipping planes can be used to limit (clip) rendering to a certain potion of your (world) space by setting up planes that define those limitations. For the fixed function pipeline this works rather straightforward, but for the programmable pipeline (HLSL) it's a bit more complicated. This snippet shows how to set this up.

» View this resource
 
Cullmode sorting trick for alpha blending mesh subsets
A code snippet with some explaination on how to use cullmode sorting to correctly render transparent mesh subsets in a back-to-front order.

» View this resource
 
Grayscale rendering in MDX (Fixed function)
A quick code snippet on setting up the fixed function pipeline to render in grayscale

» View this resource
 
EffectHandles made easy, using a hashtable-based utility class
Using effect handles to set parameters on your effects can drastically improve the performance of your application. This snippet provides a 'proxy' class that allows you to use these effect handles while you can still reference parameters by their string name.

» View this resource
 
Creating a mesh with multiple subsets
A mesh object can be used to hold all geometric data of a game object. The original SDK documentation already shows how to create a mesh with a single subset, but for defining multiple subsets (or attribute ranges) some more work is needed. This little snippet shows how to programatically set up a simple cube with two subsets.

» View this resource
 
 
MDX info is an initiative by NetForge. All content is copyright © 2005-2006 by its respective authors | About MDX info | Terms of Use |