diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-03 23:23:13 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-08-03 23:23:13 +0200 |
commit | 61bfb22f27f5216f989c023a5e39fad7e356d2d6 (patch) | |
tree | 9d7a8a760ace272739f651a2f4208326731a6fe7 /src/graphics/core/device.h | |
parent | 5e637ca0288ddd631ec33e1d620cd4a73bcdc2be (diff) | |
download | colobot-61bfb22f27f5216f989c023a5e39fad7e356d2d6.tar.gz colobot-61bfb22f27f5216f989c023a5e39fad7e356d2d6.tar.bz2 colobot-61bfb22f27f5216f989c023a5e39fad7e356d2d6.zip |
Basic font rendering
- added basic font rendering
- minor refactoring & fixes
Diffstat (limited to 'src/graphics/core/device.h')
-rw-r--r-- | src/graphics/core/device.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index c10b853..3ab86dd 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -32,6 +32,7 @@ class CImage; +struct ImageData; namespace Gfx { @@ -279,8 +280,6 @@ public: //! Destroys the device, releasing every acquired resource virtual void Destroy() = 0; - //! Returns whether the device has been initialized - virtual bool GetWasInit() = 0; //! Returns the last encountered error virtual std::string GetError() = 0; @@ -317,6 +316,8 @@ public: //! Creates a texture from image; the image can be safely removed after that virtual Gfx::Texture CreateTexture(CImage *image, const Gfx::TextureCreateParams ¶ms) = 0; + //! Creates a texture from raw image data; image data can be freed after that + virtual Gfx::Texture CreateTexture(ImageData *data, const Gfx::TextureCreateParams ¶ms) = 0; //! Deletes a given texture, freeing it from video memory virtual void DestroyTexture(const Gfx::Texture &texture) = 0; //! Deletes all textures created so far @@ -324,8 +325,10 @@ public: //! Returns the maximum number of multitexture stages virtual int GetMaxTextureCount() = 0; - //! Sets the (multi)texture at given index + //! Sets the texture at given texture stage virtual void SetTexture(int index, const Gfx::Texture &texture) = 0; + //! Sets the texture image by ID at given texture stage + virtual void SetTexture(int index, unsigned int textureId) = 0; //! Returns the (multi)texture at given index virtual Gfx::Texture GetTexture(int index) = 0; //! Enables/disables the given texture stage |