summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_state.cpp
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-05-05 14:25:04 +0200
committerwwylele <wwylele@gmail.com>2017-05-20 12:50:50 +0200
commit4d62e75fb2438fea3e9199db1641a7fe2848222a (patch)
tree090803248fcbd501526c8a8ce802b6f847eee9a7 /src/video_core/renderer_opengl/gl_state.cpp
parentpica/swrasterizer: implement procedural texture (diff)
downloadyuzu-4d62e75fb2438fea3e9199db1641a7fe2848222a.tar
yuzu-4d62e75fb2438fea3e9199db1641a7fe2848222a.tar.gz
yuzu-4d62e75fb2438fea3e9199db1641a7fe2848222a.tar.bz2
yuzu-4d62e75fb2438fea3e9199db1641a7fe2848222a.tar.lz
yuzu-4d62e75fb2438fea3e9199db1641a7fe2848222a.tar.xz
yuzu-4d62e75fb2438fea3e9199db1641a7fe2848222a.tar.zst
yuzu-4d62e75fb2438fea3e9199db1641a7fe2848222a.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index 3c03b424a..bf837a7fb 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -58,6 +58,12 @@ OpenGLState::OpenGLState() {
fog_lut.texture_1d = 0;
+ proctex_lut.texture_1d = 0;
+ proctex_diff_lut.texture_1d = 0;
+ proctex_color_map.texture_1d = 0;
+ proctex_alpha_map.texture_1d = 0;
+ proctex_noise_lut.texture_1d = 0;
+
draw.read_framebuffer = 0;
draw.draw_framebuffer = 0;
draw.vertex_array = 0;
@@ -201,6 +207,36 @@ void OpenGLState::Apply() const {
glBindTexture(GL_TEXTURE_1D, fog_lut.texture_1d);
}
+ // ProcTex Noise LUT
+ if (proctex_noise_lut.texture_1d != cur_state.proctex_noise_lut.texture_1d) {
+ glActiveTexture(GL_TEXTURE10);
+ glBindTexture(GL_TEXTURE_1D, proctex_noise_lut.texture_1d);
+ }
+
+ // ProcTex Color Map
+ if (proctex_color_map.texture_1d != cur_state.proctex_color_map.texture_1d) {
+ glActiveTexture(GL_TEXTURE11);
+ glBindTexture(GL_TEXTURE_1D, proctex_color_map.texture_1d);
+ }
+
+ // ProcTex Alpha Map
+ if (proctex_alpha_map.texture_1d != cur_state.proctex_alpha_map.texture_1d) {
+ glActiveTexture(GL_TEXTURE12);
+ glBindTexture(GL_TEXTURE_1D, proctex_alpha_map.texture_1d);
+ }
+
+ // ProcTex LUT
+ if (proctex_lut.texture_1d != cur_state.proctex_lut.texture_1d) {
+ glActiveTexture(GL_TEXTURE13);
+ glBindTexture(GL_TEXTURE_1D, proctex_lut.texture_1d);
+ }
+
+ // ProcTex Diff LUT
+ if (proctex_diff_lut.texture_1d != cur_state.proctex_diff_lut.texture_1d) {
+ glActiveTexture(GL_TEXTURE14);
+ glBindTexture(GL_TEXTURE_1D, proctex_diff_lut.texture_1d);
+ }
+
// Framebuffer
if (draw.read_framebuffer != cur_state.draw.read_framebuffer) {
glBindFramebuffer(GL_READ_FRAMEBUFFER, draw.read_framebuffer);