Commit 0627e32b authored by Laurent Le Brun's avatar Laurent Le Brun
Browse files

Shader Minifier 1.1.5

Bump version number
Add link to github
Support argument "-" to print to stdout (in addition to the empty
string)
parent e0d5dad3
......@@ -4,7 +4,7 @@ open System.Collections.Generic
type targetOutput = Text | CHeader | CList | JS | Nasm
let version = "1.1.4" // Shader Minifer version
let version = "1.1.5" // Shader Minifer version
let debugMode = false
let mutable outputName = "shader_code.h"
......
......@@ -16,13 +16,13 @@ let export ty name (newName:string) =
exportedValues := (ty, name, newName) :: !exportedValues
let private output() =
if Ast.debugMode || Ast.outputName = "" then stdout
if Ast.debugMode || Ast.outputName = "" || Ast.outputName = "-" then stdout
else new StreamWriter(Ast.outputName) :> TextWriter
let printHeader data asAList =
use out = output()
let fileName =
if Ast.outputName = "" then "shader_code.h"
if Ast.outputName = "" || Ast.outputName = "-" then "shader_code.h"
else Path.GetFileName Ast.outputName
let macroName = fileName.Replace(".", "_").ToUpper() + "_"
......
......@@ -92,8 +92,7 @@ let run files =
| exn -> fail exn exn.Message
let printHeader () =
printfn "Shader Minifier %s (c) Laurent Le Brun 2012" Ast.version
printfn "http://www.ctrl-alt-test.fr"
printfn "Shader Minifier %s, Dec 2017 - https://github.com/laurentlb/Shader_Minifier" Ast.version
printfn ""
let () =
......@@ -131,8 +130,6 @@ let () =
"--smoothstep", ArgType.Unit (fun() -> Ast.smoothstepTrick<-true), "Use IQ's smoothstep trick"
//"--macro-threshold", ArgType.Int (fun i ->
// printfn "Macros are disabled in the release."; Ast.macroThreshold <- i), "[disabled] Use a #define macro if it can save at least <int> bytes"
"--shader-only", ArgType.Unit (fun() -> Ast.targetOutput<-Ast.Text), "[Deprecated]"
"--js-output", ArgType.Unit (fun() -> Ast.targetOutput<-Ast.JS), "[Deprecated]"
"--", ArgType.Rest setFile, "Stop parsing command line"
] |> List.map (fun (s, f, d) -> ArgInfo(s, f, d))
......
void f() {
if (x) {
y();
z();
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment