Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/graphics/graphics_engine.cc @ 9761

Last change on this file since 9761 was 9761, checked in by bensch, 18 years ago

orxonox/new_class_id: moved the graphics_effect back to the lib as the GraphicsEngine is dependant on it

File size: 18.0 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Benjamin Grauer
13   co-programmer: ...
14*/
15
16#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
17
18#include "graphics_engine.h"
19#include "util/loading/resource_manager.h"
20#include "state.h"
21
22#include "world_entity.h"
23
24#include "render_2d.h"
25#include "text_engine.h"
26#include "light.h"
27#include "shader.h"
28#include "debug.h"
29
30#include "util/preferences.h"
31#include "substring.h"
32#include "text.h"
33
34#include "globals.h"
35#include "texture.h"
36
37#include "graphics_effect.h"
38
39#include "shell_command.h"
40#include "loading/load_param_xml.h"
41
42#include "parser/tinyxml/tinyxml.h"
43#include "util/loading/load_param.h"
44#include "util/loading/factory.h"
45
46#ifdef __WIN32__
47 #include "static_model.h"
48#endif
49
50SHELL_COMMAND(wireframe, GraphicsEngine, wireframe);
51SHELL_COMMAND(fps, GraphicsEngine, toggleFPSdisplay);
52
53ObjectListDefinition(GraphicsEngine);
54
55/**
56 * @brief standard constructor
57 */
58GraphicsEngine::GraphicsEngine ()
59{
60  this->registerObject(this, GraphicsEngine::_objectList);
61  this->setName("GraphicsEngine");
62
63  this->isInit = false;
64
65  this->bDisplayFPS = false;
66  this->bAntialiasing = false;
67  this->bDedicated = false;
68  this->minFPS = 9999;
69  this->maxFPS = 0;
70
71  this->geTextCFPS = NULL;
72  this->geTextMaxFPS = NULL;
73  this->geTextMinFPS = NULL;
74
75  this->fullscreenFlag = 0;
76  this->videoFlags = 0;
77  this->screen = NULL;
78
79  // initialize the Modules
80  TextEngine::getInstance();
81  this->graphicsEffects = NULL;
82
83}
84
85/**
86 * @brief The Pointer to this GraphicsEngine
87 */
88GraphicsEngine* GraphicsEngine::singletonRef = NULL;
89
90/**
91 * @brief destructs the graphicsEngine.
92*/
93GraphicsEngine::~GraphicsEngine ()
94{
95  // delete what has to be deleted here
96  this->displayFPS( false );
97
98  //TextEngine
99  delete TextEngine::getInstance();
100  // render 2D
101  delete Render2D::getInstance();
102
103  SDL_QuitSubSystem(SDL_INIT_VIDEO);
104  //   if (this->screen != NULL)
105  //     SDL_FreeSurface(this->screen);
106
107  GraphicsEngine::singletonRef = NULL;
108}
109
110
111/**
112 * @brief loads the GraphicsEngine Specific Parameters.
113 * @param root: the XML-Element to load the Data From
114 */
115void GraphicsEngine::loadParams(const TiXmlElement* root)
116{
117  LoadParamXML(root, "GraphicsEffect", this, GraphicsEngine, loadGraphicsEffects)
118   .describe("loads a graphics effect");
119}
120
121
122
123
124/**
125 * @param root The XML-element to load GraphicsEffects from
126 */
127void GraphicsEngine::loadGraphicsEffects(const TiXmlElement* root)
128{
129  LOAD_PARAM_START_CYCLE(root, element);
130  {
131    PRINTF(4)("element is: %s\n", element->Value());
132    Factory::fabricate(element);
133  }
134  LOAD_PARAM_END_CYCLE(element);
135}
136
137
138
139/**
140 * @brief initializes the GraphicsEngine with default settings.
141 */
142int GraphicsEngine::init()
143{
144  if (this->isInit)
145    return -1;
146  this->initVideo(640, 480, 16);
147  return 1;
148}
149
150/**
151 * @brief loads the GraphicsEngine's settings from a given ini-file and section
152 * @returns nothing usefull
153 */
154int GraphicsEngine::initFromPreferences()
155{
156  // looking if we are in fullscreen-mode
157  MultiType fullscreen = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_FULLSCREEN, "0");
158
159  if (fullscreen.getBool())
160    this->fullscreenFlag = SDL_FULLSCREEN;
161
162  // looking if we are in fullscreen-mode
163  MultiType textures = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO_ADVANCED, CONFIG_NAME_TEXTURES, "1");
164  Texture::setTextureEnableState(textures.getBool());
165
166  // check it is a dedicated network node: so no drawings are made
167  MultiType dedicated = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_NO_RENDER, "0");
168  this->bDedicated = dedicated.getBool();
169
170  // searching for a usefull resolution
171  SubString resolution(Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_RESOLUTION, "640x480").c_str(), 'x'); ///FIXME
172  //resolution.debug();
173  MultiType x = resolution.getString(0), y = resolution.getString(1);
174  return this->initVideo(x.getInt(), y.getInt(), 16);
175
176  //   GraphicsEffect* fe = new FogEffect(NULL);
177  //   this->loadGraphicsEffect(fe);
178  //   fe->activate();
179  //   PRINTF(0)("--------------------------------------------------------------\n");
180
181  //LenseFlare* ge = new LenseFlare();
182  //this->loadGraphicsEffect(ge);
183
184  //ge->addFlare("pictures/lense_flare/sun.png"); //sun
185  //ge->addFlare("pictures/lense_flare/lens2.png"); //first halo
186  //ge->addFlare("pictures/lense_flare/lens1.png"); //small birst
187  //ge->addFlare("pictures/lense_flare/lens3.png"); //second halo
188  //ge->addFlare("pictures/lense_flare/lens4.png");
189  //ge->addFlare("pictures/lense_flare/lens1.png");
190  //ge->addFlare("pictures/lense_flare/lens3.png");
191
192  //ge->activate();
193}
194
195
196
197/**
198 * @brief initializes the Video for openGL.
199 *
200 * This has to be done only once when starting orxonox.
201 */
202int GraphicsEngine::initVideo(unsigned int resX, unsigned int resY, unsigned int bbp)
203{
204  if (this->isInit)
205    return -1;
206  //   initialize SDL_VIDEO
207  if (SDL_InitSubSystem(SDL_INIT_VIDEO) == -1)
208  {
209    PRINTF(1)("could not initialize SDL Video\n");
210    return -1;
211  }
212  // initialize SDL_GL-settings
213  this->setGLattribs();
214
215  // setting the Video Flags.
216  this->videoFlags = SDL_OPENGL | SDL_HWPALETTE | SDL_RESIZABLE ;
217
218  /* query SDL for information about our video hardware */
219  const SDL_VideoInfo* videoInfo = SDL_GetVideoInfo ();
220  if( videoInfo == NULL)
221  {
222    PRINTF(1)("Failed getting Video Info :%s\n", SDL_GetError());
223    SDL_Quit ();
224  }
225  if( videoInfo->hw_available)
226    this->videoFlags |= SDL_HWSURFACE;
227  else
228    this->videoFlags |= SDL_SWSURFACE;
229  /*
230  if(VideoInfo -> blit_hw)
231    VideoFlags |= SDL_HWACCEL;
232  */
233  // setting up the Resolution
234  this->setResolution(resX, resY, bbp);
235
236  // GRABBING ALL GL-extensions
237  this->grabHardwareSettings();
238
239  // Enable default GL stuff
240  glEnable(GL_DEPTH_TEST);
241
242  Render2D::getInstance();
243
244  this->isInit = true;
245  return 1;
246}
247
248/**
249 * @brief sets the Window Captions and the Name of the icon.
250 * @param windowName The name of the Window
251 * @param icon The name of the Icon on the Disc
252 */
253void GraphicsEngine::setWindowName(const std::string& windowName, const std::string& icon)
254{
255  SDL_Surface* iconSurf = SDL_LoadBMP(icon.c_str());
256  if (iconSurf != NULL)
257  {
258    Uint32 colorkey = SDL_MapRGB(iconSurf->format, 0, 0, 0);
259    SDL_SetColorKey(iconSurf, SDL_SRCCOLORKEY, colorkey);
260    SDL_WM_SetIcon(iconSurf, NULL);
261    SDL_FreeSurface(iconSurf);
262  }
263
264  SDL_WM_SetCaption (windowName.c_str(), icon.c_str());
265}
266
267
268/**
269 * @brief Sets the GL-attributes
270 */
271void GraphicsEngine::setGLattribs()
272{
273  // Set video mode
274  // TO DO: parse arguments for settings
275  //SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
276  //SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
277  //SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
278  //SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
279
280
281  SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
282  SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16);
283  SDL_GL_SetAttribute( SDL_GL_STENCIL_SIZE, 0);
284  SDL_GL_SetAttribute( SDL_GL_ACCUM_RED_SIZE, 0);
285  SDL_GL_SetAttribute( SDL_GL_ACCUM_GREEN_SIZE, 0);
286  SDL_GL_SetAttribute( SDL_GL_ACCUM_BLUE_SIZE, 0);
287  SDL_GL_SetAttribute( SDL_GL_ACCUM_ALPHA_SIZE, 0);
288
289  SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);      //Use at least 5 bits of Red
290  SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);    //Use at least 5 bits of Green
291  SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);     //Use at least 5 bits of Blue
292  SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);   //Use at least 16 bits for the depth buffer
293  SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);  //Enable double buffering
294
295  // enable antialiasing?
296  if( this->bAntialiasing)
297  {
298    SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES,4);
299    SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS,1);
300  }
301
302  glEnable(GL_CULL_FACE);
303  glCullFace(GL_FRONT);
304}
305
306/**
307 * @brief grabs the Hardware Specifics
308 *
309 * checks for all the different HW-types
310 */
311void GraphicsEngine::grabHardwareSettings()
312{
313  const char* renderer = (const char*) glGetString(GL_RENDERER);
314  const char* vendor   = (const char*) glGetString(GL_VENDOR);
315  const char* version  = (const char*) glGetString(GL_VERSION);
316  const char* extensions = (const char*) glGetString(GL_EXTENSIONS);
317
318  //  printf("%s %s %s\n %s", renderer, vendor, version, extensions);
319
320  if (renderer != NULL)
321  {
322    this->hwRenderer == renderer;
323  }
324  if (vendor != NULL)
325  {
326    this->hwVendor == vendor;
327  }
328  if (version != NULL)
329  {
330    this->hwVersion == version;
331  }
332
333  if (extensions != NULL)
334    this->hwExtensions.split(extensions, " \n\t,");
335
336  PRINT(4)("Running on : vendor: %s,  renderer: %s,  version:%s\n", vendor, renderer, version);
337  PRINT(4)("Extensions:\n");
338  for (unsigned int i = 0; i < this->hwExtensions.size(); i++)
339    PRINT(4)("%d: %s\n", i, this->hwExtensions[i].c_str());
340
341
342  // inizializing GLEW
343  GLenum err = glewInit();
344  if (GLEW_OK != err)
345  {
346    /* Problem: glewInit failed, something is seriously wrong. */
347    PRINTF(1)("%s\n", glewGetErrorString(err));
348  }
349  PRINTF(4)("Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
350}
351
352
353/**
354 * @brief sets the Resolution of the Screen to display the Graphics to.
355 * @param width The width of the window
356 * @param height The height of the window
357 * @param bpp bits per pixel
358 */
359int GraphicsEngine::setResolution(int width, int height, int bpp)
360{
361  this->resolutionX = width;
362  this->resolutionY = height;
363  this->bitsPerPixel = bpp;
364  State::setResolution( width, height);
365
366  if (this->screen != NULL)
367    SDL_FreeSurface(screen);
368  if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | this->fullscreenFlag)) == NULL)
369  {
370    PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
371    //    SDL_Quit();
372    //    return -1;
373    return -1;
374  }
375  glViewport(0, 0, width, height);                     // Reset The Current Viewport
376
377#ifdef __WIN32__
378  // REBUILDING TEXTURES (ON WINDOWS CONTEXT SWITCH)
379  const std::list<BaseObject*>* texList = ClassList::getList(CL_TEXTURE);
380  if (texList != NULL)
381  {
382    std::list<BaseObject*>::const_iterator reTex;
383    for (reTex = texList->begin(); reTex != texList->end(); reTex++)
384      dynamic_cast<Texture*>(*reTex)->rebuild();
385  }
386  // REBUILDING MODELS
387  const std::list<BaseObject*>* modelList = ClassList::getList(CL_STATIC_MODEL);
388  if (texList != NULL)
389  {
390    std::list<BaseObject*>::const_iterator reModel;
391    for (reModel = modelList->begin(); reModel != modelList->end(); reModel++)
392      dynamic_cast<StaticModel*>(*reModel)->rebuild();
393  }
394#endif /* __WIN32__ */
395  return 1;
396}
397
398/**
399 * @brief sets Fullscreen mode
400 * @param fullscreen true if fullscreen, false if windowed
401*/
402void GraphicsEngine::setFullscreen(bool fullscreen)
403{
404  if (fullscreen)
405    this->fullscreenFlag = SDL_FULLSCREEN;
406  else
407    this->fullscreenFlag = 0;
408  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
409}
410
411void GraphicsEngine::toggleFullscreen()
412{
413  if (this->fullscreenFlag == SDL_FULLSCREEN)
414    this->fullscreenFlag = 0;
415  else
416    this->fullscreenFlag = SDL_FULLSCREEN;
417  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
418}
419
420
421/**
422 * @brief sets the background color
423 * @param red the red part of the background
424 * @param blue the blue part of the background
425 * @param green the green part of the background
426 * @param alpha the alpha part of the background
427 */
428void GraphicsEngine::setBackgroundColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
429{
430  glClearColor(red, green, blue, alpha);
431}
432
433/**
434 * @brief Signalhandler, for when the resolution has changed
435 * @param resizeInfo SDL information about the size of the new screen size
436 */
437void GraphicsEngine::resolutionChanged(const SDL_ResizeEvent& resizeInfo)
438{
439  this->setResolution(resizeInfo.w, resizeInfo.h, this->bitsPerPixel);
440}
441
442/**
443 * @brief entering 2D Mode
444 * this is a GL-Projection-mode, that is orthogonal, for placing the font in fron of everything else
445 */
446void GraphicsEngine::enter2DMode()
447{
448  //GraphicsEngine::storeMatrices();
449  SDL_Surface *screen = SDL_GetVideoSurface();
450
451  /* Note, there may be other things you need to change,
452     depending on how you have your OpenGL state set up.
453  */
454  glPushAttrib(GL_ENABLE_BIT);
455  glDisable(GL_DEPTH_TEST);
456  glDisable(GL_CULL_FACE);
457  glDisable(GL_LIGHTING);  // will be set back when leaving 2D-mode
458
459  glMatrixMode(GL_PROJECTION);
460  glPushMatrix();
461  glLoadIdentity();
462  glOrtho(0.0, (GLdouble)screen->w, (GLdouble)screen->h, 0.0, 0.0, 1.0);
463
464  glMatrixMode(GL_MODELVIEW);
465  glPushMatrix();
466  glLoadIdentity();
467}
468
469/**
470 * @brief leaves the 2DMode again also @see Font::enter2DMode()
471 */
472void GraphicsEngine::leave2DMode()
473{
474
475  glMatrixMode(GL_MODELVIEW);
476  glPopMatrix();
477
478  glMatrixMode(GL_PROJECTION);
479  glPopMatrix();
480
481  glPopAttrib();
482}
483
484/**
485 * @brief changes to wireframe-mode.
486 */
487void GraphicsEngine::wireframe()
488{
489  glPolygonMode(GL_FRONT, GL_LINE);
490}
491
492/**
493 * @brief stores the GL_matrices
494 */
495void GraphicsEngine::storeMatrices()
496{
497  glGetDoublev(GL_PROJECTION_MATRIX, GraphicsEngine::projMat);
498  glGetDoublev(GL_MODELVIEW_MATRIX, GraphicsEngine::modMat);
499  glGetIntegerv(GL_VIEWPORT, GraphicsEngine::viewPort);
500}
501
502//! the stored ModelView Matrix.
503GLdouble GraphicsEngine::modMat[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
504//! the stored Projection Matrix
505GLdouble GraphicsEngine::projMat[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
506//! The ViewPort
507GLint GraphicsEngine::viewPort[4] = {0,0,0,0};
508
509
510
511/**
512 * @brief outputs all the Fullscreen modes.
513 */
514void GraphicsEngine::listModes()
515{
516  /* Get available fullscreen/hardware modes */
517  this->videoModes=SDL_ListModes(NULL, SDL_FULLSCREEN|SDL_HWSURFACE);
518
519  /* Check is there are any modes available */
520  if(this->videoModes == (SDL_Rect **)0)
521  {
522    PRINTF(1)("No modes available!\n");
523    exit(-1);
524  }
525
526  /* Check if our resolution is restricted */
527  if(this->videoModes == (SDL_Rect **)-1)
528  {
529    PRINTF(2)("All resolutions available.\n");
530  }
531  else
532  {
533    /* Print valid modes */
534    PRINT(0)("Available Resoulution Modes are\n");
535    for(int i = 0; this->videoModes[i]; ++i)
536      PRINT(4)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
537  }
538}
539
540/**
541 * @brief checks wether a certain extension is availiable
542 * @param extension the Extension to check for (ex. GL_ARB_texture_env_dot3)
543 * @return true if it is, false otherwise
544 */
545bool GraphicsEngine::hwSupportsEXT(const std::string& extension)
546{
547  for (unsigned int i = 0; i < this->hwExtensions.size(); i++)
548    if ( this->hwExtensions.getString(i) == extension)
549      return true;
550  return false;
551}
552
553/**
554 * @brief updates everything that is to be updated in the GraphicsEngine
555 */
556void GraphicsEngine::update(float dt)
557{
558  Render2D::getInstance()->update(dt);
559}
560
561
562/**
563 * @brief ticks the Text
564 * @param dt the time passed
565 */
566void GraphicsEngine::tick(float dt)
567{
568  if( unlikely(this->bDisplayFPS))
569  {
570    this->currentFPS = 1.0/dt;
571    if( unlikely(this->currentFPS > this->maxFPS)) this->maxFPS = this->currentFPS;
572    if( unlikely(this->currentFPS < this->minFPS)) this->minFPS = this->currentFPS;
573
574#ifndef NO_TEXT
575    char tmpChar1[20];
576    sprintf(tmpChar1, "Current:  %4.0f", this->currentFPS);
577    this->geTextCFPS->setText(tmpChar1);
578    char tmpChar2[20];
579    sprintf(tmpChar2, "Max:    %4.0f", this->maxFPS);
580    this->geTextMaxFPS->setText(tmpChar2);
581    char tmpChar3[20];
582    sprintf(tmpChar3, "Min:    %4.0f", this->minFPS);
583    this->geTextMinFPS->setText(tmpChar3);
584#endif /* NO_TEXT */
585
586  }
587
588  Render2D::getInstance()->tick(dt);
589
590  // tick the graphics effects
591  for (ObjectList<GraphicsEffect>::const_iterator it = GraphicsEffect::objectList().begin();
592       it != GraphicsEffect::objectList().end();
593       ++it)
594    (*it)->tick(dt);
595}
596
597/**
598 * @brief draws all Elements that should be displayed on the Background.
599 */
600void GraphicsEngine::drawBackgroundElements() const
601{
602  GraphicsEngine::storeMatrices();
603
604  Render2D::getInstance()->draw(E2D_LAYER_BELOW_ALL, E2D_LAYER_BELOW_ALL);
605}
606
607/**
608 * this draws the graphics engines graphics effecs
609 */
610void GraphicsEngine::draw() const
611{
612  if( this->graphicsEffects != NULL)
613  {
614    //draw the graphics effects
615    std::list<BaseObject*>::const_iterator it;
616    for (it = this->graphicsEffects->begin(); it != this->graphicsEffects->end(); it++)
617      dynamic_cast<GraphicsEffect*>(*it)->draw();
618  }
619  Shader::suspendShader();
620  Render2D::getInstance()->draw(E2D_LAYER_BOTTOM, E2D_LAYER_ABOVE_ALL);
621  Shader::restoreShader();
622}
623
624
625void GraphicsEngine::toggleFPSdisplay()
626{
627  this->displayFPS(!this->bDisplayFPS);
628}
629
630
631/**
632 * @brief displays the Frames per second
633 * @param display if the text should be displayed
634*/
635void GraphicsEngine::displayFPS(bool display)
636{
637#ifndef NO_TEXT
638  if( display )
639  {
640    if (this->geTextCFPS == NULL)
641    {
642      this->geTextCFPS = new Text("fonts/arial_black.ttf", 15);
643      this->geTextCFPS->setName("curFPS");
644      this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
645      this->geTextCFPS->setAbsCoor2D(5, 0);
646    }
647    if (this->geTextMaxFPS == NULL)
648    {
649      this->geTextMaxFPS = new Text("fonts/arial_black.ttf", 15);
650      this->geTextMaxFPS->setName("MaxFPS");
651      this->geTextMaxFPS->setAlignment(TEXT_ALIGN_LEFT);
652      this->geTextMaxFPS->setAbsCoor2D(5, 20);
653    }
654    if (this->geTextMinFPS == NULL)
655    {
656      this->geTextMinFPS = new Text("fonts/arial_black.ttf", 15);
657      this->geTextMinFPS->setName("MinFPS");
658      this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
659      this->geTextMinFPS->setAbsCoor2D(5, 40);
660    }
661  }
662  else
663  {
664    delete this->geTextCFPS;
665    this->geTextCFPS = NULL;
666    delete this->geTextMaxFPS;
667    this->geTextMaxFPS = NULL;
668    delete this->geTextMinFPS;
669    this->geTextMinFPS = NULL;
670  }
671  this->bDisplayFPS = display;
672#else
673  this->bDisplayFPS = false;
674#endif /* NO_TEXT */
675}
676
677
678/**
679 * @brief processes the events for the GraphicsEngine class
680 * @param the event to handle
681 */
682void GraphicsEngine::process(const Event &event)
683{
684  switch (event.type)
685  {
686    case EV_VIDEO_RESIZE:
687    this->resolutionChanged(event.resize);
688    break;
689  }
690}
Note: See TracBrowser for help on using the repository browser.