You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
869 B

#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);
static void getVideoRes(std::string vidstr, int *w, int *h);
void setGLNearFar(float _znear, float _zfar);
void enableGLSetup(bool);
void setExtraGLParamFunc(void (*extrafunc)());
bool isOK();
bool apply();
int getWidth();
int getHeight();
void clearScreen();
void renderScreen();
};
#endif