source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderQueue.h @ 2782

Revision 2782, 936 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 CHCDemoEngine
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 an entity
26        */
27        void Enqueue(SceneEntity *entity);
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        int GetSize() const { return (int)mEntities.size(); }
39
40protected:
41
42        /** Sorts the render queue according to some parameters.
43        */
44        void Sort();
45
46
47        ///////////
48
49        RenderState *mState;
50        SceneEntityContainer mEntities;
51        int mMinSizeForSorting;
52};
53
54}
55
56#endif
Note: See TracBrowser for help on using the repository browser.