diff options
| author | wwylele <wwylele@gmail.com> | 2017-06-16 16:16:28 +0300 |
|---|---|---|
| committer | wwylele <wwylele@gmail.com> | 2017-06-21 23:13:06 +0300 |
| commit | be9e952bdc33b6763618ee66046ce84c0ff18a34 (patch) | |
| tree | 61c048fc5e0e8808b2d992cc2ee2bc627672a70e /src/video_core/renderer_opengl/gl_state.h | |
| parent | ab60414122184851415a27ae8bcacb4aab0504b6 (diff) | |
gl_rasterizer: manage texture ids in one place
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.h')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index d524d0625..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 { |
