Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

RA_Sample0.cpp

Go to the documentation of this file.
00001 
00002 #include "RAS_IRasterizer.h"
00003 #include "KX_GlutCanvas.h"
00004 #include "RAS_MeshObject.h"
00005 #include "RAS_MaterialBucket.h"
00006 #include "RAS_Polygon.h"
00007 
00008 //(CCString texname,int tile,int mode,int transparant,int lightlayer
00009 //              ,bool bIsTriangle)
00010         
00011 
00012 void main()

00013 {
00014         RAS_ICanvas* can = new KX_GlutCanvas();
00015 
00016         RAS_IRasterizer* rasty = new RAS_IRasterizer(can);
00017         RAS_MeshObject* mesh = new KX_MeshObject();
00018 
00019         CCString texture="";
00020         int tile=0;
00021         int mode=0;
00022         int transparant=0;
00023         int lightlayer=0;
00024         bool bIsTriangle=false;
00025         RAS_IPolyMaterial material(texture,tile,mode,transparant,lightlayer,bIsTriangle);
00026         RAS_MaterialBucket* bucket = new RAS_MaterialBucket(&material);
00027         
00028         bool bVisible=true;
00029         int numverts = 4;
00030         RAS_Polygon* poly = new RAS_Polygon(bucket,bVisible,numverts);
00031 
00032         mesh->AddPolygon(poly);
00033 
00034         rasty->BeginFrame();
00035         rasty->Init();
00036         rasty->EndFrame();
00037 
00038 
00039 
00040 }
00041 
00042 

Generated at Thu Feb 1 13:03:08 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000