source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Shape.cpp @ 2840

Revision 2840, 679 bytes checked in by mattausch, 16 years ago (diff)
Line 
1#include "Shape.h"
2#include "Material.h"
3#include "RenderState.h"
4#include "Geometry.h"
5#include "SceneEntity.h"
6
7#include "glInterface.h"
8#include <Cg/cg.h>
9#include <Cg/cgGL.h>
10
11
12namespace CHCDemoEngine
13{
14
15Shape::Shape(Geometry *geometry, Material *mat, SceneEntity *parent):
16mGeometry(geometry),
17mMaterial(mat),
18mParent(parent),
19mRenderQueueBucket(NULL)
20{
21}
22
23
24Shape::~Shape()
25{}
26
27
28void Shape::Render(RenderState *state)
29{
30        if (mMaterial) mMaterial->Render(state);
31
32        mGeometry->Render(state);
33}
34
35
36void Shape::SetGeometry(Geometry *geom)
37{
38        mGeometry = geom;
39}
40
41
42void Shape::SetMaterial(Material *mat)
43{
44        mMaterial = mat;
45}
46
47
48}
Note: See TracBrowser for help on using the repository browser.