Space Fighter
A "shmup" game for Computer Programming C++
Loading...
Searching...
No Matches
KatanaEngine::RenderTarget Class Reference

Contains a 2D texture that can be used as a render target. More...

#include <RenderTarget.h>

Inheritance diagram for KatanaEngine::RenderTarget:

Public Member Functions

 RenderTarget (const int width, const int height)
 Instantiate a render target object.
 
virtual ~RenderTarget ()
 
virtual bool Load (const std::string &path, ResourceManager *pManager)
 Render targets don't need to be loaded so this simply returns true.
 
- Public Member Functions inherited from KatanaEngine::Texture
 Texture ()
 
virtual ~Texture ()
 
int GetWidth () const
 Gets the width of the texture in pixels.
 
int GetHeight () const
 Gets the height of the texture in pixels.
 
Vector2 GetSize () const
 Gets the dimensions of the texture.
 
Vector2 GetCenter () const
 Gets the center position of the texture.
 
virtual bool IsCloneable () const
 Used to determine if the texture is cloneable.
 
virtual ALLEGRO_BITMAP * GetAllegroBitmap () const
 Get the allegro bitmap representation of the texture.
 
- Public Member Functions inherited from KatanaEngine::Resource
virtual ~Resource ()
 
unsigned short GetResourceID () const
 Gets the ID of the resource.
 

Static Public Member Functions

static void Set (RenderTarget *pTarget)
 Set the desired target to render to when drawing.
 
static void SetDisplay (ALLEGRO_DISPLAY *pDisplay)
 Set the display of the target.
 

Additional Inherited Members

- Protected Member Functions inherited from KatanaEngine::Texture
virtual void SetTexture (ALLEGRO_BITMAP *pBitmap)
 Used to set the underlaying allegro bitmap.
 
- Protected Member Functions inherited from KatanaEngine::Resource
void Split (const std::string &line, const char delimeter, std::vector< std::string > &elements)
 Splits a string into a vector of strings.
 
void ParseComments (std::string &line)
 Removes c-style, single-line comments from a line of text.
 
void TrimLine (std::string &line)
 Removes white-space at the front and end of a line of text.
 
ResourceManager * GetResourceManager ()
 Gets a pointer to the ResourceManager that was used to load the resource.
 
virtual Resource * Clone ()
 Clones a resource.
 

Detailed Description

Contains a 2D texture that can be used as a render target.

Definition at line 20 of file RenderTarget.h.

Constructor & Destructor Documentation

◆ RenderTarget()

KatanaEngine::RenderTarget::RenderTarget ( const int width,
const int height )

Instantiate a render target object.

Parameters
widthThe width of the render target.
heightThe height of the render target.

Definition at line 21 of file RenderTarget.cpp.

◆ ~RenderTarget()

virtual KatanaEngine::RenderTarget::~RenderTarget ( )
inlinevirtual

Definition at line 29 of file RenderTarget.h.

Member Function Documentation

◆ Load()

virtual bool KatanaEngine::RenderTarget::Load ( const std::string & path,
ResourceManager * pManager )
inlinevirtual

Render targets don't need to be loaded so this simply returns true.

Parameters
pathThe path to the desired resource.
pManagerA pointer to the ResourceManager that will manage the resource.
Returns
Returns true.

Reimplemented from KatanaEngine::Texture.

Definition at line 44 of file RenderTarget.h.

◆ Set()

void KatanaEngine::RenderTarget::Set ( RenderTarget * pTarget)
static

Set the desired target to render to when drawing.

Parameters
pTargetA pointer to the desired render target.

Definition at line 28 of file RenderTarget.cpp.

◆ SetDisplay()

static void KatanaEngine::RenderTarget::SetDisplay ( ALLEGRO_DISPLAY * pDisplay)
inlinestatic

Set the display of the target.

Parameters
pDisplayA pointer to the display.

Definition at line 38 of file RenderTarget.h.


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