rag
graphic 2d engine
Bitmap.h
1 #ifndef _RAG_BITMAP_H_
2 #define _RAG_BITMAP_H_
3 
4 #include "DisplayObject.h"
5 #include <rag/Platform.h>
6 #include <rag/Image.h>
7 
8 namespace rag
9 {
10 
12 
16  class Bitmap : public DisplayObject
17  {
18  public:
19 
21 
25  Bitmap(const std::string& path);
26 
28 
31  Bitmap(Image* image);
32 
33  virtual ~Bitmap();
34 
35  virtual void render() override;
36  virtual void prerender() override {};
37 
39  Image* image;
40 
42 
46  glm::vec4 uv;
47  };
48 
49 } // rag
50 
51 #endif
glm::vec4 uv
Texture coordinates. used with texture atlases.
Definition: Bitmap.h:46
Definition: Bitmap.h:8
Bitmap(const std::string &path)
Create a Bitmap using an image in a given path.
Definition: Bitmap.cpp:12
Image * image
Shared image.
Definition: Bitmap.h:36
Core object used to display things in screen.
Definition: DisplayObject.h:23
virtual void render() override
Renders the DisplayObject in the screen.
Definition: Bitmap.cpp:41
Provides the ability to show images.
Definition: Bitmap.h:16
Image object.
Definition: Image.h:19
virtual void prerender() override
Temporal transition to new automatic batch render.
Definition: Bitmap.h:36