diff options
author | Alejandro Marzini | 2010-07-09 19:45:56 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-09 19:45:56 +0000 |
commit | 386785e2b85b066398122d747117f97dbbb4896a (patch) | |
tree | 0afd07d396bf63b45f61b2757b4237a8e67a4eb2 | |
parent | 8b6d49ce42f34b84355c50871c9205d40241d20b (diff) | |
download | scummvm-rg350-386785e2b85b066398122d747117f97dbbb4896a.tar.gz scummvm-rg350-386785e2b85b066398122d747117f97dbbb4896a.tar.bz2 scummvm-rg350-386785e2b85b066398122d747117f97dbbb4896a.zip |
Added OpenGLSDLGraphicsManager.
svn-id: r50768
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 73 | ||||
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.h | 50 | ||||
-rw-r--r-- | backends/module.mk | 3 |
3 files changed, 126 insertions, 0 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp new file mode 100644 index 0000000000..711f1facea --- /dev/null +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -0,0 +1,73 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "backends/graphics/openglsdl/openglsdl-graphics.h" + +#include <SDL.h> +#include <SDL_opengl.h> + +OpenGLSDLGraphicsManager::OpenGLSDLGraphicsManager() { + +} + +OpenGLSDLGraphicsManager::~OpenGLSDLGraphicsManager() { + +} + +void OpenGLSDLGraphicsManager::init() { + if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1) { + error("Could not initialize SDL: %s", SDL_GetError()); + } + + OpenGLGraphicsManager::init(); +} + +void OpenGLSDLGraphicsManager::forceFullRedraw() { + +} + +bool OpenGLSDLGraphicsManager::handleScalerHotkeys(const SDL_KeyboardEvent &key) { + return false; +} + +bool OpenGLSDLGraphicsManager::isScalerHotkey(const Common::Event &event) { + return false; +} + +void OpenGLSDLGraphicsManager::adjustMouseEvent(Common::Event &event) { + +} + +void OpenGLSDLGraphicsManager::setMousePos(int x, int y) { + +} + +void OpenGLSDLGraphicsManager::toggleFullScreen() { + +} + +bool OpenGLSDLGraphicsManager::saveScreenshot(const char *filename) { + return false; +} diff --git a/backends/graphics/openglsdl/openglsdl-graphics.h b/backends/graphics/openglsdl/openglsdl-graphics.h new file mode 100644 index 0000000000..b1483842aa --- /dev/null +++ b/backends/graphics/openglsdl/openglsdl-graphics.h @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef BACKENDS_GRAPHICS_OPENGLSDL_H +#define BACKENDS_GRAPHICS_OPENGLSDL_H + +#include "backends/graphics/opengl/opengl-graphics.h" + +/** + * SDL OpenGL graphics manager + */ +class OpenGLSDLGraphicsManager : public OpenGLGraphicsManager { +public: + OpenGLSDLGraphicsManager(); + virtual ~OpenGLSDLGraphicsManager(); + + virtual void init(); + + virtual void forceFullRedraw(); + virtual bool handleScalerHotkeys(const SDL_KeyboardEvent &key); + virtual bool isScalerHotkey(const Common::Event &event); + virtual void adjustMouseEvent(Common::Event &event); + virtual void setMousePos(int x, int y); + virtual void toggleFullScreen(); + virtual bool saveScreenshot(const char *filename); +}; + +#endif diff --git a/backends/module.mk b/backends/module.mk index 7b35a34b8e..146253248b 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -28,6 +28,9 @@ MODULE_OBJS := \ graphics/gp2xsdl/gp2xsdl-graphics.o \ graphics/gp2xwizsdl/gp2xwizsdl-graphics.o \ graphics/linuxmotosdl/linuxmotosdl-graphics.o \ + graphics/opengl/glerrorcheck.o \ + graphics/opengl/opengl-graphics.o \ + graphics/openglsdl/openglsdl-graphics.o \ graphics/sdl/sdl-graphics.o \ graphics/symbiansdl/symbiansdl-graphics.o \ keymapper/action.o \ |