/* **********************************************************************************************************************
   Included Header Files
   **********************************************************************************************************************/
/*
#include <SDL.h>
#include <SDL_opengl.h>
#include <GL/gl.h>
#include <GL/glu.h>
*/


/* **********************************************************************************************************************
   Linked Libraries
   **********************************************************************************************************************/
/*
#pragma comment(lib, "GlU32.Lib")
#pragma comment(lib, "OpenGL32.Lib")
#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")



void CreateOpenGLWindow(int width, int height, int bpp, bool fullscreen, const char *title) {
    if( SDL_Init( SDL_INIT_VIDEO ) != 0 ) {
    }

	//all values are "at least"!	
	SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 5);
	SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 5);
	SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5);
	SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 5);
	SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 16);
	SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
	
    // Set the title.
    SDL_WM_SetCaption(title, title);  // title, icon name

    // Flags tell SDL about the type of window we are creating.
    int flags = SDL_OPENGL;
	
    if(fullscreen == true) {
        flags |= SDL_FULLSCREEN;
    };

    // Create the window
    SDL_Surface *screen = SDL_SetVideoMode(width, height, bpp, flags);
	
    if(screen == 0) {
    };
	
    //SDL doesn't trigger off a ResizeEvent at startup, but as we need this for OpenGL, we do this ourself
    SDL_Event resizeEvent;
    resizeEvent.type = SDL_VIDEORESIZE;
    resizeEvent.resize.w = width;
    resizeEvent.resize.h = height;
	
    SDL_PushEvent(&resizeEvent);
};*/