aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl/gl_rasterizer.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-07 18:46:16 -0400
committerGitHub <noreply@github.com>2018-04-07 18:46:16 -0400
commit227bc78cbefef0866fc39db1383ea4f012583e11 (patch)
tree4b6979d7483cf98463afa394d2e11001e91aa195 /src/video_core/renderer_opengl/gl_rasterizer.h
parente0fb6a188c2df3f62b608658acf9c595f6580735 (diff)
parent0b855f1c21aceeda50a115fa80bf06ad6707cf66 (diff)
Merge pull request #314 from jroweboy/tegra-progress-3b
GPU: Bind uploaded textures when drawing (Rebased)
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.h b/src/video_core/renderer_opengl/gl_rasterizer.h
index fd53e94cd..d868bf421 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -85,12 +85,34 @@ public:
"FSUniformData structure must be less than 16kb as per the OpenGL spec");
private:
- struct SamplerInfo {};
+ class SamplerInfo {
+ public:
+ OGLSampler sampler;
+
+ /// Creates the sampler object, initializing its state so that it's in sync with the
+ /// SamplerInfo struct.
+ void Create();
+ /// Syncs the sampler object with the config, updating any necessary state.
+ void SyncWithConfig(const Tegra::Texture::TSCEntry& config);
+
+ private:
+ Tegra::Texture::TextureFilter mag_filter;
+ Tegra::Texture::TextureFilter min_filter;
+ Tegra::Texture::WrapMode wrap_u;
+ Tegra::Texture::WrapMode wrap_v;
+ u32 border_color_r;
+ u32 border_color_g;
+ u32 border_color_b;
+ u32 border_color_a;
+ };
/// Binds the framebuffer color and depth surface
void BindFramebufferSurfaces(const Surface& color_surface, const Surface& depth_surface,
bool has_stencil);
+ /// Binds the required textures to OpenGL before drawing a batch.
+ void BindTextures();
+
/// Syncs the viewport to match the guest state
void SyncViewport(const MathUtil::Rectangle<u32>& surfaces_rect, u16 res_scale);