2 * Base class for graphics/sound
4 * Copyright (C) 2009 David Kolossa, Mathias Gottschlag
6 * This file is part of OpenStranded
8 * OpenStranded is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * OpenStranded is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with OpenStranded. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef STRANDED_ENGINE_HH
23 #define STRANDED_ENGINE_HH
26 #include "settings.hh"
35 * Base interface for the sound/graphics engine.
41 * Retrieves a pointer to the engine.
52 * Creates a window, initializes sound.
55 init(GlobalSettings
*settings
= 0) = 0;
58 * Returns a reference to the GUI
64 * Returns a reference to the camera
70 * Returns a reference to the environment
76 * Creates a scene node
82 * Creates an environment
88 * Returns the current game settings.
97 * Return the supported file formats for textures.
98 * Note that this method also specifies the priority of
99 * the extensions. The objects with a lower vector index
100 * have a higher priority.
102 virtual const std::vector
<std::string
>&
103 getTextureExtensions() = 0;
106 * Renders one frame and refills sound buffers if needed
108 virtual bool update() = 0;
115 Environment
*environment
;
117 GlobalSettings
*settings
;
119 static Engine
*instance
;