15 #include <SDL_opengl.h> 23 std::string strGLError(GLenum glErr);
25 #define glErrorCheck() {\ 26 static bool reported = false;\ 28 if (OpenGL::checkErrors && !reported && (glErr = glGetError()) != GL_NO_ERROR)\ 34 Log(LOG_WARNING) << __FILE__ << ":" << __LINE__ << ": glGetError() complaint: " << strGLError(glErr);\ 35 } while (((glErr = glGetError()) != GL_NO_ERROR));\ 49 unsigned iwidth, iheight, iformat, ibpp;
51 static bool checkErrors;
54 void resize(
unsigned width,
unsigned height);
56 bool lock(uint32_t *&data,
unsigned &pitch);
60 void refresh(
bool smooth,
unsigned inwidth,
unsigned inheight,
unsigned outwidth,
unsigned outheight,
int topBlackBand,
int bottomBlackBand,
int leftBlackBand,
int rightBlackBand);
68 void init(
int width,
int height);
bool set_shader(const char *source)
set a shader! but what kind?
Definition: OpenGL.cpp:228
void set_vertex_shader(const char *source)
and vertex?
Definition: OpenGL.cpp:360
void set_fragment_shader(const char *source)
same but for fragment shader?
Definition: OpenGL.cpp:349
OpenGL()
constructor – like we said, we're too cool to actually construct things
Definition: OpenGL.cpp:486
void resize(unsigned width, unsigned height)
call to resize internal buffer; internal use
Definition: OpenGL.cpp:112
void init(int width, int height)
init(), because we're too cool to initialize everything in the constructor
Definition: OpenGL.cpp:371
void term()
more like exit, because destructors are for uncool people
Definition: OpenGL.cpp:464
bool lock(uint32_t *&data, unsigned &pitch)
actually returns pointer to data buffer where one is to write the image
Definition: OpenGL.cpp:138
Element that is blit (rendered) onto the screen.
Definition: Surface.h:36
void setVSync(bool sync)
Try to set VSync!
Definition: OpenGL.cpp:441
void clear()
make all the pixels go away
Definition: OpenGL.cpp:144
void refresh(bool smooth, unsigned inwidth, unsigned inheight, unsigned outwidth, unsigned outheight, int topBlackBand, int bottomBlackBand, int leftBlackBand, int rightBlackBand)
make the buffer show up on screen
Definition: OpenGL.cpp:152
Definition: BaseInfoState.cpp:40