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

Revision 2793, 997 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        /** Returns the number entities currently in the queue.
38        */
39        int GetSize() const { return (int)mEntities.size(); }
40
41protected:
42
43        /** Sorts the render queue according to some parameters.
44        */
45        void Sort();
46
47
48        ///////////
49
50        RenderState *mState;
51        SceneEntityContainer mEntities;
52        int mMinSizeForSorting;
53};
54
55}
56
57#endif
Note: See TracBrowser for help on using the repository browser.