Title / Description
Code --- 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 +}
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code