Last active
December 14, 2015 03:59
-
-
Save ryzed/5025194 to your computer and use it in GitHub Desktop.
small patch for PicoBuild and PicoShaderInstance
without with changes - it not compiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PicoBuild { | |
- @:macro public static function shader() : Array<Field> { | |
+ macro public static function shader() : Array<Field> { | |
p.includeFile = function(file) { | |
var f = Context.resolvePath(file); | |
- return Context.parse("{"+neko.io.File.getContent(f)+"}", Context.makePosition( { min : 0, max : 0, file : f } )); | |
+ // replace "neko.io..." with "sys.io" | |
+ return Context.parse("{"+sys.io.File.getContent(f)+"}", Context.makePosition( { min : 0, max : 0, file : f } )); | |
}; | |
var decls = [ | |
- "override function getData() return '"+s+"'", | |
+ "override function getData() return '"+s+"';", // append ";" at end | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PicoShaderInstance | |
{ | |
public function new(shader:PicoShader, data:Data) { | |
+ | |
+ this.shader = shader; // save "proto" (or maybe remove param?) | |
+ | |
var c = new hxsl.AgalCompiler(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment