Skip to content

Instantly share code, notes, and snippets.

@ryzed
Last active December 14, 2015 03:59
Show Gist options
  • Save ryzed/5025194 to your computer and use it in GitHub Desktop.
Save ryzed/5025194 to your computer and use it in GitHub Desktop.
small patch for PicoBuild and PicoShaderInstance without with changes - it not compiles
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
];
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