diff options
| author | wwylele <wwylele@gmail.com> | 2017-05-05 15:25:04 +0300 |
|---|---|---|
| committer | wwylele <wwylele@gmail.com> | 2017-05-20 13:50:50 +0300 |
| commit | 4d62e75fb2438fea3e9199db1641a7fe2848222a (patch) | |
| tree | 090803248fcbd501526c8a8ce802b6f847eee9a7 /src/video_core/renderer_opengl/gl_state.cpp | |
| parent | ade45b5b9930b52b6a1d399306539073e8e2196d (diff) | |
gl_rasterizer: implement procedural texture
Diffstat (limited to 'src/video_core/renderer_opengl/gl_state.cpp')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_state.cpp | 36 |
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); |
