diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-29 15:09:53 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-29 15:09:53 +0200 |
commit | 7c5a3514dd6e907866bddcbb09b4d9cbd958dd8e (patch) | |
tree | 00aaece75d43bd35a3997bf4eacdfd103d29d5c7 /src/graphics/core | |
parent | 72c0188ec37c3783133baf6960d72cb3c9d12a6c (diff) | |
download | colobot-7c5a3514dd6e907866bddcbb09b4d9cbd958dd8e.tar.gz colobot-7c5a3514dd6e907866bddcbb09b4d9cbd958dd8e.tar.bz2 colobot-7c5a3514dd6e907866bddcbb09b4d9cbd958dd8e.zip |
Video mode changing
- added video mode querying & changing
- added joystick querying & changing
- cleaned up CApplication interface
Diffstat (limited to 'src/graphics/core')
-rw-r--r-- | src/graphics/core/device.h | 10 | ||||
-rw-r--r-- | src/graphics/core/texture.h | 10 |
2 files changed, 9 insertions, 11 deletions
diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index ae612b7..1f6cacf 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -25,6 +25,7 @@ #include "graphics/core/material.h" #include "graphics/core/texture.h" #include "graphics/core/vertex.h" +#include "math/intsize.h" #include "math/matrix.h" #include <string> @@ -43,10 +44,8 @@ namespace Gfx { */ struct DeviceConfig { - //! Screen width - int width; - //! Screen height - int height; + //! Screen size + Math::IntSize size; //! Bits per pixel int bpp; //! Full screen @@ -64,8 +63,7 @@ struct DeviceConfig //! Loads the default values inline void LoadDefault() { - width = 800; - height = 600; + size = Math::IntSize(800, 600); bpp = 32; fullScreen = false; resizeable = false; diff --git a/src/graphics/core/texture.h b/src/graphics/core/texture.h index 787c2bf..8d6b082 100644 --- a/src/graphics/core/texture.h +++ b/src/graphics/core/texture.h @@ -18,6 +18,9 @@ #pragma once +#include "math/intsize.h" + + namespace Gfx { /** @@ -190,10 +193,8 @@ struct Texture bool valid; //! ID of the texture in graphics engine unsigned int id; - //! Width of texture - int width; - //! Height of texture - int height; + //! Size of texture + Math::IntSize size; //! Whether the texture has alpha channel bool alpha; @@ -201,7 +202,6 @@ struct Texture { valid = false; id = 0; - width = height = 0; alpha = false; } |