aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp73
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.h50
-rw-r--r--backends/module.mk3
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 \