aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/renderer_opengl/gl_rasterizer.h
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2018-03-26 21:42:54 -0500
committerJames Rowe <jroweboy@gmail.com>2018-04-06 20:40:24 -0600
commitca96b04a0c524a1a6c3bc6952aab7d059da52c3d (patch)
tree5dcfad9d8419826601ba400e0a00fe115f5059ff /src/video_core/renderer_opengl/gl_rasterizer.h
parent0171ec606bd9d6d66f7c566838aebf525d8e6dee (diff)
GL: Ported the SamplerInfo struct from citra.
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.h')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.h21
1 files changed, 20 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..ba2113921 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer.h
@@ -85,7 +85,26 @@ 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,