SDL2 application_template diff

Diff code posted by Quintus
created at 14 Mar 09:46

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
--- a/application_templates/SDL2.cpp  Sun Jan 04 18:31:27 2015 +0100
+++ b/application_templates/SDL2.cpp  Sat Mar 14 09:43:51 2015 +0100
@@ -40,7 +40,8 @@
 #include <iostream>
 
 #include <CEGUI/CEGUI.h>
-#include <CEGUI/RendererModules/OpenGL/GL3Renderer.h>
+//#include <CEGUI/RendererModules/OpenGL/GL3Renderer.h>
+#include <CEGUI/RendererModules/OpenGL/GLRenderer.h>
 
 #include <SDL.h>
 #include <SDL_opengl.h>
@@ -161,7 +162,7 @@
     using namespace CEGUI;
 
     // create renderer and enable extra states
-    OpenGL3Renderer& cegui_renderer = OpenGL3Renderer::create(Sizef(800.f, 600.f));
+    OpenGLRenderer& cegui_renderer = OpenGLRenderer::create(Sizef(800.f, 600.f));
     cegui_renderer.enableExtraStateSettings(true);
 
     // create CEGUI system object
@@ -237,7 +238,8 @@
     }
 }
 
-int SDL_main(int argc, char* argv[])
+//int SDL_main(int argc, char* argv[])
+int main(int argc, char* argv[])
 {
     using namespace CEGUI;
 
@@ -260,7 +262,7 @@
     SDL_Event event;
     float time = SDL_GetTicks() / 1000.f;
 
-    OpenGL3Renderer* renderer = static_cast<OpenGL3Renderer*>(System::getSingleton().getRenderer());
+    OpenGLRenderer* renderer = static_cast<OpenGLRenderer*>(System::getSingleton().getRenderer());
 
     // repeat until a quit is requested
     while (!quit && !SDL_QuitRequested())
@@ -335,7 +337,7 @@
 
     // destroy system and renderer
     System::destroy();
-    OpenGL3Renderer::destroy(*renderer);
+    OpenGLRenderer::destroy(*renderer);
     renderer = 0;
 
     // delete SDL GL context
@@ -348,4 +350,4 @@
     SDL_Quit();
 
     return 0;
-}
\ No newline at end of file
+}
1.64 KB in 5 ms with coderay