summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/engine.h
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-08-03 23:23:13 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-08-03 23:23:13 +0200
commit61bfb22f27f5216f989c023a5e39fad7e356d2d6 (patch)
tree9d7a8a760ace272739f651a2f4208326731a6fe7 /src/graphics/engine/engine.h
parent5e637ca0288ddd631ec33e1d620cd4a73bcdc2be (diff)
downloadcolobot-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/engine/engine.h')
-rw-r--r--src/graphics/engine/engine.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h
index 25c5e5d..79844c6 100644
--- a/src/graphics/engine/engine.h
+++ b/src/graphics/engine/engine.h
@@ -29,6 +29,7 @@
#include "math/intsize.h"
#include "math/matrix.h"
#include "math/point.h"
+#include "math/size.h"
#include "math/vector.h"
@@ -514,23 +515,18 @@ public:
CEngine(CInstanceManager *iMan, CApplication *app);
~CEngine();
- //! Returns whether the device was initialized
- bool GetWasInit();
//! Returns the last error encountered
std::string GetError();
- //! Performs the first initialization, before a device was set
- bool Create();
- //! Frees all resources before exit
- void Destroy();
-
//! Sets the device to be used
void SetDevice(Gfx::CDevice *device);
//! Returns the current device
Gfx::CDevice* GetDevice();
- //! Performs initialization after a device was created and set
- bool AfterDeviceSetInit();
+ //! Performs the initialization; must be called after device was set
+ bool Create();
+ //! Frees all resources before exit
+ void Destroy();
//! Resets some states and flushes textures after device was changed (e.g. resoulution changed)
void ResetAfterDeviceChanged();
@@ -544,6 +540,17 @@ public:
bool Render();
+ //! Converts window coords to interface coords
+ Math::Point WindowToInterfaceCoords(Math::IntPoint pos);
+ //! Converts interface coords to window coords
+ Math::IntPoint InterfaceToWindowCoords(Math::Point pos);
+
+ //! Converts window size to interface size
+ Math::Size WindowToInterfaceSize(Math::IntSize size);
+ //! Converts interface size to window size
+ Math::IntSize InterfaceToWindowSize(Math::Size size);
+
+
bool WriteProfile();
void SetPause(bool pause);
@@ -769,7 +776,8 @@ public:
Math::Vector GetLookatPt();
float GetEyeDirH();
float GetEyeDirV();
- Math::Point GetDim();
+ Math::IntPoint GetViewportSize();
+ Math::IntPoint GetLastViewportSize();
void UpdateMatProj();
void ApplyChange();
@@ -903,8 +911,9 @@ protected:
bool m_render;
bool m_movieLock;
- //! Current size of window
+ //! Current size of viewport
Math::IntSize m_size;
+ //! Previous size of viewport
Math::IntSize m_lastSize;
std::vector<Gfx::EngineObjLevel1> m_objectTree;