source: GTP/trunk/App/Demos/Vis/CHC_revisited/RenderQueue.h @ 2771

Revision 2771, 898 bytes checked in by mattausch, 16 years ago (diff)
Line 
1#ifndef __RENDERQUEUE_H
2#define __RENDERQUEUE_H
3
4#include "common.h"
5
6namespace CHCDemo
7{
8
9class RenderState;
10
11
12/** This class implements a render queue that sorts entities according to
13        their materials.
14*/
15class RenderQueue
16{
17public:
18
19        /** Default constructor
20        */
21        RenderQueue();
22        /** Constructor taking a render queue
23        */
24        RenderQueue(RenderState *state);
25        /** Enqueues a number of entities
26        */
27        void Enqueue(SceneEntity **entities, int size);
28        /** Renders the contents of the render queue.
29        */
30        void Render();
31        /** Sets the current render state
32        */
33        void SetRenderState(RenderState *state);
34        /** Clears the render queue
35        */
36        void Clear();
37
38
39protected:
40
41        /** Sorts the render queue according to some parameters.
42        */
43        void Sort();
44
45
46        ///////////
47
48        RenderState *mState;
49        SceneEntityContainer mEntities;
50        int mMinSizeForSorting;
51};
52
53}
54
55#endif
Note: See TracBrowser for help on using the repository browser.