internal static void Internal_OnCompileEvent(string message, string file, int line, bool isError) { if (isError) { CompilationError?.Invoke(message, file, line); } else { CompilationWarning?.Invoke(message, file, line); } }
public ShaderProgram BuildShaderProgram(string[] shaderNames) { ReloadShaders(); ShaderProgram output = new ShaderProgram(shaderNames); if (output.HasCompilationError) { infoLog.Clear(); infoLog.Append(output.InfoLog); CompilationError?.Invoke(this, EventArgs.Empty); return(null); } else { CompilationSuccess?.Invoke(this, EventArgs.Empty); return(output); } }