VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
RenderList.h
1 /*
2  * Copyright (C) 2014 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef RENDERLIST_H
18 #define RENDERLIST_H
19 
20 #include "RenderNode.h"
21 #include "RendererCommon.h"
22 #include <vector>
23 
36 class RenderList {
37 public:
41  RenderList();
42  ~RenderList();
43 
48  void addNode(RenderNode* node);
52  void reset();
58  void render();
59 private:
60  struct NodeDepthComparator {
61  bool operator() (const RenderNode* e1, const RenderNode* e2) const;
62  };
63 
64  void buildRenderList();
65 
66  std::vector<RenderNode*> mNodeList;
67  std::vector<RenderNode*> mRenderList;
68 };
69 
70 #endif // RENDERLIST_H
Header declaring and including types common to renderer classes such as Vector2. Also includes GL hea...
void render()
Draw RenderNodes in sorted order, with larger z-depths appearing on top.
void reset()
Clear this RenderList.
RenderList()
Construct an empty RenderList.
Node which queues a callback (RenderableInterface) or MeshInstance for rendering. ...
Definition: RenderNode.h:33
List of RenderNodes, sorted by z-depth for rendering.
Definition: RenderList.h:36
void addNode(RenderNode *node)
Add a RenderNode to this RenderList.