1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-03-04 04:39:43 +00:00

major cleanup of projection setting

This commit is contained in:
Zeno Rogue
2019-04-23 15:03:17 +02:00
parent acf7883393
commit 3c9e4db46e
15 changed files with 67 additions and 84 deletions

View File

@@ -126,11 +126,14 @@ SDL_Surface *renderbuffer::render() {
}
#endif
int current_rbuffer = -1;
void renderbuffer::enable() {
#if CAP_GL
if(FramebufferName) {
GLERR("prebind");
glBindFramebuffer(GL_FRAMEBUFFER, FramebufferName);
current_rbuffer = FramebufferName;
GLERR("bind");
vid.usingGL = true;
return;
@@ -210,6 +213,7 @@ resetbuffer::resetbuffer() {
void resetbuffer::reset() {
#if CAP_GL
glBindFramebuffer(GL_FRAMEBUFFER, drawFboId);
current_rbuffer = drawFboId;
#endif
#if CAP_SDL
s = sreset;