blob: 66377e1da2387941eec98246293dba7c94f1e0af [file] [log] [blame]
Alexandros Frantzis04c90342010-07-13 13:22:05 +03001/*
Marc Ordinas i Llopis7689cac2011-08-17 19:01:31 +02002 * Copyright © 2008 Ben Smith
Alexandros Frantzis77036b52011-01-25 17:00:12 +02003 * Copyright © 2010-2011 Linaro Limited
Alexandros Frantzis04c90342010-07-13 13:22:05 +03004 *
5 * This file is part of the glmark2 OpenGL (ES) 2.0 benchmark.
6 *
7 * glmark2 is free software: you can redistribute it and/or modify it under the
Alexandros Frantzis77036b52011-01-25 17:00:12 +02008 * terms of the GNU General Public License as published by the Free Software
9 * Foundation, either version 3 of the License, or (at your option) any later
10 * version.
Alexandros Frantzis04c90342010-07-13 13:22:05 +030011 *
12 * glmark2 is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 * details.
16 *
17 * You should have received a copy of the GNU General Public License along with
18 * glmark2. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * Authors:
21 * Ben Smith (original glmark benchmark)
22 * Alexandros Frantzis (glmark2)
Marc Ordinas i Llopisbeeee452011-08-11 12:43:16 +020023 * Marc Ordinas i Llopis, Collabora Ltd. (pulsar scene)
Jesse Barker2459b3d2011-11-04 14:28:13 -040024 * Jesse Barker (glmark2)
Alexandros Frantzis04c90342010-07-13 13:22:05 +030025 */
Alexandros Frantzis2da7e4d2011-01-25 17:06:04 +020026#ifndef GLMARK2_SCENE_H_
27#define GLMARK2_SCENE_H_
Alexandros Frantzisd2683502010-07-07 13:32:18 +030028
Alexandros Frantzisc5903032011-06-30 16:33:37 +030029#include "gl-headers.h"
Alexandros Frantzisd2683502010-07-07 13:32:18 +030030
31#include "mesh.h"
Alexandros Frantzis8943a512011-06-17 12:39:44 +030032#include "vec.h"
Alexandros Frantzisee6b22d2011-06-17 16:16:16 +030033#include "program.h"
Alexandros Frantzisd2683502010-07-07 13:32:18 +030034
35#include <math.h>
36
Alexandros Frantzis901eab32011-06-06 14:57:03 +030037#include <string>
Alexandros Frantzis15deb682011-06-06 15:06:32 +030038#include <map>
Alexandros Frantzisf76d7792011-06-23 15:32:34 +030039#include <list>
Alexandros Frantzis3a246d52012-07-16 17:00:56 +030040#include <vector>
Jesse Barker2459b3d2011-11-04 14:28:13 -040041#include "canvas.h"
Alexandros Frantzis901eab32011-06-06 14:57:03 +030042
Alexandros Frantzis68261242011-11-08 23:33:18 +020043/**
44 * A configurable scene used for creating benchmarks.
45 */
Alexandros Frantzisd2683502010-07-07 13:32:18 +030046class Scene
47{
48public:
Alexandros Frantzis99429bd2011-08-16 10:37:52 +030049 virtual ~Scene();
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +030050
Alexandros Frantzis68261242011-11-08 23:33:18 +020051 /**
52 * Scene options.
53 */
Alexandros Frantzis15deb682011-06-06 15:06:32 +030054 struct Option {
Alexandros Frantzis3a246d52012-07-16 17:00:56 +030055 Option(const std::string &nam, const std::string &val, const std::string &desc,
56 const std::string &values = "");
57
Alexandros Frantzis15deb682011-06-06 15:06:32 +030058 Option() {}
Jesse Barkerb711fcb2011-06-07 14:06:38 -070059 std::string name;
60 std::string value;
61 std::string default_value;
62 std::string description;
Alexandros Frantzis3a246d52012-07-16 17:00:56 +030063 std::vector<std::string> acceptable_values;
Alexandros Frantzis15bb0512011-09-20 12:45:24 +030064 bool set;
Alexandros Frantzis15deb682011-06-06 15:06:32 +030065 };
66
Alexandros Frantzis68261242011-11-08 23:33:18 +020067 /**
68 * The result of a validation check.
69 */
Alexandros Frantzis7a996a12011-06-15 14:24:41 +030070 enum ValidationResult {
71 ValidationFailure,
72 ValidationSuccess,
73 ValidationUnknown
74 };
75
Alexandros Frantzis68261242011-11-08 23:33:18 +020076 /**
Alexandros Frantzis24d43392012-08-15 10:38:45 +030077 * Checks whether this scene (in its current configuration) is supported.
78 *
79 * @param show_errors whether to log errors about unsupported features
80 *
81 * @return whether the scene is supported
82 */
83 virtual bool supported(bool show_errors);
84
85 /**
Alexandros Frantzis68261242011-11-08 23:33:18 +020086 * Performs option-independent resource loading and configuration.
87 *
88 * It should be safe to call ::load() (and the corresponding ::unload())
89 * only once per program execution, although you may choose to do so more
90 * times to better manage resource consumption.
91 *
92 * @return whether loading succeeded
93 */
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +020094 virtual bool load();
Alexandros Frantzis68261242011-11-08 23:33:18 +020095
96 /**
97 * Performs option-independent resource unloading.
98 */
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +030099 virtual void unload();
Alexandros Frantzisacbe24c2011-06-07 12:05:05 +0300100
Alexandros Frantzis68261242011-11-08 23:33:18 +0200101 /**
102 * Performs option-dependent resource loading and configuration.
103 *
104 * This method also prepares a scene for a benchmark run.
105 * It should be called just before running a scene/benchmark.
106 *
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300107 * The base Scene::setup() method also checks whether a scene
108 * configuration is supported by calling ::supported(true).
109 *
110 * @return whether setting the scene up succeeded
Alexandros Frantzis68261242011-11-08 23:33:18 +0200111 */
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300112 virtual bool setup();
Alexandros Frantzis68261242011-11-08 23:33:18 +0200113
114 /**
115 * Performs option-dependent resource unloading.
116 *
117 * This method should be called just after running a scene/benchmark.
118 *
119 * @return the operation status
120 */
Alexandros Frantzisacbe24c2011-06-07 12:05:05 +0300121 virtual void teardown();
122
Alexandros Frantzis68261242011-11-08 23:33:18 +0200123 /**
124 * Updates the scene state.
125 */
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +0300126 virtual void update();
Alexandros Frantzis68261242011-11-08 23:33:18 +0200127
128 /**
129 * Draws the current scene state.
130 */
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +0300131 virtual void draw();
Alexandros Frantzis68261242011-11-08 23:33:18 +0200132
133 /**
134 * Gets an informational string describing the scene.
135 *
136 * @param title if specified, a custom title to use, instead of the default
137 */
Jesse Barkerb711fcb2011-06-07 14:06:38 -0700138 virtual std::string info_string(const std::string &title = "");
Alexandros Frantzis28e68712010-07-09 17:21:56 +0300139
Alexandros Frantzis68261242011-11-08 23:33:18 +0200140 /**
141 * Sets the value of an option for this scene.
142 *
143 * @param opt the option to set
144 * @param val the value to set the option to
145 *
146 * @return whether the option value was set successfully
147 */
148 virtual bool set_option(const std::string &opt, const std::string &val);
149
150 /**
151 * Validates the current output of this scene.
152 *
153 * This method should be called after having called ::draw() once.
154 *
155 * @return the validation result
156 */
157 virtual ValidationResult validate() { return ValidationUnknown; }
158
159 /**
160 * Gets whether this scene is running.
161 *
162 * @return true if running, false otherwise
163 */
Alexandros Frantzis9f12fe52012-02-09 03:28:16 +0200164 bool running() { return running_; }
165
166 /**
167 * Sets whether this scene is running.
168 *
169 * @return true if running, false otherwise
170 */
171 void running(bool r) { running_ = r; }
Alexandros Frantzis28e68712010-07-09 17:21:56 +0300172
Alexandros Frantzis68261242011-11-08 23:33:18 +0200173 /**
174 * Gets the average FPS value for this scene.
175 *
176 * @return the average FPS value
177 */
178 unsigned average_fps();
179
180 /**
181 * Gets the name of the scene.
182 * @return the name of the scene
183 */
Jesse Barker38979462011-10-25 11:05:37 -0700184 const std::string &name() { return name_; }
Alexandros Frantzis68261242011-11-08 23:33:18 +0200185
186 /**
187 * Resets all scene options to their default values.
188 */
Alexandros Frantzisf89d1be2011-06-07 11:10:02 +0300189 void reset_options();
Alexandros Frantzis68261242011-11-08 23:33:18 +0200190
191 /**
192 * Sets the default value of a scene option.
193 */
Alexandros Frantzisf76d7792011-06-23 15:32:34 +0300194 bool set_option_default(const std::string &opt, const std::string &val);
Alexandros Frantzis68261242011-11-08 23:33:18 +0200195
196 /**
197 * Gets the scene options.
198 *
199 * @return the scene options
200 */
Jesse Barker38979462011-10-25 11:05:37 -0700201 const std::map<std::string, Option> &options() { return options_; }
Alexandros Frantzis901eab32011-06-06 14:57:03 +0300202
Alexandros Frantzis68261242011-11-08 23:33:18 +0200203 /**
204 * Gets a dummy scene object reference.
205 *
206 * @return the dummy Scene
207 */
Alexandros Frantzis01596e72011-06-09 16:07:57 +0300208 static Scene &dummy()
209 {
Alexandros Frantzis215dedb2011-06-30 11:38:35 +0300210 static Scene dummy_scene(Canvas::dummy(), "");
Alexandros Frantzis01596e72011-06-09 16:07:57 +0300211 return dummy_scene;
212 }
213
Alexandros Frantzis68261242011-11-08 23:33:18 +0200214 /**
215 * Loads a shader program from a pair of vertex and fragment shader strings.
216 *
217 * @return whether the operation succeeded
218 */
Alexandros Frantzis2c780ae2011-07-04 13:46:22 +0300219 static bool load_shaders_from_strings(Program &program,
220 const std::string &vtx_shader,
221 const std::string &frg_shader,
222 const std::string &vtx_shader_filename = "None",
223 const std::string &frg_shader_filename = "None");
Alexandros Frantzis74db09e2011-06-30 15:39:37 +0300224
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +0300225protected:
Alexandros Frantzis215dedb2011-06-30 11:38:35 +0300226 Scene(Canvas &pCanvas, const std::string &name);
Jesse Barkerb711fcb2011-06-07 14:06:38 -0700227 std::string construct_title(const std::string &title);
Alexandros Frantzis901eab32011-06-06 14:57:03 +0300228
Jesse Barker38979462011-10-25 11:05:37 -0700229 Canvas &canvas_;
230 std::string name_;
231 std::map<std::string, Option> options_;
232 double startTime_;
233 double lastUpdateTime_;
234 unsigned currentFrame_;
Jesse Barker38979462011-10-25 11:05:37 -0700235 bool running_;
236 double duration_; // Duration of run in seconds
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300237};
238
Alexandros Frantzisf76d7792011-06-23 15:32:34 +0300239/*
240 * Special Scene used for setting the default options
241 */
242class SceneDefaultOptions : public Scene
243{
244public:
Alexandros Frantzis215dedb2011-06-30 11:38:35 +0300245 SceneDefaultOptions(Canvas &pCanvas) : Scene(pCanvas, "") {}
Alexandros Frantzisf76d7792011-06-23 15:32:34 +0300246 bool set_option(const std::string &opt, const std::string &val);
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300247 bool setup();
Alexandros Frantzisf76d7792011-06-23 15:32:34 +0300248
249private:
Jesse Barkerb2509352011-10-25 09:48:24 -0700250 std::list<std::pair<std::string, std::string> > defaultOptions_;
Alexandros Frantzisf76d7792011-06-23 15:32:34 +0300251};
252
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300253class SceneBuild : public Scene
254{
255public:
Alexandros Frantzis215dedb2011-06-30 11:38:35 +0300256 SceneBuild(Canvas &pCanvas);
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +0200257 bool load();
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +0300258 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300259 bool setup();
Alexandros Frantzisd9441a32011-06-07 17:36:16 +0300260 void teardown();
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300261 void update();
262 void draw();
Alexandros Frantzis3ff05002011-06-15 14:44:36 +0300263 ValidationResult validate();
Alexandros Frantzis28e68712010-07-09 17:21:56 +0300264
Alexandros Frantzis11034112010-07-09 13:16:27 +0300265 ~SceneBuild();
266
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +0300267protected:
Jesse Barker9ee5aa92011-10-25 09:22:24 -0700268 Program program_;
269 LibMatrix::mat4 perspective_;
270 LibMatrix::vec3 centerVec_;
271 float radius_;
272 Mesh mesh_;
273 bool orientModel_;
274 float orientationAngle_;
275 LibMatrix::vec3 orientationVec_;
276 float rotation_;
277 float rotationSpeed_;
278 bool useVbo_;
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300279};
280
281class SceneTexture : public Scene
282{
283public:
Alexandros Frantzis215dedb2011-06-30 11:38:35 +0300284 SceneTexture(Canvas &pCanvas);
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +0200285 bool load();
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +0300286 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300287 bool setup();
Alexandros Frantzisd9441a32011-06-07 17:36:16 +0300288 void teardown();
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300289 void update();
290 void draw();
Alexandros Frantzis39651592011-06-16 10:39:55 +0300291 ValidationResult validate();
Alexandros Frantzis28e68712010-07-09 17:21:56 +0300292
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300293 ~SceneTexture();
Alexandros Frantzis28e68712010-07-09 17:21:56 +0300294
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +0300295protected:
Jesse Barker9c9a0e52011-10-25 09:52:06 -0700296 Program program_;
297 Mesh mesh_;
298 GLuint texture_;
Jesse Barker8f56efc2012-05-15 13:46:43 +0100299 float radius_;
300 bool orientModel_;
301 float orientationAngle_;
302 LibMatrix::vec3 orientationVec_;
303 LibMatrix::mat4 perspective_;
304 LibMatrix::vec3 centerVec_;
Jesse Barker9c9a0e52011-10-25 09:52:06 -0700305 LibMatrix::vec3 rotation_;
306 LibMatrix::vec3 rotationSpeed_;
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300307};
308
309class SceneShading : public Scene
310{
311public:
Alexandros Frantzis215dedb2011-06-30 11:38:35 +0300312 SceneShading(Canvas &pCanvas);
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +0200313 bool load();
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +0300314 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300315 bool setup();
Alexandros Frantzisd9441a32011-06-07 17:36:16 +0300316 void teardown();
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300317 void update();
318 void draw();
Alexandros Frantzis1e3ec482011-06-16 10:43:05 +0300319 ValidationResult validate();
Alexandros Frantzis28e68712010-07-09 17:21:56 +0300320
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300321 ~SceneShading();
Alexandros Frantzis28e68712010-07-09 17:21:56 +0300322
Alexandros Frantzisdb4ea392010-07-09 15:11:52 +0300323protected:
Jesse Barkerdee36f42011-10-25 08:59:27 -0700324 Program program_;
325 float radius_;
326 bool orientModel_;
327 float orientationAngle_;
328 LibMatrix::vec3 orientationVec_;
329 LibMatrix::vec3 centerVec_;
330 LibMatrix::mat4 perspective_;
331 Mesh mesh_;
332 float rotation_;
333 float rotationSpeed_;
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300334};
335
Alexandros Frantzis66b1b9e2011-07-07 16:35:24 +0300336class SceneGrid : public Scene
337{
338public:
339 SceneGrid(Canvas &pCanvas, const std::string &name);
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +0200340 virtual bool load();
Alexandros Frantzis66b1b9e2011-07-07 16:35:24 +0300341 virtual void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300342 virtual bool setup();
Alexandros Frantzis66b1b9e2011-07-07 16:35:24 +0300343 virtual void teardown();
344 virtual void update();
345 virtual void draw();
346 virtual ValidationResult validate();
347
348 ~SceneGrid();
349
350protected:
Jesse Barker92cb2412011-10-25 09:43:13 -0700351 Program program_;
352 Mesh mesh_;
353 float rotation_;
354 float rotationSpeed_;
Alexandros Frantzis66b1b9e2011-07-07 16:35:24 +0300355};
356
Alexandros Frantziseec4de82011-07-07 16:45:19 +0300357class SceneConditionals : public SceneGrid
Alexandros Frantzis3b027702011-07-04 16:22:56 +0300358{
359public:
360 SceneConditionals(Canvas &pCanvas);
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300361 bool setup();
Alexandros Frantzis3495a672011-11-08 13:31:02 +0200362 ValidationResult validate();
Alexandros Frantzis3b027702011-07-04 16:22:56 +0300363
364 ~SceneConditionals();
Alexandros Frantzis3b027702011-07-04 16:22:56 +0300365};
Alexandros Frantzis16a57622011-07-07 16:16:12 +0300366
Alexandros Frantzis66b1b9e2011-07-07 16:35:24 +0300367class SceneFunction : public SceneGrid
Alexandros Frantzis16a57622011-07-07 16:16:12 +0300368{
369public:
370 SceneFunction(Canvas &pCanvas);
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300371 bool setup();
Alexandros Frantzis1bf3f8a2011-11-08 13:38:43 +0200372 ValidationResult validate();
Alexandros Frantzis16a57622011-07-07 16:16:12 +0300373
374 ~SceneFunction();
Alexandros Frantzis16a57622011-07-07 16:16:12 +0300375};
Alexandros Frantzis36e215c2011-07-08 15:48:36 +0300376
377class SceneLoop : public SceneGrid
378{
379public:
380 SceneLoop(Canvas &pCanvas);
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300381 bool setup();
Alexandros Frantzisd4d802c2011-11-08 13:43:43 +0200382 ValidationResult validate();
Alexandros Frantzis36e215c2011-07-08 15:48:36 +0300383
384 ~SceneLoop();
385};
Alexandros Frantzisbe27cc62011-07-14 14:25:43 +0300386
387class SceneBump : public Scene
388{
389public:
390 SceneBump(Canvas &pCanvas);
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +0200391 bool load();
Alexandros Frantzisbe27cc62011-07-14 14:25:43 +0300392 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300393 bool setup();
Alexandros Frantzisbe27cc62011-07-14 14:25:43 +0300394 void teardown();
395 void update();
396 void draw();
397 ValidationResult validate();
398
399 ~SceneBump();
400
401protected:
Jesse Barker6e8f0832011-10-25 09:59:18 -0700402 Program program_;
403 Mesh mesh_;
404 GLuint texture_;
405 float rotation_;
406 float rotationSpeed_;
Alexandros Frantzisbe27cc62011-07-14 14:25:43 +0300407private:
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300408 bool setup_model_plain(const std::string &type);
409 bool setup_model_normals();
410 bool setup_model_normals_tangent();
411 bool setup_model_height();
Alexandros Frantzisbe27cc62011-07-14 14:25:43 +0300412};
413
Alexandros Frantzis61eb8272011-07-28 11:44:31 +0300414class SceneEffect2D : public Scene
415{
416public:
417 SceneEffect2D(Canvas &pCanvas);
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +0200418 bool load();
Alexandros Frantzis61eb8272011-07-28 11:44:31 +0300419 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300420 bool setup();
Alexandros Frantzis61eb8272011-07-28 11:44:31 +0300421 void teardown();
422 void update();
423 void draw();
424 ValidationResult validate();
425
426 ~SceneEffect2D();
427
428protected:
429 Program program_;
430
431 Mesh mesh_;
432 GLuint texture_;
433};
Marc Ordinas i Llopisbeeee452011-08-11 12:43:16 +0200434
435class ScenePulsar : public Scene
436{
437public:
438 ScenePulsar(Canvas &pCanvas);
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +0200439 bool load();
Marc Ordinas i Llopisbeeee452011-08-11 12:43:16 +0200440 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300441 bool setup();
Marc Ordinas i Llopisbeeee452011-08-11 12:43:16 +0200442 void teardown();
443 void update();
444 void draw();
445 ValidationResult validate();
446
447 ~ScenePulsar();
448
449protected:
Jesse Barkerc12f5502011-10-25 10:04:28 -0700450 int numQuads_;
451 Program program_;
452 Mesh mesh_;
453 LibMatrix::vec3 scale_;
454 std::vector<LibMatrix::vec3> rotations_;
455 std::vector<LibMatrix::vec3> rotationSpeeds_;
456 GLuint texture_;
Alexandros Frantzise7e0de72011-08-18 16:20:04 +0300457
458private:
459 void create_and_setup_mesh();
Marc Ordinas i Llopisbeeee452011-08-11 12:43:16 +0200460};
461
Alexandros Frantzis3a790682011-09-09 16:57:53 +0300462struct SceneDesktopPrivate;
463
464class SceneDesktop : public Scene
465{
466public:
467 SceneDesktop(Canvas &canvas);
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +0200468 bool load();
Alexandros Frantzis3a790682011-09-09 16:57:53 +0300469 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300470 bool setup();
Alexandros Frantzis3a790682011-09-09 16:57:53 +0300471 void teardown();
472 void update();
473 void draw();
474 ValidationResult validate();
475
476 ~SceneDesktop();
477
478private:
479 SceneDesktopPrivate *priv_;
480};
Alexandros Frantzis73dd23e2011-10-04 18:53:47 +0300481
482struct SceneBufferPrivate;
483
484class SceneBuffer : public Scene
485{
486public:
487 SceneBuffer(Canvas &canvas);
Alexandros Frantzis24d43392012-08-15 10:38:45 +0300488 bool supported(bool show_errors);
Alexandros Frantzis0d6a00a2011-11-08 23:40:36 +0200489 bool load();
Alexandros Frantzis73dd23e2011-10-04 18:53:47 +0300490 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300491 bool setup();
Alexandros Frantzis73dd23e2011-10-04 18:53:47 +0300492 void teardown();
493 void update();
494 void draw();
495 ValidationResult validate();
496
497 ~SceneBuffer();
498
499private:
500 SceneBufferPrivate *priv_;
Alexandros Frantzis73dd23e2011-10-04 18:53:47 +0300501};
Jesse Barker67acfc32012-04-27 11:00:45 -0700502
503class SceneIdeasPrivate;
504
505class SceneIdeas : public Scene
506{
507public:
508 SceneIdeas(Canvas &pCanvas);
509 bool load();
510 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300511 bool setup();
Jesse Barker67acfc32012-04-27 11:00:45 -0700512 void teardown();
513 void update();
514 void draw();
515 ValidationResult validate();
516
517 ~SceneIdeas();
518
519private:
520 SceneIdeasPrivate* priv_;
521};
522
Alexandros Frantzis5d0013f2012-06-29 15:27:16 +0300523class SceneTerrainPrivate;
524
525class SceneTerrain : public Scene
526{
527public:
528 SceneTerrain(Canvas &pCanvas);
Alexandros Frantzis24d43392012-08-15 10:38:45 +0300529 bool supported(bool show_errors);
Alexandros Frantzis5d0013f2012-06-29 15:27:16 +0300530 bool load();
531 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300532 bool setup();
Alexandros Frantzis5d0013f2012-06-29 15:27:16 +0300533 void teardown();
534 void update();
535 void draw();
536 ValidationResult validate();
537
538 ~SceneTerrain();
539
540private:
541 SceneTerrainPrivate* priv_;
542};
543
Jesse Barker16cfee02012-07-02 10:34:48 -0700544class JellyfishPrivate;
545class SceneJellyfish : public Scene
546{
547 JellyfishPrivate* priv_;
548public:
549 SceneJellyfish(Canvas &pCanvas);
550 ~SceneJellyfish();
551 bool load();
552 void unload();
Alexandros Frantzis2b0a1f02012-08-15 12:45:06 +0300553 bool setup();
Jesse Barker16cfee02012-07-02 10:34:48 -0700554 void teardown();
555 void update();
556 void draw();
557 ValidationResult validate();
558};
Jesse Barkerbd764cf2012-10-19 06:19:19 -0700559
560class ShadowPrivate;
561class SceneShadow : public Scene
562{
563 ShadowPrivate* priv_;
564public:
565 SceneShadow(Canvas& canvas);
566 ~SceneShadow();
567 bool supported(bool show_errors);
568 bool load();
569 void unload();
570 bool setup();
571 void teardown();
572 void update();
573 void draw();
574 ValidationResult validate();
575};
576
Jesse Barkerb00c4a22012-12-07 11:57:44 -0800577class RefractPrivate;
578class SceneRefract : public Scene
579{
580 RefractPrivate* priv_;
581public:
582 SceneRefract(Canvas& canvas);
Jesse Barkerb00c4a22012-12-07 11:57:44 -0800583 bool supported(bool show_errors);
584 bool load();
585 void unload();
586 bool setup();
587 void teardown();
588 void update();
589 void draw();
590 ValidationResult validate();
591};
592
Alexandros Frantzisd2683502010-07-07 13:32:18 +0300593#endif