YAGE
Yet Another Game Engine
include
YAGE
sprite.hpp
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
public
:
31
Sprite
();
32
~
Sprite
();
33
34
void
init(
float
x,
float
y,
float
width,
float
height,
const
std::string &texture_path);
35
void
draw();
36
};
37
38
}
// yage
39
40
#endif
yage::Texture
Definition:
texture.hpp:17
yage
Definition:
camera2d.hpp:17
yage::Sprite
Definition:
sprite.hpp:21
Generated by
1.8.13