diff options
| author | bunnei <bunneidev@gmail.com> | 2018-09-08 16:14:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-08 16:14:46 -0400 |
| commit | af074ee422a5350a3adb7586fab3c3fb5ed6bdc4 (patch) | |
| tree | 6425e9818766c88b2fe33aa559b4815b3f6cf9f1 /src/video_core/renderer_opengl/gl_state.h | |
| parent | deff28d3c0f0af291946fe55f3f63af1cf83b0b1 (diff) | |
| parent | 23ae7cf9dbdfc7924974a6e418207443f5839d75 (diff) | |
Merge pull request #1256 from bunnei/tex-target-support
Initial support for non-2D textures
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.h')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 8 |
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; |
