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