Space Fighter
A "shmup" game for Computer Programming C++
Loading...
Searching...
No Matches
RenderTarget.cpp
Go to the documentation of this file.
1
2
/*
3
██╗ ██╗ █████╗ ████████╗ █████╗ ███╗ ██╗ █████╗
4
██║ ██╔╝ ██╔══██╗ ╚══██╔══╝ ██╔══██╗ ████╗ ██║ ██╔══██╗
5
█████╔╝ ███████║ ██║ ███████║ ██╔██╗ ██║ ███████║
6
██╔═██╗ ██╔══██║ ██║ ██╔══██║ ██║╚██╗██║ ██╔══██║
7
██║ ██╗ ██║ ██║ ██║ ██║ ██║ ██║ ╚████║ ██║ ██║
8
╚═╝ ╚═╝ ╚═╝ ╚═╝/\ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝
9
/vvvvvvvvvvvvvvvvvvv \=========================================,
10
`^^^^^^^^^^^^^^^^^^^ /---------------------------------------"
11
Katana Engine \/ © 2012 - Shuriken Studios LLC
12
http://www.shurikenstudios.com
13
*/
14
15
#include "
KatanaEngine.h
"
16
17
namespace
KatanaEngine
18
{
19
ALLEGRO_DISPLAY *RenderTarget::s_pDisplay;
20
21
RenderTarget::RenderTarget
(
const
int
width,
const
int
height)
22
{
23
ALLEGRO_BITMAP *pBitmap = al_create_bitmap(width, height);
24
25
SetTexture
(pBitmap);
26
}
27
28
void
RenderTarget::Set
(
RenderTarget
*pTarget)
29
{
30
if
(pTarget) al_set_target_bitmap(pTarget->
GetAllegroBitmap
());
31
else
al_set_target_bitmap(al_get_backbuffer(s_pDisplay));
32
}
33
}
KatanaEngine.h
KatanaEngine::RenderTarget
Contains a 2D texture that can be used as a render target.
Definition
RenderTarget.h:21
KatanaEngine::RenderTarget::RenderTarget
RenderTarget(const int width, const int height)
Instantiate a render target object.
Definition
RenderTarget.cpp:21
KatanaEngine::RenderTarget::Set
static void Set(RenderTarget *pTarget)
Set the desired target to render to when drawing.
Definition
RenderTarget.cpp:28
KatanaEngine::Texture::SetTexture
virtual void SetTexture(ALLEGRO_BITMAP *pBitmap)
Used to set the underlaying allegro bitmap.
Definition
Texture.cpp:49
KatanaEngine::Texture::GetAllegroBitmap
virtual ALLEGRO_BITMAP * GetAllegroBitmap() const
Get the allegro bitmap representation of the texture.
Definition
Texture.h:57
KatanaEngine
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...
Definition
Animation.cpp:18
doxy_src
KatanaEngine
RenderTarget.cpp
Generated by
1.11.0