diff options
Diffstat (limited to 'src/libjin/graphics/graphic.h')
-rw-r--r-- | src/libjin/graphics/graphic.h | 152 |
1 files changed, 76 insertions, 76 deletions
diff --git a/src/libjin/graphics/graphic.h b/src/libjin/graphics/graphic.h index 857785d..fdb1c9c 100644 --- a/src/libjin/graphics/graphic.h +++ b/src/libjin/graphics/graphic.h @@ -14,82 +14,82 @@ namespace JinEngine { - namespace Graphics - { - - /// - /// Class inherites Graphic doesn't keep any state such as origin, scale and other properties. Very low - /// level visualized resources. - /// - class Graphic : public Object, public Renderable - { - public: - /// - /// - /// - Graphic(int w = 0, int h = 0); - - /// - /// - /// - Graphic(const Bitmap* bitmap); - - /// - /// - /// - virtual ~Graphic(); - - /// - /// - /// - inline int getWidth() const { return mSize.w(); } - - /// - /// - /// - inline int getHeight() const { return mSize.h(); } - - /// - /// Get opengl texture token. - /// - /// @return OpenGL texture token. - /// - inline GLuint getGLTexture() const { return mTexture; } - - /// - /// - /// - void setFilter(GLint min, GLint max); - - /// - /// Render graphic single with given coordinates. - /// - void render(float x, float y, float sx = 1, float sy = 1, float r = 0, float ox = 0, float oy = 0) const; - - /// - /// Render part of graphic single with given coordinates. - /// - void render(const Math::Quad& slice, float x, float y, float sx = 1, float sy = 1, float r = 0, float ox = 0, float oy = 0) const; - - /// - /// Render with transform. - /// - void render(const Math::Transform& transform) const; - - /// - /// - /// - void render(const Math::Quad& slice, const Math::Transform& transform) const; - - protected: - Math::Vector2<uint> mSize; - - private: - GLuint mTexture; - - }; - - } // namespace Graphics + namespace Graphics + { + + /// + /// Class inherites Graphic doesn't keep any state such as origin, scale and other properties. Very low + /// level visualized resources. + /// + class Graphic : public Object, public Renderable + { + public: + /// + /// + /// + Graphic(int w = 0, int h = 0); + + /// + /// + /// + Graphic(const Bitmap* bitmap); + + /// + /// + /// + virtual ~Graphic(); + + /// + /// + /// + inline int getWidth() const { return mSize.w(); } + + /// + /// + /// + inline int getHeight() const { return mSize.h(); } + + /// + /// Get opengl texture token. + /// + /// @return OpenGL texture token. + /// + inline GLuint getGLTexture() const { return mTexture; } + + /// + /// + /// + void setFilter(GLint min, GLint max); + + /// + /// Render graphic single with given coordinates. + /// + void render(float x, float y, float sx = 1, float sy = 1, float r = 0, float ox = 0, float oy = 0) const; + + /// + /// Render part of graphic single with given coordinates. + /// + void render(const Math::Quad& slice, float x, float y, float sx = 1, float sy = 1, float r = 0, float ox = 0, float oy = 0) const; + + /// + /// Render with transform. + /// + void render(const Math::Transform& transform) const; + + /// + /// + /// + void render(const Math::Quad& slice, const Math::Transform& transform) const; + + protected: + Math::Vector2<uint> mSize; + + private: + GLuint mTexture; + + }; + + } // namespace Graphics } // namespace JinEngine #endif // defined(jin_graphics) |