Work on new OpenGL example - Splitting into several files.

This commit is contained in:
David Williams
2009-03-18 22:48:44 +00:00
parent 877396af31
commit 74292f7a62
5 changed files with 96 additions and 100 deletions

View File

@ -0,0 +1,39 @@
#include "OpenGLSupport.h"
using namespace PolyVox;
OpenGLColour convertMaterialIDToColour(PolyVox::uint8 materialID)
{
OpenGLColour colour;
switch(materialID)
{
case 1:
colour.red = 1.0;
colour.green = 0.0;
colour.blue = 0.0;
break;
case 2:
colour.red = 0.0;
colour.green = 1.0;
colour.blue = 0.0;
break;
case 3:
colour.red = 0.0;
colour.green = 0.0;
colour.blue = 1.0;
break;
case 4:
colour.red = 1.0;
colour.green = 1.0;
colour.blue = 0.0;
break;
case 5:
colour.red = 1.0;
colour.green = 0.0;
colour.blue = 1.0;
break;
}
return colour;
}