diff options
| author | 2017-06-16 16:55:01 +0300 | |
|---|---|---|
| committer | 2017-06-21 23:13:06 +0300 | |
| commit | 42f7ca7412cc7912a3db4fd10bf07e525be9ced1 (patch) | |
| tree | 47619756b1f7f7d62f3b2c1a507f32ea2554fa9e /src | |
| parent | gl_rasterizer: manage texture ids in one place (diff) | |
| download | yuzu-42f7ca7412cc7912a3db4fd10bf07e525be9ced1.tar.gz yuzu-42f7ca7412cc7912a3db4fd10bf07e525be9ced1.tar.xz yuzu-42f7ca7412cc7912a3db4fd10bf07e525be9ced1.zip | |
gl_rasterizer: fix glGetUniformLocation type
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index c018afbcc..8b7991c04 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -1183,7 +1183,7 @@ void RasterizerOpenGL::SetShader() { | |||
| 1183 | state.Apply(); | 1183 | state.Apply(); |
| 1184 | 1184 | ||
| 1185 | // Set the texture samplers to correspond to different texture units | 1185 | // Set the texture samplers to correspond to different texture units |
| 1186 | GLuint uniform_tex = glGetUniformLocation(shader->shader.handle, "tex[0]"); | 1186 | GLint uniform_tex = glGetUniformLocation(shader->shader.handle, "tex[0]"); |
| 1187 | if (uniform_tex != -1) { | 1187 | if (uniform_tex != -1) { |
| 1188 | glUniform1i(uniform_tex, TextureUnits::PicaTexture(0).id); | 1188 | glUniform1i(uniform_tex, TextureUnits::PicaTexture(0).id); |
| 1189 | } | 1189 | } |
| @@ -1197,40 +1197,40 @@ void RasterizerOpenGL::SetShader() { | |||
| 1197 | } | 1197 | } |
| 1198 | 1198 | ||
| 1199 | // Set the texture samplers to correspond to different lookup table texture units | 1199 | // Set the texture samplers to correspond to different lookup table texture units |
| 1200 | GLuint uniform_lut = glGetUniformLocation(shader->shader.handle, "lighting_lut"); | 1200 | GLint uniform_lut = glGetUniformLocation(shader->shader.handle, "lighting_lut"); |
| 1201 | if (uniform_lut != -1) { | 1201 | if (uniform_lut != -1) { |
| 1202 | glUniform1i(uniform_lut, TextureUnits::LightingLUT.id); | 1202 | glUniform1i(uniform_lut, TextureUnits::LightingLUT.id); |
| 1203 | } | 1203 | } |
| 1204 | 1204 | ||
| 1205 | GLuint uniform_fog_lut = glGetUniformLocation(shader->shader.handle, "fog_lut"); | 1205 | GLint uniform_fog_lut = glGetUniformLocation(shader->shader.handle, "fog_lut"); |
| 1206 | if (uniform_fog_lut != -1) { | 1206 | if (uniform_fog_lut != -1) { |
| 1207 | glUniform1i(uniform_fog_lut, TextureUnits::FogLUT.id); | 1207 | glUniform1i(uniform_fog_lut, TextureUnits::FogLUT.id); |
| 1208 | } | 1208 | } |
| 1209 | 1209 | ||
| 1210 | GLuint uniform_proctex_noise_lut = | 1210 | GLint uniform_proctex_noise_lut = |
| 1211 | glGetUniformLocation(shader->shader.handle, "proctex_noise_lut"); | 1211 | glGetUniformLocation(shader->shader.handle, "proctex_noise_lut"); |
| 1212 | if (uniform_proctex_noise_lut != -1) { | 1212 | if (uniform_proctex_noise_lut != -1) { |
| 1213 | glUniform1i(uniform_proctex_noise_lut, TextureUnits::ProcTexNoiseLUT.id); | 1213 | glUniform1i(uniform_proctex_noise_lut, TextureUnits::ProcTexNoiseLUT.id); |
| 1214 | } | 1214 | } |
| 1215 | 1215 | ||
| 1216 | GLuint uniform_proctex_color_map = | 1216 | GLint uniform_proctex_color_map = |
| 1217 | glGetUniformLocation(shader->shader.handle, "proctex_color_map"); | 1217 | glGetUniformLocation(shader->shader.handle, "proctex_color_map"); |
| 1218 | if (uniform_proctex_color_map != -1) { | 1218 | if (uniform_proctex_color_map != -1) { |
| 1219 | glUniform1i(uniform_proctex_color_map, TextureUnits::ProcTexColorMap.id); | 1219 | glUniform1i(uniform_proctex_color_map, TextureUnits::ProcTexColorMap.id); |
| 1220 | } | 1220 | } |
| 1221 | 1221 | ||
| 1222 | GLuint uniform_proctex_alpha_map = | 1222 | GLint uniform_proctex_alpha_map = |
| 1223 | glGetUniformLocation(shader->shader.handle, "proctex_alpha_map"); | 1223 | glGetUniformLocation(shader->shader.handle, "proctex_alpha_map"); |
| 1224 | if (uniform_proctex_alpha_map != -1) { | 1224 | if (uniform_proctex_alpha_map != -1) { |
| 1225 | glUniform1i(uniform_proctex_alpha_map, TextureUnits::ProcTexAlphaMap.id); | 1225 | glUniform1i(uniform_proctex_alpha_map, TextureUnits::ProcTexAlphaMap.id); |
| 1226 | } | 1226 | } |
| 1227 | 1227 | ||
| 1228 | GLuint uniform_proctex_lut = glGetUniformLocation(shader->shader.handle, "proctex_lut"); | 1228 | GLint uniform_proctex_lut = glGetUniformLocation(shader->shader.handle, "proctex_lut"); |
| 1229 | if (uniform_proctex_lut != -1) { | 1229 | if (uniform_proctex_lut != -1) { |
| 1230 | glUniform1i(uniform_proctex_lut, TextureUnits::ProcTexLUT.id); | 1230 | glUniform1i(uniform_proctex_lut, TextureUnits::ProcTexLUT.id); |
| 1231 | } | 1231 | } |
| 1232 | 1232 | ||
| 1233 | GLuint uniform_proctex_diff_lut = | 1233 | GLint uniform_proctex_diff_lut = |
| 1234 | glGetUniformLocation(shader->shader.handle, "proctex_diff_lut"); | 1234 | glGetUniformLocation(shader->shader.handle, "proctex_diff_lut"); |
| 1235 | if (uniform_proctex_diff_lut != -1) { | 1235 | if (uniform_proctex_diff_lut != -1) { |
| 1236 | glUniform1i(uniform_proctex_diff_lut, TextureUnits::ProcTexDiffLUT.id); | 1236 | glUniform1i(uniform_proctex_diff_lut, TextureUnits::ProcTexDiffLUT.id); |