From: GitHub <no...@gi...> - 2017-02-17 00:11:23
|
Branch: refs/heads/master Home: https://github.com/supertuxkart/stk-code Commit: 251c46dcc443a0a8199ee07b25045435b88d657d https://github.com/supertuxkart/stk-code/commit/251c46dcc443a0a8199ee07b25045435b88d657d Author: Deve <de...@gm...> Date: 2017-02-17 (Fri, 17 Feb 2017) Changed paths: M src/graphics/texture_shader.hpp Log Message: ----------- Always call bind sampler function. This fixes errors for Intel HD4000 on Windows. My understending of this issue is following: - a shader assigned two textures, i.e. texture1 = sampler1, texture2=sampler2 - then next shader (i.e. importance sampling specular) assigned two textures: texture1=sampler1, texture2=without_sampler - when we executed setTextureUnits, the glBindSampler function wasn't called at all, so the drivers were trying to use combination texture2=sampler2, even though the sampler2 was prepared for different texture and most likely was already deleted. We can just always call the glBindSampler function, so that if texture doesn't have a sampler, it will execute it with sampler_id=0 param, which is practically an "unbind" function. |