diff engine/core/video/renderbackend.h @ 654:5d6b1820b953

* Added the ability to change screen modes on the fly. This works both in OpenGL and SDL modes. * Added IEngineChangeListener so the client can update the cameras viewport if the screen mode has been changed. I chose to do it this way because the engine has no way to know which camera it should update. It will be up to the client to do it. * The cursor surface is now correctly freed when exiting. * Added DeviceCaps::getNearestScreenMode() for the client to request a supported screen mode. closes[t:315]
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 21 Oct 2010 18:50:50 +0000
parents 01acc9fc35ea
children e3140f01749d
line wrap: on
line diff
--- a/engine/core/video/renderbackend.h	Fri Oct 15 18:54:34 2010 +0000
+++ b/engine/core/video/renderbackend.h	Thu Oct 21 18:50:50 2010 +0000
@@ -92,6 +92,12 @@
 		 */
 		virtual Image* createMainScreen(const ScreenMode& mode, const std::string& title, const std::string& icon) = 0;
 
+		/** Sets the mainscreen display mode.
+		 * @param mode The ScreenMode to change the display to.  @see FIFE::ScreenMode.
+		 * @return The new Screen Image
+		 */
+		virtual Image* setScreenMode(const ScreenMode& mode) = 0;
+
 		/** Creates an Image suitable for this renderbackend.
 		 * @param data Pointer to the imagedata (needs to be in RGBA, 8 bits per channel).
 		 * @param width Width of the image.
@@ -118,7 +124,8 @@
 
 		SDL_Surface* getSurface();
 
-		/** Get current video mode
+		/** Get current screen mode
+		 * @return The current screen mode
 		 */
 		const ScreenMode& getCurrentScreenMode() const;