Ver código fonte

libobs-opengl: Do not fail if shader param unused

I encountered a scenario where effects might reference shader parameters
that may not potentially exist, this isn't particularly a bad thing that
needs to return failure.  It just needs to gracefully ignore it.
jp9000 10 anos atrás
pai
commit
86e56a5c4e
1 arquivos alterados com 1 adições e 3 exclusões
  1. 1 3
      libobs-opengl/gl-shader.c

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

@@ -560,9 +560,7 @@ static bool assign_program_param(struct gs_program *program,
 		return false;
 
 	if (info.obj == -1) {
-		blog(LOG_ERROR, "Program parameter '%s' not found",
-				param->name);
-		return false;
+		return true;
 	}
 
 	info.param = param;