1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-20 16:37:40 +00:00

renderbuffer should work without OpenGL

This commit is contained in:
Zeno Rogue
2018-02-03 13:50:47 +01:00
parent b3f047ea6a
commit dcc3e11287
3 changed files with 89 additions and 44 deletions

17
hyper.h
View File

@@ -2515,20 +2515,27 @@ bool is_cell_removed(cell *c);
void set_if_removed(cell*& c, cell *val);
struct renderbuffer {
int x, y, tx, ty;
bool valid;
int x, y;
#if CAP_GL
int tx, ty;
GLuint FramebufferName;
GLuint renderedTexture;
GLuint depth_stencil_rb;
SDL_Surface *srf;
Uint32 *expanded_data;
void use_as_texture();
#endif
#if CAP_SDL
SDL_Surface *srf;
void make_surface();
SDL_Surface *render();
#endif
renderbuffer(int x, int y, bool gl);
~renderbuffer();
void enable();
void disable();
SDL_Surface *render();
void use_as_texture();
void clear(int col);
};