VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Files | Classes | Typedefs
Game-specific OpenGL renderer and helper classes

Wrappers around GL resources, and classes managing draw calls and render lists. More...

Files

file  PointerDeclarations.h
 File containing forward declarations for renderer types and smart pointers.
 
file  RendererCommon.h
 Header declaring and including types common to renderer classes such as Vector2. Also includes GL headers and forward declarations for renderer types.
 

Classes

struct  Attribute
 The definition of a vertex attribute, such as a position vector, or a texture coordinate. More...
 
class  AttributeArray< T >
 A helper class to access and iterate over an interleaved vertex attribute array. More...
 
class  AttributeArray< T >::Iterator
 An iterator over a vertex attribute array. More...
 
struct  AttributeSet
 A list of vertex attributes. More...
 
class  DebugRenderer
 A class with helper methods for rendering primitives like lines, for debug visualization. More...
 
class  DirectTexture
 A texture which points to a user managed GL texture object. More...
 
class  InstancedShader
 Shader which has instanced values for uniforms and other GL state. More...
 
class  InstancedShaderBase< TShaderImpl >
 Helper class to implement InstancedShader subclasses, by managing a shared Shader. More...
 
class  Mesh
 Mesh composed of vertices, and attributes for each vertex. More...
 
class  MeshInstance
 Mesh bound to a specific Shader. More...
 
class  RenderableInterface
 Callback set in a RenderNode which can be used to issues draw calls. More...
 
class  Renderer
 Class managing GL state switches and draw calls. More...
 
class  RenderList
 List of RenderNodes, sorted by z-depth for rendering. More...
 
struct  RenderNode
 Node which queues a callback (RenderableInterface) or MeshInstance for rendering. More...
 
class  Shader
 Shader program abstract base class. More...
 
class  ShaderBase
 Implementation of Shader which compiles itself from shader code. More...
 
class  SingletonInstancedShaderBase< TShaderImpl >
 A helper to define singletons for InstancedShaders. More...
 
class  SpriteShader
 Shader use by Renderer to draw textured rectangles (sprites). More...
 
class  Texture
 Texture abstract base class. More...
 

Typedefs

typedef std::shared_ptr
< Attribute
AttributePtr
 Shared pointer typedef for Attribute. More...
 
typedef std::weak_ptr< AttributeAttributeWeakPtr
 Weak shared pointer typedef for Attribute. More...
 
typedef std::shared_ptr
< AttributeSet
AttributeSetPtr
 Shared pointer typedef for AttributeSet. More...
 
typedef std::weak_ptr
< AttributeSet
AttributeSetWeakPtr
 Weak shared pointer typedef for AttributeSet. More...
 
typedef std::shared_ptr
< DebugRenderer
DebugRendererPtr
 Shared pointer typedef for DebugRenderer. More...
 
typedef std::weak_ptr
< DebugRenderer
DebugRendererWeakPtr
 Weak shared pointer typedef for DebugRenderer. More...
 
typedef std::shared_ptr
< DirectTexture
DirectTexturePtr
 Shared pointer typedef for DirectTexture. More...
 
typedef std::weak_ptr
< DirectTexture
DirectTextureWeakPtr
 Weak shared pointer typedef for DirectTexture. More...
 
typedef std::shared_ptr
< InstancedShader
InstancedShaderPtr
 Shared pointer typedef for InstancedShader. More...
 
typedef std::weak_ptr
< InstancedShader
InstancedShaderWeakPtr
 Weak shared pointer typedef for InstancedShader. More...
 
typedef std::shared_ptr< MeshMeshPtr
 Shared pointer typedef for Mesh. More...
 
typedef std::weak_ptr< MeshMeshWeakPtr
 Weak shared pointer typedef for Mesh. More...
 
typedef std::shared_ptr
< MeshInstance
MeshInstancePtr
 Shared pointer typedef for MeshInstance. More...
 
typedef std::weak_ptr
< MeshInstance
MeshInstanceWeakPtr
 Weak shared pointer typedef for MeshInstance. More...
 
typedef std::shared_ptr
< RenderList
RenderListPtr
 Shared pointer typedef for RenderList. More...
 
typedef std::weak_ptr< RenderListRenderListWeakPtr
 Weak shared pointer typedef for RenderList. More...
 
typedef std::shared_ptr
< RenderNode
RenderNodePtr
 Shared pointer typedef for RenderNode. More...
 
typedef std::weak_ptr< RenderNodeRenderNodeWeakPtr
 Weak shared pointer typedef for RenderNode. More...
 
typedef std::shared_ptr< ShaderShaderPtr
 Shared pointer typedef for Shader. More...
 
typedef std::weak_ptr< ShaderShaderWeakPtr
 Weak shared pointer typedef for Shader. More...
 
typedef std::shared_ptr
< ShaderBase
ShaderBasePtr
 Shared pointer typedef for ShaderBase. More...
 
typedef std::weak_ptr< ShaderBaseShaderBaseWeakPtr
 Weak shared pointer typedef for ShaderBase. More...
 
typedef std::shared_ptr
< SpriteShader
SpriteShaderPtr
 Shared pointer typedef for SpriteShader. More...
 
typedef std::weak_ptr
< SpriteShader
SpriteShaderWeakPtr
 Weak shared pointer typedef for SpriteShader. More...
 
typedef std::shared_ptr< TextureTexturePtr
 Shared pointer typedef for Texture. More...
 
typedef std::weak_ptr< TextureTextureWeakPtr
 Weak shared pointer typedef for Texture. More...
 

Detailed Description

Wrappers around GL resources, and classes managing draw calls and render lists.

This module is a simple game world renderer focused on 2D scenes. It is separated into three main sections:

These are designed to be modular and reused / repurposed. For simplicity this renderer does not perform batching or other optimizations. Our usage also does not rely on texture sheets. With some modifications these could be added.

VoltAir maintains a Renderer, and a single RenderList in Engine. Each Graphic, which represents a visual element of an Actor in the game world, is then requested to queue RenderNodes to that RenderList. Engine then renders these on Qt's render thread. Because rendering occurs on a separate thread from physics and game logic, each Graphic is required to perform synchronization and double buffering, which is partially accomplished through InstancedShaders (for example TerrainShader).

Typedef Documentation

typedef std::shared_ptr<Attribute> AttributePtr

Shared pointer typedef for Attribute.

typedef std::shared_ptr<AttributeSet> AttributeSetPtr

Shared pointer typedef for AttributeSet.

typedef std::weak_ptr<AttributeSet> AttributeSetWeakPtr

Weak shared pointer typedef for AttributeSet.

typedef std::weak_ptr<Attribute> AttributeWeakPtr

Weak shared pointer typedef for Attribute.

typedef std::shared_ptr<DebugRenderer> DebugRendererPtr

Shared pointer typedef for DebugRenderer.

typedef std::weak_ptr<DebugRenderer> DebugRendererWeakPtr

Weak shared pointer typedef for DebugRenderer.

typedef std::shared_ptr<DirectTexture> DirectTexturePtr

Shared pointer typedef for DirectTexture.

typedef std::weak_ptr<DirectTexture> DirectTextureWeakPtr

Weak shared pointer typedef for DirectTexture.

typedef std::shared_ptr<InstancedShader> InstancedShaderPtr

Shared pointer typedef for InstancedShader.

typedef std::weak_ptr<InstancedShader> InstancedShaderWeakPtr

Weak shared pointer typedef for InstancedShader.

typedef std::shared_ptr<MeshInstance> MeshInstancePtr

Shared pointer typedef for MeshInstance.

typedef std::weak_ptr<MeshInstance> MeshInstanceWeakPtr

Weak shared pointer typedef for MeshInstance.

typedef std::shared_ptr<Mesh> MeshPtr

Shared pointer typedef for Mesh.

typedef std::weak_ptr<Mesh> MeshWeakPtr

Weak shared pointer typedef for Mesh.

typedef std::shared_ptr<RenderList> RenderListPtr

Shared pointer typedef for RenderList.

typedef std::weak_ptr<RenderList> RenderListWeakPtr

Weak shared pointer typedef for RenderList.

typedef std::shared_ptr<RenderNode> RenderNodePtr

Shared pointer typedef for RenderNode.

typedef std::weak_ptr<RenderNode> RenderNodeWeakPtr

Weak shared pointer typedef for RenderNode.

typedef std::shared_ptr<ShaderBase> ShaderBasePtr

Shared pointer typedef for ShaderBase.

typedef std::weak_ptr<ShaderBase> ShaderBaseWeakPtr

Weak shared pointer typedef for ShaderBase.

typedef std::shared_ptr<Shader> ShaderPtr

Shared pointer typedef for Shader.

typedef std::weak_ptr<Shader> ShaderWeakPtr

Weak shared pointer typedef for Shader.

typedef std::shared_ptr<SpriteShader> SpriteShaderPtr

Shared pointer typedef for SpriteShader.

typedef std::weak_ptr<SpriteShader> SpriteShaderWeakPtr

Weak shared pointer typedef for SpriteShader.

typedef std::shared_ptr<Texture> TexturePtr

Shared pointer typedef for Texture.

typedef std::weak_ptr<Texture> TextureWeakPtr

Weak shared pointer typedef for Texture.