Explorar o código

libobs-opengl: Assign texture units to shader vars

Texture units were not being properly associated with the shader uniform
variables.
jp9000 %!s(int64=10) %!d(string=hai) anos
pai
achega
84d16fed8e
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      libobs-opengl/gl-shader.c

+ 1 - 0
libobs-opengl/gl-shader.c

@@ -487,6 +487,7 @@ static void program_set_param_data(struct gs_program *program,
 		}
 
 	} else if (pp->param->type == GS_SHADER_PARAM_TEXTURE) {
+		glUniform1i(pp->obj, pp->param->texture_id);
 		device_load_texture(program->device, pp->param->texture,
 				pp->param->texture_id);
 	}