|
@@ -15,20 +15,47 @@
|
|
|
#include "../driver.h"
|
|
|
#include "../core/geometry_type.hpp"
|
|
|
|
|
|
/** The base of all video drivers. */
|
|
|
class VideoDriver: public Driver {
|
|
|
public:
|
|
|
/**
|
|
|
* Mark a particular area dirty.
|
|
|
* @param left The left most line of the dirty area.
|
|
|
* @param top The top most line of the dirty area.
|
|
|
* @param width The width of the dirty area.
|
|
|
* @param height The height of the dirty area.
|
|
|
*/
|
|
|
virtual void MakeDirty(int left, int top, int width, int height) = 0;
|
|
|
|
|
|
/**
|
|
|
* Perform the actual drawing.
|
|
|
*/
|
|
|
virtual void MainLoop() = 0;
|
|
|
|
|
|
/**
|
|
|
* Change the resolution of the window.
|
|
|
* @param w The new width.
|
|
|
* @param h The new height.
|
|
|
* @return True if the change succeeded.
|
|
|
*/
|
|
|
virtual bool ChangeResolution(int w, int h) = 0;
|
|
|
|
|
|
/**
|
|
|
* Change the full screen setting.
|
|
|
* @param fullscreen The new setting.
|
|
|
* @return True if the change succeeded.
|
|
|
*/
|
|
|
virtual bool ToggleFullscreen(bool fullscreen) = 0;
|
|
|
};
|
|
|
|
|
|
/** Base of the factory for the video drivers. */
|
|
|
class VideoDriverFactoryBase: public DriverFactoryBase {
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* Factory for the video drivers.
|
|
|
* @tparam T The type of the video factory to register.
|
|
|
*/
|
|
|
template <class T>
|
|
|
class VideoDriverFactory: public VideoDriverFactoryBase {
|
|
|
public:
|