14 #include <SDL_opengl.h> 22 std::string strGLError(GLenum glErr);
24 #define glErrorCheck() {\ 25 static bool reported = false;\ 27 if (OpenGL::checkErrors && !reported && (glErr = glGetError()) != GL_NO_ERROR)\ 33 Log(LOG_WARNING) << __FILE__ << ":" << __LINE__ << ": glGetError() complaint: " << strGLError(glErr);\ 34 } while (((glErr = glGetError()) != GL_NO_ERROR));\ 48 unsigned iwidth, iheight, iformat, ibpp;
50 static bool checkErrors;
53 void resize(
unsigned width,
unsigned height);
55 bool lock(uint32_t *&data,
unsigned &pitch);
59 void refresh(
bool smooth,
unsigned inwidth,
unsigned inheight,
unsigned outwidth,
unsigned outheight,
int topBlackBand,
int bottomBlackBand,
int leftBlackBand,
int rightBlackBand);
67 void init(
int width,
int height);
81 namespace OpenXcom {
class OpenGL {}; }
bool set_shader(const char *source)
set a shader! but what kind?
Definition: OpenGL.cpp:246
void set_vertex_shader(const char *source)
and vertex?
Definition: OpenGL.cpp:378
void set_fragment_shader(const char *source)
same but for fragment shader?
Definition: OpenGL.cpp:367
OpenGL()
constructor – like we said, we're too cool to actually construct things
Definition: OpenGL.cpp:504
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:389
void term()
more like exit, because destructors are for uncool people
Definition: OpenGL.cpp:482
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:38
void setVSync(bool sync)
Try to set VSync!
Definition: OpenGL.cpp:459
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