Skip to content

Commit b8980bb

Browse files
committed
Fixes
1 parent 9424564 commit b8980bb

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

code/graphics/2d.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,6 @@ void removeVSyncOption()
755755
static std::unique_ptr<graphics::util::UniformBufferManager> UniformBufferManager;
756756

757757
// Forward definitions
758-
static void uniform_buffer_managers_init();
759758
static void uniform_buffer_managers_deinit();
760759
static void uniform_buffer_managers_retire_buffers();
761760

@@ -1980,9 +1979,6 @@ bool gr_init(std::unique_ptr<os::GraphicsOperations>&& graphicsOps, int d_mode,
19801979

19811980
gr_light_init();
19821981

1983-
// Initialize uniform buffer managers
1984-
uniform_buffer_managers_init();
1985-
19861982
gpu_heap_init();
19871983

19881984
mprintf(("Checking graphics capabilities:\n"));
@@ -2991,7 +2987,7 @@ void gr_print_timestamp(int x, int y, fix timestamp, int resize_mode)
29912987
gr_string(x, y, time.c_str(), resize_mode);
29922988
}
29932989

2994-
static void uniform_buffer_managers_init()
2990+
void gr_uniform_buffer_managers_init()
29952991
{
29962992
if (gr_screen.mode == GR_STUB) {
29972993
return;

code/graphics/2d.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,8 @@ void gr_get_post_process_effect_names(SCP_vector<SCP_string> &names);
14891489

14901490
bool gr_is_viewport_window();
14911491

1492+
void gr_uniform_buffer_managers_init();
1493+
14921494
// Include this last to make the 2D rendering function available everywhere
14931495
#include "graphics/render.h"
14941496

code/graphics/opengl/gropengl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ void gr_opengl_flip()
119119
return;
120120

121121
if (Cmdline_window_res) {
122-
GL_state.PushFramebufferState();
123-
GL_state.BindFrameBuffer(0, GL_FRAMEBUFFER);
122+
GL_state.PopFramebufferState();
123+
124124
glViewport(0, 0, Cmdline_window_res->first, Cmdline_window_res->second);
125125

126126
opengl_shader_set_current(gr_opengl_maybe_create_shader(SDR_TYPE_GAMMA_BLIT, 0));
@@ -137,8 +137,6 @@ void gr_opengl_flip()
137137
});
138138

139139
opengl_draw_full_screen_textured(0.0f, 0.0f, 1.0f, 1.0f);
140-
141-
GL_state.PopFramebufferState();
142140
}
143141

144142
if (Cmdline_gl_finish)
@@ -1496,6 +1494,8 @@ bool gr_opengl_init(std::unique_ptr<os::GraphicsOperations>&& graphicsOps)
14961494
Gr_current_green = &Gr_green;
14971495
Gr_current_alpha = &Gr_alpha;
14981496

1497+
// Initialize uniform buffer managers
1498+
gr_uniform_buffer_managers_init();
14991499

15001500
gr_setup_frame();
15011501
gr_opengl_reset_clip();

0 commit comments

Comments
 (0)