summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-09-01 05:54:31 +0200
committerbunnei <bunneidev@gmail.com>2018-09-08 08:53:37 +0200
commitb56e5edafcc18901c08634b1730f1e1870a14891 (patch)
treeb91531252b3743a2d62df9cf7b86a3e89a011ad7 /src/video_core/renderer_opengl/gl_state.h
parentMerge pull request #1257 from lioncash/process (diff)
downloadyuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar
yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.gz
yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.bz2
yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.lz
yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.xz
yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.tar.zst
yuzu-b56e5edafcc18901c08634b1730f1e1870a14891.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.h')
-rw-r--r--src/video_core/renderer_opengl/gl_state.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index 46e96a97d..e3e24b9e7 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -94,8 +94,9 @@ public:
// 3 texture units - one for each that is used in PICA fragment shader emulation
struct TextureUnit {
- GLuint texture_2d; // GL_TEXTURE_BINDING_2D
- GLuint sampler; // GL_SAMPLER_BINDING
+ GLuint texture; // GL_TEXTURE_BINDING_2D
+ GLuint sampler; // GL_SAMPLER_BINDING
+ GLenum target;
struct {
GLint r; // GL_TEXTURE_SWIZZLE_R
GLint g; // GL_TEXTURE_SWIZZLE_G
@@ -104,7 +105,7 @@ public:
} swizzle;
void Unbind() {
- texture_2d = 0;
+ texture = 0;
swizzle.r = GL_RED;
swizzle.g = GL_GREEN;
swizzle.b = GL_BLUE;
@@ -114,6 +115,7 @@ public:
void Reset() {
Unbind();
sampler = 0;
+ target = GL_TEXTURE_2D;
}
};
std::array<TextureUnit, 32> texture_units;