YAGE
v0.1.1
Yet Another Game Engine
sprite.hpp
Go to the documentation of this file.
1
/* ----------------------------------------------------------------------------
2
* sprite.hpp
3
*
4
* Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
5
* See file LICENSE for more details
6
* ----------------------------------------------------------------------------
7
*/
8
9
#ifndef SPRITE_HPP
10
#define SPRITE_HPP
11
12
#include "
texture.hpp
"
13
14
#include <GL/glew.h>
15
16
#include <string>
17
18
namespace
yage
19
{
20
21
class
Sprite
22
{
23
private
:
24
float
x_
;
25
float
y_
;
26
float
width_
;
27
float
height_
;
28
GLuint
vbo_id_
= 0;
29
Texture
texture_
;
30
31
public
:
32
Sprite
();
33
Sprite
(
const
Sprite
&) =
delete
;
34
Sprite
(
Sprite
&&) =
delete
;
35
~Sprite
();
36
37
Sprite
&
operator=
(
const
Sprite
&) =
delete
;
38
Sprite
&
operator=
(
Sprite
&&) =
delete
;
39
40
void
init
(
float
x,
float
y,
float
width,
float
height,
41
const
std::string &texture_path);
42
void
draw
();
43
};
44
45
}
// namespace yage
46
47
#endif
yage::Sprite::Sprite
Sprite()
yage::Sprite::draw
void draw()
Definition:
sprite.cpp:73
yage::Sprite::texture_
Texture texture_
Definition:
sprite.hpp:29
yage::Sprite::vbo_id_
GLuint vbo_id_
Definition:
sprite.hpp:28
yage::Sprite::width_
float width_
Definition:
sprite.hpp:26
texture.hpp
yage::Sprite::init
void init(float x, float y, float width, float height, const std::string &texture_path)
Definition:
sprite.cpp:27
yage::Texture
Definition:
texture.hpp:17
yage::Sprite::x_
float x_
Definition:
sprite.hpp:24
yage::Sprite::~Sprite
~Sprite()
Definition:
sprite.cpp:20
yage::Sprite::y_
float y_
Definition:
sprite.hpp:25
yage::Sprite::operator=
Sprite & operator=(const Sprite &)=delete
yage
Project namespace.
Definition:
body.cpp:13
yage::Sprite::height_
float height_
Definition:
sprite.hpp:27
yage::Sprite
Definition:
sprite.hpp:21
include
YAGE
sprite.hpp
Generated on Fri Aug 25 2017 14:31:55 for YAGE by
1.8.13