VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
RenderNode.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 RENDERNODE_H
18 #define RENDERNODE_H
19 
20 #include "MeshInstance.h"
21 #include "RenderableInterface.h"
22 #include "RendererCommon.h"
23 #include "Shader.h"
24 
33 struct RenderNode {
37  float zDepth = 0.0f;
55 
62  void render();
63 };
64 
65 #endif // RENDERNODE_H
RenderableInterface * callback
RenderableInterface queued for rendering.
Definition: RenderNode.h:54
Header declaring and including types common to renderer classes such as Vector2. Also includes GL hea...
Callback set in a RenderNode which can be used to issues draw calls.
Definition: RenderableInterface.h:26
float zDepth
Z-depth value used for sorting nodes in a RenderList.
Definition: RenderNode.h:37
MeshInstancePtr mesh
MeshInstance to queue for rendering.
Definition: RenderNode.h:48
ShaderPtr shader
Shader to draw mesh with, if set.
Definition: RenderNode.h:41
std::shared_ptr< Shader > ShaderPtr
Shared pointer typedef for Shader.
Definition: PointerDeclarations.h:143
Node which queues a callback (RenderableInterface) or MeshInstance for rendering. ...
Definition: RenderNode.h:33
void render()
Renders the queued callback or MeshInstance.
std::shared_ptr< MeshInstance > MeshInstancePtr
Shared pointer typedef for MeshInstance.
Definition: PointerDeclarations.h:113