Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <SDL.h>
- #include <iostream>
- #include <GL\glew.h>
- #include "EngineOpenGl.h"
- // DEBUG_MemoryLeaks
- #define _CRTDBG_MAP_ALLOC
- #include <stdlib.h>
- #include <crtdbg.h>
- // _DEBUG
- #include "SDLInitVideoException.h"
- int main(int argc, char **argv) {
- _CrtDumpMemoryLeaks();
- EngineOpenGL * scene = new EngineOpenGL("3DPerlin", 720, 1280);
- try {
- scene->init();
- } catch (const SDLInitVideoException &e) {
- delete scene;
- std::cout << "Error while initialising SDL" << std::endl;
- } catch (const SDLCreateWindowException &e) {
- delete scene;
- std::cout << "Error while initialising the window" << std::endl;
- } catch (const SDLCreateContextGLException &e) {
- delete scene;
- std::cout << "Error while creating the contextGL" << std::endl;
- } catch (const GLEWInitException &e) {
- delete scene;
- std::cout << "Error while initialising " << std::endl;
- } catch (const SceneOpenGLException &e) {
- delete scene;
- std::cout << "Error while starting the scene" << std::endl;
- }
- scene->start();
- delete scene;
- // DEBUG_MemoryLeaks
- _CrtDumpMemoryLeaks();
- // _DEBUG
- return 0;
- }
Add Comment
Please, Sign In to add comment