summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/FramebufferManager.h
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2017-03-16 21:39:17 +0100
committerGitHub <noreply@github.com>2017-03-16 21:39:17 +0100
commita0acdfc070d5bed422d3cdafd7675fc28af4eed5 (patch)
tree0edd5873022cafad1caf3c9588ae6fda8e201d75 /Source/Core/VideoBackends/OGL/FramebufferManager.h
parentb2ab713ad93f8734fc65e104f4dc6c1c9a3e9411 (diff)
parent134317e07f7c371000389e7c3f45ceaf046eea69 (diff)
Merge pull request #5029 from ligfx/bboximagemask
OGL: implement Bounding Box on systems w/o SSBO
Diffstat (limited to 'Source/Core/VideoBackends/OGL/FramebufferManager.h')
-rw-r--r--Source/Core/VideoBackends/OGL/FramebufferManager.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.h b/Source/Core/VideoBackends/OGL/FramebufferManager.h
index 84270777c4..62b2f5ce3c 100644
--- a/Source/Core/VideoBackends/OGL/FramebufferManager.h
+++ b/Source/Core/VideoBackends/OGL/FramebufferManager.h
@@ -63,13 +63,15 @@ struct XFBSource : public XFBSourceBase
class FramebufferManager : public FramebufferManagerBase
{
public:
- FramebufferManager(int targetWidth, int targetHeight, int msaaSamples);
+ FramebufferManager(int targetWidth, int targetHeight, int msaaSamples,
+ bool enable_stencil_buffer);
~FramebufferManager();
// To get the EFB in texture form, these functions may have to transfer
// the EFB to a resolved texture first.
static GLuint GetEFBColorTexture(const EFBRectangle& sourceRc);
static GLuint GetEFBDepthTexture(const EFBRectangle& sourceRc);
+ static void ResolveEFBStencilTexture();
static GLuint GetEFBFramebuffer(unsigned int layer = 0)
{
@@ -77,7 +79,7 @@ public:
}
static GLuint GetXFBFramebuffer() { return m_xfbFramebuffer; }
// Resolved framebuffer is only used in MSAA mode.
- static GLuint GetResolvedFramebuffer() { return m_resolvedFramebuffer[0]; }
+ static GLuint GetResolvedFramebuffer();
static void SetFramebuffer(GLuint fb);
static void FramebufferTexture(GLenum target, GLenum attachment, GLenum textarget, GLuint texture,
GLint level);
@@ -100,8 +102,13 @@ public:
static void ReinterpretPixelData(unsigned int convtype);
static void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points);
+ static bool HasStencilBuffer();
private:
+ GLuint CreateTexture(GLenum texture_type, GLenum internal_format, GLenum pixel_format,
+ GLenum data_type);
+ void BindLayeredTexture(GLuint texture, const std::vector<GLuint>& framebuffers,
+ GLenum attachment, GLenum texture_type);
std::unique_ptr<XFBSourceBase> CreateXFBSource(unsigned int target_width,
unsigned int target_height,
unsigned int layers) override;
@@ -122,6 +129,8 @@ private:
static GLuint
m_efbColorSwap; // will be hot swapped with m_efbColor when reinterpreting EFB pixel formats
+ static bool m_enable_stencil_buffer;
+
// Only used in MSAA mode, TODO: try to avoid them
static std::vector<GLuint> m_resolvedFramebuffer;
static GLuint m_resolvedColorTexture;