HxGL
HxGL copied to clipboard
Cross target resource management
Thanks for the great start!
Currently hxgl.display3D.textures.Texture uses haxe.io.* to load image data into the gpu buffer. I personally think this is a bad idea, because haxe.io.* is not cross-target and probably incurs unnecessary overhead.
it's probably more efficient and cross-target to store a reference to a pointer (in CPP), a native image tag (in javascript), and a bytedata (in flash), type this as Void and pass it directly to the underlying backend methods. what do you think ?
All libraries that use your backend will probably have some nicer way to load images, but the least complex interface is to be able to feed the raw native data into the backend without any haxe code around it.