diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-06-21 23:55:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-21 23:55:23 +0200 |
commit | 72b69cea4bf9d01e520fb984a382de3e85af4e36 (patch) | |
tree | ff8a7246f49a300a1bbcd0447ace505744ec48db /src/video_core/renderer_opengl/gl_state.h | |
parent | Merge pull request #2789 from yuriks/misc-kernel (diff) | |
parent | gl_state: reset 1d textures (diff) | |
download | yuzu-72b69cea4bf9d01e520fb984a382de3e85af4e36.tar yuzu-72b69cea4bf9d01e520fb984a382de3e85af4e36.tar.gz yuzu-72b69cea4bf9d01e520fb984a382de3e85af4e36.tar.bz2 yuzu-72b69cea4bf9d01e520fb984a382de3e85af4e36.tar.lz yuzu-72b69cea4bf9d01e520fb984a382de3e85af4e36.tar.xz yuzu-72b69cea4bf9d01e520fb984a382de3e85af4e36.tar.zst yuzu-72b69cea4bf9d01e520fb984a382de3e85af4e36.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 7dcc03bd5..bb0218708 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -6,6 +6,29 @@ #include <glad/glad.h> +namespace TextureUnits { + +struct TextureUnit { + GLint id; + constexpr GLenum Enum() const { + return static_cast<GLenum>(GL_TEXTURE0 + id); + } +}; + +constexpr TextureUnit PicaTexture(int unit) { + return TextureUnit{unit}; +} + +constexpr TextureUnit LightingLUT{3}; +constexpr TextureUnit FogLUT{4}; +constexpr TextureUnit ProcTexNoiseLUT{5}; +constexpr TextureUnit ProcTexColorMap{6}; +constexpr TextureUnit ProcTexAlphaMap{7}; +constexpr TextureUnit ProcTexLUT{8}; +constexpr TextureUnit ProcTexDiffLUT{9}; + +} // namespace TextureUnits + class OpenGLState { public: struct { @@ -64,8 +87,8 @@ public: } texture_units[3]; struct { - GLuint texture_1d; // GL_TEXTURE_BINDING_1D - } lighting_luts[6]; + GLuint texture_buffer; // GL_TEXTURE_BINDING_BUFFER + } lighting_lut; struct { GLuint texture_1d; // GL_TEXTURE_BINDING_1D |