raylibstarter
0.1.0
texture2d.cpp
Go to the documentation of this file.
1
#include <raylib.h>
2
3
#include "
texture2d.h
"
4
5
game::core::Texture2D::Texture2D
(
const
char
*filename) {
6
// @todo Error handling needed
7
this->
texture_
= LoadTexture(filename);
8
}
9
10
game::core::Texture2D::~Texture2D
() {
11
TraceLog(LOG_INFO,
"game::core::Texture2D destructor called"
);
12
UnloadTexture(this->texture_);
13
}
14
15
const ::Texture2D &
game::core::Texture2D::texture
()
const
{
16
return
this->texture_;
17
}
18
19
const
int
&
game::core::Texture2D::width
()
const
{
20
return
this->texture_.width;
21
}
22
23
const
int
&
game::core::Texture2D::height
()
const
{
24
return
this->texture_.height;
25
}
game::core::Texture2D::texture
const ::Texture2D & texture() const
Definition:
texture2d.cpp:15
game::core::Texture2D::width
const int & width() const
Definition:
texture2d.cpp:19
game::core::Texture2D::texture_
::Texture2D texture_
Raylib Texture2D structure which contains width, height and the ID of the associated VRAM texture.
Definition:
texture2d.h:54
game::core::Texture2D::Texture2D
Texture2D()=delete
game::core::Texture2D::height
const int & height() const
Definition:
texture2d.cpp:23
game::core::Texture2D::~Texture2D
~Texture2D()
Destructor.
Definition:
texture2d.cpp:10
texture2d.h
src
core
texture2d.cpp
Generated by
1.9.3