YAGE  v0.1.1
Yet Another Game Engine
yage::SpriteBatch Class Reference

#include <spritebatch.h>

Public Member Functions

 SpriteBatch ()
 
 SpriteBatch (const SpriteBatch &)=delete
 
 SpriteBatch (SpriteBatch &&)=delete
 
 ~SpriteBatch ()
 
SpriteBatchoperator= (const SpriteBatch &)=delete
 
SpriteBatchoperator= (SpriteBatch &&)=delete
 
void init ()
 
void begin ()
 
void end ()
 
void draw (const glm::vec4 &destination_rect, const glm::vec4 &uv_rect, GLuint texture, const Color &color, float depth)
 
void render ()
 

Static Public Attributes

static const int NUM_VERTICES = 6
 

Private Member Functions

void createVertexArray ()
 
void createRenderBatches ()
 
void sortGlyphs ()
 

Private Attributes

GLuint vbo_ = 0
 
GLuint vao_ = 0
 
std::vector< Glyphglyphs_
 
std::vector< Glyph * > glyph_ptrs_
 
std::vector< RenderBatchrender_batches_
 

Constructor & Destructor Documentation

◆ SpriteBatch() [1/3]

yage::SpriteBatch::SpriteBatch ( )
default

◆ SpriteBatch() [2/3]

yage::SpriteBatch::SpriteBatch ( const SpriteBatch )
delete

◆ SpriteBatch() [3/3]

yage::SpriteBatch::SpriteBatch ( SpriteBatch &&  )
delete

◆ ~SpriteBatch()

yage::SpriteBatch::~SpriteBatch ( )

Member Function Documentation

◆ begin()

void yage::SpriteBatch::begin ( )

◆ createRenderBatches()

void yage::SpriteBatch::createRenderBatches ( )
private

◆ createVertexArray()

void yage::SpriteBatch::createVertexArray ( )
private

◆ draw()

void yage::SpriteBatch::draw ( const glm::vec4 &  destination_rect,
const glm::vec4 &  uv_rect,
GLuint  texture,
const Color color,
float  depth 
)

◆ end()

void yage::SpriteBatch::end ( )

◆ init()

void yage::SpriteBatch::init ( )

◆ operator=() [1/2]

SpriteBatch& yage::SpriteBatch::operator= ( const SpriteBatch )
delete

◆ operator=() [2/2]

SpriteBatch& yage::SpriteBatch::operator= ( SpriteBatch &&  )
delete

◆ render()

void yage::SpriteBatch::render ( )

◆ sortGlyphs()

void yage::SpriteBatch::sortGlyphs ( )
private

Member Data Documentation

◆ glyph_ptrs_

std::vector<Glyph *> yage::SpriteBatch::glyph_ptrs_
private

◆ glyphs_

std::vector<Glyph> yage::SpriteBatch::glyphs_
private

◆ NUM_VERTICES

const int yage::SpriteBatch::NUM_VERTICES = 6
static

◆ render_batches_

std::vector<RenderBatch> yage::SpriteBatch::render_batches_
private

◆ vao_

GLuint yage::SpriteBatch::vao_ = 0
private

◆ vbo_

GLuint yage::SpriteBatch::vbo_ = 0
private

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