2008-02-10 20:50:42 +01:00
|
|
|
#ifndef __GLSDLSCREEN_H
|
|
|
|
#define __GLSDLSCREEN_H
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <SDL.h>
|
|
|
|
#include <SDL_opengl.h>
|
|
|
|
#include "gltexture.h"
|
|
|
|
|
|
|
|
class GLSDLScreen {
|
|
|
|
private:
|
|
|
|
SDL_Surface *screen;
|
|
|
|
|
|
|
|
int width, height, bpp;
|
|
|
|
bool opengl;
|
|
|
|
bool glsetup;
|
|
|
|
bool resizable;
|
|
|
|
bool fullscreen;
|
|
|
|
|
|
|
|
// OpenGL related
|
|
|
|
float znear, zfar;
|
|
|
|
void (*extraglparam)();
|
|
|
|
int getFlags();
|
|
|
|
public:
|
|
|
|
GLSDLScreen();
|
|
|
|
|
|
|
|
void enableOpenGL(bool);
|
|
|
|
void enableResizable(bool);
|
|
|
|
void enableFullscreen(bool);
|
|
|
|
void setVideoMode(int _width, int _height, int _bpp);
|
2008-03-23 18:00:55 +01:00
|
|
|
static void getVideoRes(std::string vidstr, int *w, int *h);
|
2008-02-10 20:50:42 +01:00
|
|
|
|
|
|
|
void setGLNearFar(float _znear, float _zfar);
|
|
|
|
void enableGLSetup(bool);
|
|
|
|
void setExtraGLParamFunc(void (*extrafunc)());
|
|
|
|
|
|
|
|
bool isOK();
|
|
|
|
bool apply();
|
2008-03-08 23:03:26 +01:00
|
|
|
|
|
|
|
int getWidth();
|
|
|
|
int getHeight();
|
2008-03-23 18:00:55 +01:00
|
|
|
|
|
|
|
void clearScreen();
|
|
|
|
void renderScreen();
|
2008-02-10 20:50:42 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|