YAGE  v0.1.3.0
Yet Another Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
yage::Batch Class Reference

The Batch class will be the base class for all the different batching processes that might use different shaders and attributes. More...

#include <batch.h>

Public Member Functions

virtual bool init ()
 
virtual void begin ()
 
virtual void end ()
 
virtual void render ()
 

Detailed Description

The Batch class will be the base class for all the different batching processes that might use different shaders and attributes.

This is necessary because when we use a different shader, we have to bind a specific number of attributes, and we might not always want to have a texture, colours and coordinates, for example, when only using simple shapes.

Batching

The purpose of batching is to combine all sprites that use the same textures so that the textures does not have to be switched out on the gpu very often. This produces a much more efficient rendering process. An implementation of this can be seen in the SpriteBatch class, as it sorts and renders the objects you give it.

The reason this base class exists, is because it makes it easier to also render objects that may not need a texture, or may require multiple textures or different attributes.

Member Function Documentation

virtual void yage::Batch::begin ( )
virtual
virtual void yage::Batch::end ( )
virtual
virtual bool yage::Batch::init ( )
virtual
virtual void yage::Batch::render ( )
virtual

The documentation for this class was generated from the following file: