Created
November 22, 2015 02:13
-
-
Save SplittyDev/6ff9c0004738350ed08a to your computer and use it in GitHub Desktop.
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
using System; | |
using Iodine.Runtime; | |
using nginz.Common; | |
namespace nginz.Interop.Iodine.nginzcore | |
{ | |
public class GLBufferType : IodineObject, ICanLog | |
{ | |
readonly static IodineTypeDefinition typeDef; | |
static GLBufferType () { | |
typeDef = new GLBufferTypeDefinition ("GLBuffer"); | |
} | |
class GLBufferTypeDefinition : IodineTypeDefinition, ICanLog { | |
public GLBufferTypeDefinition (string name) : base (name) { } | |
public override IodineObject Invoke (VirtualMachine vm, IodineObject[] arguments) { | |
this.Log ("Initializing GLBuffer"); | |
return null; | |
} | |
} | |
public GLBufferType () : base (typeDef) { | |
SetAttribute ("init", new InternalMethodCallback (init, this)); | |
} | |
// args [0]: BufferTargetType | |
// args [1]: IodineArray | |
IodineObject init (VirtualMachine vm, IodineObject self, IodineObject[] args) { | |
this.Log ("Initializing GLBuffer"); | |
//var iodinetarget = args [0] as BufferTargetType; | |
return null; | |
} | |
} | |
} |
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
using System; | |
using Iodine.Runtime; | |
namespace nginz.Interop.Iodine.nginzcore | |
{ | |
[IodineBuiltinModule ("nginz")] | |
public class nginzcoreModule : IodineModule | |
{ | |
public nginzcoreModule () : base ("nginz") { | |
var glBufferCallback = new InternalMethodCallback (createGlBuffer, this); | |
SetAttribute ("GLBuffer", glBufferCallback); | |
} | |
static IodineObject createGlBuffer (VirtualMachine vm, IodineObject self, IodineObject[] args) { | |
return new GLBufferType (); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment