GPU: Factor out the framebuffer configuration code for both Clear and Draw commands.

This commit is contained in:
Subv
2018-07-03 16:55:44 -05:00
parent c1811ed3d1
commit 78443a7f29
2 changed files with 62 additions and 95 deletions

View File

@@ -7,6 +7,7 @@
#include <array>
#include <cstddef>
#include <memory>
#include <utility>
#include <vector>
#include <glad/glad.h>
#include "common/common_types.h"
@@ -82,6 +83,10 @@ private:
u32 border_color_a;
};
/// Configures the color and depth framebuffer states and returns the dirty <Color, Depth>
/// surfaces if writing was enabled.
std::pair<Surface, Surface> ConfigureFramebuffers();
/// Binds the framebuffer color and depth surface
void BindFramebufferSurfaces(const Surface& color_surface, const Surface& depth_surface,
bool has_stencil);