YAGE  v0.1.4.0
Yet Another Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sprite.h
Go to the documentation of this file.
1 
9 #ifndef SPRITE_H
10 #define SPRITE_H
11 
12 #include "../data/texture.h"
13 
14 #include <glad/glad.h>
15 
16 #include <string>
17 
18 namespace yage
19 {
20 
23 class Sprite
24 {
25 private:
26  float x_;
27  float y_;
28  float width_;
29  float height_;
30  GLuint vbo_id_ = 0;
31  Texture texture_;
32 
33 public:
34  Sprite() = default;
35  Sprite(const Sprite &) = delete;
36  Sprite(Sprite &&) = delete;
37  ~Sprite();
38 
39  Sprite &operator=(const Sprite &) = delete;
40  Sprite &operator=(Sprite &&) = delete;
41 
42  void init(float x, float y, float width, float height,
43  const std::string &texture_path);
44  void draw();
45 };
46 
47 } // namespace yage
48 
49 #endif
Sprite()=default
void draw()
Definition: sprite.cpp:71
void init(float x, float y, float width, float height, const std::string &texture_path)
Definition: sprite.cpp:25
Definition: texture.h:17
~Sprite()
Definition: sprite.cpp:18
Sprite & operator=(const Sprite &)=delete
Definition: sprite.h:23