52 lines
911 B
C++
52 lines
911 B
C++
#ifndef __GLSDLSCREEN_H
|
|
#define __GLSDLSCREEN_H
|
|
|
|
#include <iostream>
|
|
#include <SDL.h>
|
|
#include <SDL_opengl.h>
|
|
#include "gltexture.h"
|
|
|
|
namespace segl {
|
|
|
|
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();
|
|
};
|
|
|
|
} // namespace segl
|
|
|
|
#endif
|