Arcade Shooter
RenderTarget.h
1 
2 /* ██╗ ██╗ █████╗ ████████╗ █████╗ ███╗ ██╗ █████╗
3  ██║ ██╔╝ ██╔══██╗ ╚══██╔══╝ ██╔══██╗ ████╗ ██║ ██╔══██╗
4  █████╔╝ ███████║ ██║ ███████║ ██╔██╗ ██║ ███████║
5  ██╔═██╗ ██╔══██║ ██║ ██╔══██║ ██║╚██╗██║ ██╔══██║
6  ██║ ██╗ ██║ ██║ ██║ ██║ ██║ ██║ ╚████║ ██║ ██║
7  ╚═╝ ╚═╝ ╚═╝ ╚═╝/\ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝
8  /vvvvvvvvvvvvvvvvvvv \=========================================,
9  `^^^^^^^^^^^^^^^^^^^ /---------------------------------------"
10  Katana Engine \/ © 2012 - Shuriken Studios LLC */
11 
12 #pragma once
13 
14 namespace KatanaEngine
15 {
17  class RenderTarget : public Texture
18  {
19 
20  public:
21 
25  RenderTarget(const int width, const int height);
26  virtual ~RenderTarget() { }
27 
28 
31  static void Set(RenderTarget *pTarget);
32 
35  static void SetDisplay(ALLEGRO_DISPLAY *pDisplay) { s_pDisplay = pDisplay; }
36 
41  virtual bool Load(const std::string &path, ResourceManager *pManager) { return true; }
42 
43  private:
44 
45  static ALLEGRO_DISPLAY *s_pDisplay;
46 
47  };
48 }
Represents a 2D grid of texels.
Definition: Texture.h:17
RenderTarget(const int width, const int height)
Instantiate a render target object.
Definition: RenderTarget.cpp:18
Contains a 2D texture that can be used as a render target.
Definition: RenderTarget.h:17
virtual bool Load(const std::string &path, ResourceManager *pManager)
Render targets don't need to be loaded so this simply returns true.
Definition: RenderTarget.h:41
static void Set(RenderTarget *pTarget)
Set the desired target to render to when drawing.
Definition: RenderTarget.cpp:25
static void SetDisplay(ALLEGRO_DISPLAY *pDisplay)
Set the display of the target.
Definition: RenderTarget.h:35
Loads and manages the lifespan of objects from external files.
Definition: ResourceManager.h:17
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...
Definition: Animation.cpp:14