Selaa lähdekoodia

Restored full Lua bindings, integrated Lua bindings into the core and made the script resource loader manage bingings, added ability to attach Lua classes to entities with the Entity passed as bound Lua class

Ivan Safrin 9 vuotta sitten
vanhempi
sitoutus
4f70414684
100 muutettua tiedostoa jossa 10110 lisäystä ja 0 poistoa
  1. 2 0
      .gitignore
  2. BIN
      assets/default/default.pak
  3. 128 0
      bindings/lua/Polycode.lua
  4. 36 0
      bindings/lua/Polycode/AABB.lua
  5. 54 0
      bindings/lua/Polycode/AttributeBinding.lua
  6. 47 0
      bindings/lua/Polycode/AudioMixer.lua
  7. 35 0
      bindings/lua/Polycode/AudioStreamingSource.lua
  8. 28 0
      bindings/lua/Polycode/BackTraceEntry.lua
  9. 43 0
      bindings/lua/Polycode/BasicFile.lua
  10. 45 0
      bindings/lua/Polycode/BasicFileProvider.lua
  11. 122 0
      bindings/lua/Polycode/BezierCurve.lua
  12. 59 0
      bindings/lua/Polycode/BezierPoint.lua
  13. 37 0
      bindings/lua/Polycode/BinaryObjectReader.lua
  14. 48 0
      bindings/lua/Polycode/BinaryObjectWriter.lua
  15. 238 0
      bindings/lua/Polycode/Bone.lua
  16. 150 0
      bindings/lua/Polycode/BoneTrack.lua
  17. 265 0
      bindings/lua/Polycode/Camera.lua
  18. 144 0
      bindings/lua/Polycode/Color.lua
  19. 51 0
      bindings/lua/Polycode/ColorRange.lua
  20. 71 0
      bindings/lua/Polycode/Config.lua
  21. 43 0
      bindings/lua/Polycode/ConfigEntry.lua
  22. 399 0
      bindings/lua/Polycode/Core.lua
  23. 42 0
      bindings/lua/Polycode/CoreFileExtension.lua
  24. 218 0
      bindings/lua/Polycode/CoreInput.lua
  25. 36 0
      bindings/lua/Polycode/CoreMotionEvent.lua
  26. 31 0
      bindings/lua/Polycode/CoreMutex.lua
  27. 145 0
      bindings/lua/Polycode/CoreServices.lua
  28. 55 0
      bindings/lua/Polycode/Cubemap.lua
  29. 52 0
      bindings/lua/Polycode/Data.lua
  30. 128 0
      bindings/lua/Polycode/DummyCore.lua
  31. 805 0
      bindings/lua/Polycode/Entity.lua
  32. 28 0
      bindings/lua/Polycode/EntityProp.lua
  33. 86 0
      bindings/lua/Polycode/Event.lua
  34. 0 0
      bindings/lua/Polycode/EventDispatcher.lua
  35. 25 0
      bindings/lua/Polycode/EventHandler.lua
  36. 79 0
      bindings/lua/Polycode/Font.lua
  37. 33 0
      bindings/lua/Polycode/FontResourceLoader.lua
  38. 108 0
      bindings/lua/Polycode/GPUDrawBuffer.lua
  39. 48 0
      bindings/lua/Polycode/GPUDrawCall.lua
  40. 81 0
      bindings/lua/Polycode/GPUDrawOptions.lua
  41. 62 0
      bindings/lua/Polycode/GlyphData.lua
  42. 173 0
      bindings/lua/Polycode/Image.lua
  43. 46 0
      bindings/lua/Polycode/IndexDataArray.lua
  44. 172 0
      bindings/lua/Polycode/InputEvent.lua
  45. 32 0
      bindings/lua/Polycode/JSScriptInstance.lua
  46. 42 0
      bindings/lua/Polycode/JoystickInfo.lua
  47. 164 0
      bindings/lua/Polycode/Label.lua
  48. 114 0
      bindings/lua/Polycode/LightInfo.lua
  49. 77 0
      bindings/lua/Polycode/LightInfoBinding.lua
  50. 29 0
      bindings/lua/Polycode/LightShadowInfoBinding.lua
  51. 157 0
      bindings/lua/Polycode/LocalShaderParam.lua
  52. 32 0
      bindings/lua/Polycode/LuaScriptInstance.lua
  53. 170 0
      bindings/lua/Polycode/Material.lua
  54. 239 0
      bindings/lua/Polycode/MaterialManager.lua
  55. 33 0
      bindings/lua/Polycode/MaterialResourceLoader.lua
  56. 139 0
      bindings/lua/Polycode/Matrix4.lua
  57. 390 0
      bindings/lua/Polycode/Mesh.lua
  58. 33 0
      bindings/lua/Polycode/MeshResourceLoader.lua
  59. 28 0
      bindings/lua/Polycode/MouseEventResult.lua
  60. 68 0
      bindings/lua/Polycode/OSFileEntry.lua
  61. 110 0
      bindings/lua/Polycode/ObjectEntry.lua
  62. 169 0
      bindings/lua/Polycode/OpenGLGraphicsInterface.lua
  63. 45 0
      bindings/lua/Polycode/Perlin.lua
  64. 43 0
      bindings/lua/Polycode/PhysFSFile.lua
  65. 50 0
      bindings/lua/Polycode/PhysFSFileProvider.lua
  66. 43 0
      bindings/lua/Polycode/PolycodeViewBase.lua
  67. 48 0
      bindings/lua/Polycode/ProgramAttribute.lua
  68. 70 0
      bindings/lua/Polycode/ProgramParam.lua
  69. 33 0
      bindings/lua/Polycode/ProgramResourceLoader.lua
  70. 50 0
      bindings/lua/Polycode/QuatTriple.lua
  71. 168 0
      bindings/lua/Polycode/Quaternion.lua
  72. 37 0
      bindings/lua/Polycode/QuaternionCurve.lua
  73. 98 0
      bindings/lua/Polycode/Ray.lua
  74. 84 0
      bindings/lua/Polycode/Rectangle.lua
  75. 65 0
      bindings/lua/Polycode/RenderBuffer.lua
  76. 75 0
      bindings/lua/Polycode/RenderDataArray.lua
  77. 27 0
      bindings/lua/Polycode/RenderFrame.lua
  78. 43 0
      bindings/lua/Polycode/RenderTargetBinding.lua
  79. 100 0
      bindings/lua/Polycode/RenderThread.lua
  80. 33 0
      bindings/lua/Polycode/RenderThreadDebugInfo.lua
  81. 175 0
      bindings/lua/Polycode/Renderer.lua
  82. 35 0
      bindings/lua/Polycode/RendererThreadJob.lua
  83. 110 0
      bindings/lua/Polycode/Resource.lua
  84. 113 0
      bindings/lua/Polycode/ResourceManager.lua
  85. 148 0
      bindings/lua/Polycode/ResourcePool.lua
  86. 47 0
      bindings/lua/Polycode/Rotation.lua
  87. 241 0
      bindings/lua/Polycode/Scene.lua
  88. 97 0
      bindings/lua/Polycode/SceneCurve.lua
  89. 178 0
      bindings/lua/Polycode/SceneEntityInstance.lua
  90. 61 0
      bindings/lua/Polycode/SceneEntityInstanceLayer.lua
  91. 45 0
      bindings/lua/Polycode/SceneEntityInstanceResourceEntry.lua
  92. 75 0
      bindings/lua/Polycode/SceneImage.lua
  93. 103 0
      bindings/lua/Polycode/SceneLabel.lua
  94. 187 0
      bindings/lua/Polycode/SceneLight.lua
  95. 53 0
      bindings/lua/Polycode/SceneLine.lua
  96. 61 0
      bindings/lua/Polycode/SceneManager.lua
  97. 236 0
      bindings/lua/Polycode/SceneMesh.lua
  98. 83 0
      bindings/lua/Polycode/SceneParticle.lua
  99. 331 0
      bindings/lua/Polycode/SceneParticleEmitter.lua
  100. 95 0
      bindings/lua/Polycode/ScenePrimitive.lua

+ 2 - 0
.gitignore

@@ -3,6 +3,8 @@
 bin/polyimport
 bin/polybuild
 
+*.pyc
+
 *.o
 *.do
 *.io

BIN
assets/default/default.pak


+ 128 - 0
bindings/lua/Polycode.lua

@@ -0,0 +1,128 @@
+require "Polycode/BasicFile"
+require "Polycode/BasicFileProvider"
+require "Polycode/BezierCurve"
+require "Polycode/BezierPoint"
+require "Polycode/Bone"
+require "Polycode/Camera"
+require "Polycode/Color"
+require "Polycode/ConfigEntry"
+require "Polycode/Config"
+require "Polycode/Core"
+require "Polycode/VideoModeChangeInfo"
+require "Polycode/PolycodeViewBase"
+require "Polycode/DummyCore"
+require "Polycode/TimeInfo"
+require "Polycode/CoreMutex"
+require "Polycode/CoreMotionEvent"
+require "Polycode/CoreFileExtension"
+require "Polycode/OSFileEntry"
+require "Polycode/CoreInput"
+require "Polycode/JoystickInfo"
+require "Polycode/CoreServices"
+require "Polycode/Cubemap"
+require "Polycode/Data"
+require "Polycode/MouseEventResult"
+require "Polycode/EntityProp"
+require "Polycode/AABB"
+require "Polycode/Rotation"
+require "Polycode/Entity"
+require "Polycode/Event"
+require "Polycode/EventDispatcher"
+require "Polycode/EventHandler"
+require "Polycode/Font"
+require "Polycode/LightInfo"
+require "Polycode/GPUDrawCall"
+require "Polycode/GPUDrawOptions"
+require "Polycode/GPUDrawBuffer"
+require "Polycode/Image"
+require "Polycode/TouchInfo"
+require "Polycode/InputEvent"
+require "Polycode/GlyphData"
+require "Polycode/ColorRange"
+require "Polycode/Label"
+require "Polycode/Material"
+require "Polycode/ShaderPass"
+require "Polycode/MaterialManager"
+require "Polycode/Matrix4"
+require "Polycode/Mesh"
+require "Polycode/ObjectEntry"
+require "Polycode/BinaryObjectReader"
+require "Polycode/BinaryObjectWriter"
+require "Polycode/OpenGLGraphicsInterface"
+require "Polycode/SceneParticle"
+require "Polycode/SceneParticleEmitter"
+require "Polycode/Perlin"
+require "Polycode/PhysFSFile"
+require "Polycode/PhysFSFileProvider"
+require "Polycode/Quaternion"
+require "Polycode/QuatTriple"
+require "Polycode/QuaternionCurve"
+require "Polycode/Ray"
+require "Polycode/Rectangle"
+require "Polycode/RenderDataArray"
+require "Polycode/VertexDataArray"
+require "Polycode/IndexDataArray"
+require "Polycode/LightShadowInfoBinding"
+require "Polycode/LightInfoBinding"
+require "Polycode/RenderFrame"
+require "Polycode/RendererThreadJob"
+require "Polycode/RenderThread"
+require "Polycode/RenderThreadDebugInfo"
+require "Polycode/Renderer"
+require "Polycode/Resource"
+require "Polycode/ScriptResourceLoader"
+require "Polycode/ResourcePool"
+require "Polycode/ResourceManager"
+require "Polycode/FontResourceLoader"
+require "Polycode/ProgramResourceLoader"
+require "Polycode/MeshResourceLoader"
+require "Polycode/BackTraceEntry"
+require "Polycode/MaterialResourceLoader"
+require "Polycode/TextureResourceLoader"
+require "Polycode/Scene"
+require "Polycode/SceneEntityInstanceResourceEntry"
+require "Polycode/SceneEntityInstance"
+require "Polycode/SceneEntityInstanceLayer"
+require "Polycode/SceneImage"
+require "Polycode/SceneLabel"
+require "Polycode/SceneLight"
+require "Polycode/SceneCurve"
+require "Polycode/SceneLine"
+require "Polycode/SceneManager"
+require "Polycode/SceneMesh"
+require "Polycode/ScenePrimitive"
+require "Polycode/SceneRenderTexture"
+require "Polycode/SceneSound"
+require "Polycode/SceneSoundListener"
+require "Polycode/SceneSprite"
+require "Polycode/Sprite"
+require "Polycode/SpriteSet"
+require "Polycode/SpriteFrame"
+require "Polycode/SpriteState"
+require "Polycode/JSScriptInstance"
+require "Polycode/LuaScriptInstance"
+require "Polycode/ScriptInstance"
+require "Polycode/ProgramParam"
+require "Polycode/ProgramAttribute"
+require "Polycode/ShaderRenderTarget"
+require "Polycode/RenderTargetBinding"
+require "Polycode/Shader"
+require "Polycode/LocalShaderParam"
+require "Polycode/ShaderProgram"
+require "Polycode/AttributeBinding"
+require "Polycode/ShaderBinding"
+require "Polycode/SkeletonAnimation"
+require "Polycode/Skeleton"
+require "Polycode/BoneTrack"
+require "Polycode/Sound"
+require "Polycode/AudioStreamingSource"
+require "Polycode/AudioMixer"
+require "Polycode/SoundManager"
+require "Polycode/String"
+require "Polycode/RenderBuffer"
+require "Polycode/Texture"
+require "Polycode/Timer"
+require "Polycode/TimerManager"
+require "Polycode/Vector2"
+require "Polycode/Vector3"
+require "Polycode/Vector4"

+ 36 - 0
bindings/lua/Polycode/AABB.lua

@@ -0,0 +1,36 @@
+class "AABB"
+
+
+
+function AABB:__getvar(name)
+	if name == "min" then
+		local retVal = Polycore.AABB_get_min(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "max" then
+		local retVal = Polycore.AABB_get_max(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function AABB:__setvar(name,value)
+	if name == "min" then
+		Polycore.AABB_set_min(self.__ptr, value.__ptr)
+		return true
+	elseif name == "max" then
+		Polycore.AABB_set_max(self.__ptr, value.__ptr)
+		return true
+	end
+	return false
+end
+
+
+function AABB:__delete()
+	if self then Polycore.delete_AABB(self.__ptr) end
+end

+ 54 - 0
bindings/lua/Polycode/AttributeBinding.lua

@@ -0,0 +1,54 @@
+class "AttributeBinding"
+
+
+
+function AttributeBinding:__getvar(name)
+	if name == "name" then
+		return Polycore.AttributeBinding_get_name(self.__ptr)
+	elseif name == "vertexData" then
+		local retVal = Polycore.AttributeBinding_get_vertexData(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["VertexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "attribute" then
+		local retVal = Polycore.AttributeBinding_get_attribute(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["ProgramAttribute"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "enabled" then
+		return Polycore.AttributeBinding_get_enabled(self.__ptr)
+	end
+end
+
+
+function AttributeBinding:__setvar(name,value)
+	if name == "name" then
+		Polycore.AttributeBinding_set_name(self.__ptr, value)
+		return true
+	elseif name == "enabled" then
+		Polycore.AttributeBinding_set_enabled(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function AttributeBinding:AttributeBinding(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.AttributeBinding(unpack(arg))
+	end
+end
+
+function AttributeBinding:__delete()
+	if self then Polycore.delete_AttributeBinding(self.__ptr) end
+end

+ 47 - 0
bindings/lua/Polycode/AudioMixer.lua

@@ -0,0 +1,47 @@
+class "AudioMixer"
+
+
+
+function AudioMixer:__getvar(name)
+	if name == "globalVolume" then
+		return Polycore.AudioMixer_get_globalVolume(self.__ptr)
+	elseif name == "mixerMutex" then
+		local retVal = Polycore.AudioMixer_get_mixerMutex(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["CoreMutex"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function AudioMixer:__setvar(name,value)
+	if name == "globalVolume" then
+		Polycore.AudioMixer_set_globalVolume(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function AudioMixer:AudioMixer(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.AudioMixer(unpack(arg))
+	end
+end
+
+function AudioMixer:mixIntoBuffer(buffer, numSamples)
+	local retVal = Polycore.AudioMixer_mixIntoBuffer(self.__ptr, buffer.__ptr, numSamples)
+end
+
+function AudioMixer:__delete()
+	if self then Polycore.delete_AudioMixer(self.__ptr) end
+end

+ 35 - 0
bindings/lua/Polycode/AudioStreamingSource.lua

@@ -0,0 +1,35 @@
+class "AudioStreamingSource"
+
+
+
+
+
+
+
+function AudioStreamingSource:AudioStreamingSource(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.AudioStreamingSource(unpack(arg))
+	end
+end
+
+function AudioStreamingSource:getNumChannels()
+	local retVal =  Polycore.AudioStreamingSource_getNumChannels(self.__ptr)
+	return retVal
+end
+
+function AudioStreamingSource:getFrequency()
+	local retVal =  Polycore.AudioStreamingSource_getFrequency(self.__ptr)
+	return retVal
+end
+
+function AudioStreamingSource:__delete()
+	if self then Polycore.delete_AudioStreamingSource(self.__ptr) end
+end

+ 28 - 0
bindings/lua/Polycode/BackTraceEntry.lua

@@ -0,0 +1,28 @@
+class "BackTraceEntry"
+
+
+
+function BackTraceEntry:__getvar(name)
+	if name == "fileName" then
+		return Polycore.BackTraceEntry_get_fileName(self.__ptr)
+	elseif name == "lineNumber" then
+		return Polycore.BackTraceEntry_get_lineNumber(self.__ptr)
+	end
+end
+
+
+function BackTraceEntry:__setvar(name,value)
+	if name == "fileName" then
+		Polycore.BackTraceEntry_set_fileName(self.__ptr, value)
+		return true
+	elseif name == "lineNumber" then
+		Polycore.BackTraceEntry_set_lineNumber(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function BackTraceEntry:__delete()
+	if self then Polycore.delete_BackTraceEntry(self.__ptr) end
+end

+ 43 - 0
bindings/lua/Polycode/BasicFile.lua

@@ -0,0 +1,43 @@
+class "BasicFile"
+
+
+
+function BasicFile:__getvar(name)
+	if name == "file" then
+		local retVal = Polycore.BasicFile_get_file(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["FILE"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function BasicFile:__setvar(name,value)
+	return false
+end
+
+
+function BasicFile:read(ptr, size, count)
+	local retVal = Polycore.BasicFile_read(self.__ptr, ptr.__ptr, size.__ptr, count.__ptr)
+	return retVal
+end
+
+function BasicFile:write(ptr, size, count)
+	local retVal = Polycore.BasicFile_write(self.__ptr, ptr.__ptr, size.__ptr, count.__ptr)
+	return retVal
+end
+
+function BasicFile:seek(offset, origin)
+	local retVal = Polycore.BasicFile_seek(self.__ptr, offset, origin)
+	return retVal
+end
+
+function BasicFile:tell()
+	local retVal =  Polycore.BasicFile_tell(self.__ptr)
+	return retVal
+end
+
+function BasicFile:__delete()
+	if self then Polycore.delete_BasicFile(self.__ptr) end
+end

+ 45 - 0
bindings/lua/Polycode/BasicFileProvider.lua

@@ -0,0 +1,45 @@
+class "BasicFileProvider"
+
+
+
+
+
+
+
+function BasicFileProvider:BasicFileProvider(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.BasicFileProvider(unpack(arg))
+	end
+end
+
+function BasicFileProvider:openFile(fileName, opts)
+	local retVal = Polycore.BasicFileProvider_openFile(self.__ptr, fileName, opts)
+	if retVal == nil then return nil end
+	local __c = _G["Polycode::CoreFile"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function BasicFileProvider:closeFile(file)
+	local retVal = Polycore.BasicFileProvider_closeFile(self.__ptr, file.__ptr)
+end
+
+function BasicFileProvider:addSource(source)
+	local retVal = Polycore.BasicFileProvider_addSource(self.__ptr, source)
+end
+
+function BasicFileProvider:removeSource(source)
+	local retVal = Polycore.BasicFileProvider_removeSource(self.__ptr, source)
+end
+
+function BasicFileProvider:__delete()
+	if self then Polycore.delete_BasicFileProvider(self.__ptr) end
+end

+ 122 - 0
bindings/lua/Polycode/BezierCurve.lua

@@ -0,0 +1,122 @@
+class "BezierCurve"
+
+
+
+function BezierCurve:__getvar(name)
+	if name == "insertPoint" then
+		local retVal = Polycore.BezierCurve_get_insertPoint(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierPoint"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "evaluationAccuracy" then
+		return Polycore.BezierCurve_get_evaluationAccuracy(self.__ptr)
+	end
+end
+
+
+function BezierCurve:__setvar(name,value)
+	if name == "evaluationAccuracy" then
+		Polycore.BezierCurve_set_evaluationAccuracy(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function BezierCurve:BezierCurve(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.BezierCurve(unpack(arg))
+	end
+end
+
+function BezierCurve:getControlPoint(index)
+	local retVal = Polycore.BezierCurve_getControlPoint(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["BezierPoint"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function BezierCurve:getNumControlPoints()
+	local retVal =  Polycore.BezierCurve_getNumControlPoints(self.__ptr)
+	return retVal
+end
+
+function BezierCurve:addControlPoint(p1x, p1y, p1z, p2x, p2y, p2z, p3x, p3y, p3z)
+	local retVal = Polycore.BezierCurve_addControlPoint(self.__ptr, p1x, p1y, p1z, p2x, p2y, p2z, p3x, p3y, p3z)
+end
+
+function BezierCurve:addControlPoint3dWithHandles(p1x, p1y, p1z, p2x, p2y, p2z, p3x, p3y, p3z)
+	local retVal = Polycore.BezierCurve_addControlPoint3dWithHandles(self.__ptr, p1x, p1y, p1z, p2x, p2y, p2z, p3x, p3y, p3z)
+end
+
+function BezierCurve:addControlPoint3d(x, y, z)
+	local retVal = Polycore.BezierCurve_addControlPoint3d(self.__ptr, x, y, z)
+end
+
+function BezierCurve:addControlPoint2dWithHandles(p1x, p1y, p2x, p2y, p3x, p3y)
+	local retVal = Polycore.BezierCurve_addControlPoint2dWithHandles(self.__ptr, p1x, p1y, p2x, p2y, p3x, p3y)
+end
+
+function BezierCurve:addControlPoint2d(x, y)
+	local retVal = Polycore.BezierCurve_addControlPoint2d(self.__ptr, x, y)
+end
+
+function BezierCurve:getPointAt(a)
+	local retVal = Polycore.BezierCurve_getPointAt(self.__ptr, a)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function BezierCurve:getPointBetween(a, bp1, bp2)
+	local retVal = Polycore.BezierCurve_getPointBetween(self.__ptr, a, bp1.__ptr, bp2.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function BezierCurve:clearControlPoints()
+	local retVal =  Polycore.BezierCurve_clearControlPoints(self.__ptr)
+end
+
+function BezierCurve:getYValueAtX(x)
+	local retVal = Polycore.BezierCurve_getYValueAtX(self.__ptr, x)
+	return retVal
+end
+
+function BezierCurve:getTValueAtX(x)
+	local retVal = Polycore.BezierCurve_getTValueAtX(self.__ptr, x)
+	return retVal
+end
+
+function BezierCurve:removePoint(point)
+	local retVal = Polycore.BezierCurve_removePoint(self.__ptr, point.__ptr)
+end
+
+function BezierCurve:setHeightCacheResolution(resolution)
+	local retVal = Polycore.BezierCurve_setHeightCacheResolution(self.__ptr, resolution)
+end
+
+function BezierCurve:rebuildHeightCache()
+	local retVal =  Polycore.BezierCurve_rebuildHeightCache(self.__ptr)
+end
+
+function BezierCurve:recalculateDistances()
+	local retVal =  Polycore.BezierCurve_recalculateDistances(self.__ptr)
+end
+
+function BezierCurve:__delete()
+	if self then Polycore.delete_BezierCurve(self.__ptr) end
+end

+ 59 - 0
bindings/lua/Polycode/BezierPoint.lua

@@ -0,0 +1,59 @@
+class "BezierPoint"
+
+
+
+function BezierPoint:__getvar(name)
+	if name == "p1" then
+		local retVal = Polycore.BezierPoint_get_p1(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "p2" then
+		local retVal = Polycore.BezierPoint_get_p2(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "p3" then
+		local retVal = Polycore.BezierPoint_get_p3(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function BezierPoint:__setvar(name,value)
+	if name == "p1" then
+		Polycore.BezierPoint_set_p1(self.__ptr, value.__ptr)
+		return true
+	elseif name == "p2" then
+		Polycore.BezierPoint_set_p2(self.__ptr, value.__ptr)
+		return true
+	elseif name == "p3" then
+		Polycore.BezierPoint_set_p3(self.__ptr, value.__ptr)
+		return true
+	end
+	return false
+end
+
+
+function BezierPoint:BezierPoint(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.BezierPoint(unpack(arg))
+	end
+end
+
+function BezierPoint:__delete()
+	if self then Polycore.delete_BezierPoint(self.__ptr) end
+end

+ 37 - 0
bindings/lua/Polycode/BinaryObjectReader.lua

@@ -0,0 +1,37 @@
+class "BinaryObjectReader"
+
+
+
+function BinaryObjectReader:__getvar(name)
+	if name == "success" then
+		return Polycore.BinaryObjectReader_get_success(self.__ptr)
+	end
+end
+
+
+function BinaryObjectReader:__setvar(name,value)
+	if name == "success" then
+		Polycore.BinaryObjectReader_set_success(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function BinaryObjectReader:BinaryObjectReader(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.BinaryObjectReader(unpack(arg))
+	end
+end
+
+function BinaryObjectReader:__delete()
+	if self then Polycore.delete_BinaryObjectReader(self.__ptr) end
+end

+ 48 - 0
bindings/lua/Polycode/BinaryObjectWriter.lua

@@ -0,0 +1,48 @@
+class "BinaryObjectWriter"
+
+
+
+
+
+
+
+function BinaryObjectWriter:BinaryObjectWriter(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.BinaryObjectWriter(unpack(arg))
+	end
+end
+
+function BinaryObjectWriter:parseKeysFromObjectEntry(entry)
+	local retVal = Polycore.BinaryObjectWriter_parseKeysFromObjectEntry(self.__ptr, entry.__ptr)
+end
+
+function BinaryObjectWriter:writeEntryToFile(entry)
+	local retVal = Polycore.BinaryObjectWriter_writeEntryToFile(self.__ptr, entry.__ptr)
+end
+
+function BinaryObjectWriter:addKey(key)
+	local retVal = Polycore.BinaryObjectWriter_addKey(self.__ptr, key)
+	return retVal
+end
+
+function BinaryObjectWriter:getKeyIndex(key)
+	local retVal = Polycore.BinaryObjectWriter_getKeyIndex(self.__ptr, key)
+	return retVal
+end
+
+function BinaryObjectWriter:writeToFile(fileName)
+	local retVal = Polycore.BinaryObjectWriter_writeToFile(self.__ptr, fileName)
+	return retVal
+end
+
+function BinaryObjectWriter:__delete()
+	if self then Polycore.delete_BinaryObjectWriter(self.__ptr) end
+end

+ 238 - 0
bindings/lua/Polycode/Bone.lua

@@ -0,0 +1,238 @@
+require "Polycode/Entity"
+
+class "Bone" (Entity)
+
+
+
+function Bone:__getvar(name)
+	if name == "parentBoneId" then
+		return Polycore.Bone_get_parentBoneId(self.__ptr)
+	elseif name == "boneMatrix" then
+		local retVal = Polycore.Bone_get_boneMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Matrix4"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "restMatrix" then
+		local retVal = Polycore.Bone_get_restMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Matrix4"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "baseMatrix" then
+		local retVal = Polycore.Bone_get_baseMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Matrix4"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "finalMatrix" then
+		local retVal = Polycore.Bone_get_finalMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Matrix4"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "baseRotation" then
+		local retVal = Polycore.Bone_get_baseRotation(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Quaternion"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "baseScale" then
+		local retVal = Polycore.Bone_get_baseScale(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "basePosition" then
+		local retVal = Polycore.Bone_get_basePosition(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "disableAnimation" then
+		return Polycore.Bone_get_disableAnimation(self.__ptr)
+	end
+	if Entity["__getvar"] ~= nil then
+		return Entity.__getvar(self, name)
+	end
+end
+
+
+function Bone:__setvar(name,value)
+	if name == "parentBoneId" then
+		Polycore.Bone_set_parentBoneId(self.__ptr, value)
+		return true
+	elseif name == "boneMatrix" then
+		Polycore.Bone_set_boneMatrix(self.__ptr, value.__ptr)
+		return true
+	elseif name == "restMatrix" then
+		Polycore.Bone_set_restMatrix(self.__ptr, value.__ptr)
+		return true
+	elseif name == "baseMatrix" then
+		Polycore.Bone_set_baseMatrix(self.__ptr, value.__ptr)
+		return true
+	elseif name == "finalMatrix" then
+		Polycore.Bone_set_finalMatrix(self.__ptr, value.__ptr)
+		return true
+	elseif name == "baseRotation" then
+		Polycore.Bone_set_baseRotation(self.__ptr, value.__ptr)
+		return true
+	elseif name == "baseScale" then
+		Polycore.Bone_set_baseScale(self.__ptr, value.__ptr)
+		return true
+	elseif name == "basePosition" then
+		Polycore.Bone_set_basePosition(self.__ptr, value.__ptr)
+		return true
+	elseif name == "disableAnimation" then
+		Polycore.Bone_set_disableAnimation(self.__ptr, value)
+		return true
+	end
+	if Entity["__setvar"] ~= nil then
+		return Entity.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function Bone:Bone(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Entity" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Bone(unpack(arg))
+	end
+end
+
+function Bone:getName()
+	local retVal =  Polycore.Bone_getName(self.__ptr)
+	return retVal
+end
+
+function Bone:setParentBone(bone)
+	local retVal = Polycore.Bone_setParentBone(self.__ptr, bone.__ptr)
+end
+
+function Bone:addChildBone(bone)
+	local retVal = Polycore.Bone_addChildBone(self.__ptr, bone.__ptr)
+end
+
+function Bone:getParentBone()
+	local retVal =  Polycore.Bone_getParentBone(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Bone"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:getNumChildBones()
+	local retVal =  Polycore.Bone_getNumChildBones(self.__ptr)
+	return retVal
+end
+
+function Bone:getChildBone(index)
+	local retVal = Polycore.Bone_getChildBone(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["Bone"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:getBoneMatrix()
+	local retVal =  Polycore.Bone_getBoneMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:setBoneMatrix(matrix)
+	local retVal = Polycore.Bone_setBoneMatrix(self.__ptr, matrix.__ptr)
+end
+
+function Bone:getRestMatrix()
+	local retVal =  Polycore.Bone_getRestMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:getFullRestMatrix()
+	local retVal =  Polycore.Bone_getFullRestMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:getParentRestMatrix()
+	local retVal =  Polycore.Bone_getParentRestMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:getFinalMatrix()
+	local retVal =  Polycore.Bone_getFinalMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:setRestMatrix(matrix)
+	local retVal = Polycore.Bone_setRestMatrix(self.__ptr, matrix.__ptr)
+end
+
+function Bone:setBaseMatrix(matrix)
+	local retVal = Polycore.Bone_setBaseMatrix(self.__ptr, matrix.__ptr)
+end
+
+function Bone:getBaseMatrix()
+	local retVal =  Polycore.Bone_getBaseMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:getFullBaseMatrix()
+	local retVal =  Polycore.Bone_getFullBaseMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:rebuildFinalMatrix()
+	local retVal =  Polycore.Bone_rebuildFinalMatrix(self.__ptr)
+end
+
+function Bone:buildFinalMatrix()
+	local retVal =  Polycore.Bone_buildFinalMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Bone:intializeBone(basePosition, baseScale, baseRotation, restPosition, restScale, restRotation)
+	local retVal = Polycore.Bone_intializeBone(self.__ptr, basePosition.__ptr, baseScale.__ptr, baseRotation.__ptr, restPosition.__ptr, restScale.__ptr, restRotation.__ptr)
+end
+
+function Bone:__delete()
+	if self then Polycore.delete_Bone(self.__ptr) end
+end

+ 150 - 0
bindings/lua/Polycode/BoneTrack.lua

@@ -0,0 +1,150 @@
+class "BoneTrack"
+
+
+
+function BoneTrack:__getvar(name)
+	if name == "scaleX" then
+		local retVal = Polycore.BoneTrack_get_scaleX(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "scaleY" then
+		local retVal = Polycore.BoneTrack_get_scaleY(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "scaleZ" then
+		local retVal = Polycore.BoneTrack_get_scaleZ(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "QuatW" then
+		local retVal = Polycore.BoneTrack_get_QuatW(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "QuatX" then
+		local retVal = Polycore.BoneTrack_get_QuatX(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "QuatY" then
+		local retVal = Polycore.BoneTrack_get_QuatY(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "QuatZ" then
+		local retVal = Polycore.BoneTrack_get_QuatZ(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "LocX" then
+		local retVal = Polycore.BoneTrack_get_LocX(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "LocY" then
+		local retVal = Polycore.BoneTrack_get_LocY(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "LocZ" then
+		local retVal = Polycore.BoneTrack_get_LocZ(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "position" then
+		local retVal = Polycore.BoneTrack_get_position(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "scale" then
+		local retVal = Polycore.BoneTrack_get_scale(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "boneQuat" then
+		local retVal = Polycore.BoneTrack_get_boneQuat(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Quaternion"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "quatCurve" then
+		local retVal = Polycore.BoneTrack_get_quatCurve(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["QuaternionCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "weight" then
+		return Polycore.BoneTrack_get_weight(self.__ptr)
+	end
+end
+
+
+function BoneTrack:__setvar(name,value)
+	if name == "position" then
+		Polycore.BoneTrack_set_position(self.__ptr, value.__ptr)
+		return true
+	elseif name == "scale" then
+		Polycore.BoneTrack_set_scale(self.__ptr, value.__ptr)
+		return true
+	elseif name == "boneQuat" then
+		Polycore.BoneTrack_set_boneQuat(self.__ptr, value.__ptr)
+		return true
+	elseif name == "weight" then
+		Polycore.BoneTrack_set_weight(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function BoneTrack:BoneTrack(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.BoneTrack(unpack(arg))
+	end
+end
+
+function BoneTrack:Play(once)
+	local retVal = Polycore.BoneTrack_Play(self.__ptr, once)
+end
+
+function BoneTrack:Stop()
+	local retVal =  Polycore.BoneTrack_Stop(self.__ptr)
+end
+
+function BoneTrack:Update(elapsed)
+	local retVal = Polycore.BoneTrack_Update(self.__ptr, elapsed)
+end
+
+function BoneTrack:Reset()
+	local retVal =  Polycore.BoneTrack_Reset(self.__ptr)
+end
+
+function BoneTrack:setSpeed(speed)
+	local retVal = Polycore.BoneTrack_setSpeed(self.__ptr, speed)
+end
+
+function BoneTrack:__delete()
+	if self then Polycore.delete_BoneTrack(self.__ptr) end
+end

+ 265 - 0
bindings/lua/Polycode/Camera.lua

@@ -0,0 +1,265 @@
+require "Polycode/Entity"
+
+class "Camera" (Entity)
+
+
+
+Camera.ORTHO_SIZE_MANUAL = 0
+Camera.ORTHO_SIZE_LOCK_HEIGHT = 1
+Camera.ORTHO_SIZE_LOCK_WIDTH = 2
+Camera.ORTHO_SIZE_VIEWPORT = 3
+Camera.PERSPECTIVE_FOV = 4
+Camera.PERSPECTIVE_FRUSTUM = 5
+Camera.MANUAL_MATRIX = 6
+function Camera:__getvar(name)
+	if name == "frustumCulling" then
+		return Polycore.Camera_get_frustumCulling(self.__ptr)
+	elseif name == "topLeftOrtho" then
+		return Polycore.Camera_get_topLeftOrtho(self.__ptr)
+	elseif name == "cameraShift" then
+		local retVal = Polycore.Camera_get_cameraShift(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector2"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+	if Entity["__getvar"] ~= nil then
+		return Entity.__getvar(self, name)
+	end
+end
+
+
+function Camera:__setvar(name,value)
+	if name == "frustumCulling" then
+		Polycore.Camera_set_frustumCulling(self.__ptr, value)
+		return true
+	elseif name == "topLeftOrtho" then
+		Polycore.Camera_set_topLeftOrtho(self.__ptr, value)
+		return true
+	elseif name == "cameraShift" then
+		Polycore.Camera_set_cameraShift(self.__ptr, value.__ptr)
+		return true
+	end
+	if Entity["__setvar"] ~= nil then
+		return Entity.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function Camera:Camera(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Entity" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Camera(unpack(arg))
+	end
+end
+
+function Camera:buildFrustumPlanes()
+	local retVal =  Polycore.Camera_buildFrustumPlanes(self.__ptr)
+end
+
+function Camera:isSphereInFrustum(pos, fRadius)
+	local retVal = Polycore.Camera_isSphereInFrustum(self.__ptr, pos.__ptr, fRadius)
+	return retVal
+end
+
+function Camera:isAABBInFrustum(aabb)
+	local retVal = Polycore.Camera_isAABBInFrustum(self.__ptr, aabb.__ptr)
+	return retVal
+end
+
+function Camera:setOrthoMode(mode)
+	local retVal = Polycore.Camera_setOrthoMode(self.__ptr, mode)
+end
+
+function Camera:setOrthoSize(orthoSizeX, orthoSizeY)
+	local retVal = Polycore.Camera_setOrthoSize(self.__ptr, orthoSizeX, orthoSizeY)
+end
+
+function Camera:setFrustumMode(left, right, bottom, top, front, back)
+	local retVal = Polycore.Camera_setFrustumMode(self.__ptr, left, right, bottom, top, front, back)
+end
+
+function Camera:getOrthoMode()
+	local retVal =  Polycore.Camera_getOrthoMode(self.__ptr)
+	return retVal
+end
+
+function Camera:getOrthoSizeX()
+	local retVal =  Polycore.Camera_getOrthoSizeX(self.__ptr)
+	return retVal
+end
+
+function Camera:getOrthoSizeY()
+	local retVal =  Polycore.Camera_getOrthoSizeY(self.__ptr)
+	return retVal
+end
+
+function Camera:setFOV(fov)
+	local retVal = Polycore.Camera_setFOV(self.__ptr, fov)
+end
+
+function Camera:getFOV()
+	local retVal =  Polycore.Camera_getFOV(self.__ptr)
+	return retVal
+end
+
+function Camera:setClippingPlanes(nearClipPlane, farClipPlane)
+	local retVal = Polycore.Camera_setClippingPlanes(self.__ptr, nearClipPlane, farClipPlane)
+end
+
+function Camera:getNearClippingPlane()
+	local retVal =  Polycore.Camera_getNearClippingPlane(self.__ptr)
+	return retVal
+end
+
+function Camera:getFarClippingPlane()
+	local retVal =  Polycore.Camera_getFarClippingPlane(self.__ptr)
+	return retVal
+end
+
+function Camera:setParentScene(parentScene)
+	local retVal = Polycore.Camera_setParentScene(self.__ptr, parentScene.__ptr)
+end
+
+function Camera:getParentScene()
+	local retVal =  Polycore.Camera_getParentScene(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Scene"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Camera:createProjectionMatrix()
+	local retVal =  Polycore.Camera_createProjectionMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Camera:hasFilterShader()
+	local retVal =  Polycore.Camera_hasFilterShader(self.__ptr)
+	return retVal
+end
+
+function Camera:drawFilter(targetBuffer)
+	local retVal = Polycore.Camera_drawFilter(self.__ptr, targetBuffer.__ptr)
+end
+
+function Camera:setPostFilter(material)
+	local retVal = Polycore.Camera_setPostFilter(self.__ptr, material.__ptr)
+end
+
+function Camera:setPostFilterByName(shaderName)
+	local retVal = Polycore.Camera_setPostFilterByName(self.__ptr, shaderName)
+end
+
+function Camera:removePostFilter()
+	local retVal =  Polycore.Camera_removePostFilter(self.__ptr)
+end
+
+function Camera:getScreenShaderMaterial()
+	local retVal =  Polycore.Camera_getScreenShaderMaterial(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Material"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Camera:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.Camera_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Camera:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.Camera_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function Camera:getProjectionMatrix()
+	local retVal =  Polycore.Camera_getProjectionMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Camera:setCustomProjectionMatrix(matrix)
+	local retVal = Polycore.Camera_setCustomProjectionMatrix(self.__ptr, matrix.__ptr)
+end
+
+function Camera:getViewport()
+	local retVal =  Polycore.Camera_getViewport(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Polycode::Rectangle"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Camera:setViewport(viewport)
+	local retVal = Polycore.Camera_setViewport(self.__ptr, viewport.__ptr)
+end
+
+function Camera:setOrthoSizeMode(orthoSizeMode)
+	local retVal = Polycore.Camera_setOrthoSizeMode(self.__ptr, orthoSizeMode)
+end
+
+function Camera:getOrthoSizeMode()
+	local retVal =  Polycore.Camera_getOrthoSizeMode(self.__ptr)
+	return retVal
+end
+
+function Camera:setProjectionMode(mode)
+	local retVal = Polycore.Camera_setProjectionMode(self.__ptr, mode)
+end
+
+function Camera:getProjectionMode()
+	local retVal =  Polycore.Camera_getProjectionMode(self.__ptr)
+	return retVal
+end
+
+function Camera:projectRayFrom2DCoordinate(coordinate, viewport)
+	local retVal = Polycore.Camera_projectRayFrom2DCoordinate(self.__ptr, coordinate.__ptr, viewport.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Camera:renderFullScreenQuad(drawBuffer, shaderPass)
+	local retVal = Polycore.Camera_renderFullScreenQuad(self.__ptr, drawBuffer.__ptr, shaderPass)
+end
+
+function Camera:getShaderPass(index)
+	local retVal = Polycore.Camera_getShaderPass(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["ShaderPass"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Camera:getNumShaderPasses()
+	local retVal =  Polycore.Camera_getNumShaderPasses(self.__ptr)
+	return retVal
+end
+
+function Camera:__delete()
+	if self then Polycore.delete_Camera(self.__ptr) end
+end

+ 144 - 0
bindings/lua/Polycode/Color.lua

@@ -0,0 +1,144 @@
+class "Color"
+
+
+
+Color.BLEND_NORMAL = 0
+Color.BLEND_REPLACE_COLOR = 1
+Color.BLEND_ADDITIVE = 2
+function Color:__getvar(name)
+	if name == "r" then
+		return Polycore.Color_get_r(self.__ptr)
+	elseif name == "g" then
+		return Polycore.Color_get_g(self.__ptr)
+	elseif name == "b" then
+		return Polycore.Color_get_b(self.__ptr)
+	elseif name == "a" then
+		return Polycore.Color_get_a(self.__ptr)
+	end
+end
+
+
+function Color:__setvar(name,value)
+	if name == "r" then
+		Polycore.Color_set_r(self.__ptr, value)
+		return true
+	elseif name == "g" then
+		Polycore.Color_set_g(self.__ptr, value)
+		return true
+	elseif name == "b" then
+		Polycore.Color_set_b(self.__ptr, value)
+		return true
+	elseif name == "a" then
+		Polycore.Color_set_a(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function Color:Color(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Color(unpack(arg))
+	end
+end
+
+function Color.ColorWithInts(r, g, b, a)
+	local retVal = Polycore.Color_ColorWithInts(r, g, b, a)
+	if retVal == nil then return nil end
+	local __c = _G["Color"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Color.ColorWithHex(hex)
+	local retVal = Polycore.Color_ColorWithHex(hex)
+	if retVal == nil then return nil end
+	local __c = _G["Color"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Color:setColorHex(hex)
+	local retVal = Polycore.Color_setColorHex(self.__ptr, hex)
+end
+
+function Color:setColorHexRGB(hex)
+	local retVal = Polycore.Color_setColorHexRGB(self.__ptr, hex)
+end
+
+function Color:setColorHexFromString(hex)
+	local retVal = Polycore.Color_setColorHexFromString(self.__ptr, hex)
+end
+
+function Color:setColorHexRGBFromString(hex)
+	local retVal = Polycore.Color_setColorHexRGBFromString(self.__ptr, hex)
+end
+
+function Color:setColorHSV(h, s, v)
+	local retVal = Polycore.Color_setColorHSV(self.__ptr, h, s, v)
+end
+
+function Color:setColorRGBA(r, g, b, a)
+	local retVal = Polycore.Color_setColorRGBA(self.__ptr, r, g, b, a)
+end
+
+function Color:setColorRGB(r, g, b)
+	local retVal = Polycore.Color_setColorRGB(self.__ptr, r, g, b)
+end
+
+function Color:setColor(r, g, b, a)
+	local retVal = Polycore.Color_setColor(self.__ptr, r, g, b, a)
+end
+
+function Color:blendColor(c2, mode, amount, c3)
+	local retVal = Polycore.Color_blendColor(self.__ptr, c2.__ptr, mode, amount, c3.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Color"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Color:Random()
+	local retVal =  Polycore.Color_Random(self.__ptr)
+end
+
+function Color:getBrightness()
+	local retVal =  Polycore.Color_getBrightness(self.__ptr)
+	return retVal
+end
+
+function Color.RGBtoHSV(r, g, b, h, s, v)
+	local retVal = Polycore.Color_RGBtoHSV(r, g, b, h, s, v)
+end
+
+function Color:getHue()
+	local retVal =  Polycore.Color_getHue(self.__ptr)
+	return retVal
+end
+
+function Color:getSaturation()
+	local retVal =  Polycore.Color_getSaturation(self.__ptr)
+	return retVal
+end
+
+function Color:getValue()
+	local retVal =  Polycore.Color_getValue(self.__ptr)
+	return retVal
+end
+
+function Color:getUint()
+	local retVal =  Polycore.Color_getUint(self.__ptr)
+	return retVal
+end
+
+function Color:__delete()
+	if self then Polycore.delete_Color(self.__ptr) end
+end

+ 51 - 0
bindings/lua/Polycode/ColorRange.lua

@@ -0,0 +1,51 @@
+class "ColorRange"
+
+
+
+function ColorRange:__getvar(name)
+	if name == "color" then
+		local retVal = Polycore.ColorRange_get_color(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "rangeStart" then
+		return Polycore.ColorRange_get_rangeStart(self.__ptr)
+	elseif name == "rangeEnd" then
+		return Polycore.ColorRange_get_rangeEnd(self.__ptr)
+	end
+end
+
+
+function ColorRange:__setvar(name,value)
+	if name == "color" then
+		Polycore.ColorRange_set_color(self.__ptr, value.__ptr)
+		return true
+	elseif name == "rangeStart" then
+		Polycore.ColorRange_set_rangeStart(self.__ptr, value)
+		return true
+	elseif name == "rangeEnd" then
+		Polycore.ColorRange_set_rangeEnd(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function ColorRange:ColorRange(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ColorRange(unpack(arg))
+	end
+end
+
+function ColorRange:__delete()
+	if self then Polycore.delete_ColorRange(self.__ptr) end
+end

+ 71 - 0
bindings/lua/Polycode/Config.lua

@@ -0,0 +1,71 @@
+class "Config"
+
+
+
+
+
+
+
+function Config:Config(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Config(unpack(arg))
+	end
+end
+
+function Config:loadConfig(configNamespace, fileName)
+	local retVal = Polycore.Config_loadConfig(self.__ptr, configNamespace, fileName)
+end
+
+function Config:saveConfig(configNamespace, fileName)
+	local retVal = Polycore.Config_saveConfig(self.__ptr, configNamespace, fileName)
+end
+
+function Config:getEntry(configNamespace, key)
+	local retVal = Polycore.Config_getEntry(self.__ptr, configNamespace, key)
+	if retVal == nil then return nil end
+	local __c = _G["ConfigEntry"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Config:setStringValue(configNamespace, key, value)
+	local retVal = Polycore.Config_setStringValue(self.__ptr, configNamespace, key, value)
+end
+
+function Config:setNumericValue(configNamespace, key, value)
+	local retVal = Polycore.Config_setNumericValue(self.__ptr, configNamespace, key, value)
+end
+
+function Config:getNumericValue(configNamespace, key)
+	local retVal = Polycore.Config_getNumericValue(self.__ptr, configNamespace, key)
+	return retVal
+end
+
+function Config:getStringValue(configNamespace, key)
+	local retVal = Polycore.Config_getStringValue(self.__ptr, configNamespace, key)
+	if retVal == nil then return nil end
+	local __c = _G["String"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Config:setBoolValue(configNamespace, key, value)
+	local retVal = Polycore.Config_setBoolValue(self.__ptr, configNamespace, key, value)
+end
+
+function Config:getBoolValue(configNamespace, key)
+	local retVal = Polycore.Config_getBoolValue(self.__ptr, configNamespace, key)
+	return retVal
+end
+
+function Config:__delete()
+	if self then Polycore.delete_Config(self.__ptr) end
+end

+ 43 - 0
bindings/lua/Polycode/ConfigEntry.lua

@@ -0,0 +1,43 @@
+class "ConfigEntry"
+
+
+
+function ConfigEntry:__getvar(name)
+	if name == "key" then
+		return Polycore.ConfigEntry_get_key(self.__ptr)
+	elseif name == "configNamespace" then
+		return Polycore.ConfigEntry_get_configNamespace(self.__ptr)
+	elseif name == "numVal" then
+		return Polycore.ConfigEntry_get_numVal(self.__ptr)
+	elseif name == "stringVal" then
+		return Polycore.ConfigEntry_get_stringVal(self.__ptr)
+	elseif name == "isString" then
+		return Polycore.ConfigEntry_get_isString(self.__ptr)
+	end
+end
+
+
+function ConfigEntry:__setvar(name,value)
+	if name == "key" then
+		Polycore.ConfigEntry_set_key(self.__ptr, value)
+		return true
+	elseif name == "configNamespace" then
+		Polycore.ConfigEntry_set_configNamespace(self.__ptr, value)
+		return true
+	elseif name == "numVal" then
+		Polycore.ConfigEntry_set_numVal(self.__ptr, value)
+		return true
+	elseif name == "stringVal" then
+		Polycore.ConfigEntry_set_stringVal(self.__ptr, value)
+		return true
+	elseif name == "isString" then
+		Polycore.ConfigEntry_set_isString(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function ConfigEntry:__delete()
+	if self then Polycore.delete_ConfigEntry(self.__ptr) end
+end

+ 399 - 0
bindings/lua/Polycode/Core.lua

@@ -0,0 +1,399 @@
+require "Polycode/EventDispatcher"
+
+class "Core" (EventDispatcher)
+
+
+
+Core.EVENTBASE_CORE = 0x200
+Core.EVENT_CORE_RESIZE = Core.EVENTBASE_CORE + 0
+Core.EVENT_LOST_FOCUS = Core.EVENTBASE_CORE + 1
+Core.EVENT_GAINED_FOCUS = Core.EVENTBASE_CORE + 2
+Core.EVENT_UNDO = Core.EVENTBASE_CORE + 3
+Core.EVENT_REDO = Core.EVENTBASE_CORE + 4
+Core.EVENT_COPY = Core.EVENTBASE_CORE + 5
+Core.EVENT_CUT = Core.EVENTBASE_CORE + 6
+Core.EVENT_SELECT_ALL = Core.EVENTBASE_CORE + 7
+Core.EVENT_PASTE = Core.EVENTBASE_CORE + 8
+Core.EVENT_GYRO_ROTATION = Core.EVENTBASE_CORE + 9
+Core.EVENT_ACCELEROMETER_MOTION = Core.EVENTBASE_CORE + 10
+Core.CURSOR_ARROW = 0
+Core.CURSOR_TEXT = 1
+Core.CURSOR_POINTER = 2
+Core.CURSOR_CROSSHAIR = 3
+Core.CURSOR_RESIZE_LEFT_RIGHT = 4
+Core.CURSOR_RESIZE_UP_DOWN = 5
+Core.CURSOR_OPEN_HAND = 6
+function Core:__getvar(name)
+	if name == "eventMutex" then
+		local retVal = Polycore.Core_get_eventMutex(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["CoreMutex"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "paused" then
+		return Polycore.Core_get_paused(self.__ptr)
+	elseif name == "pauseOnLoseFocus" then
+		return Polycore.Core_get_pauseOnLoseFocus(self.__ptr)
+	elseif name == "defaultScreenWidth" then
+		return Polycore.Core_get_defaultScreenWidth(self.__ptr)
+	elseif name == "defaultScreenHeight" then
+		return Polycore.Core_get_defaultScreenHeight(self.__ptr)
+	elseif name == "deviceAttitude" then
+		local retVal = Polycore.Core_get_deviceAttitude(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Quaternion"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+	if EventDispatcher["__getvar"] ~= nil then
+		return EventDispatcher.__getvar(self, name)
+	end
+end
+
+
+function Core:__setvar(name,value)
+	if name == "paused" then
+		Polycore.Core_set_paused(self.__ptr, value)
+		return true
+	elseif name == "pauseOnLoseFocus" then
+		Polycore.Core_set_pauseOnLoseFocus(self.__ptr, value)
+		return true
+	elseif name == "defaultScreenWidth" then
+		Polycore.Core_set_defaultScreenWidth(self.__ptr, value)
+		return true
+	elseif name == "defaultScreenHeight" then
+		Polycore.Core_set_defaultScreenHeight(self.__ptr, value)
+		return true
+	elseif name == "deviceAttitude" then
+		Polycore.Core_set_deviceAttitude(self.__ptr, value.__ptr)
+		return true
+	end
+	if EventDispatcher["__setvar"] ~= nil then
+		return EventDispatcher.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function Core:Update()
+	local retVal =  Polycore.Core_Update(self.__ptr)
+	return retVal
+end
+
+function Core:Render()
+	local retVal =  Polycore.Core_Render(self.__ptr)
+end
+
+function Core:fixedUpdate()
+	local retVal =  Polycore.Core_fixedUpdate(self.__ptr)
+	return retVal
+end
+
+function Core:systemUpdate()
+	local retVal =  Polycore.Core_systemUpdate(self.__ptr)
+	return retVal
+end
+
+function Core:updateAndRender()
+	local retVal =  Polycore.Core_updateAndRender(self.__ptr)
+	return retVal
+end
+
+function Core:enableMouse(newval)
+	local retVal = Polycore.Core_enableMouse(self.__ptr, newval)
+end
+
+function Core:captureMouse(newval)
+	local retVal = Polycore.Core_captureMouse(self.__ptr, newval)
+end
+
+function Core:setCursor(cursorType)
+	local retVal = Polycore.Core_setCursor(self.__ptr, cursorType)
+end
+
+function Core:warpCursor(x, y)
+	local retVal = Polycore.Core_warpCursor(self.__ptr, x, y)
+end
+
+function Core:createThread(target)
+	local retVal = Polycore.Core_createThread(self.__ptr, target.__ptr)
+end
+
+function Core:lockMutex(mutex)
+	local retVal = Polycore.Core_lockMutex(self.__ptr, mutex.__ptr)
+end
+
+function Core:unlockMutex(mutex)
+	local retVal = Polycore.Core_unlockMutex(self.__ptr, mutex.__ptr)
+end
+
+function Core:createMutex()
+	local retVal =  Polycore.Core_createMutex(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["CoreMutex"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Core:copyStringToClipboard(str)
+	local retVal = Polycore.Core_copyStringToClipboard(self.__ptr, str)
+end
+
+function Core:getClipboardString()
+	local retVal =  Polycore.Core_getClipboardString(self.__ptr)
+	return retVal
+end
+
+function Core:getServices()
+	local retVal =  Polycore.Core_getServices(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["CoreServices"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Core:getFPS()
+	local retVal =  Polycore.Core_getFPS(self.__ptr)
+	return retVal
+end
+
+function Core:Shutdown()
+	local retVal =  Polycore.Core_Shutdown(self.__ptr)
+end
+
+function Core:isFullscreen()
+	local retVal =  Polycore.Core_isFullscreen(self.__ptr)
+	return retVal
+end
+
+function Core:getAALevel()
+	local retVal =  Polycore.Core_getAALevel(self.__ptr)
+	return retVal
+end
+
+function Core:getInput()
+	local retVal =  Polycore.Core_getInput(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["CoreInput"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Core:getXRes()
+	local retVal =  Polycore.Core_getXRes(self.__ptr)
+	return retVal
+end
+
+function Core:getYRes()
+	local retVal =  Polycore.Core_getYRes(self.__ptr)
+	return retVal
+end
+
+function Core:getBackingXRes()
+	local retVal =  Polycore.Core_getBackingXRes(self.__ptr)
+	return retVal
+end
+
+function Core:getBackingYRes()
+	local retVal =  Polycore.Core_getBackingYRes(self.__ptr)
+	return retVal
+end
+
+function Core.getScreenInfo(width, height, hz)
+	local retVal = Polycore.Core_getScreenInfo(width.__ptr, height.__ptr, hz.__ptr)
+end
+
+function Core:getScreenWidth()
+	local retVal =  Polycore.Core_getScreenWidth(self.__ptr)
+	return retVal
+end
+
+function Core:getScreenHeight()
+	local retVal =  Polycore.Core_getScreenHeight(self.__ptr)
+	return retVal
+end
+
+function Core:createFolder(folderPath)
+	local retVal = Polycore.Core_createFolder(self.__ptr, folderPath)
+end
+
+function Core:copyDiskItem(itemPath, destItemPath)
+	local retVal = Polycore.Core_copyDiskItem(self.__ptr, itemPath, destItemPath)
+end
+
+function Core:moveDiskItem(itemPath, destItemPath)
+	local retVal = Polycore.Core_moveDiskItem(self.__ptr, itemPath, destItemPath)
+end
+
+function Core:removeDiskItem(itemPath)
+	local retVal = Polycore.Core_removeDiskItem(self.__ptr, itemPath)
+end
+
+function Core:openFolderPicker()
+	local retVal =  Polycore.Core_openFolderPicker(self.__ptr)
+	return retVal
+end
+
+function Core:setFramerate(frameRate, maxFixedCycles)
+	local retVal = Polycore.Core_setFramerate(self.__ptr, frameRate, maxFixedCycles)
+end
+
+function Core:openFilePicker(extensions, allowMultiple)
+	local retVal = Polycore.Core_openFilePicker(self.__ptr, extensions.__ptr, allowMultiple)
+	if retVal == nil then return nil end
+	local __c = _G["std::vector<String>"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Core:saveFilePicker(extensions)
+	local retVal = Polycore.Core_saveFilePicker(self.__ptr, extensions.__ptr)
+	return retVal
+end
+
+function Core:handleVideoModeChange(modeInfo)
+	local retVal = Polycore.Core_handleVideoModeChange(self.__ptr, modeInfo.__ptr)
+end
+
+function Core:flushRenderContext()
+	local retVal =  Polycore.Core_flushRenderContext(self.__ptr)
+end
+
+function Core:prepareRenderContext()
+	local retVal =  Polycore.Core_prepareRenderContext(self.__ptr)
+end
+
+function Core:openFile(fileName, opts)
+	local retVal = Polycore.Core_openFile(self.__ptr, fileName, opts)
+	if retVal == nil then return nil end
+	local __c = _G["CoreFile"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Core:closeFile(file)
+	local retVal = Polycore.Core_closeFile(self.__ptr, file.__ptr)
+end
+
+function Core:addFileSource(type, source)
+	local retVal = Polycore.Core_addFileSource(self.__ptr, type, source)
+end
+
+function Core:removeFileSource(type, source)
+	local retVal = Polycore.Core_removeFileSource(self.__ptr, type, source)
+end
+
+function Core:parseFolder(pathString, showHidden)
+	local retVal = Polycore.Core_parseFolder(self.__ptr, pathString, showHidden)
+	if retVal == nil then return nil end
+	local __c = _G["std::vector<OSFileEntry>"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Core:systemParseFolder(pathString, showHidden, targetVector)
+	local retVal = Polycore.Core_systemParseFolder(self.__ptr, pathString, showHidden, targetVector.__ptr)
+	return retVal
+end
+
+function Core:getResourcePathForFile(fileName)
+	local retVal = Polycore.Core_getResourcePathForFile(self.__ptr, fileName)
+	return retVal
+end
+
+function Core:setVideoMode(xRes, yRes, fullScreen, vSync, aaLevel, anisotropyLevel, retinaSupport)
+	local retVal = Polycore.Core_setVideoMode(self.__ptr, xRes, yRes, fullScreen, vSync, aaLevel, anisotropyLevel, retinaSupport)
+end
+
+function Core:resizeTo(xRes, yRes)
+	local retVal = Polycore.Core_resizeTo(self.__ptr, xRes, yRes)
+end
+
+function Core:doSleep()
+	local retVal =  Polycore.Core_doSleep(self.__ptr)
+end
+
+function Core:openURL(url)
+	local retVal = Polycore.Core_openURL(self.__ptr, url)
+end
+
+function Core:getElapsed()
+	local retVal =  Polycore.Core_getElapsed(self.__ptr)
+	return retVal
+end
+
+function Core:getTicks()
+	local retVal =  Polycore.Core_getTicks(self.__ptr)
+	return retVal
+end
+
+function Core:getRefreshIntervalMs()
+	local retVal =  Polycore.Core_getRefreshIntervalMs(self.__ptr)
+	return retVal
+end
+
+function Core:getTimeSleptMs()
+	local retVal =  Polycore.Core_getTimeSleptMs(self.__ptr)
+	return retVal
+end
+
+function Core:getFixedTimestep()
+	local retVal =  Polycore.Core_getFixedTimestep(self.__ptr)
+	return retVal
+end
+
+function Core:getTicksFloat()
+	local retVal =  Polycore.Core_getTicksFloat(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["double"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Core:setUserPointer(ptr)
+	local retVal = Polycore.Core_setUserPointer(self.__ptr, ptr.__ptr)
+end
+
+function Core:getUserPointer()
+	local retVal =  Polycore.Core_getUserPointer(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["void"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Core:executeExternalCommand(command, args, inDirectory)
+	local retVal = Polycore.Core_executeExternalCommand(self.__ptr, command, args, inDirectory)
+	return retVal
+end
+
+function Core:getDefaultWorkingDirectory()
+	local retVal =  Polycore.Core_getDefaultWorkingDirectory(self.__ptr)
+	return retVal
+end
+
+function Core:getUserHomeDirectory()
+	local retVal =  Polycore.Core_getUserHomeDirectory(self.__ptr)
+	return retVal
+end
+
+function Core:makeApplicationMain()
+	local retVal =  Polycore.Core_makeApplicationMain(self.__ptr)
+end
+
+function Core:getEventMutex()
+	local retVal =  Polycore.Core_getEventMutex(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["CoreMutex"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Core:removeThread(thread)
+	local retVal = Polycore.Core_removeThread(self.__ptr, thread.__ptr)
+end
+
+function Core:__delete()
+	if self then Polycore.delete_Core(self.__ptr) end
+end

+ 42 - 0
bindings/lua/Polycode/CoreFileExtension.lua

@@ -0,0 +1,42 @@
+class "CoreFileExtension"
+
+
+
+function CoreFileExtension:__getvar(name)
+	if name == "extension" then
+		return Polycore.CoreFileExtension_get_extension(self.__ptr)
+	elseif name == "description" then
+		return Polycore.CoreFileExtension_get_description(self.__ptr)
+	end
+end
+
+
+function CoreFileExtension:__setvar(name,value)
+	if name == "extension" then
+		Polycore.CoreFileExtension_set_extension(self.__ptr, value)
+		return true
+	elseif name == "description" then
+		Polycore.CoreFileExtension_set_description(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function CoreFileExtension:CoreFileExtension(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.CoreFileExtension(unpack(arg))
+	end
+end
+
+function CoreFileExtension:__delete()
+	if self then Polycore.delete_CoreFileExtension(self.__ptr) end
+end

+ 218 - 0
bindings/lua/Polycode/CoreInput.lua

@@ -0,0 +1,218 @@
+require "Polycode/EventDispatcher"
+
+class "CoreInput" (EventDispatcher)
+
+
+
+CoreInput.MOUSE_BUTTON1 = 0
+CoreInput.MOUSE_BUTTON2 = 1
+CoreInput.MOUSE_BUTTON3 = 2
+function CoreInput:__getvar(name)
+	if name == "simulateTouchWithMouse" then
+		return Polycore.CoreInput_get_simulateTouchWithMouse(self.__ptr)
+	elseif name == "simulateTouchAsPen" then
+		return Polycore.CoreInput_get_simulateTouchAsPen(self.__ptr)
+	elseif name == "simulateMouseWithTouch" then
+		return Polycore.CoreInput_get_simulateMouseWithTouch(self.__ptr)
+	elseif name == "ignoreOffScreenTouch" then
+		return Polycore.CoreInput_get_ignoreOffScreenTouch(self.__ptr)
+	elseif name == "keyRepeat" then
+		return Polycore.CoreInput_get_keyRepeat(self.__ptr)
+	elseif name == "mousePosition" then
+		local retVal = Polycore.CoreInput_get_mousePosition(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector2"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "deltaMousePosition" then
+		local retVal = Polycore.CoreInput_get_deltaMousePosition(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector2"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+	if EventDispatcher["__getvar"] ~= nil then
+		return EventDispatcher.__getvar(self, name)
+	end
+end
+
+
+function CoreInput:__setvar(name,value)
+	if name == "simulateTouchWithMouse" then
+		Polycore.CoreInput_set_simulateTouchWithMouse(self.__ptr, value)
+		return true
+	elseif name == "simulateTouchAsPen" then
+		Polycore.CoreInput_set_simulateTouchAsPen(self.__ptr, value)
+		return true
+	elseif name == "simulateMouseWithTouch" then
+		Polycore.CoreInput_set_simulateMouseWithTouch(self.__ptr, value)
+		return true
+	elseif name == "ignoreOffScreenTouch" then
+		Polycore.CoreInput_set_ignoreOffScreenTouch(self.__ptr, value)
+		return true
+	elseif name == "keyRepeat" then
+		Polycore.CoreInput_set_keyRepeat(self.__ptr, value)
+		return true
+	elseif name == "mousePosition" then
+		Polycore.CoreInput_set_mousePosition(self.__ptr, value.__ptr)
+		return true
+	elseif name == "deltaMousePosition" then
+		Polycore.CoreInput_set_deltaMousePosition(self.__ptr, value.__ptr)
+		return true
+	end
+	if EventDispatcher["__setvar"] ~= nil then
+		return EventDispatcher.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function CoreInput:CoreInput(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "EventDispatcher" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.CoreInput(unpack(arg))
+	end
+end
+
+function CoreInput:getMousePosition()
+	local retVal =  Polycore.CoreInput_getMousePosition(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector2"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreInput:getKeyState(keyCode)
+	local retVal = Polycore.CoreInput_getKeyState(self.__ptr, keyCode)
+	return retVal
+end
+
+function CoreInput:getJoystickButtonState(joystickIndex, button)
+	local retVal = Polycore.CoreInput_getJoystickButtonState(self.__ptr, joystickIndex, button)
+	return retVal
+end
+
+function CoreInput:getJoystickAxisValue(joystickIndex, axis)
+	local retVal = Polycore.CoreInput_getJoystickAxisValue(self.__ptr, joystickIndex, axis)
+	return retVal
+end
+
+function CoreInput:getMouseDelta()
+	local retVal =  Polycore.CoreInput_getMouseDelta(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector2"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreInput:getMouseButtonState(mouseButton)
+	local retVal = Polycore.CoreInput_getMouseButtonState(self.__ptr, mouseButton)
+	return retVal
+end
+
+function CoreInput:getNumJoysticks()
+	local retVal =  Polycore.CoreInput_getNumJoysticks(self.__ptr)
+	return retVal
+end
+
+function CoreInput:getJoystickInfoByIndex(index)
+	local retVal = Polycore.CoreInput_getJoystickInfoByIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["JoystickInfo"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreInput:getJoystickInfoByID(deviceID)
+	local retVal = Polycore.CoreInput_getJoystickInfoByID(self.__ptr, deviceID)
+	if retVal == nil then return nil end
+	local __c = _G["JoystickInfo"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreInput:addJoystick(deviceID)
+	local retVal = Polycore.CoreInput_addJoystick(self.__ptr, deviceID)
+end
+
+function CoreInput:removeJoystick(deviceID)
+	local retVal = Polycore.CoreInput_removeJoystick(self.__ptr, deviceID)
+end
+
+function CoreInput:joystickAxisMoved(axisID, value, deviceID)
+	local retVal = Polycore.CoreInput_joystickAxisMoved(self.__ptr, axisID, value, deviceID)
+end
+
+function CoreInput:joystickButtonDown(buttonID, deviceID)
+	local retVal = Polycore.CoreInput_joystickButtonDown(self.__ptr, buttonID, deviceID)
+end
+
+function CoreInput:joystickButtonUp(buttonID, deviceID)
+	local retVal = Polycore.CoreInput_joystickButtonUp(self.__ptr, buttonID, deviceID)
+end
+
+function CoreInput:mouseWheelUp(ticks)
+	local retVal = Polycore.CoreInput_mouseWheelUp(self.__ptr, ticks)
+end
+
+function CoreInput:mouseWheelDown(ticks)
+	local retVal = Polycore.CoreInput_mouseWheelDown(self.__ptr, ticks)
+end
+
+function CoreInput:setMouseButtonState(mouseButton, state, ticks)
+	local retVal = Polycore.CoreInput_setMouseButtonState(self.__ptr, mouseButton, state, ticks)
+end
+
+function CoreInput:setMousePosition(x, y, ticks)
+	local retVal = Polycore.CoreInput_setMousePosition(self.__ptr, x, y, ticks)
+end
+
+function CoreInput:setKeyState(keyCode, code, newState, ticks)
+	local retVal = Polycore.CoreInput_setKeyState(self.__ptr, keyCode, code.__ptr, newState, ticks)
+end
+
+function CoreInput:setDeltaPosition(x, y)
+	local retVal = Polycore.CoreInput_setDeltaPosition(self.__ptr, x, y)
+end
+
+function CoreInput:touchesBegan(touch, touches, ticks)
+	local retVal = Polycore.CoreInput_touchesBegan(self.__ptr, touch.__ptr, touches.__ptr, ticks)
+end
+
+function CoreInput:touchesMoved(touch, touches, ticks)
+	local retVal = Polycore.CoreInput_touchesMoved(self.__ptr, touch.__ptr, touches.__ptr, ticks)
+end
+
+function CoreInput:touchesEnded(touch, touches, ticks)
+	local retVal = Polycore.CoreInput_touchesEnded(self.__ptr, touch.__ptr, touches.__ptr, ticks)
+end
+
+function CoreInput.createEvent(event)
+	local retVal = Polycore.CoreInput_createEvent(event.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["InputEvent"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreInput:clearInput()
+	local retVal =  Polycore.CoreInput_clearInput(self.__ptr)
+end
+
+function CoreInput:__delete()
+	if self then Polycore.delete_CoreInput(self.__ptr) end
+end

+ 36 - 0
bindings/lua/Polycode/CoreMotionEvent.lua

@@ -0,0 +1,36 @@
+require "Polycode/Event"
+
+class "CoreMotionEvent" (Event)
+
+
+
+function CoreMotionEvent:__getvar(name)
+	if name == "amount" then
+		local retVal = Polycore.CoreMotionEvent_get_amount(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+	if Event["__getvar"] ~= nil then
+		return Event.__getvar(self, name)
+	end
+end
+
+
+function CoreMotionEvent:__setvar(name,value)
+	if name == "amount" then
+		Polycore.CoreMotionEvent_set_amount(self.__ptr, value.__ptr)
+		return true
+	end
+	if Event["__setvar"] ~= nil then
+		return Event.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function CoreMotionEvent:__delete()
+	if self then Polycore.delete_CoreMotionEvent(self.__ptr) end
+end

+ 31 - 0
bindings/lua/Polycode/CoreMutex.lua

@@ -0,0 +1,31 @@
+class "CoreMutex"
+
+
+
+function CoreMutex:__getvar(name)
+	if name == "mutexID" then
+		return Polycore.CoreMutex_get_mutexID(self.__ptr)
+	end
+end
+
+
+function CoreMutex:__setvar(name,value)
+	if name == "mutexID" then
+		Polycore.CoreMutex_set_mutexID(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function CoreMutex:lock()
+	local retVal =  Polycore.CoreMutex_lock(self.__ptr)
+end
+
+function CoreMutex:unlock()
+	local retVal =  Polycore.CoreMutex_unlock(self.__ptr)
+end
+
+function CoreMutex:__delete()
+	if self then Polycore.delete_CoreMutex(self.__ptr) end
+end

+ 145 - 0
bindings/lua/Polycode/CoreServices.lua

@@ -0,0 +1,145 @@
+require "Polycode/EventDispatcher"
+
+class "CoreServices" (EventDispatcher)
+
+
+
+
+
+
+
+function CoreServices.getInstance()
+	local retVal =  Polycore.CoreServices_getInstance()
+	if retVal == nil then return nil end
+	local __c = _G["CoreServices"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices.setInstance(_instance)
+	local retVal = Polycore.CoreServices_setInstance(_instance.__ptr)
+end
+
+function CoreServices.getRenderMutex()
+	local retVal =  Polycore.CoreServices_getRenderMutex()
+	if retVal == nil then return nil end
+	local __c = _G["CoreMutex"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices.createInstance()
+	local retVal =  Polycore.CoreServices_createInstance()
+end
+
+function CoreServices:setRenderer(r_enderer)
+	local retVal = Polycore.CoreServices_setRenderer(self.__ptr, r_enderer.__ptr)
+end
+
+function CoreServices:getRenderer()
+	local retVal =  Polycore.CoreServices_getRenderer(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Renderer"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:Update(elapsed)
+	local retVal = Polycore.CoreServices_Update(self.__ptr, elapsed)
+end
+
+function CoreServices:fixedUpdate()
+	local retVal =  Polycore.CoreServices_fixedUpdate(self.__ptr)
+end
+
+function CoreServices:Render(viewport)
+	local retVal = Polycore.CoreServices_Render(self.__ptr, viewport.__ptr)
+end
+
+function CoreServices:setCore(core)
+	local retVal = Polycore.CoreServices_setCore(self.__ptr, core.__ptr)
+end
+
+function CoreServices:getCore()
+	local retVal =  Polycore.CoreServices_getCore(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Core"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:getInput()
+	local retVal =  Polycore.CoreServices_getInput(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["CoreInput"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:getMaterialManager()
+	local retVal =  Polycore.CoreServices_getMaterialManager(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["MaterialManager"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:getSceneManager()
+	local retVal =  Polycore.CoreServices_getSceneManager(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SceneManager"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:getTimerManager()
+	local retVal =  Polycore.CoreServices_getTimerManager(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["TimerManager"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:getTweenManager()
+	local retVal =  Polycore.CoreServices_getTweenManager(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["TweenManager"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:getResourceManager()
+	local retVal =  Polycore.CoreServices_getResourceManager(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["ResourceManager"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:getSoundManager()
+	local retVal =  Polycore.CoreServices_getSoundManager(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SoundManager"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:getLogger()
+	local retVal =  Polycore.CoreServices_getLogger(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Logger"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:getConfig()
+	local retVal =  Polycore.CoreServices_getConfig(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Config"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function CoreServices:__delete()
+	if self then Polycore.delete_CoreServices(self.__ptr) end
+end

+ 55 - 0
bindings/lua/Polycode/Cubemap.lua

@@ -0,0 +1,55 @@
+require "Polycode/Resource"
+
+class "Cubemap" (Resource)
+
+
+
+Cubemap.CUBEMAP_XPOS = 0
+Cubemap.CUBEMAP_XNEG = 1
+Cubemap.CUBEMAP_YPOS = 2
+Cubemap.CUBEMAP_YNEG = 3
+Cubemap.CUBEMAP_ZPOS = 4
+Cubemap.CUBEMAP_ZNEG = 5
+
+
+
+
+function Cubemap:Cubemap(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Resource" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Cubemap(unpack(arg))
+	end
+end
+
+function Cubemap:getTexture(index)
+	local retVal = Polycore.Cubemap_getTexture(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["Texture"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Cubemap:setTexture(texture, index)
+	local retVal = Polycore.Cubemap_setTexture(self.__ptr, texture.__ptr, index)
+end
+
+function Cubemap:recreateFromTextures()
+	local retVal =  Polycore.Cubemap_recreateFromTextures(self.__ptr)
+end
+
+function Cubemap:__delete()
+	if self then Polycore.delete_Cubemap(self.__ptr) end
+end

+ 52 - 0
bindings/lua/Polycode/Data.lua

@@ -0,0 +1,52 @@
+class "Data"
+
+
+
+
+
+
+
+function Data:Data(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Data(unpack(arg))
+	end
+end
+
+function Data:loadFromFile(fileName)
+	local retVal = Polycore.Data_loadFromFile(self.__ptr, fileName)
+	return retVal
+end
+
+function Data:getAsString(encoding)
+	local retVal = Polycore.Data_getAsString(self.__ptr, encoding)
+	return retVal
+end
+
+function Data:setFromString(str, encoding)
+	local retVal = Polycore.Data_setFromString(self.__ptr, str, encoding)
+end
+
+function Data:saveToFile(fileName)
+	local retVal = Polycore.Data_saveToFile(self.__ptr, fileName)
+	return retVal
+end
+
+function Data:getData()
+	local retVal =  Polycore.Data_getData(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["char"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Data:__delete()
+	if self then Polycore.delete_Data(self.__ptr) end
+end

+ 128 - 0
bindings/lua/Polycode/DummyCore.lua

@@ -0,0 +1,128 @@
+require "Polycode/Core"
+
+class "DummyCore" (Core)
+
+
+
+
+
+
+
+function DummyCore:DummyCore(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Core" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.DummyCore(unpack(arg))
+	end
+end
+
+function DummyCore:Render()
+	local retVal =  Polycore.DummyCore_Render(self.__ptr)
+end
+
+function DummyCore:systemUpdate()
+	local retVal =  Polycore.DummyCore_systemUpdate(self.__ptr)
+	return retVal
+end
+
+function DummyCore:setCursor(cursorType)
+	local retVal = Polycore.DummyCore_setCursor(self.__ptr, cursorType)
+end
+
+function DummyCore:createThread(target)
+	local retVal = Polycore.DummyCore_createThread(self.__ptr, target.__ptr)
+end
+
+function DummyCore:createMutex()
+	local retVal =  Polycore.DummyCore_createMutex(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["CoreMutex"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function DummyCore:copyStringToClipboard(str)
+	local retVal = Polycore.DummyCore_copyStringToClipboard(self.__ptr, str)
+end
+
+function DummyCore:getClipboardString()
+	local retVal =  Polycore.DummyCore_getClipboardString(self.__ptr)
+	return retVal
+end
+
+function DummyCore:createFolder(folderPath)
+	local retVal = Polycore.DummyCore_createFolder(self.__ptr, folderPath)
+end
+
+function DummyCore:copyDiskItem(itemPath, destItemPath)
+	local retVal = Polycore.DummyCore_copyDiskItem(self.__ptr, itemPath, destItemPath)
+end
+
+function DummyCore:moveDiskItem(itemPath, destItemPath)
+	local retVal = Polycore.DummyCore_moveDiskItem(self.__ptr, itemPath, destItemPath)
+end
+
+function DummyCore:removeDiskItem(itemPath)
+	local retVal = Polycore.DummyCore_removeDiskItem(self.__ptr, itemPath)
+end
+
+function DummyCore:openFolderPicker()
+	local retVal =  Polycore.DummyCore_openFolderPicker(self.__ptr)
+	return retVal
+end
+
+function DummyCore:openFilePicker(extensions, allowMultiple)
+	local retVal = Polycore.DummyCore_openFilePicker(self.__ptr, extensions.__ptr, allowMultiple)
+	if retVal == nil then return nil end
+	local __c = _G["std::vector<String>"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function DummyCore:saveFilePicker(extensions)
+	local retVal = Polycore.DummyCore_saveFilePicker(self.__ptr, extensions.__ptr)
+	return retVal
+end
+
+function DummyCore:handleVideoModeChange(modeInfo)
+	local retVal = Polycore.DummyCore_handleVideoModeChange(self.__ptr, modeInfo.__ptr)
+end
+
+function DummyCore:flushRenderContext()
+	local retVal =  Polycore.DummyCore_flushRenderContext(self.__ptr)
+end
+
+function DummyCore:openURL(url)
+	local retVal = Polycore.DummyCore_openURL(self.__ptr, url)
+end
+
+function DummyCore:getTicks()
+	local retVal =  Polycore.DummyCore_getTicks(self.__ptr)
+	return retVal
+end
+
+function DummyCore:executeExternalCommand(command, args, inDirectory)
+	local retVal = Polycore.DummyCore_executeExternalCommand(self.__ptr, command, args, inDirectory)
+	return retVal
+end
+
+function DummyCore:systemParseFolder(pathString, showHidden, targetVector)
+	local retVal = Polycore.DummyCore_systemParseFolder(self.__ptr, pathString, showHidden, targetVector.__ptr)
+	return retVal
+end
+
+function DummyCore:__delete()
+	if self then Polycore.delete_DummyCore(self.__ptr) end
+end

+ 805 - 0
bindings/lua/Polycode/Entity.lua

@@ -0,0 +1,805 @@
+require "Polycode/EventDispatcher"
+
+class "Entity" (EventDispatcher)
+
+
+
+function Entity:__getvar(name)
+	if name == "ownsChildren" then
+		return Polycore.Entity_get_ownsChildren(self.__ptr)
+	elseif name == "billboardMode" then
+		return Polycore.Entity_get_billboardMode(self.__ptr)
+	elseif name == "color" then
+		local retVal = Polycore.Entity_get_color(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "enabled" then
+		return Polycore.Entity_get_enabled(self.__ptr)
+	elseif name == "visible" then
+		return Polycore.Entity_get_visible(self.__ptr)
+	elseif name == "depthWrite" then
+		return Polycore.Entity_get_depthWrite(self.__ptr)
+	elseif name == "depthTest" then
+		return Polycore.Entity_get_depthTest(self.__ptr)
+	elseif name == "colorAffectsChildren" then
+		return Polycore.Entity_get_colorAffectsChildren(self.__ptr)
+	elseif name == "visibilityAffectsChildren" then
+		return Polycore.Entity_get_visibilityAffectsChildren(self.__ptr)
+	elseif name == "ignoreParentMatrix" then
+		return Polycore.Entity_get_ignoreParentMatrix(self.__ptr)
+	elseif name == "enableScissor" then
+		return Polycore.Entity_get_enableScissor(self.__ptr)
+	elseif name == "scissorBox" then
+		local retVal = Polycore.Entity_get_scissorBox(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Rectangle"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "editorOnly" then
+		return Polycore.Entity_get_editorOnly(self.__ptr)
+	elseif name == "id" then
+		return Polycore.Entity_get_id(self.__ptr)
+	elseif name == "collisionShapeType" then
+		local retVal = Polycore.Entity_get_collisionShapeType(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["char"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "processInputEvents" then
+		return Polycore.Entity_get_processInputEvents(self.__ptr)
+	elseif name == "blockMouseInput" then
+		return Polycore.Entity_get_blockMouseInput(self.__ptr)
+	elseif name == "snapToPixels" then
+		return Polycore.Entity_get_snapToPixels(self.__ptr)
+	elseif name == "mouseOver" then
+		return Polycore.Entity_get_mouseOver(self.__ptr)
+	elseif name == "rendererVis" then
+		return Polycore.Entity_get_rendererVis(self.__ptr)
+	elseif name == "layerID" then
+		local retVal = Polycore.Entity_get_layerID(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["char"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+	if EventDispatcher["__getvar"] ~= nil then
+		return EventDispatcher.__getvar(self, name)
+	end
+end
+
+
+function Entity:__setvar(name,value)
+	if name == "ownsChildren" then
+		Polycore.Entity_set_ownsChildren(self.__ptr, value)
+		return true
+	elseif name == "billboardMode" then
+		Polycore.Entity_set_billboardMode(self.__ptr, value)
+		return true
+	elseif name == "color" then
+		Polycore.Entity_set_color(self.__ptr, value.__ptr)
+		return true
+	elseif name == "enabled" then
+		Polycore.Entity_set_enabled(self.__ptr, value)
+		return true
+	elseif name == "visible" then
+		Polycore.Entity_set_visible(self.__ptr, value)
+		return true
+	elseif name == "depthWrite" then
+		Polycore.Entity_set_depthWrite(self.__ptr, value)
+		return true
+	elseif name == "depthTest" then
+		Polycore.Entity_set_depthTest(self.__ptr, value)
+		return true
+	elseif name == "colorAffectsChildren" then
+		Polycore.Entity_set_colorAffectsChildren(self.__ptr, value)
+		return true
+	elseif name == "visibilityAffectsChildren" then
+		Polycore.Entity_set_visibilityAffectsChildren(self.__ptr, value)
+		return true
+	elseif name == "ignoreParentMatrix" then
+		Polycore.Entity_set_ignoreParentMatrix(self.__ptr, value)
+		return true
+	elseif name == "enableScissor" then
+		Polycore.Entity_set_enableScissor(self.__ptr, value)
+		return true
+	elseif name == "scissorBox" then
+		Polycore.Entity_set_scissorBox(self.__ptr, value.__ptr)
+		return true
+	elseif name == "editorOnly" then
+		Polycore.Entity_set_editorOnly(self.__ptr, value)
+		return true
+	elseif name == "id" then
+		Polycore.Entity_set_id(self.__ptr, value)
+		return true
+	elseif name == "collisionShapeType" then
+		Polycore.Entity_set_collisionShapeType(self.__ptr, value.__ptr)
+		return true
+	elseif name == "processInputEvents" then
+		Polycore.Entity_set_processInputEvents(self.__ptr, value)
+		return true
+	elseif name == "blockMouseInput" then
+		Polycore.Entity_set_blockMouseInput(self.__ptr, value)
+		return true
+	elseif name == "snapToPixels" then
+		Polycore.Entity_set_snapToPixels(self.__ptr, value)
+		return true
+	elseif name == "mouseOver" then
+		Polycore.Entity_set_mouseOver(self.__ptr, value)
+		return true
+	elseif name == "rendererVis" then
+		Polycore.Entity_set_rendererVis(self.__ptr, value)
+		return true
+	elseif name == "layerID" then
+		Polycore.Entity_set_layerID(self.__ptr, value.__ptr)
+		return true
+	end
+	if EventDispatcher["__setvar"] ~= nil then
+		return EventDispatcher.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function Entity:Entity(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "EventDispatcher" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Entity(unpack(arg))
+	end
+end
+
+function Entity:initEntity()
+	local retVal =  Polycore.Entity_initEntity(self.__ptr)
+end
+
+function Entity:Render(buffer)
+	local retVal = Polycore.Entity_Render(self.__ptr, buffer.__ptr)
+end
+
+function Entity:Update()
+	local retVal =  Polycore.Entity_Update(self.__ptr)
+end
+
+function Entity:fixedUpdate()
+	local retVal =  Polycore.Entity_fixedUpdate(self.__ptr)
+end
+
+function Entity:transformAndRender(drawBuffer, parentScissorBox)
+	local retVal = Polycore.Entity_transformAndRender(self.__ptr, drawBuffer.__ptr, parentScissorBox.__ptr)
+end
+
+function Entity:renderChildren(buffer, parentScissorBox)
+	local retVal = Polycore.Entity_renderChildren(self.__ptr, buffer.__ptr, parentScissorBox.__ptr)
+end
+
+function Entity:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.Entity_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.Entity_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function Entity:dirtyMatrix(val)
+	local retVal = Polycore.Entity_dirtyMatrix(self.__ptr, val)
+end
+
+function Entity:rebuildTransformMatrix()
+	local retVal =  Polycore.Entity_rebuildTransformMatrix(self.__ptr)
+end
+
+function Entity:updateEntityMatrix()
+	local retVal =  Polycore.Entity_updateEntityMatrix(self.__ptr)
+end
+
+function Entity:getTransformMatrix()
+	local retVal =  Polycore.Entity_getTransformMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getConcatenatedMatrix()
+	local retVal =  Polycore.Entity_getConcatenatedMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getConcatenatedMatrixRelativeTo(relativeEntity)
+	local retVal = Polycore.Entity_getConcatenatedMatrixRelativeTo(self.__ptr, relativeEntity.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getAnchorAdjustedMatrix()
+	local retVal =  Polycore.Entity_getAnchorAdjustedMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getConcatenatedRollMatrix()
+	local retVal =  Polycore.Entity_getConcatenatedRollMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:setTransformByMatrixPure(matrix)
+	local retVal = Polycore.Entity_setTransformByMatrixPure(self.__ptr, matrix.__ptr)
+end
+
+function Entity:getLookAtMatrix(loc, upVector)
+	local retVal = Polycore.Entity_getLookAtMatrix(self.__ptr, loc.__ptr, upVector.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:addChild(newChild)
+	local retVal = Polycore.Entity_addChild(self.__ptr, newChild.__ptr)
+end
+
+function Entity:removeChild(entityToRemove)
+	local retVal = Polycore.Entity_removeChild(self.__ptr, entityToRemove.__ptr)
+end
+
+function Entity:moveChildUp(child)
+	local retVal = Polycore.Entity_moveChildUp(self.__ptr, child.__ptr)
+end
+
+function Entity:moveChildDown(child)
+	local retVal = Polycore.Entity_moveChildDown(self.__ptr, child.__ptr)
+end
+
+function Entity:moveChildTop(child)
+	local retVal = Polycore.Entity_moveChildTop(self.__ptr, child.__ptr)
+end
+
+function Entity:moveChildBottom(child)
+	local retVal = Polycore.Entity_moveChildBottom(self.__ptr, child.__ptr)
+end
+
+function Entity:setParentEntity(entity)
+	local retVal = Polycore.Entity_setParentEntity(self.__ptr, entity.__ptr)
+end
+
+function Entity:getParentEntity()
+	local retVal =  Polycore.Entity_getParentEntity(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getNumChildren()
+	local retVal =  Polycore.Entity_getNumChildren(self.__ptr)
+	return retVal
+end
+
+function Entity:getChildAtIndex(index)
+	local retVal = Polycore.Entity_getChildAtIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:setOwnsChildrenRecursive(val)
+	local retVal = Polycore.Entity_setOwnsChildrenRecursive(self.__ptr, val)
+end
+
+function Entity:getPosition()
+	local retVal =  Polycore.Entity_getPosition(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getPosition2D()
+	local retVal =  Polycore.Entity_getPosition2D(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector2"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getCombinedPosition()
+	local retVal =  Polycore.Entity_getCombinedPosition(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:setPosition(x, y, z)
+	local retVal = Polycore.Entity_setPosition(self.__ptr, x, y, z)
+end
+
+function Entity:setPositionX(x)
+	local retVal = Polycore.Entity_setPositionX(self.__ptr, x)
+end
+
+function Entity:setPositionY(y)
+	local retVal = Polycore.Entity_setPositionY(self.__ptr, y)
+end
+
+function Entity:Translate(x, y, z)
+	local retVal = Polycore.Entity_Translate(self.__ptr, x, y, z)
+end
+
+function Entity:setPositionZ(z)
+	local retVal = Polycore.Entity_setPositionZ(self.__ptr, z)
+end
+
+function Entity:setScaleX(x)
+	local retVal = Polycore.Entity_setScaleX(self.__ptr, x)
+end
+
+function Entity:setScaleY(y)
+	local retVal = Polycore.Entity_setScaleY(self.__ptr, y)
+end
+
+function Entity:setScaleZ(z)
+	local retVal = Polycore.Entity_setScaleZ(self.__ptr, z)
+end
+
+function Entity:Scale(x, y, z)
+	local retVal = Polycore.Entity_Scale(self.__ptr, x, y, z)
+end
+
+function Entity:setScale(x, y, z)
+	local retVal = Polycore.Entity_setScale(self.__ptr, x, y, z)
+end
+
+function Entity:getCompoundScale()
+	local retVal =  Polycore.Entity_getCompoundScale(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getScale()
+	local retVal =  Polycore.Entity_getScale(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getRotationEuler()
+	local retVal =  Polycore.Entity_getRotationEuler(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getCombinedPitch()
+	local retVal =  Polycore.Entity_getCombinedPitch(self.__ptr)
+	return retVal
+end
+
+function Entity:getCombinedYaw()
+	local retVal =  Polycore.Entity_getCombinedYaw(self.__ptr)
+	return retVal
+end
+
+function Entity:getCombinedRoll()
+	local retVal =  Polycore.Entity_getCombinedRoll(self.__ptr)
+	return retVal
+end
+
+function Entity:rebuildRotation()
+	local retVal =  Polycore.Entity_rebuildRotation(self.__ptr)
+end
+
+function Entity:setRotationEuler(rotation)
+	local retVal = Polycore.Entity_setRotationEuler(self.__ptr, rotation.__ptr)
+end
+
+function Entity:setPitch(pitch)
+	local retVal = Polycore.Entity_setPitch(self.__ptr, pitch)
+end
+
+function Entity:setYaw(yaw)
+	local retVal = Polycore.Entity_setYaw(self.__ptr, yaw)
+end
+
+function Entity:setRoll(roll)
+	local retVal = Polycore.Entity_setRoll(self.__ptr, roll)
+end
+
+function Entity:Roll(roll)
+	local retVal = Polycore.Entity_Roll(self.__ptr, roll)
+end
+
+function Entity:Yaw(yaw)
+	local retVal = Polycore.Entity_Yaw(self.__ptr, yaw)
+end
+
+function Entity:Pitch(pitch)
+	local retVal = Polycore.Entity_Pitch(self.__ptr, pitch)
+end
+
+function Entity:getPitch()
+	local retVal =  Polycore.Entity_getPitch(self.__ptr)
+	return retVal
+end
+
+function Entity:getYaw()
+	local retVal =  Polycore.Entity_getYaw(self.__ptr)
+	return retVal
+end
+
+function Entity:getRoll()
+	local retVal =  Polycore.Entity_getRoll(self.__ptr)
+	return retVal
+end
+
+function Entity:getWidth()
+	local retVal =  Polycore.Entity_getWidth(self.__ptr)
+	return retVal
+end
+
+function Entity:getHeight()
+	local retVal =  Polycore.Entity_getHeight(self.__ptr)
+	return retVal
+end
+
+function Entity:getDepth()
+	local retVal =  Polycore.Entity_getDepth(self.__ptr)
+	return retVal
+end
+
+function Entity:setWidth(width)
+	local retVal = Polycore.Entity_setWidth(self.__ptr, width)
+end
+
+function Entity:setHeight(height)
+	local retVal = Polycore.Entity_setHeight(self.__ptr, height)
+end
+
+function Entity:setDepth(depth)
+	local retVal = Polycore.Entity_setDepth(self.__ptr, depth)
+end
+
+function Entity:setRotationQuat(w, x, y, z)
+	local retVal = Polycore.Entity_setRotationQuat(self.__ptr, w, x, y, z)
+end
+
+function Entity:setRotationByQuaternion(quaternion)
+	local retVal = Polycore.Entity_setRotationByQuaternion(self.__ptr, quaternion.__ptr)
+end
+
+function Entity:getRotationQuat()
+	local retVal =  Polycore.Entity_getRotationQuat(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Quaternion"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getConcatenatedQuat()
+	local retVal =  Polycore.Entity_getConcatenatedQuat(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Quaternion"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:lookAt(loc, upVector)
+	local retVal = Polycore.Entity_lookAt(self.__ptr, loc.__ptr, upVector.__ptr)
+end
+
+function Entity:lookAtEntity(entity, upVector)
+	local retVal = Polycore.Entity_lookAtEntity(self.__ptr, entity.__ptr, upVector.__ptr)
+end
+
+function Entity:getCombinedColor()
+	local retVal =  Polycore.Entity_getCombinedColor(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Color"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:setColor(r, g, b, a)
+	local retVal = Polycore.Entity_setColor(self.__ptr, r, g, b, a)
+end
+
+function Entity:setColorInt(r, g, b, a)
+	local retVal = Polycore.Entity_setColorInt(self.__ptr, r, g, b, a)
+end
+
+function Entity:setAnchorPoint(anchorPoint)
+	local retVal = Polycore.Entity_setAnchorPoint(self.__ptr, anchorPoint.__ptr)
+end
+
+function Entity:getAnchorPoint()
+	local retVal =  Polycore.Entity_getAnchorPoint(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:onMouseDown(ray, mouseButton, timestamp)
+	local retVal = Polycore.Entity_onMouseDown(self.__ptr, ray.__ptr, mouseButton, timestamp)
+	if retVal == nil then return nil end
+	local __c = _G["MouseEventResult"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:onMouseUp(ray, mouseButton, timestamp)
+	local retVal = Polycore.Entity_onMouseUp(self.__ptr, ray.__ptr, mouseButton, timestamp)
+	if retVal == nil then return nil end
+	local __c = _G["MouseEventResult"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:onMouseMove(ray, timestamp)
+	local retVal = Polycore.Entity_onMouseMove(self.__ptr, ray.__ptr, timestamp)
+	if retVal == nil then return nil end
+	local __c = _G["MouseEventResult"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:onMouseWheelUp(ray, timestamp)
+	local retVal = Polycore.Entity_onMouseWheelUp(self.__ptr, ray.__ptr, timestamp)
+	if retVal == nil then return nil end
+	local __c = _G["MouseEventResult"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:onMouseWheelDown(ray, timestamp)
+	local retVal = Polycore.Entity_onMouseWheelDown(self.__ptr, ray.__ptr, timestamp)
+	if retVal == nil then return nil end
+	local __c = _G["MouseEventResult"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:setDepthOnly(val)
+	local retVal = Polycore.Entity_setDepthOnly(self.__ptr, val)
+end
+
+function Entity:getDepthOnly()
+	local retVal =  Polycore.Entity_getDepthOnly(self.__ptr)
+	return retVal
+end
+
+function Entity:setUserData(userData)
+	local retVal = Polycore.Entity_setUserData(self.__ptr, userData.__ptr)
+end
+
+function Entity:getUserData()
+	local retVal =  Polycore.Entity_getUserData(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["void"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:setBlendingMode(newBl_endingMode)
+	local retVal = Polycore.Entity_setBlendingMode(self.__ptr, newBl_endingMode)
+end
+
+function Entity:getBlendingMode()
+	local retVal =  Polycore.Entity_getBlendingMode(self.__ptr)
+	return retVal
+end
+
+function Entity:getEntityById(id, recursive)
+	local retVal = Polycore.Entity_getEntityById(self.__ptr, id, recursive)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getEntitiesByTag(tag, recursive)
+	local retVal = Polycore.Entity_getEntitiesByTag(self.__ptr, tag, recursive)
+	if retVal == nil then return nil end
+	for i=1,count(retVal) do
+		local __c  = _G["Entity"]("__skip_ptr__")
+		__c.__ptr = retVal[i]
+		retVal[i] = __c
+	end
+	return retVal
+end
+
+function Entity:getEntitiesByLayerID(layerID, recursive)
+	local retVal = Polycore.Entity_getEntitiesByLayerID(self.__ptr, layerID.__ptr, recursive)
+	if retVal == nil then return nil end
+	for i=1,count(retVal) do
+		local __c  = _G["Entity"]("__skip_ptr__")
+		__c.__ptr = retVal[i]
+		retVal[i] = __c
+	end
+	return retVal
+end
+
+function Entity:getEntityProp(propName)
+	local retVal = Polycore.Entity_getEntityProp(self.__ptr, propName)
+	return retVal
+end
+
+function Entity:setEntityProp(propName, propValue)
+	local retVal = Polycore.Entity_setEntityProp(self.__ptr, propName, propValue)
+end
+
+function Entity:setInverseY(val)
+	local retVal = Polycore.Entity_setInverseY(self.__ptr, val)
+end
+
+function Entity:getInverseY()
+	local retVal =  Polycore.Entity_getInverseY(self.__ptr)
+	return retVal
+end
+
+function Entity:doUpdates()
+	local retVal =  Polycore.Entity_doUpdates(self.__ptr)
+end
+
+function Entity:doFixedUpdates()
+	local retVal =  Polycore.Entity_doFixedUpdates(self.__ptr)
+end
+
+function Entity:buildPositionMatrix()
+	local retVal =  Polycore.Entity_buildPositionMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:setRenderer(r_enderer)
+	local retVal = Polycore.Entity_setRenderer(self.__ptr, r_enderer.__ptr)
+end
+
+function Entity:customHitDetection(ray)
+	local retVal = Polycore.Entity_customHitDetection(self.__ptr, ray.__ptr)
+	return retVal
+end
+
+function Entity:getNumTags()
+	local retVal =  Polycore.Entity_getNumTags(self.__ptr)
+	return retVal
+end
+
+function Entity:getTagAtIndex(index)
+	local retVal = Polycore.Entity_getTagAtIndex(self.__ptr, index)
+	return retVal
+end
+
+function Entity:hasTag(tag)
+	local retVal = Polycore.Entity_hasTag(self.__ptr, tag)
+	return retVal
+end
+
+function Entity:clearTags()
+	local retVal =  Polycore.Entity_clearTags(self.__ptr)
+end
+
+function Entity:addTag(tag)
+	local retVal = Polycore.Entity_addTag(self.__ptr, tag)
+end
+
+function Entity:getScreenPosition(projectionMatrix, cameraMatrix, viewport)
+	local retVal = Polycore.Entity_getScreenPosition(self.__ptr, projectionMatrix.__ptr, cameraMatrix.__ptr, viewport.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector2"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:recalculateAABBAllChildren()
+	local retVal =  Polycore.Entity_recalculateAABBAllChildren(self.__ptr)
+end
+
+function Entity:recalculateAABB()
+	local retVal =  Polycore.Entity_recalculateAABB(self.__ptr)
+end
+
+function Entity:getWorldAABB()
+	local retVal =  Polycore.Entity_getWorldAABB(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["AABB"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:getLocalBoundingBox()
+	local retVal =  Polycore.Entity_getLocalBoundingBox(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:setLocalBoundingBox(box)
+	local retVal = Polycore.Entity_setLocalBoundingBox(self.__ptr, box.__ptr)
+end
+
+function Entity:setLocalBoundingBoxX(x)
+	local retVal = Polycore.Entity_setLocalBoundingBoxX(self.__ptr, x)
+end
+
+function Entity:setLocalBoundingBoxY(y)
+	local retVal = Polycore.Entity_setLocalBoundingBoxY(self.__ptr, y)
+end
+
+function Entity:setLocalBoundingBoxZ(z)
+	local retVal = Polycore.Entity_setLocalBoundingBoxZ(self.__ptr, z)
+end
+
+function Entity:setContainerScene(scene)
+	local retVal = Polycore.Entity_setContainerScene(self.__ptr, scene.__ptr)
+end
+
+function Entity:getContainerScene()
+	local retVal =  Polycore.Entity_getContainerScene(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Scene"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:attachScript(script)
+	local retVal = Polycore.Entity_attachScript(self.__ptr, script.__ptr)
+end
+
+function Entity:detachScript(script)
+	local retVal = Polycore.Entity_detachScript(self.__ptr, script.__ptr)
+end
+
+function Entity:getNumScripts()
+	local retVal =  Polycore.Entity_getNumScripts(self.__ptr)
+	return retVal
+end
+
+function Entity:getScriptAtIndex(index)
+	local retVal = Polycore.Entity_getScriptAtIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["ScriptInstance"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Entity:__delete()
+	if self then Polycore.delete_Entity(self.__ptr) end
+end

+ 28 - 0
bindings/lua/Polycode/EntityProp.lua

@@ -0,0 +1,28 @@
+class "EntityProp"
+
+
+
+function EntityProp:__getvar(name)
+	if name == "propName" then
+		return Polycore.EntityProp_get_propName(self.__ptr)
+	elseif name == "propValue" then
+		return Polycore.EntityProp_get_propValue(self.__ptr)
+	end
+end
+
+
+function EntityProp:__setvar(name,value)
+	if name == "propName" then
+		Polycore.EntityProp_set_propName(self.__ptr, value)
+		return true
+	elseif name == "propValue" then
+		Polycore.EntityProp_set_propValue(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function EntityProp:__delete()
+	if self then Polycore.delete_EntityProp(self.__ptr) end
+end

+ 86 - 0
bindings/lua/Polycode/Event.lua

@@ -0,0 +1,86 @@
+class "Event"
+
+
+
+Event.EVENTBASE_EVENT = 0x100
+Event.COMPLETE_EVENT = Event.EVENTBASE_EVENT + 0
+Event.CHANGE_EVENT = Event.EVENTBASE_EVENT + 1
+Event.CANCEL_EVENT = Event.EVENTBASE_EVENT + 2
+Event.NOTIFY_EVENT = Event.EVENTBASE_EVENT + 3
+Event.FIRE_EVENT = Event.EVENTBASE_EVENT + 4
+Event.RESOURCE_RELOAD_EVENT = Event.EVENTBASE_EVENT + 5
+Event.SELECT_EVENT = Event.EVENTBASE_EVENT + 6
+Event.REMOVE_EVENT = Event.EVENTBASE_EVENT + 7
+Event.RESOURCE_CHANGE_EVENT = Event.EVENTBASE_EVENT + 8
+Event.EVENTBASE_NONPOLYCODE = 0x10000
+function Event:__getvar(name)
+	if name == "deleteOnDispatch" then
+		return Polycore.Event_get_deleteOnDispatch(self.__ptr)
+	elseif name == "cancelEventFlag" then
+		return Polycore.Event_get_cancelEventFlag(self.__ptr)
+	end
+end
+
+
+function Event:__setvar(name,value)
+	if name == "deleteOnDispatch" then
+		Polycore.Event_set_deleteOnDispatch(self.__ptr, value)
+		return true
+	elseif name == "cancelEventFlag" then
+		Polycore.Event_set_cancelEventFlag(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function Event:Event(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Event(unpack(arg))
+	end
+end
+
+function Event:getEventCode()
+	local retVal =  Polycore.Event_getEventCode(self.__ptr)
+	return retVal
+end
+
+function Event:getDispatcher()
+	local retVal =  Polycore.Event_getDispatcher(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["EventDispatcher"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Event:setEventCode(eventCode)
+	local retVal = Polycore.Event_setEventCode(self.__ptr, eventCode)
+end
+
+function Event:setDispatcher(dispatcher)
+	local retVal = Polycore.Event_setDispatcher(self.__ptr, dispatcher.__ptr)
+end
+
+function Event:getEventType()
+	local retVal =  Polycore.Event_getEventType(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["String"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Event:cancelEvent()
+	local retVal =  Polycore.Event_cancelEvent(self.__ptr)
+end
+
+function Event:__delete()
+	if self then Polycore.delete_Event(self.__ptr) end
+end

+ 0 - 0
scripts/lua/API/Polycode/EventDispatcher.lua → bindings/lua/Polycode/EventDispatcher.lua


+ 25 - 0
bindings/lua/Polycode/EventHandler.lua

@@ -0,0 +1,25 @@
+class "EventHandler"
+
+
+
+
+
+
+
+function EventHandler:EventHandler(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.EventHandler(self)
+	end
+end
+
+function EventHandler:__delete()
+	if self then Polycore.delete_EventHandler(self.__ptr) end
+end

+ 79 - 0
bindings/lua/Polycode/Font.lua

@@ -0,0 +1,79 @@
+require "Polycode/Resource"
+
+class "Font" (Resource)
+
+
+
+function Font:__getvar(name)
+	if name == "loaded" then
+		return Polycore.Font_get_loaded(self.__ptr)
+	end
+	if Resource["__getvar"] ~= nil then
+		return Resource.__getvar(self, name)
+	end
+end
+
+
+function Font:__setvar(name,value)
+	if name == "loaded" then
+		Polycore.Font_set_loaded(self.__ptr, value)
+		return true
+	end
+	if Resource["__setvar"] ~= nil then
+		return Resource.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function Font:Font(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Resource" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Font(unpack(arg))
+	end
+end
+
+function Font:getFace()
+	local retVal =  Polycore.Font_getFace(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["FT_Face"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Font:isValid()
+	local retVal =  Polycore.Font_isValid(self.__ptr)
+	return retVal
+end
+
+function Font:setFontName(fontName)
+	local retVal = Polycore.Font_setFontName(self.__ptr, fontName)
+end
+
+function Font:getFontName()
+	local retVal =  Polycore.Font_getFontName(self.__ptr)
+	return retVal
+end
+
+function Font:getFontPath()
+	local retVal =  Polycore.Font_getFontPath(self.__ptr)
+	return retVal
+end
+
+function Font:__delete()
+	if self then Polycore.delete_Font(self.__ptr) end
+end

+ 33 - 0
bindings/lua/Polycode/FontResourceLoader.lua

@@ -0,0 +1,33 @@
+class "FontResourceLoader"
+
+
+
+
+
+
+
+function FontResourceLoader:FontResourceLoader(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.FontResourceLoader(unpack(arg))
+	end
+end
+
+function FontResourceLoader:loadResource(path, targetPool)
+	local retVal = Polycore.FontResourceLoader_loadResource(self.__ptr, path, targetPool.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Resource"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function FontResourceLoader:__delete()
+	if self then Polycore.delete_FontResourceLoader(self.__ptr) end
+end

+ 108 - 0
bindings/lua/Polycode/GPUDrawBuffer.lua

@@ -0,0 +1,108 @@
+class "GPUDrawBuffer"
+
+
+
+function GPUDrawBuffer:__getvar(name)
+	if name == "targetFramebuffer" then
+		local retVal = Polycore.GPUDrawBuffer_get_targetFramebuffer(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["RenderBuffer"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "projectionMatrix" then
+		local retVal = Polycore.GPUDrawBuffer_get_projectionMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Matrix4"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "viewMatrix" then
+		local retVal = Polycore.GPUDrawBuffer_get_viewMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Matrix4"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "cameraMatrix" then
+		local retVal = Polycore.GPUDrawBuffer_get_cameraMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Matrix4"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "clearColor" then
+		local retVal = Polycore.GPUDrawBuffer_get_clearColor(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "clearDepthBuffer" then
+		return Polycore.GPUDrawBuffer_get_clearDepthBuffer(self.__ptr)
+	elseif name == "clearColorBuffer" then
+		return Polycore.GPUDrawBuffer_get_clearColorBuffer(self.__ptr)
+	elseif name == "backingResolutionScale" then
+		local retVal = Polycore.GPUDrawBuffer_get_backingResolutionScale(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector2"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "globalMaterial" then
+		local retVal = Polycore.GPUDrawBuffer_get_globalMaterial(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Material"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "viewport" then
+		local retVal = Polycore.GPUDrawBuffer_get_viewport(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Rectangle"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function GPUDrawBuffer:__setvar(name,value)
+	if name == "projectionMatrix" then
+		Polycore.GPUDrawBuffer_set_projectionMatrix(self.__ptr, value.__ptr)
+		return true
+	elseif name == "viewMatrix" then
+		Polycore.GPUDrawBuffer_set_viewMatrix(self.__ptr, value.__ptr)
+		return true
+	elseif name == "cameraMatrix" then
+		Polycore.GPUDrawBuffer_set_cameraMatrix(self.__ptr, value.__ptr)
+		return true
+	elseif name == "clearColor" then
+		Polycore.GPUDrawBuffer_set_clearColor(self.__ptr, value.__ptr)
+		return true
+	elseif name == "clearDepthBuffer" then
+		Polycore.GPUDrawBuffer_set_clearDepthBuffer(self.__ptr, value)
+		return true
+	elseif name == "clearColorBuffer" then
+		Polycore.GPUDrawBuffer_set_clearColorBuffer(self.__ptr, value)
+		return true
+	elseif name == "backingResolutionScale" then
+		Polycore.GPUDrawBuffer_set_backingResolutionScale(self.__ptr, value.__ptr)
+		return true
+	elseif name == "viewport" then
+		Polycore.GPUDrawBuffer_set_viewport(self.__ptr, value.__ptr)
+		return true
+	end
+	return false
+end
+
+
+function GPUDrawBuffer:GPUDrawBuffer(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.GPUDrawBuffer(unpack(arg))
+	end
+end
+
+function GPUDrawBuffer:__delete()
+	if self then Polycore.delete_GPUDrawBuffer(self.__ptr) end
+end

+ 48 - 0
bindings/lua/Polycode/GPUDrawCall.lua

@@ -0,0 +1,48 @@
+class "GPUDrawCall"
+
+
+
+function GPUDrawCall:__getvar(name)
+	if name == "mesh" then
+		local retVal = Polycore.GPUDrawCall_get_mesh(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Mesh"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "options" then
+		local retVal = Polycore.GPUDrawCall_get_options(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["GPUDrawOptions"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "modelMatrix" then
+		local retVal = Polycore.GPUDrawCall_get_modelMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Matrix4"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "material" then
+		local retVal = Polycore.GPUDrawCall_get_material(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Material"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function GPUDrawCall:__setvar(name,value)
+	if name == "options" then
+		Polycore.GPUDrawCall_set_options(self.__ptr, value.__ptr)
+		return true
+	elseif name == "modelMatrix" then
+		Polycore.GPUDrawCall_set_modelMatrix(self.__ptr, value.__ptr)
+		return true
+	end
+	return false
+end
+
+
+function GPUDrawCall:__delete()
+	if self then Polycore.delete_GPUDrawCall(self.__ptr) end
+end

+ 81 - 0
bindings/lua/Polycode/GPUDrawOptions.lua

@@ -0,0 +1,81 @@
+class "GPUDrawOptions"
+
+
+
+function GPUDrawOptions:__getvar(name)
+	if name == "depthTest" then
+		return Polycore.GPUDrawOptions_get_depthTest(self.__ptr)
+	elseif name == "depthWrite" then
+		return Polycore.GPUDrawOptions_get_depthWrite(self.__ptr)
+	elseif name == "linePointSize" then
+		return Polycore.GPUDrawOptions_get_linePointSize(self.__ptr)
+	elseif name == "alphaTest" then
+		return Polycore.GPUDrawOptions_get_alphaTest(self.__ptr)
+	elseif name == "backfaceCull" then
+		return Polycore.GPUDrawOptions_get_backfaceCull(self.__ptr)
+	elseif name == "depthOnly" then
+		return Polycore.GPUDrawOptions_get_depthOnly(self.__ptr)
+	elseif name == "forceMaterial" then
+		return Polycore.GPUDrawOptions_get_forceMaterial(self.__ptr)
+	elseif name == "blendingMode" then
+		return Polycore.GPUDrawOptions_get_blendingMode(self.__ptr)
+	elseif name == "scissorBox" then
+		local retVal = Polycore.GPUDrawOptions_get_scissorBox(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Rectangle"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "enableScissor" then
+		return Polycore.GPUDrawOptions_get_enableScissor(self.__ptr)
+	elseif name == "drawColor" then
+		local retVal = Polycore.GPUDrawOptions_get_drawColor(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function GPUDrawOptions:__setvar(name,value)
+	if name == "depthTest" then
+		Polycore.GPUDrawOptions_set_depthTest(self.__ptr, value)
+		return true
+	elseif name == "depthWrite" then
+		Polycore.GPUDrawOptions_set_depthWrite(self.__ptr, value)
+		return true
+	elseif name == "linePointSize" then
+		Polycore.GPUDrawOptions_set_linePointSize(self.__ptr, value)
+		return true
+	elseif name == "alphaTest" then
+		Polycore.GPUDrawOptions_set_alphaTest(self.__ptr, value)
+		return true
+	elseif name == "backfaceCull" then
+		Polycore.GPUDrawOptions_set_backfaceCull(self.__ptr, value)
+		return true
+	elseif name == "depthOnly" then
+		Polycore.GPUDrawOptions_set_depthOnly(self.__ptr, value)
+		return true
+	elseif name == "forceMaterial" then
+		Polycore.GPUDrawOptions_set_forceMaterial(self.__ptr, value)
+		return true
+	elseif name == "blendingMode" then
+		Polycore.GPUDrawOptions_set_blendingMode(self.__ptr, value)
+		return true
+	elseif name == "scissorBox" then
+		Polycore.GPUDrawOptions_set_scissorBox(self.__ptr, value.__ptr)
+		return true
+	elseif name == "enableScissor" then
+		Polycore.GPUDrawOptions_set_enableScissor(self.__ptr, value)
+		return true
+	elseif name == "drawColor" then
+		Polycore.GPUDrawOptions_set_drawColor(self.__ptr, value.__ptr)
+		return true
+	end
+	return false
+end
+
+
+function GPUDrawOptions:__delete()
+	if self then Polycore.delete_GPUDrawOptions(self.__ptr) end
+end

+ 62 - 0
bindings/lua/Polycode/GlyphData.lua

@@ -0,0 +1,62 @@
+class "GlyphData"
+
+
+
+function GlyphData:__getvar(name)
+	if name == "glyphs" then
+		local retVal = Polycore.GlyphData_get_glyphs(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["FT_Glyph"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "positions" then
+		local retVal = Polycore.GlyphData_get_positions(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["FT_Vector"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "num_glyphs" then
+		local retVal = Polycore.GlyphData_get_num_glyphs(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["FT_UInt"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "trailingAdvance" then
+		return Polycore.GlyphData_get_trailingAdvance(self.__ptr)
+	end
+end
+
+
+function GlyphData:__setvar(name,value)
+	if name == "num_glyphs" then
+		Polycore.GlyphData_set_num_glyphs(self.__ptr, value.__ptr)
+		return true
+	elseif name == "trailingAdvance" then
+		Polycore.GlyphData_set_trailingAdvance(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function GlyphData:GlyphData(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.GlyphData(unpack(arg))
+	end
+end
+
+function GlyphData:clearData()
+	local retVal =  Polycore.GlyphData_clearData(self.__ptr)
+end
+
+function GlyphData:__delete()
+	if self then Polycore.delete_GlyphData(self.__ptr) end
+end

+ 173 - 0
bindings/lua/Polycode/Image.lua

@@ -0,0 +1,173 @@
+class "Image"
+
+
+
+Image.IMAGE_RGB = 0
+Image.IMAGE_RGBA = 1
+Image.IMAGE_FP16 = 2
+
+
+
+
+function Image:Image(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Image(unpack(arg))
+	end
+end
+
+function Image.BlankImage(width, height, type)
+	local retVal = Polycore.Image_BlankImage(width, height, type)
+	if retVal == nil then return nil end
+	local __c = _G["Image"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Image:loadImage(fileName)
+	local retVal = Polycore.Image_loadImage(self.__ptr, fileName)
+	return retVal
+end
+
+function Image:saveImage(fileName)
+	local retVal = Polycore.Image_saveImage(self.__ptr, fileName)
+	return retVal
+end
+
+function Image:pasteImage(image, x, y, bl_endingMode, bl_endAmount, bl_endColor)
+	local retVal = Polycore.Image_pasteImage(self.__ptr, image.__ptr, x, y, bl_endingMode, bl_endAmount, bl_endColor.__ptr)
+end
+
+function Image:createEmpty(width, height, fillColor)
+	local retVal = Polycore.Image_createEmpty(self.__ptr, width, height, fillColor.__ptr)
+end
+
+function Image:fill(color)
+	local retVal = Polycore.Image_fill(self.__ptr, color.__ptr)
+end
+
+function Image:setPixel(x, y, r, g, b, a)
+	local retVal = Polycore.Image_setPixel(self.__ptr, x, y, r, g, b, a)
+end
+
+function Image:getPixel(x, y)
+	local retVal = Polycore.Image_getPixel(self.__ptr, x, y)
+	if retVal == nil then return nil end
+	local __c = _G["Color"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Image:swap(v1, v2)
+	local retVal = Polycore.Image_swap(self.__ptr, v1.__ptr, v2.__ptr)
+end
+
+function Image:drawLine(x0, y0, x1, y1, col)
+	local retVal = Polycore.Image_drawLine(self.__ptr, x0, y0, x1, y1, col.__ptr)
+end
+
+function Image:moveBrushTo(x, y)
+	local retVal = Polycore.Image_moveBrushTo(self.__ptr, x, y)
+end
+
+function Image:moveBrush(x, y)
+	local retVal = Polycore.Image_moveBrush(self.__ptr, x, y)
+end
+
+function Image:drawLineTo(x, y, col)
+	local retVal = Polycore.Image_drawLineTo(self.__ptr, x, y, col.__ptr)
+end
+
+function Image:fillRect(x, y, w, h, col)
+	local retVal = Polycore.Image_fillRect(self.__ptr, x, y, w, h, col.__ptr)
+end
+
+function Image:perlinNoise(seed, alpha)
+	local retVal = Polycore.Image_perlinNoise(self.__ptr, seed, alpha)
+end
+
+function Image:fastBlur(blurSize)
+	local retVal = Polycore.Image_fastBlur(self.__ptr, blurSize)
+end
+
+function Image:fastBlurVert(blurSize)
+	local retVal = Polycore.Image_fastBlurVert(self.__ptr, blurSize)
+end
+
+function Image:fastBlurHor(blurSize)
+	local retVal = Polycore.Image_fastBlurHor(self.__ptr, blurSize)
+end
+
+function Image:getPixelsInRect(x, y, width, height)
+	local retVal = Polycore.Image_getPixelsInRect(self.__ptr, x, y, width, height)
+	if retVal == nil then return nil end
+	local __c = _G["char"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Image:getImagePart(subRect)
+	local retVal = Polycore.Image_getImagePart(self.__ptr, subRect.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Image"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Image:getBrushX()
+	local retVal =  Polycore.Image_getBrushX(self.__ptr)
+	return retVal
+end
+
+function Image:getBrushY()
+	local retVal =  Polycore.Image_getBrushY(self.__ptr)
+	return retVal
+end
+
+function Image:isLoaded()
+	local retVal =  Polycore.Image_isLoaded(self.__ptr)
+	return retVal
+end
+
+function Image:getType()
+	local retVal =  Polycore.Image_getType(self.__ptr)
+	return retVal
+end
+
+function Image:getWidth()
+	local retVal =  Polycore.Image_getWidth(self.__ptr)
+	return retVal
+end
+
+function Image:getHeight()
+	local retVal =  Polycore.Image_getHeight(self.__ptr)
+	return retVal
+end
+
+function Image:getPixels()
+	local retVal =  Polycore.Image_getPixels(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["char"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Image:premultiplyAlpha()
+	local retVal =  Polycore.Image_premultiplyAlpha(self.__ptr)
+end
+
+function Image:savePNG(fileName)
+	local retVal = Polycore.Image_savePNG(self.__ptr, fileName)
+	return retVal
+end
+
+function Image:__delete()
+	if self then Polycore.delete_Image(self.__ptr) end
+end

+ 46 - 0
bindings/lua/Polycode/IndexDataArray.lua

@@ -0,0 +1,46 @@
+require "Polycode/RenderDataArray"
+
+class "IndexDataArray" (RenderDataArray)
+
+
+
+
+
+
+
+function IndexDataArray:IndexDataArray(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "RenderDataArray" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.IndexDataArray(unpack(arg))
+	end
+end
+
+function IndexDataArray:getArrayData()
+	local retVal =  Polycore.IndexDataArray_getArrayData(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["void"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function IndexDataArray:getDataSize()
+	local retVal =  Polycore.IndexDataArray_getDataSize(self.__ptr)
+	return retVal
+end
+
+function IndexDataArray:__delete()
+	if self then Polycore.delete_IndexDataArray(self.__ptr) end
+end

+ 172 - 0
bindings/lua/Polycode/InputEvent.lua

@@ -0,0 +1,172 @@
+require "Polycode/Event"
+
+class "InputEvent" (Event)
+
+
+
+InputEvent.EVENTBASE_INPUTEVENT = 0x400
+InputEvent.EVENT_MOUSEDOWN = InputEvent.EVENTBASE_INPUTEVENT + 0
+InputEvent.EVENT_MOUSEUP = InputEvent.EVENTBASE_INPUTEVENT + 1
+InputEvent.EVENT_MOUSEMOVE = InputEvent.EVENTBASE_INPUTEVENT + 2
+InputEvent.EVENT_MOUSEOVER = InputEvent.EVENTBASE_INPUTEVENT + 3
+InputEvent.EVENT_MOUSEOUT = InputEvent.EVENTBASE_INPUTEVENT + 4
+InputEvent.EVENT_DOUBLECLICK = InputEvent.EVENTBASE_INPUTEVENT + 5
+InputEvent.EVENT_MOUSEUP_OUTSIDE = InputEvent.EVENTBASE_INPUTEVENT + 6
+InputEvent.EVENT_MOUSEWHEEL_UP = InputEvent.EVENTBASE_INPUTEVENT + 7
+InputEvent.EVENT_MOUSEWHEEL_DOWN = InputEvent.EVENTBASE_INPUTEVENT + 8
+InputEvent.EVENT_KEYDOWN = InputEvent.EVENTBASE_INPUTEVENT + 13
+InputEvent.EVENT_KEYUP = InputEvent.EVENTBASE_INPUTEVENT + 14
+InputEvent.EVENT_JOYBUTTON_DOWN = InputEvent.EVENTBASE_INPUTEVENT + 15
+InputEvent.EVENT_JOYBUTTON_UP = InputEvent.EVENTBASE_INPUTEVENT + 16
+InputEvent.EVENT_JOYAXIS_MOVED = InputEvent.EVENTBASE_INPUTEVENT + 17
+InputEvent.EVENT_JOYDEVICE_ATTACHED = InputEvent.EVENTBASE_INPUTEVENT + 18
+InputEvent.EVENT_JOYDEVICE_DETACHED = InputEvent.EVENTBASE_INPUTEVENT + 19
+InputEvent.EVENT_TOUCHES_BEGAN = InputEvent.EVENTBASE_INPUTEVENT + 20
+InputEvent.EVENT_TOUCHES_MOVED = InputEvent.EVENTBASE_INPUTEVENT + 21
+InputEvent.EVENT_TOUCHES_ENDED = InputEvent.EVENTBASE_INPUTEVENT + 22
+function InputEvent:__getvar(name)
+	if name == "mouseButton" then
+		return Polycore.InputEvent_get_mouseButton(self.__ptr)
+	elseif name == "mousePosition" then
+		local retVal = Polycore.InputEvent_get_mousePosition(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector2"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "key" then
+		return Polycore.InputEvent_get_key(self.__ptr)
+	elseif name == "charCode" then
+		local retVal = Polycore.InputEvent_get_charCode(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["wchar_t"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "timestamp" then
+		return Polycore.InputEvent_get_timestamp(self.__ptr)
+	elseif name == "touch" then
+		local retVal = Polycore.InputEvent_get_touch(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["TouchInfo"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "touchType" then
+		return Polycore.InputEvent_get_touchType(self.__ptr)
+	elseif name == "joystickDeviceID" then
+		return Polycore.InputEvent_get_joystickDeviceID(self.__ptr)
+	elseif name == "joystickAxisValue" then
+		return Polycore.InputEvent_get_joystickAxisValue(self.__ptr)
+	elseif name == "joystickButton" then
+		return Polycore.InputEvent_get_joystickButton(self.__ptr)
+	elseif name == "joystickAxis" then
+		return Polycore.InputEvent_get_joystickAxis(self.__ptr)
+	elseif name == "joystickIndex" then
+		return Polycore.InputEvent_get_joystickIndex(self.__ptr)
+	elseif name == "hitDistance" then
+		return Polycore.InputEvent_get_hitDistance(self.__ptr)
+	end
+	if Event["__getvar"] ~= nil then
+		return Event.__getvar(self, name)
+	end
+end
+
+
+function InputEvent:__setvar(name,value)
+	if name == "mouseButton" then
+		Polycore.InputEvent_set_mouseButton(self.__ptr, value)
+		return true
+	elseif name == "mousePosition" then
+		Polycore.InputEvent_set_mousePosition(self.__ptr, value.__ptr)
+		return true
+	elseif name == "key" then
+		Polycore.InputEvent_set_key(self.__ptr, value)
+		return true
+	elseif name == "charCode" then
+		Polycore.InputEvent_set_charCode(self.__ptr, value.__ptr)
+		return true
+	elseif name == "timestamp" then
+		Polycore.InputEvent_set_timestamp(self.__ptr, value)
+		return true
+	elseif name == "touch" then
+		Polycore.InputEvent_set_touch(self.__ptr, value.__ptr)
+		return true
+	elseif name == "touchType" then
+		Polycore.InputEvent_set_touchType(self.__ptr, value)
+		return true
+	elseif name == "joystickDeviceID" then
+		Polycore.InputEvent_set_joystickDeviceID(self.__ptr, value)
+		return true
+	elseif name == "joystickAxisValue" then
+		Polycore.InputEvent_set_joystickAxisValue(self.__ptr, value)
+		return true
+	elseif name == "joystickButton" then
+		Polycore.InputEvent_set_joystickButton(self.__ptr, value)
+		return true
+	elseif name == "joystickAxis" then
+		Polycore.InputEvent_set_joystickAxis(self.__ptr, value)
+		return true
+	elseif name == "joystickIndex" then
+		Polycore.InputEvent_set_joystickIndex(self.__ptr, value)
+		return true
+	elseif name == "hitDistance" then
+		Polycore.InputEvent_set_hitDistance(self.__ptr, value)
+		return true
+	end
+	if Event["__setvar"] ~= nil then
+		return Event.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function InputEvent:InputEvent(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Event" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.InputEvent(unpack(arg))
+	end
+end
+
+function InputEvent:getMousePosition()
+	local retVal =  Polycore.InputEvent_getMousePosition(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector2"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function InputEvent:getKey()
+	local retVal =  Polycore.InputEvent_getKey(self.__ptr)
+	return retVal
+end
+
+function InputEvent:getMouseButton()
+	local retVal =  Polycore.InputEvent_getMouseButton(self.__ptr)
+	return retVal
+end
+
+function InputEvent:getCharCode()
+	local retVal =  Polycore.InputEvent_getCharCode(self.__ptr)
+	return retVal
+end
+
+function InputEvent:keyCode()
+	local retVal =  Polycore.InputEvent_keyCode(self.__ptr)
+	return retVal
+end
+
+function InputEvent:__delete()
+	if self then Polycore.delete_InputEvent(self.__ptr) end
+end

+ 32 - 0
bindings/lua/Polycode/JSScriptInstance.lua

@@ -0,0 +1,32 @@
+require "Polycode/ScriptInstance"
+
+class "JSScriptInstance" (ScriptInstance)
+
+
+
+function JSScriptInstance:__getvar(name)
+	if name == "objectRef" then
+		local retVal = Polycore.JSScriptInstance_get_objectRef(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+	if ScriptInstance["__getvar"] ~= nil then
+		return ScriptInstance.__getvar(self, name)
+	end
+end
+
+
+function JSScriptInstance:__setvar(name,value)
+	if ScriptInstance["__setvar"] ~= nil then
+		return ScriptInstance.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function JSScriptInstance:__delete()
+	if self then Polycore.delete_JSScriptInstance(self.__ptr) end
+end

+ 42 - 0
bindings/lua/Polycode/JoystickInfo.lua

@@ -0,0 +1,42 @@
+class "JoystickInfo"
+
+
+
+function JoystickInfo:__getvar(name)
+	if name == "deviceID" then
+		return Polycore.JoystickInfo_get_deviceID(self.__ptr)
+	elseif name == "deviceIndex" then
+		return Polycore.JoystickInfo_get_deviceIndex(self.__ptr)
+	end
+end
+
+
+function JoystickInfo:__setvar(name,value)
+	if name == "deviceID" then
+		Polycore.JoystickInfo_set_deviceID(self.__ptr, value)
+		return true
+	elseif name == "deviceIndex" then
+		Polycore.JoystickInfo_set_deviceIndex(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function JoystickInfo:JoystickInfo(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.JoystickInfo(unpack(arg))
+	end
+end
+
+function JoystickInfo:__delete()
+	if self then Polycore.delete_JoystickInfo(self.__ptr) end
+end

+ 164 - 0
bindings/lua/Polycode/Label.lua

@@ -0,0 +1,164 @@
+require "Polycode/Image"
+
+class "Label" (Image)
+
+
+
+Label.ANTIALIAS_FULL = 0
+Label.ANTIALIAS_NONE = 1
+Label.ANTIALIAS_STRONG = 2
+Label.ANTIALIAS_LCD = 3
+Label.ANTIALIAS_LCD_HINT = 4
+Label.ANTIALIAS_FULL_HINT = 5
+
+
+
+
+function Label:Label(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Image" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Label(unpack(arg))
+	end
+end
+
+function Label:setText(text)
+	local retVal = Polycore.Label_setText(self.__ptr, text)
+end
+
+function Label:getText()
+	local retVal =  Polycore.Label_getText(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["String"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Label:getTextWidthForString(text)
+	local retVal = Polycore.Label_getTextWidthForString(self.__ptr, text)
+	return retVal
+end
+
+function Label:getTextHeightForString(text)
+	local retVal = Polycore.Label_getTextHeightForString(self.__ptr, text)
+	return retVal
+end
+
+function Label:getTextWidth()
+	local retVal =  Polycore.Label_getTextWidth(self.__ptr)
+	return retVal
+end
+
+function Label:getTextHeight()
+	local retVal =  Polycore.Label_getTextHeight(self.__ptr)
+	return retVal
+end
+
+function Label:setColorForRange(color, rangeStart, rangeEnd)
+	local retVal = Polycore.Label_setColorForRange(self.__ptr, color.__ptr, rangeStart, rangeEnd)
+end
+
+function Label:clearColors()
+	local retVal =  Polycore.Label_clearColors(self.__ptr)
+end
+
+function Label:getColorForIndex(index)
+	local retVal = Polycore.Label_getColorForIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["Color"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Label:getPremultiplyAlpha()
+	local retVal =  Polycore.Label_getPremultiplyAlpha(self.__ptr)
+	return retVal
+end
+
+function Label:setPremultiplyAlpha(val)
+	local retVal = Polycore.Label_setPremultiplyAlpha(self.__ptr, val)
+end
+
+function Label:setFont(newFont)
+	local retVal = Polycore.Label_setFont(self.__ptr, newFont.__ptr)
+end
+
+function Label:getFont()
+	local retVal =  Polycore.Label_getFont(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Font"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Label:setSize(newSize)
+	local retVal = Polycore.Label_setSize(self.__ptr, newSize)
+end
+
+function Label:getSize()
+	local retVal =  Polycore.Label_getSize(self.__ptr)
+	return retVal
+end
+
+function Label:getAntialiasMode()
+	local retVal =  Polycore.Label_getAntialiasMode(self.__ptr)
+	return retVal
+end
+
+function Label:setAntialiasMode(newMode)
+	local retVal = Polycore.Label_setAntialiasMode(self.__ptr, newMode)
+end
+
+function Label:getBaselineAdjust()
+	local retVal =  Polycore.Label_getBaselineAdjust(self.__ptr)
+	return retVal
+end
+
+function Label:setBackgroundColor(color)
+	local retVal = Polycore.Label_setBackgroundColor(self.__ptr, color.__ptr)
+end
+
+function Label:setForegroundColor(color)
+	local retVal = Polycore.Label_setForegroundColor(self.__ptr, color.__ptr)
+end
+
+function Label:setColors(backgroundColor, foregroundColor)
+	local retVal = Polycore.Label_setColors(self.__ptr, backgroundColor.__ptr, foregroundColor.__ptr)
+end
+
+function Label:getBackgroundColor()
+	local retVal =  Polycore.Label_getBackgroundColor(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Color"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Label:getForegroundColor()
+	local retVal =  Polycore.Label_getForegroundColor(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Color"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Label:optionsChanged()
+	local retVal =  Polycore.Label_optionsChanged(self.__ptr)
+	return retVal
+end
+
+function Label:__delete()
+	if self then Polycore.delete_Label(self.__ptr) end
+end

+ 114 - 0
bindings/lua/Polycode/LightInfo.lua

@@ -0,0 +1,114 @@
+class "LightInfo"
+
+
+
+function LightInfo:__getvar(name)
+	if name == "importance" then
+		return Polycore.LightInfo_get_importance(self.__ptr)
+	elseif name == "position" then
+		local retVal = Polycore.LightInfo_get_position(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "direction" then
+		local retVal = Polycore.LightInfo_get_direction(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "type" then
+		return Polycore.LightInfo_get_type(self.__ptr)
+	elseif name == "diffuseColor" then
+		local retVal = Polycore.LightInfo_get_diffuseColor(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "specularColor" then
+		local retVal = Polycore.LightInfo_get_specularColor(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "constantAttenuation" then
+		return Polycore.LightInfo_get_constantAttenuation(self.__ptr)
+	elseif name == "linearAttenuation" then
+		return Polycore.LightInfo_get_linearAttenuation(self.__ptr)
+	elseif name == "quadraticAttenuation" then
+		return Polycore.LightInfo_get_quadraticAttenuation(self.__ptr)
+	elseif name == "intensity" then
+		return Polycore.LightInfo_get_intensity(self.__ptr)
+	elseif name == "spotlightCutoff" then
+		return Polycore.LightInfo_get_spotlightCutoff(self.__ptr)
+	elseif name == "spotlightExponent" then
+		return Polycore.LightInfo_get_spotlightExponent(self.__ptr)
+	elseif name == "shadowsEnabled" then
+		return Polycore.LightInfo_get_shadowsEnabled(self.__ptr)
+	elseif name == "shadowMapTexture" then
+		local retVal = Polycore.LightInfo_get_shadowMapTexture(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Texture"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "lightViewMatrix" then
+		local retVal = Polycore.LightInfo_get_lightViewMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Matrix4"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function LightInfo:__setvar(name,value)
+	if name == "importance" then
+		Polycore.LightInfo_set_importance(self.__ptr, value)
+		return true
+	elseif name == "position" then
+		Polycore.LightInfo_set_position(self.__ptr, value.__ptr)
+		return true
+	elseif name == "direction" then
+		Polycore.LightInfo_set_direction(self.__ptr, value.__ptr)
+		return true
+	elseif name == "type" then
+		Polycore.LightInfo_set_type(self.__ptr, value)
+		return true
+	elseif name == "diffuseColor" then
+		Polycore.LightInfo_set_diffuseColor(self.__ptr, value.__ptr)
+		return true
+	elseif name == "specularColor" then
+		Polycore.LightInfo_set_specularColor(self.__ptr, value.__ptr)
+		return true
+	elseif name == "constantAttenuation" then
+		Polycore.LightInfo_set_constantAttenuation(self.__ptr, value)
+		return true
+	elseif name == "linearAttenuation" then
+		Polycore.LightInfo_set_linearAttenuation(self.__ptr, value)
+		return true
+	elseif name == "quadraticAttenuation" then
+		Polycore.LightInfo_set_quadraticAttenuation(self.__ptr, value)
+		return true
+	elseif name == "intensity" then
+		Polycore.LightInfo_set_intensity(self.__ptr, value)
+		return true
+	elseif name == "spotlightCutoff" then
+		Polycore.LightInfo_set_spotlightCutoff(self.__ptr, value)
+		return true
+	elseif name == "spotlightExponent" then
+		Polycore.LightInfo_set_spotlightExponent(self.__ptr, value)
+		return true
+	elseif name == "shadowsEnabled" then
+		Polycore.LightInfo_set_shadowsEnabled(self.__ptr, value)
+		return true
+	elseif name == "lightViewMatrix" then
+		Polycore.LightInfo_set_lightViewMatrix(self.__ptr, value.__ptr)
+		return true
+	end
+	return false
+end
+
+
+function LightInfo:__delete()
+	if self then Polycore.delete_LightInfo(self.__ptr) end
+end

+ 77 - 0
bindings/lua/Polycode/LightInfoBinding.lua

@@ -0,0 +1,77 @@
+class "LightInfoBinding"
+
+
+
+function LightInfoBinding:__getvar(name)
+	if name == "position" then
+		local retVal = Polycore.LightInfoBinding_get_position(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "direction" then
+		local retVal = Polycore.LightInfoBinding_get_direction(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "specular" then
+		local retVal = Polycore.LightInfoBinding_get_specular(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "diffuse" then
+		local retVal = Polycore.LightInfoBinding_get_diffuse(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "spotExponent" then
+		local retVal = Polycore.LightInfoBinding_get_spotExponent(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "spotCosCutoff" then
+		local retVal = Polycore.LightInfoBinding_get_spotCosCutoff(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "constantAttenuation" then
+		local retVal = Polycore.LightInfoBinding_get_constantAttenuation(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "linearAttenuation" then
+		local retVal = Polycore.LightInfoBinding_get_linearAttenuation(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "quadraticAttenuation" then
+		local retVal = Polycore.LightInfoBinding_get_quadraticAttenuation(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "shadowEnabled" then
+		local retVal = Polycore.LightInfoBinding_get_shadowEnabled(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function LightInfoBinding:__setvar(name,value)
+	return false
+end
+
+
+function LightInfoBinding:__delete()
+	if self then Polycore.delete_LightInfoBinding(self.__ptr) end
+end

+ 29 - 0
bindings/lua/Polycode/LightShadowInfoBinding.lua

@@ -0,0 +1,29 @@
+class "LightShadowInfoBinding"
+
+
+
+function LightShadowInfoBinding:__getvar(name)
+	if name == "shadowMatrix" then
+		local retVal = Polycore.LightShadowInfoBinding_get_shadowMatrix(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "shadowBuffer" then
+		local retVal = Polycore.LightShadowInfoBinding_get_shadowBuffer(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function LightShadowInfoBinding:__setvar(name,value)
+	return false
+end
+
+
+function LightShadowInfoBinding:__delete()
+	if self then Polycore.delete_LightShadowInfoBinding(self.__ptr) end
+end

+ 157 - 0
bindings/lua/Polycode/LocalShaderParam.lua

@@ -0,0 +1,157 @@
+class "LocalShaderParam"
+
+
+
+function LocalShaderParam:__getvar(name)
+	if name == "name" then
+		return Polycore.LocalShaderParam_get_name(self.__ptr)
+	elseif name == "data" then
+		local retVal = Polycore.LocalShaderParam_get_data(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "type" then
+		return Polycore.LocalShaderParam_get_type(self.__ptr)
+	elseif name == "ownsPointer" then
+		return Polycore.LocalShaderParam_get_ownsPointer(self.__ptr)
+	elseif name == "arraySize" then
+		return Polycore.LocalShaderParam_get_arraySize(self.__ptr)
+	elseif name == "param" then
+		local retVal = Polycore.LocalShaderParam_get_param(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["ProgramParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function LocalShaderParam:__setvar(name,value)
+	if name == "name" then
+		Polycore.LocalShaderParam_set_name(self.__ptr, value)
+		return true
+	elseif name == "type" then
+		Polycore.LocalShaderParam_set_type(self.__ptr, value)
+		return true
+	elseif name == "ownsPointer" then
+		Polycore.LocalShaderParam_set_ownsPointer(self.__ptr, value)
+		return true
+	elseif name == "arraySize" then
+		Polycore.LocalShaderParam_set_arraySize(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function LocalShaderParam:LocalShaderParam(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.LocalShaderParam(unpack(arg))
+	end
+end
+
+function LocalShaderParam:Copy()
+	local retVal =  Polycore.LocalShaderParam_Copy(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["LocalShaderParam"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function LocalShaderParam:getNumber()
+	local retVal =  Polycore.LocalShaderParam_getNumber(self.__ptr)
+	return retVal
+end
+
+function LocalShaderParam:getVector2()
+	local retVal =  Polycore.LocalShaderParam_getVector2(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector2"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function LocalShaderParam:getVector3()
+	local retVal =  Polycore.LocalShaderParam_getVector3(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function LocalShaderParam:getMatrix4()
+	local retVal =  Polycore.LocalShaderParam_getMatrix4(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function LocalShaderParam:getColor()
+	local retVal =  Polycore.LocalShaderParam_getColor(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Color"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function LocalShaderParam:setNumber(x)
+	local retVal = Polycore.LocalShaderParam_setNumber(self.__ptr, x)
+end
+
+function LocalShaderParam:setVector2(x)
+	local retVal = Polycore.LocalShaderParam_setVector2(self.__ptr, x.__ptr)
+end
+
+function LocalShaderParam:setVector3(x)
+	local retVal = Polycore.LocalShaderParam_setVector3(self.__ptr, x.__ptr)
+end
+
+function LocalShaderParam:setMatrix4(x)
+	local retVal = Polycore.LocalShaderParam_setMatrix4(self.__ptr, x.__ptr)
+end
+
+function LocalShaderParam:setColor(x)
+	local retVal = Polycore.LocalShaderParam_setColor(self.__ptr, x.__ptr)
+end
+
+function LocalShaderParam:setTexture(texture)
+	local retVal = Polycore.LocalShaderParam_setTexture(self.__ptr, texture.__ptr)
+end
+
+function LocalShaderParam:getTexture()
+	local retVal =  Polycore.LocalShaderParam_getTexture(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Texture"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function LocalShaderParam:setCubemap(cubemap)
+	local retVal = Polycore.LocalShaderParam_setCubemap(self.__ptr, cubemap.__ptr)
+end
+
+function LocalShaderParam:getCubemap()
+	local retVal =  Polycore.LocalShaderParam_getCubemap(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Cubemap"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function LocalShaderParam:setParamValueFromString(type, pvalue)
+	local retVal = Polycore.LocalShaderParam_setParamValueFromString(self.__ptr, type, pvalue)
+end
+
+function LocalShaderParam:__delete()
+	if self then Polycore.delete_LocalShaderParam(self.__ptr) end
+end

+ 32 - 0
bindings/lua/Polycode/LuaScriptInstance.lua

@@ -0,0 +1,32 @@
+require "Polycode/ScriptInstance"
+
+class "LuaScriptInstance" (ScriptInstance)
+
+
+
+function LuaScriptInstance:__getvar(name)
+	if name == "tableRef" then
+		return Polycore.LuaScriptInstance_get_tableRef(self.__ptr)
+	end
+	if ScriptInstance["__getvar"] ~= nil then
+		return ScriptInstance.__getvar(self, name)
+	end
+end
+
+
+function LuaScriptInstance:__setvar(name,value)
+	if name == "tableRef" then
+		Polycore.LuaScriptInstance_set_tableRef(self.__ptr, value)
+		return true
+	end
+	if ScriptInstance["__setvar"] ~= nil then
+		return ScriptInstance.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function LuaScriptInstance:__delete()
+	if self then Polycore.delete_LuaScriptInstance(self.__ptr) end
+end

+ 170 - 0
bindings/lua/Polycode/Material.lua

@@ -0,0 +1,170 @@
+require "Polycode/Resource"
+
+class "Material" (Resource)
+
+
+
+function Material:__getvar(name)
+	if name == "fp16RenderTargets" then
+		return Polycore.Material_get_fp16RenderTargets(self.__ptr)
+	elseif name == "shaderModule" then
+		local retVal = Polycore.Material_get_shaderModule(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "blendingMode" then
+		return Polycore.Material_get_blendingMode(self.__ptr)
+	elseif name == "screenMaterial" then
+		return Polycore.Material_get_screenMaterial(self.__ptr)
+	end
+	if Resource["__getvar"] ~= nil then
+		return Resource.__getvar(self, name)
+	end
+end
+
+
+function Material:__setvar(name,value)
+	if name == "fp16RenderTargets" then
+		Polycore.Material_set_fp16RenderTargets(self.__ptr, value)
+		return true
+	elseif name == "blendingMode" then
+		Polycore.Material_set_blendingMode(self.__ptr, value)
+		return true
+	elseif name == "screenMaterial" then
+		Polycore.Material_set_screenMaterial(self.__ptr, value)
+		return true
+	end
+	if Resource["__setvar"] ~= nil then
+		return Resource.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function Material:Material(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Resource" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Material(unpack(arg))
+	end
+end
+
+function Material:addShaderPass(pass)
+	local retVal = Polycore.Material_addShaderPass(self.__ptr, pass.__ptr)
+end
+
+function Material:addShaderPassAtIndex(pass, shaderIndex)
+	local retVal = Polycore.Material_addShaderPassAtIndex(self.__ptr, pass.__ptr, shaderIndex)
+end
+
+function Material:addShader(shader, shaderBinding)
+	local retVal = Polycore.Material_addShader(self.__ptr, shader.__ptr, shaderBinding.__ptr)
+end
+
+function Material:addShaderAtIndex(shader, shaderBinding, shaderIndex)
+	local retVal = Polycore.Material_addShaderAtIndex(self.__ptr, shader.__ptr, shaderBinding.__ptr, shaderIndex)
+end
+
+function Material:getNumShaderPasses()
+	local retVal =  Polycore.Material_getNumShaderPasses(self.__ptr)
+	return retVal
+end
+
+function Material:removeShaderPass(shaderIndex)
+	local retVal = Polycore.Material_removeShaderPass(self.__ptr, shaderIndex)
+end
+
+function Material:recreateExpectedShaderParams()
+	local retVal =  Polycore.Material_recreateExpectedShaderParams(self.__ptr)
+end
+
+function Material:addShaderRenderTarget(newTarget)
+	local retVal = Polycore.Material_addShaderRenderTarget(self.__ptr, newTarget.__ptr)
+end
+
+function Material:getNumShaderRenderTargets()
+	local retVal =  Polycore.Material_getNumShaderRenderTargets(self.__ptr)
+	return retVal
+end
+
+function Material:getShaderRenderTarget(index)
+	local retVal = Polycore.Material_getShaderRenderTarget(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["ShaderRenderTarget"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Material:removeShaderRenderTarget(index)
+	local retVal = Polycore.Material_removeShaderRenderTarget(self.__ptr, index)
+end
+
+function Material:recreateRenderTarget(r_enderTarget)
+	local retVal = Polycore.Material_recreateRenderTarget(self.__ptr, r_enderTarget.__ptr)
+end
+
+function Material:recreateRenderTargets()
+	local retVal =  Polycore.Material_recreateRenderTargets(self.__ptr)
+end
+
+function Material:getName()
+	local retVal =  Polycore.Material_getName(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["String"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Material:getShaderPass(index)
+	local retVal = Polycore.Material_getShaderPass(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["ShaderPass"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Material:getShaderBinding(index)
+	local retVal = Polycore.Material_getShaderBinding(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["ShaderBinding"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Material:getShader(index)
+	local retVal = Polycore.Material_getShader(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["Shader"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Material:loadMaterial(fileName)
+	local retVal = Polycore.Material_loadMaterial(self.__ptr, fileName)
+end
+
+function Material:setName(name)
+	local retVal = Polycore.Material_setName(self.__ptr, name)
+end
+
+function Material:clearShaders()
+	local retVal =  Polycore.Material_clearShaders(self.__ptr)
+end
+
+function Material:__delete()
+	if self then Polycore.delete_Material(self.__ptr) end
+end

+ 239 - 0
bindings/lua/Polycode/MaterialManager.lua

@@ -0,0 +1,239 @@
+class "MaterialManager"
+
+
+
+function MaterialManager:__getvar(name)
+	if name == "premultiplyAlphaOnLoad" then
+		return Polycore.MaterialManager_get_premultiplyAlphaOnLoad(self.__ptr)
+	elseif name == "clampDefault" then
+		return Polycore.MaterialManager_get_clampDefault(self.__ptr)
+	elseif name == "mipmapsDefault" then
+		return Polycore.MaterialManager_get_mipmapsDefault(self.__ptr)
+	elseif name == "keepTextureData" then
+		return Polycore.MaterialManager_get_keepTextureData(self.__ptr)
+	end
+end
+
+
+function MaterialManager:__setvar(name,value)
+	if name == "premultiplyAlphaOnLoad" then
+		Polycore.MaterialManager_set_premultiplyAlphaOnLoad(self.__ptr, value)
+		return true
+	elseif name == "clampDefault" then
+		Polycore.MaterialManager_set_clampDefault(self.__ptr, value)
+		return true
+	elseif name == "mipmapsDefault" then
+		Polycore.MaterialManager_set_mipmapsDefault(self.__ptr, value)
+		return true
+	elseif name == "keepTextureData" then
+		Polycore.MaterialManager_set_keepTextureData(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function MaterialManager:MaterialManager(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.MaterialManager(unpack(arg))
+	end
+end
+
+function MaterialManager:Update(elapsed)
+	local retVal = Polycore.MaterialManager_Update(self.__ptr, elapsed)
+end
+
+function MaterialManager:createTexture(width, height, imageData, clamp, createMipmaps, type)
+	local retVal = Polycore.MaterialManager_createTexture(self.__ptr, width, height, imageData.__ptr, clamp, createMipmaps, type)
+	if retVal == nil then return nil end
+	local __c = _G["Texture"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:createNewTexture(width, height, clamp, createMipmaps, type)
+	local retVal = Polycore.MaterialManager_createNewTexture(self.__ptr, width, height, clamp, createMipmaps, type)
+	if retVal == nil then return nil end
+	local __c = _G["Texture"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:createTextureFromImage(image, clamp, createMipmaps)
+	local retVal = Polycore.MaterialManager_createTextureFromImage(self.__ptr, image.__ptr, clamp, createMipmaps)
+	if retVal == nil then return nil end
+	local __c = _G["Texture"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:createTextureFromFile(fileName, clamp, createMipmaps, resourcePool)
+	local retVal = Polycore.MaterialManager_createTextureFromFile(self.__ptr, fileName, clamp, createMipmaps, resourcePool.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Texture"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:deleteTexture(texture)
+	local retVal = Polycore.MaterialManager_deleteTexture(self.__ptr, texture.__ptr)
+end
+
+function MaterialManager:reloadTextures()
+	local retVal =  Polycore.MaterialManager_reloadTextures(self.__ptr)
+end
+
+function MaterialManager:reloadProgramsAndTextures()
+	local retVal =  Polycore.MaterialManager_reloadProgramsAndTextures(self.__ptr)
+end
+
+function MaterialManager:reloadPrograms()
+	local retVal =  Polycore.MaterialManager_reloadPrograms(self.__ptr)
+end
+
+function MaterialManager:getTextureByResourcePath(resourcePath)
+	local retVal = Polycore.MaterialManager_getTextureByResourcePath(self.__ptr, resourcePath)
+	if retVal == nil then return nil end
+	local __c = _G["Texture"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:createProgramFromFile(programPath)
+	local retVal = Polycore.MaterialManager_createProgramFromFile(self.__ptr, programPath)
+	if retVal == nil then return nil end
+	local __c = _G["ShaderProgram"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:loadMaterialLibraryIntoPool(pool, materialFile)
+	local retVal = Polycore.MaterialManager_loadMaterialLibraryIntoPool(self.__ptr, pool.__ptr, materialFile)
+end
+
+function MaterialManager:cubemapFromXMLNode(node)
+	local retVal = Polycore.MaterialManager_cubemapFromXMLNode(self.__ptr, node.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Cubemap"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:materialFromXMLNode(resourcePool, node)
+	local retVal = Polycore.MaterialManager_materialFromXMLNode(self.__ptr, resourcePool.__ptr, node.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Material"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:createMaterial(resourcePool, materialName, shaderName)
+	local retVal = Polycore.MaterialManager_createMaterial(self.__ptr, resourcePool.__ptr, materialName, shaderName)
+	if retVal == nil then return nil end
+	local __c = _G["Material"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:setShaderFromXMLNode(resourcePool, node)
+	local retVal = Polycore.MaterialManager_setShaderFromXMLNode(self.__ptr, resourcePool.__ptr, node.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Shader"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:createShaderFromXMLNode(resourcePool, node)
+	local retVal = Polycore.MaterialManager_createShaderFromXMLNode(self.__ptr, resourcePool.__ptr, node.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Shader"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:createShader(resourcePool, shaderType, name, vpName, fpName, screenShader)
+	local retVal = Polycore.MaterialManager_createShader(self.__ptr, resourcePool.__ptr, shaderType, name, vpName, fpName, screenShader)
+	if retVal == nil then return nil end
+	local __c = _G["Shader"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:loadMaterialsFromFile(resourcePool, fileName)
+	local retVal = Polycore.MaterialManager_loadMaterialsFromFile(self.__ptr, resourcePool.__ptr, fileName)
+	if retVal == nil then return nil end
+	for i=1,count(retVal) do
+		local __c  = _G["Material"]("__skip_ptr__")
+		__c.__ptr = retVal[i]
+		retVal[i] = __c
+	end
+	return retVal
+end
+
+function MaterialManager:loadShadersFromFile(resourcePool, fileName)
+	local retVal = Polycore.MaterialManager_loadShadersFromFile(self.__ptr, resourcePool.__ptr, fileName)
+	if retVal == nil then return nil end
+	for i=1,count(retVal) do
+		local __c  = _G["Shader"]("__skip_ptr__")
+		__c.__ptr = retVal[i]
+		retVal[i] = __c
+	end
+	return retVal
+end
+
+function MaterialManager:loadCubemapsFromFile(fileName)
+	local retVal = Polycore.MaterialManager_loadCubemapsFromFile(self.__ptr, fileName)
+	if retVal == nil then return nil end
+	for i=1,count(retVal) do
+		local __c  = _G["Cubemap"]("__skip_ptr__")
+		__c.__ptr = retVal[i]
+		retVal[i] = __c
+	end
+	return retVal
+end
+
+function MaterialManager:setAnisotropyAmount(anisotropy)
+	local retVal = Polycore.MaterialManager_setAnisotropyAmount(self.__ptr, anisotropy)
+end
+
+function MaterialManager:setTextureFilteringMode(textureFilteringMode)
+	local retVal = Polycore.MaterialManager_setTextureFilteringMode(self.__ptr, textureFilteringMode)
+end
+
+function MaterialManager:getTextureFilteringMode()
+	local retVal =  Polycore.MaterialManager_getTextureFilteringMode(self.__ptr)
+	return retVal
+end
+
+function MaterialManager:addMaterial(material)
+	local retVal = Polycore.MaterialManager_addMaterial(self.__ptr, material.__ptr)
+end
+
+function MaterialManager:addShader(shader)
+	local retVal = Polycore.MaterialManager_addShader(self.__ptr, shader.__ptr)
+end
+
+function MaterialManager:getNumShaders()
+	local retVal =  Polycore.MaterialManager_getNumShaders(self.__ptr)
+	return retVal
+end
+
+function MaterialManager:getShaderByIndex(index)
+	local retVal = Polycore.MaterialManager_getShaderByIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["Shader"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialManager:__delete()
+	if self then Polycore.delete_MaterialManager(self.__ptr) end
+end

+ 33 - 0
bindings/lua/Polycode/MaterialResourceLoader.lua

@@ -0,0 +1,33 @@
+class "MaterialResourceLoader"
+
+
+
+
+
+
+
+function MaterialResourceLoader:MaterialResourceLoader(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.MaterialResourceLoader(unpack(arg))
+	end
+end
+
+function MaterialResourceLoader:loadResource(path, targetPool)
+	local retVal = Polycore.MaterialResourceLoader_loadResource(self.__ptr, path, targetPool.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Resource"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MaterialResourceLoader:__delete()
+	if self then Polycore.delete_MaterialResourceLoader(self.__ptr) end
+end

+ 139 - 0
bindings/lua/Polycode/Matrix4.lua

@@ -0,0 +1,139 @@
+class "Matrix4"
+
+
+
+function Matrix4:__getvar(name)
+end
+
+
+function Matrix4:__setvar(name,value)
+	return false
+end
+
+
+function Matrix4:Matrix4(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Matrix4(unpack(arg))
+	end
+end
+
+function Matrix4:identity()
+	local retVal =  Polycore.Matrix4_identity(self.__ptr)
+end
+
+function Matrix4:rotateVector(v2)
+	local retVal = Polycore.Matrix4_rotateVector(self.__ptr, v2.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Matrix4:getPosition()
+	local retVal =  Polycore.Matrix4_getPosition(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Matrix4:multiplyWithPerspective(v2)
+	local retVal = Polycore.Matrix4_multiplyWithPerspective(self.__ptr, v2.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Matrix4:multVector3(v2)
+	local retVal = Polycore.Matrix4_multVector3(self.__ptr, v2.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Matrix4:multVector4(v2)
+	local retVal = Polycore.Matrix4_multVector4(self.__ptr, v2.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Matrix4:Translate(x, y, z)
+	local retVal = Polycore.Matrix4_Translate(self.__ptr, x, y, z)
+end
+
+function Matrix4:setPosition(x, y, z)
+	local retVal = Polycore.Matrix4_setPosition(self.__ptr, x, y, z)
+end
+
+function Matrix4:setScale(scale)
+	local retVal = Polycore.Matrix4_setScale(self.__ptr, scale.__ptr)
+end
+
+function Matrix4:getEulerAngles(ax, ay, az)
+	local retVal = Polycore.Matrix4_getEulerAngles(self.__ptr, ax.__ptr, ay.__ptr, az.__ptr)
+end
+
+function Matrix4:transpose()
+	local retVal =  Polycore.Matrix4_transpose(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Matrix4:Inverse()
+	local retVal =  Polycore.Matrix4_Inverse(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Matrix4:inverseAffine()
+	local retVal =  Polycore.Matrix4_inverseAffine(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Matrix4:determinant()
+	local retVal =  Polycore.Matrix4_determinant(self.__ptr)
+	return retVal
+end
+
+function Matrix4.generalDeterminant(a, n)
+	local retVal = Polycore.Matrix4_generalDeterminant(a.__ptr, n)
+	if retVal == nil then return nil end
+	local __c = _G["Number"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Matrix4:setOrthoProjection(left, right, bottom, top, zNear, zFar)
+	local retVal = Polycore.Matrix4_setOrthoProjection(self.__ptr, left, right, bottom, top, zNear, zFar)
+end
+
+function Matrix4:setProjectionFrustum(left, right, bottom, top, zNear, zFar)
+	local retVal = Polycore.Matrix4_setProjectionFrustum(self.__ptr, left, right, bottom, top, zNear, zFar)
+end
+
+function Matrix4:setProjection(fov, aspect, zNear, zFar)
+	local retVal = Polycore.Matrix4_setProjection(self.__ptr, fov, aspect, zNear, zFar)
+end
+
+function Matrix4:__delete()
+	if self then Polycore.delete_Matrix4(self.__ptr) end
+end

+ 390 - 0
bindings/lua/Polycode/Mesh.lua

@@ -0,0 +1,390 @@
+require "Polycode/Resource"
+
+class "Mesh" (Resource)
+
+
+
+Mesh.TRISTRIP_MESH = 0
+Mesh.TRI_MESH = 1
+Mesh.TRIFAN_MESH = 2
+Mesh.LINE_MESH = 4
+Mesh.POINT_MESH = 5
+Mesh.LINE_STRIP_MESH = 6
+Mesh.LINE_LOOP_MESH = 7
+function Mesh:__getvar(name)
+	if name == "indexedMesh" then
+		return Polycore.Mesh_get_indexedMesh(self.__ptr)
+	elseif name == "vertexPositionArray" then
+		local retVal = Polycore.Mesh_get_vertexPositionArray(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["VertexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "vertexColorArray" then
+		local retVal = Polycore.Mesh_get_vertexColorArray(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["VertexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "vertexNormalArray" then
+		local retVal = Polycore.Mesh_get_vertexNormalArray(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["VertexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "vertexTexCoordArray" then
+		local retVal = Polycore.Mesh_get_vertexTexCoordArray(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["VertexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "vertexTexCoord2Array" then
+		local retVal = Polycore.Mesh_get_vertexTexCoord2Array(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["VertexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "vertexTangentArray" then
+		local retVal = Polycore.Mesh_get_vertexTangentArray(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["VertexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "vertexBoneWeightArray" then
+		local retVal = Polycore.Mesh_get_vertexBoneWeightArray(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["VertexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "vertexBoneIndexArray" then
+		local retVal = Polycore.Mesh_get_vertexBoneIndexArray(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["VertexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "indexArray" then
+		local retVal = Polycore.Mesh_get_indexArray(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["IndexDataArray"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+	if Resource["__getvar"] ~= nil then
+		return Resource.__getvar(self, name)
+	end
+end
+
+
+function Mesh:__setvar(name,value)
+	if name == "indexedMesh" then
+		Polycore.Mesh_set_indexedMesh(self.__ptr, value)
+		return true
+	elseif name == "vertexPositionArray" then
+		Polycore.Mesh_set_vertexPositionArray(self.__ptr, value.__ptr)
+		return true
+	elseif name == "vertexColorArray" then
+		Polycore.Mesh_set_vertexColorArray(self.__ptr, value.__ptr)
+		return true
+	elseif name == "vertexNormalArray" then
+		Polycore.Mesh_set_vertexNormalArray(self.__ptr, value.__ptr)
+		return true
+	elseif name == "vertexTexCoordArray" then
+		Polycore.Mesh_set_vertexTexCoordArray(self.__ptr, value.__ptr)
+		return true
+	elseif name == "vertexTexCoord2Array" then
+		Polycore.Mesh_set_vertexTexCoord2Array(self.__ptr, value.__ptr)
+		return true
+	elseif name == "vertexTangentArray" then
+		Polycore.Mesh_set_vertexTangentArray(self.__ptr, value.__ptr)
+		return true
+	elseif name == "vertexBoneWeightArray" then
+		Polycore.Mesh_set_vertexBoneWeightArray(self.__ptr, value.__ptr)
+		return true
+	elseif name == "vertexBoneIndexArray" then
+		Polycore.Mesh_set_vertexBoneIndexArray(self.__ptr, value.__ptr)
+		return true
+	elseif name == "indexArray" then
+		Polycore.Mesh_set_indexArray(self.__ptr, value.__ptr)
+		return true
+	end
+	if Resource["__setvar"] ~= nil then
+		return Resource.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function Mesh:Mesh(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Resource" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Mesh(unpack(arg))
+	end
+end
+
+function Mesh.MeshFromFileName(fileName)
+	local retVal = Polycore.Mesh_MeshFromFileName(fileName)
+	if retVal == nil then return nil end
+	local __c = _G["Mesh"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:loadMesh(fileName)
+	local retVal = Polycore.Mesh_loadMesh(self.__ptr, fileName)
+end
+
+function Mesh:clearMesh()
+	local retVal =  Polycore.Mesh_clearMesh(self.__ptr)
+end
+
+function Mesh:saveToFile(fileName, writeNormals, writeTangents, writeColors, writeBoneWeights, writeUVs, writeSecondaryUVs)
+	local retVal = Polycore.Mesh_saveToFile(self.__ptr, fileName, writeNormals, writeTangents, writeColors, writeBoneWeights, writeUVs, writeSecondaryUVs)
+end
+
+function Mesh:loadFromFile(inFile)
+	local retVal = Polycore.Mesh_loadFromFile(self.__ptr, inFile.__ptr)
+end
+
+function Mesh:getVertexCount()
+	local retVal =  Polycore.Mesh_getVertexCount(self.__ptr)
+	return retVal
+end
+
+function Mesh:createPlane(w, h, tilingValue)
+	local retVal = Polycore.Mesh_createPlane(self.__ptr, w, h, tilingValue)
+end
+
+function Mesh:createVPlane(w, h, tilingValue)
+	local retVal = Polycore.Mesh_createVPlane(self.__ptr, w, h, tilingValue)
+end
+
+function Mesh:createCircle(w, h, numSegments, tilingValue)
+	local retVal = Polycore.Mesh_createCircle(self.__ptr, w, h, numSegments, tilingValue)
+end
+
+function Mesh:createLineCircle(w, h, numSegments, tilingValue)
+	local retVal = Polycore.Mesh_createLineCircle(self.__ptr, w, h, numSegments, tilingValue)
+end
+
+function Mesh:createTorus(radius, tubeRadius, segmentsW, segmentsH, tilingValue)
+	local retVal = Polycore.Mesh_createTorus(self.__ptr, radius, tubeRadius, segmentsW, segmentsH, tilingValue)
+end
+
+function Mesh:createBox(w, d, h, tilingValue)
+	local retVal = Polycore.Mesh_createBox(self.__ptr, w, d, h, tilingValue)
+end
+
+function Mesh:createSphere(radius, numRings, numSegments, tilingValue)
+	local retVal = Polycore.Mesh_createSphere(self.__ptr, radius, numRings, numSegments, tilingValue)
+end
+
+function Mesh:createIcosphere(radius, subdivisions)
+	local retVal = Polycore.Mesh_createIcosphere(self.__ptr, radius, subdivisions)
+end
+
+function Mesh:createOctosphere(radius, subdivisions)
+	local retVal = Polycore.Mesh_createOctosphere(self.__ptr, radius, subdivisions)
+end
+
+function Mesh:createCylinder(height, radius, numSegments, capped, tilingValue)
+	local retVal = Polycore.Mesh_createCylinder(self.__ptr, height, radius, numSegments, capped, tilingValue)
+end
+
+function Mesh:createCone(height, radius, numSegments, tilingValue)
+	local retVal = Polycore.Mesh_createCone(self.__ptr, height, radius, numSegments, tilingValue)
+end
+
+function Mesh:recenterMesh()
+	local retVal =  Polycore.Mesh_recenterMesh(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:setVertexAtOffset(offset, x, y, z)
+	local retVal = Polycore.Mesh_setVertexAtOffset(self.__ptr, offset, x, y, z)
+end
+
+function Mesh:addVertexWithUVAndNormal(x, y, z, u, v, nx, ny, nz)
+	local retVal = Polycore.Mesh_addVertexWithUVAndNormal(self.__ptr, x, y, z, u, v, nx, ny, nz)
+end
+
+function Mesh:addTexCoord(u, v)
+	local retVal = Polycore.Mesh_addTexCoord(self.__ptr, u, v)
+end
+
+function Mesh:addTexCoord2(u, v)
+	local retVal = Polycore.Mesh_addTexCoord2(self.__ptr, u, v)
+end
+
+function Mesh:addTangent(x, y, z)
+	local retVal = Polycore.Mesh_addTangent(self.__ptr, x, y, z)
+end
+
+function Mesh:addVertexWithUV(x, y, z, u, v)
+	local retVal = Polycore.Mesh_addVertexWithUV(self.__ptr, x, y, z, u, v)
+end
+
+function Mesh:addVertex(x, y, z)
+	local retVal = Polycore.Mesh_addVertex(self.__ptr, x, y, z)
+end
+
+function Mesh:addNormal(nx, ny, nz)
+	local retVal = Polycore.Mesh_addNormal(self.__ptr, nx, ny, nz)
+end
+
+function Mesh:addBoneAssignments(b1Weight, b1Index, b2Weight, b2Index, b3Weight, b3Index, b4Weight, b4Index)
+	local retVal = Polycore.Mesh_addBoneAssignments(self.__ptr, b1Weight, b1Index, b2Weight, b2Index, b3Weight, b3Index, b4Weight, b4Index)
+end
+
+function Mesh:addColor(r, g, b, a)
+	local retVal = Polycore.Mesh_addColor(self.__ptr, r, g, b, a)
+end
+
+function Mesh:getVertexPosition(vertexOffset)
+	local retVal = Polycore.Mesh_getVertexPosition(self.__ptr, vertexOffset)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:getVertexPositionAtIndex(index)
+	local retVal = Polycore.Mesh_getVertexPositionAtIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:getVertexTexCoord(vertexOffset)
+	local retVal = Polycore.Mesh_getVertexTexCoord(self.__ptr, vertexOffset)
+	if retVal == nil then return nil end
+	local __c = _G["Vector2"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:getVertexTexCoordAtIndex(index)
+	local retVal = Polycore.Mesh_getVertexTexCoordAtIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["Vector2"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:Copy()
+	local retVal =  Polycore.Mesh_Copy(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Mesh"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:getRadius()
+	local retVal =  Polycore.Mesh_getRadius(self.__ptr)
+	return retVal
+end
+
+function Mesh:calculateNormals()
+	local retVal =  Polycore.Mesh_calculateNormals(self.__ptr)
+end
+
+function Mesh:calculateTangents()
+	local retVal =  Polycore.Mesh_calculateTangents(self.__ptr)
+end
+
+function Mesh:getMeshType()
+	local retVal =  Polycore.Mesh_getMeshType(self.__ptr)
+	return retVal
+end
+
+function Mesh:setMeshType(newType)
+	local retVal = Polycore.Mesh_setMeshType(self.__ptr, newType)
+end
+
+function Mesh:getIndexGroupSize()
+	local retVal =  Polycore.Mesh_getIndexGroupSize(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["unsignedint"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:calculateBBox()
+	local retVal =  Polycore.Mesh_calculateBBox(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:hasVertexBuffer()
+	local retVal =  Polycore.Mesh_hasVertexBuffer(self.__ptr)
+	return retVal
+end
+
+function Mesh:addIndexedFace(i1, i2)
+	local retVal = Polycore.Mesh_addIndexedFace(self.__ptr, i1, i2)
+end
+
+function Mesh:addIndex(index)
+	local retVal = Polycore.Mesh_addIndex(self.__ptr, index)
+end
+
+function Mesh:removeVertexRange(beginRemoveVertex, vertexRemovalCount)
+	local retVal = Polycore.Mesh_removeVertexRange(self.__ptr, beginRemoveVertex, vertexRemovalCount)
+end
+
+function Mesh:removeFace(faceIndex)
+	local retVal = Polycore.Mesh_removeFace(self.__ptr, faceIndex)
+end
+
+function Mesh:removeUnusedVertices()
+	local retVal =  Polycore.Mesh_removeUnusedVertices(self.__ptr)
+	return retVal
+end
+
+function Mesh:getIndexCount()
+	local retVal =  Polycore.Mesh_getIndexCount(self.__ptr)
+	return retVal
+end
+
+function Mesh:subdivideToRadius(radius, subdivisions)
+	local retVal = Polycore.Mesh_subdivideToRadius(self.__ptr, radius, subdivisions)
+end
+
+function Mesh.calculateFaceTangent(v1, v2, v3, texCoord1, texCoord2, texCoord3)
+	local retVal = Polycore.Mesh_calculateFaceTangent(v1.__ptr, v2.__ptr, v3.__ptr, texCoord1.__ptr, texCoord2.__ptr, texCoord3.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Mesh:saveAsOBJ(fileName)
+	local retVal = Polycore.Mesh_saveAsOBJ(self.__ptr, fileName)
+end
+
+function Mesh:normalizeBoneWeights()
+	local retVal =  Polycore.Mesh_normalizeBoneWeights(self.__ptr)
+end
+
+function Mesh:__delete()
+	if self then Polycore.delete_Mesh(self.__ptr) end
+end

+ 33 - 0
bindings/lua/Polycode/MeshResourceLoader.lua

@@ -0,0 +1,33 @@
+class "MeshResourceLoader"
+
+
+
+
+
+
+
+function MeshResourceLoader:MeshResourceLoader(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.MeshResourceLoader(unpack(arg))
+	end
+end
+
+function MeshResourceLoader:loadResource(path, targetPool)
+	local retVal = Polycore.MeshResourceLoader_loadResource(self.__ptr, path, targetPool.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Resource"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function MeshResourceLoader:__delete()
+	if self then Polycore.delete_MeshResourceLoader(self.__ptr) end
+end

+ 28 - 0
bindings/lua/Polycode/MouseEventResult.lua

@@ -0,0 +1,28 @@
+class "MouseEventResult"
+
+
+
+function MouseEventResult:__getvar(name)
+	if name == "hit" then
+		return Polycore.MouseEventResult_get_hit(self.__ptr)
+	elseif name == "blocked" then
+		return Polycore.MouseEventResult_get_blocked(self.__ptr)
+	end
+end
+
+
+function MouseEventResult:__setvar(name,value)
+	if name == "hit" then
+		Polycore.MouseEventResult_set_hit(self.__ptr, value)
+		return true
+	elseif name == "blocked" then
+		Polycore.MouseEventResult_set_blocked(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function MouseEventResult:__delete()
+	if self then Polycore.delete_MouseEventResult(self.__ptr) end
+end

+ 68 - 0
bindings/lua/Polycode/OSFileEntry.lua

@@ -0,0 +1,68 @@
+class "OSFileEntry"
+
+
+
+OSFileEntry.TYPE_FILE = 0
+OSFileEntry.TYPE_FOLDER = 1
+function OSFileEntry:__getvar(name)
+	if name == "name" then
+		return Polycore.OSFileEntry_get_name(self.__ptr)
+	elseif name == "extension" then
+		return Polycore.OSFileEntry_get_extension(self.__ptr)
+	elseif name == "nameWithoutExtension" then
+		return Polycore.OSFileEntry_get_nameWithoutExtension(self.__ptr)
+	elseif name == "basePath" then
+		return Polycore.OSFileEntry_get_basePath(self.__ptr)
+	elseif name == "fullPath" then
+		return Polycore.OSFileEntry_get_fullPath(self.__ptr)
+	elseif name == "type" then
+		return Polycore.OSFileEntry_get_type(self.__ptr)
+	end
+end
+
+
+function OSFileEntry:__setvar(name,value)
+	if name == "name" then
+		Polycore.OSFileEntry_set_name(self.__ptr, value)
+		return true
+	elseif name == "extension" then
+		Polycore.OSFileEntry_set_extension(self.__ptr, value)
+		return true
+	elseif name == "nameWithoutExtension" then
+		Polycore.OSFileEntry_set_nameWithoutExtension(self.__ptr, value)
+		return true
+	elseif name == "basePath" then
+		Polycore.OSFileEntry_set_basePath(self.__ptr, value)
+		return true
+	elseif name == "fullPath" then
+		Polycore.OSFileEntry_set_fullPath(self.__ptr, value)
+		return true
+	elseif name == "type" then
+		Polycore.OSFileEntry_set_type(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function OSFileEntry:OSFileEntry(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.OSFileEntry(unpack(arg))
+	end
+end
+
+function OSFileEntry:init(path, name, type)
+	local retVal = Polycore.OSFileEntry_init(self.__ptr, path, name, type)
+end
+
+function OSFileEntry:__delete()
+	if self then Polycore.delete_OSFileEntry(self.__ptr) end
+end

+ 110 - 0
bindings/lua/Polycode/ObjectEntry.lua

@@ -0,0 +1,110 @@
+class "ObjectEntry"
+
+
+
+ObjectEntry.UNKNOWN_ENTRY = - 1
+ObjectEntry.FLOAT_ENTRY = 0
+ObjectEntry.INT_ENTRY = 1
+ObjectEntry.BOOL_ENTRY = 2
+ObjectEntry.ARRAY_ENTRY = 3
+ObjectEntry.STRING_ENTRY = 4
+ObjectEntry.CONTAINER_ENTRY = 5
+function ObjectEntry:__getvar(name)
+	if name == "type" then
+		return Polycore.ObjectEntry_get_type(self.__ptr)
+	elseif name == "name" then
+		return Polycore.ObjectEntry_get_name(self.__ptr)
+	elseif name == "NumberVal" then
+		return Polycore.ObjectEntry_get_NumberVal(self.__ptr)
+	elseif name == "intVal" then
+		return Polycore.ObjectEntry_get_intVal(self.__ptr)
+	elseif name == "stringVal" then
+		return Polycore.ObjectEntry_get_stringVal(self.__ptr)
+	elseif name == "boolVal" then
+		return Polycore.ObjectEntry_get_boolVal(self.__ptr)
+	elseif name == "length" then
+		return Polycore.ObjectEntry_get_length(self.__ptr)
+	end
+end
+
+
+function ObjectEntry:__setvar(name,value)
+	if name == "type" then
+		Polycore.ObjectEntry_set_type(self.__ptr, value)
+		return true
+	elseif name == "name" then
+		Polycore.ObjectEntry_set_name(self.__ptr, value)
+		return true
+	elseif name == "NumberVal" then
+		Polycore.ObjectEntry_set_NumberVal(self.__ptr, value)
+		return true
+	elseif name == "intVal" then
+		Polycore.ObjectEntry_set_intVal(self.__ptr, value)
+		return true
+	elseif name == "stringVal" then
+		Polycore.ObjectEntry_set_stringVal(self.__ptr, value)
+		return true
+	elseif name == "boolVal" then
+		Polycore.ObjectEntry_set_boolVal(self.__ptr, value)
+		return true
+	elseif name == "length" then
+		Polycore.ObjectEntry_set_length(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function ObjectEntry:ObjectEntry(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ObjectEntry(unpack(arg))
+	end
+end
+
+function ObjectEntry:readNumber(key, out)
+	local retVal = Polycore.ObjectEntry_readNumber(self.__ptr, key, out.__ptr)
+	return retVal
+end
+
+function ObjectEntry:readString(key, out)
+	local retVal = Polycore.ObjectEntry_readString(self.__ptr, key, out.__ptr)
+	return retVal
+end
+
+function ObjectEntry:readBool(key, out)
+	local retVal = Polycore.ObjectEntry_readBool(self.__ptr, key, out.__ptr)
+	return retVal
+end
+
+function ObjectEntry:addChild(name)
+	local retVal = Polycore.ObjectEntry_addChild(self.__ptr, name)
+	if retVal == nil then return nil end
+	local __c = _G["ObjectEntry"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ObjectEntry:getTypedName()
+	local retVal =  Polycore.ObjectEntry_getTypedName(self.__ptr)
+	return retVal
+end
+
+function ObjectEntry:setTypedName(str)
+	local retVal = Polycore.ObjectEntry_setTypedName(self.__ptr, str)
+end
+
+function ObjectEntry:Clear()
+	local retVal =  Polycore.ObjectEntry_Clear(self.__ptr)
+end
+
+function ObjectEntry:__delete()
+	if self then Polycore.delete_ObjectEntry(self.__ptr) end
+end

+ 169 - 0
bindings/lua/Polycode/OpenGLGraphicsInterface.lua

@@ -0,0 +1,169 @@
+class "OpenGLGraphicsInterface"
+
+
+
+function OpenGLGraphicsInterface:__getvar(name)
+	if name == "lineSmooth" then
+		return Polycore.OpenGLGraphicsInterface_get_lineSmooth(self.__ptr)
+	end
+end
+
+
+function OpenGLGraphicsInterface:__setvar(name,value)
+	if name == "lineSmooth" then
+		Polycore.OpenGLGraphicsInterface_set_lineSmooth(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function OpenGLGraphicsInterface:OpenGLGraphicsInterface(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.OpenGLGraphicsInterface(unpack(arg))
+	end
+end
+
+function OpenGLGraphicsInterface:createTexture(texture)
+	local retVal = Polycore.OpenGLGraphicsInterface_createTexture(self.__ptr, texture.__ptr)
+end
+
+function OpenGLGraphicsInterface:destroyTexture(texture)
+	local retVal = Polycore.OpenGLGraphicsInterface_destroyTexture(self.__ptr, texture.__ptr)
+end
+
+function OpenGLGraphicsInterface:setViewport(x, y, width, height)
+	local retVal = Polycore.OpenGLGraphicsInterface_setViewport(self.__ptr, x, y, width, height)
+end
+
+function OpenGLGraphicsInterface:clearBuffers(clearColor, colorBuffer, depthBuffer, stencilBuffer)
+	local retVal = Polycore.OpenGLGraphicsInterface_clearBuffers(self.__ptr, clearColor.__ptr, colorBuffer, depthBuffer, stencilBuffer)
+end
+
+function OpenGLGraphicsInterface:setParamInShader(shader, param, localParam)
+	local retVal = Polycore.OpenGLGraphicsInterface_setParamInShader(self.__ptr, shader.__ptr, param.__ptr, localParam.__ptr)
+end
+
+function OpenGLGraphicsInterface:setAttributeInShader(shader, attribute, attributeBinding)
+	local retVal = Polycore.OpenGLGraphicsInterface_setAttributeInShader(self.__ptr, shader.__ptr, attribute.__ptr, attributeBinding.__ptr)
+end
+
+function OpenGLGraphicsInterface:disableAttribute(shader, attribute)
+	local retVal = Polycore.OpenGLGraphicsInterface_disableAttribute(self.__ptr, shader.__ptr, attribute.__ptr)
+end
+
+function OpenGLGraphicsInterface:useShader(shader)
+	local retVal = Polycore.OpenGLGraphicsInterface_useShader(self.__ptr, shader.__ptr)
+end
+
+function OpenGLGraphicsInterface:createProgram(program)
+	local retVal = Polycore.OpenGLGraphicsInterface_createProgram(self.__ptr, program.__ptr)
+end
+
+function OpenGLGraphicsInterface:destroyProgram(program)
+	local retVal = Polycore.OpenGLGraphicsInterface_destroyProgram(self.__ptr, program.__ptr)
+end
+
+function OpenGLGraphicsInterface:createVBOForVertexArray(array)
+	local retVal = Polycore.OpenGLGraphicsInterface_createVBOForVertexArray(self.__ptr, array.__ptr)
+end
+
+function OpenGLGraphicsInterface:createMesh(mesh)
+	local retVal = Polycore.OpenGLGraphicsInterface_createMesh(self.__ptr, mesh.__ptr)
+end
+
+function OpenGLGraphicsInterface:destroyMesh(mesh)
+	local retVal = Polycore.OpenGLGraphicsInterface_destroyMesh(self.__ptr, mesh.__ptr)
+end
+
+function OpenGLGraphicsInterface:createShader(shader)
+	local retVal = Polycore.OpenGLGraphicsInterface_createShader(self.__ptr, shader.__ptr)
+end
+
+function OpenGLGraphicsInterface:destroyShader(shader)
+	local retVal = Polycore.OpenGLGraphicsInterface_destroyShader(self.__ptr, shader.__ptr)
+end
+
+function OpenGLGraphicsInterface:beginDrawCall()
+	local retVal =  Polycore.OpenGLGraphicsInterface_beginDrawCall(self.__ptr)
+end
+
+function OpenGLGraphicsInterface:endDrawCall()
+	local retVal =  Polycore.OpenGLGraphicsInterface_endDrawCall(self.__ptr)
+end
+
+function OpenGLGraphicsInterface:setBlendingMode(bl_endingMode)
+	local retVal = Polycore.OpenGLGraphicsInterface_setBlendingMode(self.__ptr, bl_endingMode)
+end
+
+function OpenGLGraphicsInterface:createRenderBuffer(r_enderBuffer)
+	local retVal = Polycore.OpenGLGraphicsInterface_createRenderBuffer(self.__ptr, r_enderBuffer.__ptr)
+end
+
+function OpenGLGraphicsInterface:destroyRenderBuffer(r_enderBuffer)
+	local retVal = Polycore.OpenGLGraphicsInterface_destroyRenderBuffer(self.__ptr, r_enderBuffer.__ptr)
+end
+
+function OpenGLGraphicsInterface:bindRenderBuffer(r_enderBuffer)
+	local retVal = Polycore.OpenGLGraphicsInterface_bindRenderBuffer(self.__ptr, r_enderBuffer.__ptr)
+end
+
+function OpenGLGraphicsInterface:createVertexBuffer(dataArray)
+	local retVal = Polycore.OpenGLGraphicsInterface_createVertexBuffer(self.__ptr, dataArray.__ptr)
+end
+
+function OpenGLGraphicsInterface:createIndexBuffer(dataArray)
+	local retVal = Polycore.OpenGLGraphicsInterface_createIndexBuffer(self.__ptr, dataArray.__ptr)
+end
+
+function OpenGLGraphicsInterface:destroyBuffer(array)
+	local retVal = Polycore.OpenGLGraphicsInterface_destroyBuffer(self.__ptr, array.__ptr)
+end
+
+function OpenGLGraphicsInterface:drawIndices(type, indexArray)
+	local retVal = Polycore.OpenGLGraphicsInterface_drawIndices(self.__ptr, type, indexArray.__ptr)
+end
+
+function OpenGLGraphicsInterface:drawArrays(type, vertexCount)
+	local retVal = Polycore.OpenGLGraphicsInterface_drawArrays(self.__ptr, type, vertexCount)
+end
+
+function OpenGLGraphicsInterface:enableDepthTest(val)
+	local retVal = Polycore.OpenGLGraphicsInterface_enableDepthTest(self.__ptr, val)
+end
+
+function OpenGLGraphicsInterface:enableDepthWrite(val)
+	local retVal = Polycore.OpenGLGraphicsInterface_enableDepthWrite(self.__ptr, val)
+end
+
+function OpenGLGraphicsInterface:enableBackfaceCulling(val)
+	local retVal = Polycore.OpenGLGraphicsInterface_enableBackfaceCulling(self.__ptr, val)
+end
+
+function OpenGLGraphicsInterface:setLineSize(lineSize)
+	local retVal = Polycore.OpenGLGraphicsInterface_setLineSize(self.__ptr, lineSize)
+end
+
+function OpenGLGraphicsInterface:setWireframeMode(val)
+	local retVal = Polycore.OpenGLGraphicsInterface_setWireframeMode(self.__ptr, val)
+end
+
+function OpenGLGraphicsInterface:enableScissor(val)
+	local retVal = Polycore.OpenGLGraphicsInterface_enableScissor(self.__ptr, val)
+end
+
+function OpenGLGraphicsInterface:setScissorBox(box)
+	local retVal = Polycore.OpenGLGraphicsInterface_setScissorBox(self.__ptr, box.__ptr)
+end
+
+function OpenGLGraphicsInterface:__delete()
+	if self then Polycore.delete_OpenGLGraphicsInterface(self.__ptr) end
+end

+ 45 - 0
bindings/lua/Polycode/Perlin.lua

@@ -0,0 +1,45 @@
+class "Perlin"
+
+
+
+
+
+
+
+function Perlin:Perlin(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Perlin(unpack(arg))
+	end
+end
+
+function Perlin:Get2DTiledX(x, y, t)
+	local retVal = Polycore.Perlin_Get2DTiledX(self.__ptr, x, y, t)
+	return retVal
+end
+
+function Perlin:Get(x, y)
+	local retVal = Polycore.Perlin_Get(self.__ptr, x, y)
+	return retVal
+end
+
+function Perlin:Get2D(x, y)
+	local retVal = Polycore.Perlin_Get2D(self.__ptr, x, y)
+	return retVal
+end
+
+function Perlin:Get3D(x, y, z)
+	local retVal = Polycore.Perlin_Get3D(self.__ptr, x, y, z)
+	return retVal
+end
+
+function Perlin:__delete()
+	if self then Polycore.delete_Perlin(self.__ptr) end
+end

+ 43 - 0
bindings/lua/Polycode/PhysFSFile.lua

@@ -0,0 +1,43 @@
+class "PhysFSFile"
+
+
+
+function PhysFSFile:__getvar(name)
+	if name == "physFSFile" then
+		local retVal = Polycore.PhysFSFile_get_physFSFile(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["PHYSFS_File"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function PhysFSFile:__setvar(name,value)
+	return false
+end
+
+
+function PhysFSFile:read(ptr, size, count)
+	local retVal = Polycore.PhysFSFile_read(self.__ptr, ptr.__ptr, size.__ptr, count.__ptr)
+	return retVal
+end
+
+function PhysFSFile:write(ptr, size, count)
+	local retVal = Polycore.PhysFSFile_write(self.__ptr, ptr.__ptr, size.__ptr, count.__ptr)
+	return retVal
+end
+
+function PhysFSFile:seek(offset, origin)
+	local retVal = Polycore.PhysFSFile_seek(self.__ptr, offset, origin)
+	return retVal
+end
+
+function PhysFSFile:tell()
+	local retVal =  Polycore.PhysFSFile_tell(self.__ptr)
+	return retVal
+end
+
+function PhysFSFile:__delete()
+	if self then Polycore.delete_PhysFSFile(self.__ptr) end
+end

+ 50 - 0
bindings/lua/Polycode/PhysFSFileProvider.lua

@@ -0,0 +1,50 @@
+class "PhysFSFileProvider"
+
+
+
+
+
+
+
+function PhysFSFileProvider:PhysFSFileProvider(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.PhysFSFileProvider(unpack(arg))
+	end
+end
+
+function PhysFSFileProvider:openFile(fileName, opts)
+	local retVal = Polycore.PhysFSFileProvider_openFile(self.__ptr, fileName, opts)
+	if retVal == nil then return nil end
+	local __c = _G["Polycode::CoreFile"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function PhysFSFileProvider:closeFile(file)
+	local retVal = Polycore.PhysFSFileProvider_closeFile(self.__ptr, file.__ptr)
+end
+
+function PhysFSFileProvider:parseFolder(pathString, showHidden, targetVector)
+	local retVal = Polycore.PhysFSFileProvider_parseFolder(self.__ptr, pathString, showHidden, targetVector.__ptr)
+	return retVal
+end
+
+function PhysFSFileProvider:addSource(source)
+	local retVal = Polycore.PhysFSFileProvider_addSource(self.__ptr, source)
+end
+
+function PhysFSFileProvider:removeSource(source)
+	local retVal = Polycore.PhysFSFileProvider_removeSource(self.__ptr, source)
+end
+
+function PhysFSFileProvider:__delete()
+	if self then Polycore.delete_PhysFSFileProvider(self.__ptr) end
+end

+ 43 - 0
bindings/lua/Polycode/PolycodeViewBase.lua

@@ -0,0 +1,43 @@
+class "PolycodeViewBase"
+
+
+
+function PolycodeViewBase:__getvar(name)
+	if name == "windowData" then
+		local retVal = Polycore.PolycodeViewBase_get_windowData(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "resizable" then
+		return Polycore.PolycodeViewBase_get_resizable(self.__ptr)
+	end
+end
+
+
+function PolycodeViewBase:__setvar(name,value)
+	if name == "resizable" then
+		Polycore.PolycodeViewBase_set_resizable(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function PolycodeViewBase:PolycodeViewBase(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.PolycodeViewBase(unpack(arg))
+	end
+end
+
+function PolycodeViewBase:__delete()
+	if self then Polycore.delete_PolycodeViewBase(self.__ptr) end
+end

+ 48 - 0
bindings/lua/Polycode/ProgramAttribute.lua

@@ -0,0 +1,48 @@
+class "ProgramAttribute"
+
+
+
+function ProgramAttribute:__getvar(name)
+	if name == "size" then
+		return Polycore.ProgramAttribute_get_size(self.__ptr)
+	elseif name == "name" then
+		return Polycore.ProgramAttribute_get_name(self.__ptr)
+	elseif name == "platformData" then
+		local retVal = Polycore.ProgramAttribute_get_platformData(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function ProgramAttribute:__setvar(name,value)
+	if name == "size" then
+		Polycore.ProgramAttribute_set_size(self.__ptr, value)
+		return true
+	elseif name == "name" then
+		Polycore.ProgramAttribute_set_name(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function ProgramAttribute:ProgramAttribute(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ProgramAttribute(unpack(arg))
+	end
+end
+
+function ProgramAttribute:__delete()
+	if self then Polycore.delete_ProgramAttribute(self.__ptr) end
+end

+ 70 - 0
bindings/lua/Polycode/ProgramParam.lua

@@ -0,0 +1,70 @@
+class "ProgramParam"
+
+
+
+ProgramParam.PARAM_UNKNOWN = 0
+ProgramParam.PARAM_NUMBER = 1
+ProgramParam.PARAM_VECTOR2 = 2
+ProgramParam.PARAM_VECTOR3 = 3
+ProgramParam.PARAM_COLOR = 4
+ProgramParam.PARAM_MATRIX = 5
+ProgramParam.PARAM_TEXTURE = 6
+ProgramParam.PARAM_CUBEMAP = 7
+function ProgramParam:__getvar(name)
+	if name == "name" then
+		return Polycore.ProgramParam_get_name(self.__ptr)
+	elseif name == "type" then
+		return Polycore.ProgramParam_get_type(self.__ptr)
+	elseif name == "platformData" then
+		local retVal = Polycore.ProgramParam_get_platformData(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "globalParam" then
+		local retVal = Polycore.ProgramParam_get_globalParam(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["LocalShaderParam"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function ProgramParam:__setvar(name,value)
+	if name == "name" then
+		Polycore.ProgramParam_set_name(self.__ptr, value)
+		return true
+	elseif name == "type" then
+		Polycore.ProgramParam_set_type(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function ProgramParam:ProgramParam(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ProgramParam(unpack(arg))
+	end
+end
+
+function ProgramParam.createParamData(type)
+	local retVal = Polycore.ProgramParam_createParamData(type)
+	if retVal == nil then return nil end
+	local __c = _G["void"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ProgramParam:__delete()
+	if self then Polycore.delete_ProgramParam(self.__ptr) end
+end

+ 33 - 0
bindings/lua/Polycode/ProgramResourceLoader.lua

@@ -0,0 +1,33 @@
+class "ProgramResourceLoader"
+
+
+
+
+
+
+
+function ProgramResourceLoader:ProgramResourceLoader(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ProgramResourceLoader(unpack(arg))
+	end
+end
+
+function ProgramResourceLoader:loadResource(path, targetPool)
+	local retVal = Polycore.ProgramResourceLoader_loadResource(self.__ptr, path, targetPool.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Resource"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ProgramResourceLoader:__delete()
+	if self then Polycore.delete_ProgramResourceLoader(self.__ptr) end
+end

+ 50 - 0
bindings/lua/Polycode/QuatTriple.lua

@@ -0,0 +1,50 @@
+class "QuatTriple"
+
+
+
+function QuatTriple:__getvar(name)
+	if name == "q1" then
+		local retVal = Polycore.QuatTriple_get_q1(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Quaternion"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "q2" then
+		local retVal = Polycore.QuatTriple_get_q2(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Quaternion"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "q3" then
+		local retVal = Polycore.QuatTriple_get_q3(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Quaternion"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "time" then
+		return Polycore.QuatTriple_get_time(self.__ptr)
+	end
+end
+
+
+function QuatTriple:__setvar(name,value)
+	if name == "q1" then
+		Polycore.QuatTriple_set_q1(self.__ptr, value.__ptr)
+		return true
+	elseif name == "q2" then
+		Polycore.QuatTriple_set_q2(self.__ptr, value.__ptr)
+		return true
+	elseif name == "q3" then
+		Polycore.QuatTriple_set_q3(self.__ptr, value.__ptr)
+		return true
+	elseif name == "time" then
+		Polycore.QuatTriple_set_time(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function QuatTriple:__delete()
+	if self then Polycore.delete_QuatTriple(self.__ptr) end
+end

+ 168 - 0
bindings/lua/Polycode/Quaternion.lua

@@ -0,0 +1,168 @@
+class "Quaternion"
+
+
+
+function Quaternion:__getvar(name)
+	if name == "x" then
+		return Polycore.Quaternion_get_x(self.__ptr)
+	elseif name == "y" then
+		return Polycore.Quaternion_get_y(self.__ptr)
+	elseif name == "z" then
+		return Polycore.Quaternion_get_z(self.__ptr)
+	elseif name == "w" then
+		return Polycore.Quaternion_get_w(self.__ptr)
+	end
+end
+
+
+function Quaternion:__setvar(name,value)
+	if name == "x" then
+		Polycore.Quaternion_set_x(self.__ptr, value)
+		return true
+	elseif name == "y" then
+		Polycore.Quaternion_set_y(self.__ptr, value)
+		return true
+	elseif name == "z" then
+		Polycore.Quaternion_set_z(self.__ptr, value)
+		return true
+	elseif name == "w" then
+		Polycore.Quaternion_set_w(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function Quaternion:Quaternion(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Quaternion(unpack(arg))
+	end
+end
+
+function Quaternion:setFromMatrix(_mat)
+	local retVal = Polycore.Quaternion_setFromMatrix(self.__ptr, _mat.__ptr)
+end
+
+function Quaternion.Slerp(fT, rkP, rkQ, shortestPath)
+	local retVal = Polycore.Quaternion_Slerp(fT, rkP.__ptr, rkQ.__ptr, shortestPath)
+	if retVal == nil then return nil end
+	local __c = _G["Quaternion"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Quaternion:Dot(rkQ)
+	local retVal = Polycore.Quaternion_Dot(self.__ptr, rkQ.__ptr)
+	return retVal
+end
+
+function Quaternion:Log()
+	local retVal =  Polycore.Quaternion_Log(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Quaternion"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Quaternion:Exp()
+	local retVal =  Polycore.Quaternion_Exp(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Quaternion"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Quaternion:Norm()
+	local retVal =  Polycore.Quaternion_Norm(self.__ptr)
+	return retVal
+end
+
+function Quaternion:Normalize()
+	local retVal =  Polycore.Quaternion_Normalize(self.__ptr)
+	return retVal
+end
+
+function Quaternion:lookAt(D, upVector)
+	local retVal = Polycore.Quaternion_lookAt(self.__ptr, D.__ptr, upVector.__ptr)
+end
+
+function Quaternion:createFromMatrix(matrix)
+	local retVal = Polycore.Quaternion_createFromMatrix(self.__ptr, matrix.__ptr)
+end
+
+function Quaternion.Squad(fT, rkP, rkA, rkB, rkQ, shortestPath)
+	local retVal = Polycore.Quaternion_Squad(fT, rkP.__ptr, rkA.__ptr, rkB.__ptr, rkQ.__ptr, shortestPath)
+	if retVal == nil then return nil end
+	local __c = _G["Quaternion"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Quaternion:Inverse()
+	local retVal =  Polycore.Quaternion_Inverse(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Quaternion"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Quaternion:set(w, x, y, z)
+	local retVal = Polycore.Quaternion_set(self.__ptr, w, x, y, z)
+end
+
+function Quaternion:InvSqrt(x)
+	local retVal = Polycore.Quaternion_InvSqrt(self.__ptr, x)
+	return retVal
+end
+
+function Quaternion:fromAxes(az, ay, ax)
+	local retVal = Polycore.Quaternion_fromAxes(self.__ptr, az, ay, ax)
+end
+
+function Quaternion:fromAngleAxis(rfAngle, rkAxis)
+	local retVal = Polycore.Quaternion_fromAngleAxis(self.__ptr, rfAngle, rkAxis.__ptr)
+end
+
+function Quaternion:toEulerAngles()
+	local retVal =  Polycore.Quaternion_toEulerAngles(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Quaternion:toAngleAxis(rfAngle, rkAxis)
+	local retVal = Polycore.Quaternion_toAngleAxis(self.__ptr, rfAngle, rkAxis.__ptr)
+end
+
+function Quaternion:createFromAxisAngle(x, y, z, degrees)
+	local retVal = Polycore.Quaternion_createFromAxisAngle(self.__ptr, x, y, z, degrees)
+end
+
+function Quaternion:createMatrix()
+	local retVal =  Polycore.Quaternion_createMatrix(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Matrix4"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Quaternion:applyTo(v)
+	local retVal = Polycore.Quaternion_applyTo(self.__ptr, v.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Quaternion:__delete()
+	if self then Polycore.delete_Quaternion(self.__ptr) end
+end

+ 37 - 0
bindings/lua/Polycode/QuaternionCurve.lua

@@ -0,0 +1,37 @@
+class "QuaternionCurve"
+
+
+
+
+
+
+
+function QuaternionCurve:QuaternionCurve(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.QuaternionCurve(unpack(arg))
+	end
+end
+
+function QuaternionCurve:interpolate(t, useShortestPath)
+	local retVal = Polycore.QuaternionCurve_interpolate(self.__ptr, t, useShortestPath)
+	if retVal == nil then return nil end
+	local __c = _G["Quaternion"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function QuaternionCurve:generatePointsFromCurves(wCurve, xCurve, yCurve, zCurve)
+	local retVal = Polycore.QuaternionCurve_generatePointsFromCurves(self.__ptr, wCurve.__ptr, xCurve.__ptr, yCurve.__ptr, zCurve.__ptr)
+end
+
+function QuaternionCurve:__delete()
+	if self then Polycore.delete_QuaternionCurve(self.__ptr) end
+end

+ 98 - 0
bindings/lua/Polycode/Ray.lua

@@ -0,0 +1,98 @@
+class "Ray"
+
+
+
+function Ray:__getvar(name)
+	if name == "origin" then
+		local retVal = Polycore.Ray_get_origin(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "direction" then
+		local retVal = Polycore.Ray_get_direction(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "inv_direction" then
+		local retVal = Polycore.Ray_get_inv_direction(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function Ray:__setvar(name,value)
+	if name == "origin" then
+		Polycore.Ray_set_origin(self.__ptr, value.__ptr)
+		return true
+	elseif name == "direction" then
+		Polycore.Ray_set_direction(self.__ptr, value.__ptr)
+		return true
+	elseif name == "inv_direction" then
+		Polycore.Ray_set_inv_direction(self.__ptr, value.__ptr)
+		return true
+	end
+	return false
+end
+
+
+function Ray:Ray(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Ray(unpack(arg))
+	end
+end
+
+function Ray:boxIntersect(box, transformMatrix, near, far)
+	local retVal = Polycore.Ray_boxIntersect(self.__ptr, box.__ptr, transformMatrix.__ptr, near, far)
+	return retVal
+end
+
+function Ray:planeIntersectPoint(planeNormal, planeDistance)
+	local retVal = Polycore.Ray_planeIntersectPoint(self.__ptr, planeNormal.__ptr, planeDistance)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Ray:tranformByMatrix(matrix)
+	local retVal = Polycore.Ray_tranformByMatrix(self.__ptr, matrix.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Ray"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Ray:closestPointOnRay(point)
+	local retVal = Polycore.Ray_closestPointOnRay(self.__ptr, point.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Ray:closestPointsBetween(ray2, point1, point2)
+	local retVal = Polycore.Ray_closestPointsBetween(self.__ptr, ray2.__ptr, point1.__ptr, point2.__ptr)
+	return retVal
+end
+
+function Ray:polygonIntersect(v1, v2, v3)
+	local retVal = Polycore.Ray_polygonIntersect(self.__ptr, v1.__ptr, v2.__ptr, v3.__ptr)
+	return retVal
+end
+
+function Ray:__delete()
+	if self then Polycore.delete_Ray(self.__ptr) end
+end

+ 84 - 0
bindings/lua/Polycode/Rectangle.lua

@@ -0,0 +1,84 @@
+class "Rectangle"
+
+
+
+function Rectangle:__getvar(name)
+	if name == "x" then
+		return Polycore.Rectangle_get_x(self.__ptr)
+	elseif name == "y" then
+		return Polycore.Rectangle_get_y(self.__ptr)
+	elseif name == "w" then
+		return Polycore.Rectangle_get_w(self.__ptr)
+	elseif name == "h" then
+		return Polycore.Rectangle_get_h(self.__ptr)
+	end
+end
+
+
+function Rectangle:__setvar(name,value)
+	if name == "x" then
+		Polycore.Rectangle_set_x(self.__ptr, value)
+		return true
+	elseif name == "y" then
+		Polycore.Rectangle_set_y(self.__ptr, value)
+		return true
+	elseif name == "w" then
+		Polycore.Rectangle_set_w(self.__ptr, value)
+		return true
+	elseif name == "h" then
+		Polycore.Rectangle_set_h(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function Rectangle:Rectangle(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Rectangle(unpack(arg))
+	end
+end
+
+function Rectangle:setRect(x, y, w, h)
+	local retVal = Polycore.Rectangle_setRect(self.__ptr, x, y, w, h)
+end
+
+function Rectangle:Clipped(rect)
+	local retVal = Polycore.Rectangle_Clipped(self.__ptr, rect.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Rectangle"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Rectangle:minX()
+	local retVal =  Polycore.Rectangle_minX(self.__ptr)
+	return retVal
+end
+
+function Rectangle:maxX()
+	local retVal =  Polycore.Rectangle_maxX(self.__ptr)
+	return retVal
+end
+
+function Rectangle:minY()
+	local retVal =  Polycore.Rectangle_minY(self.__ptr)
+	return retVal
+end
+
+function Rectangle:maxY()
+	local retVal =  Polycore.Rectangle_maxY(self.__ptr)
+	return retVal
+end
+
+function Rectangle:__delete()
+	if self then Polycore.delete_Rectangle(self.__ptr) end
+end

+ 65 - 0
bindings/lua/Polycode/RenderBuffer.lua

@@ -0,0 +1,65 @@
+class "RenderBuffer"
+
+
+
+function RenderBuffer:__getvar(name)
+	if name == "colorTexture" then
+		local retVal = Polycore.RenderBuffer_get_colorTexture(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Texture"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "depthTexture" then
+		local retVal = Polycore.RenderBuffer_get_depthTexture(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Texture"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "platformData" then
+		local retVal = Polycore.RenderBuffer_get_platformData(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "depthBufferPlatformData" then
+		local retVal = Polycore.RenderBuffer_get_depthBufferPlatformData(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function RenderBuffer:__setvar(name,value)
+	return false
+end
+
+
+function RenderBuffer:RenderBuffer(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.RenderBuffer(unpack(arg))
+	end
+end
+
+function RenderBuffer:getWidth()
+	local retVal =  Polycore.RenderBuffer_getWidth(self.__ptr)
+	return retVal
+end
+
+function RenderBuffer:getHeight()
+	local retVal =  Polycore.RenderBuffer_getHeight(self.__ptr)
+	return retVal
+end
+
+function RenderBuffer:__delete()
+	if self then Polycore.delete_RenderBuffer(self.__ptr) end
+end

+ 75 - 0
bindings/lua/Polycode/RenderDataArray.lua

@@ -0,0 +1,75 @@
+class "RenderDataArray"
+
+
+
+RenderDataArray.VERTEX_DATA_ARRAY = 0
+RenderDataArray.COLOR_DATA_ARRAY = 1
+RenderDataArray.NORMAL_DATA_ARRAY = 2
+RenderDataArray.TEXCOORD_DATA_ARRAY = 3
+RenderDataArray.TANGENT_DATA_ARRAY = 4
+RenderDataArray.BONE_WEIGHT_DATA_ARRAY = 5
+RenderDataArray.BONE_INDEX_DATA_ARRAY = 6
+RenderDataArray.INDEX_DATA_ARRAY = 7
+RenderDataArray.TEXCOORD2_DATA_ARRAY = 8
+function RenderDataArray:__getvar(name)
+	if name == "type" then
+		return Polycore.RenderDataArray_get_type(self.__ptr)
+	elseif name == "customArrayName" then
+		return Polycore.RenderDataArray_get_customArrayName(self.__ptr)
+	elseif name == "hasVBO" then
+		return Polycore.RenderDataArray_get_hasVBO(self.__ptr)
+	elseif name == "platformData" then
+		local retVal = Polycore.RenderDataArray_get_platformData(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function RenderDataArray:__setvar(name,value)
+	if name == "type" then
+		Polycore.RenderDataArray_set_type(self.__ptr, value)
+		return true
+	elseif name == "customArrayName" then
+		Polycore.RenderDataArray_set_customArrayName(self.__ptr, value)
+		return true
+	elseif name == "hasVBO" then
+		Polycore.RenderDataArray_set_hasVBO(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function RenderDataArray:RenderDataArray(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.RenderDataArray(unpack(arg))
+	end
+end
+
+function RenderDataArray:getArrayData()
+	local retVal =  Polycore.RenderDataArray_getArrayData(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["void"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function RenderDataArray:getDataSize()
+	local retVal =  Polycore.RenderDataArray_getDataSize(self.__ptr)
+	return retVal
+end
+
+function RenderDataArray:__delete()
+	if self then Polycore.delete_RenderDataArray(self.__ptr) end
+end

+ 27 - 0
bindings/lua/Polycode/RenderFrame.lua

@@ -0,0 +1,27 @@
+class "RenderFrame"
+
+
+
+function RenderFrame:__getvar(name)
+	if name == "jobQueue" then
+		local retVal = Polycore.RenderFrame_get_jobQueue(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["queue<RendererThreadJob>"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function RenderFrame:__setvar(name,value)
+	if name == "jobQueue" then
+		Polycore.RenderFrame_set_jobQueue(self.__ptr, value.__ptr)
+		return true
+	end
+	return false
+end
+
+
+function RenderFrame:__delete()
+	if self then Polycore.delete_RenderFrame(self.__ptr) end
+end

+ 43 - 0
bindings/lua/Polycode/RenderTargetBinding.lua

@@ -0,0 +1,43 @@
+class "RenderTargetBinding"
+
+
+
+RenderTargetBinding.MODE_IN = 0
+RenderTargetBinding.MODE_OUT = 1
+RenderTargetBinding.MODE_COLOR = 2
+RenderTargetBinding.MODE_DEPTH = 3
+function RenderTargetBinding:__getvar(name)
+	if name == "id" then
+		return Polycore.RenderTargetBinding_get_id(self.__ptr)
+	elseif name == "name" then
+		return Polycore.RenderTargetBinding_get_name(self.__ptr)
+	elseif name == "mode" then
+		return Polycore.RenderTargetBinding_get_mode(self.__ptr)
+	elseif name == "buffer" then
+		local retVal = Polycore.RenderTargetBinding_get_buffer(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["RenderBuffer"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function RenderTargetBinding:__setvar(name,value)
+	if name == "id" then
+		Polycore.RenderTargetBinding_set_id(self.__ptr, value)
+		return true
+	elseif name == "name" then
+		Polycore.RenderTargetBinding_set_name(self.__ptr, value)
+		return true
+	elseif name == "mode" then
+		Polycore.RenderTargetBinding_set_mode(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function RenderTargetBinding:__delete()
+	if self then Polycore.delete_RenderTargetBinding(self.__ptr) end
+end

+ 100 - 0
bindings/lua/Polycode/RenderThread.lua

@@ -0,0 +1,100 @@
+class "RenderThread"
+
+
+
+RenderThread.JOB_REQUEST_CONTEXT_CHANGE = 0
+RenderThread.JOB_CREATE_TEXTURE = 1
+RenderThread.JOB_PROCESS_DRAW_BUFFER = 2
+RenderThread.JOB_END_FRAME = 3
+RenderThread.JOB_CREATE_PROGRAM = 4
+RenderThread.JOB_CREATE_SHADER = 5
+RenderThread.JOB_BEGIN_FRAME = 6
+RenderThread.JOB_CREATE_VERTEX_BUFFERS = 7
+RenderThread.JOB_DESTROY_TEXTURE = 8
+RenderThread.JOB_DESTROY_SHADER = 9
+RenderThread.JOB_DESTROY_PROGRAM = 10
+RenderThread.JOB_DESTROY_BUFFER = 11
+RenderThread.JOB_CREATE_RENDER_BUFFER = 12
+RenderThread.JOB_DESTROY_RENDER_BUFFER = 13
+RenderThread.JOB_SET_TEXTURE_PARAM = 14
+RenderThread.JOB_DESTROY_SHADER_BINDING = 16
+RenderThread.JOB_DESTROY_SHADER_PARAM = 17
+RenderThread.JOB_CREATE_MESH = 18
+RenderThread.JOB_DESTROY_MESH = 19
+
+
+
+
+function RenderThread:RenderThread(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.RenderThread(unpack(arg))
+	end
+end
+
+function RenderThread:setGraphicsInterface(core, graphicsInterface)
+	local retVal = Polycore.RenderThread_setGraphicsInterface(self.__ptr, core.__ptr, graphicsInterface.__ptr)
+end
+
+function RenderThread:runThread()
+	local retVal =  Polycore.RenderThread_runThread(self.__ptr)
+end
+
+function RenderThread:enqueueFrame(frame)
+	local retVal = Polycore.RenderThread_enqueueFrame(self.__ptr, frame.__ptr)
+end
+
+function RenderThread:enqueueJob(jobType, data, data2)
+	local retVal = Polycore.RenderThread_enqueueJob(self.__ptr, jobType, data.__ptr, data2.__ptr)
+end
+
+function RenderThread:processJob(job)
+	local retVal = Polycore.RenderThread_processJob(self.__ptr, job.__ptr)
+end
+
+function RenderThread:getShaderBinding()
+	local retVal =  Polycore.RenderThread_getShaderBinding(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["ShaderBinding"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function RenderThread:processDrawBuffer(buffer)
+	local retVal = Polycore.RenderThread_processDrawBuffer(self.__ptr, buffer.__ptr)
+end
+
+function RenderThread:getFrameInfo()
+	local retVal =  Polycore.RenderThread_getFrameInfo(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["RenderThreadDebugInfo"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function RenderThread:clearFrameQueue()
+	local retVal =  Polycore.RenderThread_clearFrameQueue(self.__ptr)
+end
+
+function RenderThread:initGlobals()
+	local retVal =  Polycore.RenderThread_initGlobals(self.__ptr)
+end
+
+function RenderThread:lockRenderMutex()
+	local retVal =  Polycore.RenderThread_lockRenderMutex(self.__ptr)
+end
+
+function RenderThread:unlockRenderMutex()
+	local retVal =  Polycore.RenderThread_unlockRenderMutex(self.__ptr)
+end
+
+function RenderThread:__delete()
+	if self then Polycore.delete_RenderThread(self.__ptr) end
+end

+ 33 - 0
bindings/lua/Polycode/RenderThreadDebugInfo.lua

@@ -0,0 +1,33 @@
+class "RenderThreadDebugInfo"
+
+
+
+function RenderThreadDebugInfo:__getvar(name)
+	if name == "buffersProcessed" then
+		return Polycore.RenderThreadDebugInfo_get_buffersProcessed(self.__ptr)
+	elseif name == "drawCallsProcessed" then
+		return Polycore.RenderThreadDebugInfo_get_drawCallsProcessed(self.__ptr)
+	elseif name == "timeTaken" then
+		return Polycore.RenderThreadDebugInfo_get_timeTaken(self.__ptr)
+	end
+end
+
+
+function RenderThreadDebugInfo:__setvar(name,value)
+	if name == "buffersProcessed" then
+		Polycore.RenderThreadDebugInfo_set_buffersProcessed(self.__ptr, value)
+		return true
+	elseif name == "drawCallsProcessed" then
+		Polycore.RenderThreadDebugInfo_set_drawCallsProcessed(self.__ptr, value)
+		return true
+	elseif name == "timeTaken" then
+		Polycore.RenderThreadDebugInfo_set_timeTaken(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function RenderThreadDebugInfo:__delete()
+	if self then Polycore.delete_RenderThreadDebugInfo(self.__ptr) end
+end

+ 175 - 0
bindings/lua/Polycode/Renderer.lua

@@ -0,0 +1,175 @@
+class "Renderer"
+
+
+
+Renderer.BLEND_MODE_NONE = 0
+Renderer.BLEND_MODE_NORMAL = 1
+Renderer.BLEND_MODE_LIGHTEN = 2
+Renderer.BLEND_MODE_COLOR = 3
+Renderer.BLEND_MODE_PREMULTIPLIED = 4
+Renderer.BLEND_MODE_MULTIPLY = 5
+Renderer.BLEND_MODE_MATERIAL = 6
+Renderer.DEPTH_FUNCTION_GREATER = 0
+Renderer.DEPTH_FUNCTION_LEQUAL = 1
+
+
+
+
+function Renderer:setGraphicsInterface(core, graphicsInterface)
+	local retVal = Polycore.Renderer_setGraphicsInterface(self.__ptr, core.__ptr, graphicsInterface.__ptr)
+end
+
+function Renderer:getRenderThread()
+	local retVal =  Polycore.Renderer_getRenderThread(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["RenderThread"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Renderer:createCubemap(t0, t1, t2, t3, t4, t5)
+	local retVal = Polycore.Renderer_createCubemap(self.__ptr, t0.__ptr, t1.__ptr, t2.__ptr, t3.__ptr, t4.__ptr, t5.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Cubemap"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Renderer:createTexture(width, height, textureData, clamp, createMipmaps, type, filteringMode, anisotropy, framebufferTexture)
+	local retVal = Polycore.Renderer_createTexture(self.__ptr, width, height, textureData.__ptr, clamp, createMipmaps, type, filteringMode, anisotropy, framebufferTexture)
+	if retVal == nil then return nil end
+	local __c = _G["Texture"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Renderer:createRenderBuffer(width, height, attachDepthBuffer, floatingPoint)
+	local retVal = Polycore.Renderer_createRenderBuffer(self.__ptr, width, height, attachDepthBuffer, floatingPoint)
+	if retVal == nil then return nil end
+	local __c = _G["RenderBuffer"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Renderer:destroyRenderBuffer(buffer)
+	local retVal = Polycore.Renderer_destroyRenderBuffer(self.__ptr, buffer.__ptr)
+end
+
+function Renderer:destroyTexture(texture)
+	local retVal = Polycore.Renderer_destroyTexture(self.__ptr, texture.__ptr)
+end
+
+function Renderer:processDrawBuffer(buffer)
+	local retVal = Polycore.Renderer_processDrawBuffer(self.__ptr, buffer.__ptr)
+end
+
+function Renderer:setBackingResolutionScale(xScale, yScale)
+	local retVal = Polycore.Renderer_setBackingResolutionScale(self.__ptr, xScale, yScale)
+end
+
+function Renderer:getBackingResolutionScaleX()
+	local retVal =  Polycore.Renderer_getBackingResolutionScaleX(self.__ptr)
+	return retVal
+end
+
+function Renderer:getBackingResolutionScaleY()
+	local retVal =  Polycore.Renderer_getBackingResolutionScaleY(self.__ptr)
+	return retVal
+end
+
+function Renderer:createProgram(fileName)
+	local retVal = Polycore.Renderer_createProgram(self.__ptr, fileName)
+	if retVal == nil then return nil end
+	local __c = _G["ShaderProgram"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Renderer:createShader(vertexProgram, fragmentProgram)
+	local retVal = Polycore.Renderer_createShader(self.__ptr, vertexProgram.__ptr, fragmentProgram.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Shader"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Renderer:createVertexBuffers(mesh)
+	local retVal = Polycore.Renderer_createVertexBuffers(self.__ptr, mesh.__ptr)
+end
+
+function Renderer:enqueueFrameJob(jobType, data)
+	local retVal = Polycore.Renderer_enqueueFrameJob(self.__ptr, jobType, data.__ptr)
+end
+
+function Renderer:destroyProgram(program)
+	local retVal = Polycore.Renderer_destroyProgram(self.__ptr, program.__ptr)
+end
+
+function Renderer:destroyShader(shader)
+	local retVal = Polycore.Renderer_destroyShader(self.__ptr, shader.__ptr)
+end
+
+function Renderer:destroyBuffer(array)
+	local retVal = Polycore.Renderer_destroyBuffer(self.__ptr, array.__ptr)
+end
+
+function Renderer:destroyShaderBinding(binding)
+	local retVal = Polycore.Renderer_destroyShaderBinding(self.__ptr, binding.__ptr)
+end
+
+function Renderer:destroyShaderParam(param)
+	local retVal = Polycore.Renderer_destroyShaderParam(self.__ptr, param.__ptr)
+end
+
+function Renderer:setTextureParam(param, texture)
+	local retVal = Polycore.Renderer_setTextureParam(self.__ptr, param.__ptr, texture.__ptr)
+end
+
+function Renderer:setAnisotropyAmount(amount)
+	local retVal = Polycore.Renderer_setAnisotropyAmount(self.__ptr, amount)
+end
+
+function Renderer:getAnisotropyAmount()
+	local retVal =  Polycore.Renderer_getAnisotropyAmount(self.__ptr)
+	return retVal
+end
+
+function Renderer:createMesh(fileName)
+	local retVal = Polycore.Renderer_createMesh(self.__ptr, fileName)
+	if retVal == nil then return nil end
+	local __c = _G["Mesh"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Renderer:destroyMesh(mesh)
+	local retVal = Polycore.Renderer_destroyMesh(self.__ptr, mesh.__ptr)
+end
+
+function Renderer.unProject(position, modelMatrix, projectionMatrix, viewport)
+	local retVal = Polycore.Renderer_unProject(position.__ptr, modelMatrix.__ptr, projectionMatrix.__ptr, viewport.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Renderer.project(position, modelMatrix, projectionMatrix, viewport)
+	local retVal = Polycore.Renderer_project(position.__ptr, modelMatrix.__ptr, projectionMatrix.__ptr, viewport.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Renderer:beginFrame()
+	local retVal =  Polycore.Renderer_beginFrame(self.__ptr)
+end
+
+function Renderer:endFrame()
+	local retVal =  Polycore.Renderer_endFrame(self.__ptr)
+end
+
+function Renderer:__delete()
+	if self then Polycore.delete_Renderer(self.__ptr) end
+end

+ 35 - 0
bindings/lua/Polycode/RendererThreadJob.lua

@@ -0,0 +1,35 @@
+class "RendererThreadJob"
+
+
+
+function RendererThreadJob:__getvar(name)
+	if name == "jobType" then
+		return Polycore.RendererThreadJob_get_jobType(self.__ptr)
+	elseif name == "data" then
+		local retVal = Polycore.RendererThreadJob_get_data(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "data2" then
+		local retVal = Polycore.RendererThreadJob_get_data2(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function RendererThreadJob:__setvar(name,value)
+	if name == "jobType" then
+		Polycore.RendererThreadJob_set_jobType(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function RendererThreadJob:__delete()
+	if self then Polycore.delete_RendererThreadJob(self.__ptr) end
+end

+ 110 - 0
bindings/lua/Polycode/Resource.lua

@@ -0,0 +1,110 @@
+require "Polycode/EventDispatcher"
+
+class "Resource" (EventDispatcher)
+
+
+
+Resource.RESOURCE_TEXTURE = 0
+Resource.RESOURCE_MATERIAL = 1
+Resource.RESOURCE_SHADER = 2
+Resource.RESOURCE_PROGRAM = 3
+Resource.RESOURCE_MESH = 5
+Resource.RESOURCE_CUBEMAP = 6
+Resource.RESOURCE_SPRITE = 7
+Resource.RESOURCE_ENTITY_INSTANCE = 8
+Resource.RESOURCE_FONT = 9
+Resource.RESOURCE_SCRIPT = 10
+function Resource:__getvar(name)
+	if name == "reloadOnFileModify" then
+		return Polycore.Resource_get_reloadOnFileModify(self.__ptr)
+	elseif name == "resourceFileTime" then
+		local retVal = Polycore.Resource_get_resourceFileTime(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["time_t"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "platformData" then
+		local retVal = Polycore.Resource_get_platformData(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["void"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+	if EventDispatcher["__getvar"] ~= nil then
+		return EventDispatcher.__getvar(self, name)
+	end
+end
+
+
+function Resource:__setvar(name,value)
+	if name == "reloadOnFileModify" then
+		Polycore.Resource_set_reloadOnFileModify(self.__ptr, value)
+		return true
+	elseif name == "resourceFileTime" then
+		Polycore.Resource_set_resourceFileTime(self.__ptr, value.__ptr)
+		return true
+	end
+	if EventDispatcher["__setvar"] ~= nil then
+		return EventDispatcher.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function Resource:Resource(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "EventDispatcher" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Resource(unpack(arg))
+	end
+end
+
+function Resource:reloadResource()
+	local retVal =  Polycore.Resource_reloadResource(self.__ptr)
+end
+
+function Resource:getResourceName()
+	local retVal =  Polycore.Resource_getResourceName(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["String"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Resource:getResourceType()
+	local retVal =  Polycore.Resource_getResourceType(self.__ptr)
+	return retVal
+end
+
+function Resource:setResourceName(newName)
+	local retVal = Polycore.Resource_setResourceName(self.__ptr, newName)
+end
+
+function Resource:setResourcePath(path)
+	local retVal = Polycore.Resource_setResourcePath(self.__ptr, path)
+end
+
+function Resource:getResourcePath()
+	local retVal =  Polycore.Resource_getResourcePath(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["String"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Resource:__delete()
+	if self then Polycore.delete_Resource(self.__ptr) end
+end

+ 113 - 0
bindings/lua/Polycode/ResourceManager.lua

@@ -0,0 +1,113 @@
+require "Polycode/EventDispatcher"
+
+class "ResourceManager" (EventDispatcher)
+
+
+
+
+
+
+
+function ResourceManager:ResourceManager(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "EventDispatcher" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ResourceManager(unpack(arg))
+	end
+end
+
+function ResourceManager:getGlobalPool()
+	local retVal =  Polycore.ResourceManager_getGlobalPool(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["ResourcePool"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ResourceManager:getResourcePoolByName(name)
+	local retVal = Polycore.ResourceManager_getResourcePoolByName(self.__ptr, name)
+	if retVal == nil then return nil end
+	local __c = _G["ResourcePool"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ResourceManager:addResourceLoader(loader)
+	local retVal = Polycore.ResourceManager_addResourceLoader(self.__ptr, loader.__ptr)
+end
+
+function ResourceManager:getResourceLoaderForExtension(extension)
+	local retVal = Polycore.ResourceManager_getResourceLoaderForExtension(self.__ptr, extension)
+	if retVal == nil then return nil end
+	local __c = _G["ResourceLoader"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ResourceManager:removeResourceLoader(loader)
+	local retVal = Polycore.ResourceManager_removeResourceLoader(self.__ptr, loader.__ptr)
+end
+
+function ResourceManager:getNumResourceLoaders()
+	local retVal =  Polycore.ResourceManager_getNumResourceLoaders(self.__ptr)
+	return retVal
+end
+
+function ResourceManager:getResourceLoaderAtIndex(index)
+	local retVal = Polycore.ResourceManager_getResourceLoaderAtIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["ResourceLoader"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ResourceManager:addResourcePool(pool)
+	local retVal = Polycore.ResourceManager_addResourcePool(self.__ptr, pool.__ptr)
+end
+
+function ResourceManager:removeResourcePool(pool)
+	local retVal = Polycore.ResourceManager_removeResourcePool(self.__ptr, pool.__ptr)
+end
+
+function ResourceManager:getResources(resourceType)
+	local retVal = Polycore.ResourceManager_getResources(self.__ptr, resourceType)
+	if retVal == nil then return nil end
+	for i=1,count(retVal) do
+		local __c  = _G["Resource"]("__skip_ptr__")
+		__c.__ptr = retVal[i]
+		retVal[i] = __c
+	end
+	return retVal
+end
+
+function ResourceManager:removeResource(resource)
+	local retVal = Polycore.ResourceManager_removeResource(self.__ptr, resource.__ptr)
+end
+
+function ResourceManager:subscribeToResourcePool(pool)
+	local retVal = Polycore.ResourceManager_subscribeToResourcePool(self.__ptr, pool.__ptr)
+end
+
+function ResourceManager:unsubscibeFromResourcePool(pool)
+	local retVal = Polycore.ResourceManager_unsubscibeFromResourcePool(self.__ptr, pool.__ptr)
+end
+
+function ResourceManager:Update(elapsed)
+	local retVal = Polycore.ResourceManager_Update(self.__ptr, elapsed)
+end
+
+function ResourceManager:__delete()
+	if self then Polycore.delete_ResourceManager(self.__ptr) end
+end

+ 148 - 0
bindings/lua/Polycode/ResourcePool.lua

@@ -0,0 +1,148 @@
+require "Polycode/EventDispatcher"
+
+class "ResourcePool" (EventDispatcher)
+
+
+
+function ResourcePool:__getvar(name)
+	if name == "reloadResourcesOnModify" then
+		return Polycore.ResourcePool_get_reloadResourcesOnModify(self.__ptr)
+	elseif name == "dispatchChangeEvents" then
+		return Polycore.ResourcePool_get_dispatchChangeEvents(self.__ptr)
+	elseif name == "resourceSubscribers" then
+		return Polycore.ResourcePool_get_resourceSubscribers(self.__ptr)
+	elseif name == "deleteOnUnsubscribe" then
+		return Polycore.ResourcePool_get_deleteOnUnsubscribe(self.__ptr)
+	end
+	if EventDispatcher["__getvar"] ~= nil then
+		return EventDispatcher.__getvar(self, name)
+	end
+end
+
+
+function ResourcePool:__setvar(name,value)
+	if name == "reloadResourcesOnModify" then
+		Polycore.ResourcePool_set_reloadResourcesOnModify(self.__ptr, value)
+		return true
+	elseif name == "dispatchChangeEvents" then
+		Polycore.ResourcePool_set_dispatchChangeEvents(self.__ptr, value)
+		return true
+	elseif name == "resourceSubscribers" then
+		Polycore.ResourcePool_set_resourceSubscribers(self.__ptr, value)
+		return true
+	elseif name == "deleteOnUnsubscribe" then
+		Polycore.ResourcePool_set_deleteOnUnsubscribe(self.__ptr, value)
+		return true
+	end
+	if EventDispatcher["__setvar"] ~= nil then
+		return EventDispatcher.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function ResourcePool:ResourcePool(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "EventDispatcher" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ResourcePool(unpack(arg))
+	end
+end
+
+function ResourcePool:setFallbackPool(pool)
+	local retVal = Polycore.ResourcePool_setFallbackPool(self.__ptr, pool.__ptr)
+end
+
+function ResourcePool:addResource(resource)
+	local retVal = Polycore.ResourcePool_addResource(self.__ptr, resource.__ptr)
+end
+
+function ResourcePool:removeResource(resource)
+	local retVal = Polycore.ResourcePool_removeResource(self.__ptr, resource.__ptr)
+end
+
+function ResourcePool:hasResource(resource)
+	local retVal = Polycore.ResourcePool_hasResource(self.__ptr, resource.__ptr)
+	return retVal
+end
+
+function ResourcePool:loadResourcesFromFolder(folder, recursive)
+	local retVal = Polycore.ResourcePool_loadResourcesFromFolder(self.__ptr, folder, recursive)
+end
+
+function ResourcePool:loadResource(path)
+	local retVal = Polycore.ResourcePool_loadResource(self.__ptr, path)
+	if retVal == nil then return nil end
+	local __c = _G["Resource"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ResourcePool:loadResourceWithName(path, name)
+	local retVal = Polycore.ResourcePool_loadResourceWithName(self.__ptr, path, name)
+	if retVal == nil then return nil end
+	local __c = _G["Resource"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ResourcePool:getResource(resourceType, resourceName)
+	local retVal = Polycore.ResourcePool_getResource(self.__ptr, resourceType, resourceName)
+	if retVal == nil then return nil end
+	local __c = _G["Resource"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ResourcePool:getName()
+	local retVal =  Polycore.ResourcePool_getName(self.__ptr)
+	return retVal
+end
+
+function ResourcePool:setName(name)
+	local retVal = Polycore.ResourcePool_setName(self.__ptr, name)
+end
+
+function ResourcePool:getResourceByPath(resourcePath)
+	local retVal = Polycore.ResourcePool_getResourceByPath(self.__ptr, resourcePath)
+	if retVal == nil then return nil end
+	local __c = _G["Resource"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ResourcePool:Update(elapsed)
+	local retVal = Polycore.ResourcePool_Update(self.__ptr, elapsed)
+end
+
+function ResourcePool:getResources(resourceType)
+	local retVal = Polycore.ResourcePool_getResources(self.__ptr, resourceType)
+	if retVal == nil then return nil end
+	for i=1,count(retVal) do
+		local __c  = _G["Resource"]("__skip_ptr__")
+		__c.__ptr = retVal[i]
+		retVal[i] = __c
+	end
+	return retVal
+end
+
+function ResourcePool:checkForChangedFiles()
+	local retVal =  Polycore.ResourcePool_checkForChangedFiles(self.__ptr)
+end
+
+function ResourcePool:__delete()
+	if self then Polycore.delete_ResourcePool(self.__ptr) end
+end

+ 47 - 0
bindings/lua/Polycode/Rotation.lua

@@ -0,0 +1,47 @@
+class "Rotation"
+
+
+
+function Rotation:__getvar(name)
+	if name == "pitch" then
+		return Polycore.Rotation_get_pitch(self.__ptr)
+	elseif name == "yaw" then
+		return Polycore.Rotation_get_yaw(self.__ptr)
+	elseif name == "roll" then
+		return Polycore.Rotation_get_roll(self.__ptr)
+	end
+end
+
+
+function Rotation:__setvar(name,value)
+	if name == "pitch" then
+		Polycore.Rotation_set_pitch(self.__ptr, value)
+		return true
+	elseif name == "yaw" then
+		Polycore.Rotation_set_yaw(self.__ptr, value)
+		return true
+	elseif name == "roll" then
+		Polycore.Rotation_set_roll(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function Rotation:Rotation(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Rotation(unpack(arg))
+	end
+end
+
+function Rotation:__delete()
+	if self then Polycore.delete_Rotation(self.__ptr) end
+end

+ 241 - 0
bindings/lua/Polycode/Scene.lua

@@ -0,0 +1,241 @@
+require "Polycode/EventDispatcher"
+
+class "Scene" (EventDispatcher)
+
+
+
+Scene.SCENE_3D = 0
+Scene.SCENE_2D = 1
+Scene.SCENE_2D_TOPLEFT = 2
+function Scene:__getvar(name)
+	if name == "clearColor" then
+		local retVal = Polycore.Scene_get_clearColor(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "useClearColor" then
+		return Polycore.Scene_get_useClearColor(self.__ptr)
+	elseif name == "useClearDepth" then
+		return Polycore.Scene_get_useClearDepth(self.__ptr)
+	elseif name == "ambientColor" then
+		local retVal = Polycore.Scene_get_ambientColor(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "fogColor" then
+		local retVal = Polycore.Scene_get_fogColor(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "enabled" then
+		return Polycore.Scene_get_enabled(self.__ptr)
+	elseif name == "ownsChildren" then
+		return Polycore.Scene_get_ownsChildren(self.__ptr)
+	elseif name == "rootEntity" then
+		local retVal = Polycore.Scene_get_rootEntity(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Entity"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "sceneMouseRect" then
+		local retVal = Polycore.Scene_get_sceneMouseRect(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Rectangle"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "remapMouse" then
+		return Polycore.Scene_get_remapMouse(self.__ptr)
+	elseif name == "constrainPickingToViewport" then
+		return Polycore.Scene_get_constrainPickingToViewport(self.__ptr)
+	end
+	if EventDispatcher["__getvar"] ~= nil then
+		return EventDispatcher.__getvar(self, name)
+	end
+end
+
+
+function Scene:__setvar(name,value)
+	if name == "clearColor" then
+		Polycore.Scene_set_clearColor(self.__ptr, value.__ptr)
+		return true
+	elseif name == "useClearColor" then
+		Polycore.Scene_set_useClearColor(self.__ptr, value)
+		return true
+	elseif name == "useClearDepth" then
+		Polycore.Scene_set_useClearDepth(self.__ptr, value)
+		return true
+	elseif name == "ambientColor" then
+		Polycore.Scene_set_ambientColor(self.__ptr, value.__ptr)
+		return true
+	elseif name == "fogColor" then
+		Polycore.Scene_set_fogColor(self.__ptr, value.__ptr)
+		return true
+	elseif name == "enabled" then
+		Polycore.Scene_set_enabled(self.__ptr, value)
+		return true
+	elseif name == "ownsChildren" then
+		Polycore.Scene_set_ownsChildren(self.__ptr, value)
+		return true
+	elseif name == "rootEntity" then
+		Polycore.Scene_set_rootEntity(self.__ptr, value.__ptr)
+		return true
+	elseif name == "sceneMouseRect" then
+		Polycore.Scene_set_sceneMouseRect(self.__ptr, value.__ptr)
+		return true
+	elseif name == "remapMouse" then
+		Polycore.Scene_set_remapMouse(self.__ptr, value)
+		return true
+	elseif name == "constrainPickingToViewport" then
+		Polycore.Scene_set_constrainPickingToViewport(self.__ptr, value)
+		return true
+	end
+	if EventDispatcher["__setvar"] ~= nil then
+		return EventDispatcher.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function Scene:Scene(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "EventDispatcher" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.Scene(unpack(arg))
+	end
+end
+
+function Scene:addEntity(entity)
+	local retVal = Polycore.Scene_addEntity(self.__ptr, entity.__ptr)
+end
+
+function Scene:addChild(entity)
+	local retVal = Polycore.Scene_addChild(self.__ptr, entity.__ptr)
+end
+
+function Scene:removeEntity(entity)
+	local retVal = Polycore.Scene_removeEntity(self.__ptr, entity.__ptr)
+end
+
+function Scene:getDefaultCamera()
+	local retVal =  Polycore.Scene_getDefaultCamera(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Camera"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Scene:getActiveCamera()
+	local retVal =  Polycore.Scene_getActiveCamera(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Camera"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Scene:setActiveCamera(camera)
+	local retVal = Polycore.Scene_setActiveCamera(self.__ptr, camera.__ptr)
+end
+
+function Scene:enableFog(enable)
+	local retVal = Polycore.Scene_enableFog(self.__ptr, enable)
+end
+
+function Scene:setFogProperties(fogMode, color, density, startDepth, _endDepth)
+	local retVal = Polycore.Scene_setFogProperties(self.__ptr, fogMode, color.__ptr, density, startDepth, _endDepth)
+end
+
+function Scene:setSceneType(newType)
+	local retVal = Polycore.Scene_setSceneType(self.__ptr, newType)
+end
+
+function Scene:fixedUpdate()
+	local retVal =  Polycore.Scene_fixedUpdate(self.__ptr)
+end
+
+function Scene:Update()
+	local retVal =  Polycore.Scene_Update(self.__ptr)
+end
+
+function Scene:setVirtual(val)
+	local retVal = Polycore.Scene_setVirtual(self.__ptr, val)
+end
+
+function Scene:isVirtual()
+	local retVal =  Polycore.Scene_isVirtual(self.__ptr)
+	return retVal
+end
+
+function Scene:isEnabled()
+	local retVal =  Polycore.Scene_isEnabled(self.__ptr)
+	return retVal
+end
+
+function Scene:setEnabled(enabled)
+	local retVal = Polycore.Scene_setEnabled(self.__ptr, enabled)
+end
+
+function Scene:Render(targetCamera, targetFramebuffer, overrideMaterial, s_endLights)
+	local retVal = Polycore.Scene_Render(self.__ptr, targetCamera.__ptr, targetFramebuffer.__ptr, overrideMaterial.__ptr, s_endLights)
+end
+
+function Scene:setOverrideMaterial(material)
+	local retVal = Polycore.Scene_setOverrideMaterial(self.__ptr, material.__ptr)
+end
+
+function Scene:projectRayFromCameraAndViewportCoordinate(camera, coordinate)
+	local retVal = Polycore.Scene_projectRayFromCameraAndViewportCoordinate(self.__ptr, camera.__ptr, coordinate.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Ray"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Scene:addLight(light)
+	local retVal = Polycore.Scene_addLight(self.__ptr, light.__ptr)
+end
+
+function Scene:removeLight(light)
+	local retVal = Polycore.Scene_removeLight(self.__ptr, light.__ptr)
+end
+
+function Scene:getNumLights()
+	local retVal =  Polycore.Scene_getNumLights(self.__ptr)
+	return retVal
+end
+
+function Scene:getLight(index)
+	local retVal = Polycore.Scene_getLight(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["SceneLight"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function Scene:doVisibilityChecking(val)
+	local retVal = Polycore.Scene_doVisibilityChecking(self.__ptr, val)
+end
+
+function Scene:doesVisibilityChecking()
+	local retVal =  Polycore.Scene_doesVisibilityChecking(self.__ptr)
+	return retVal
+end
+
+function Scene:__delete()
+	if self then Polycore.delete_Scene(self.__ptr) end
+end

+ 97 - 0
bindings/lua/Polycode/SceneCurve.lua

@@ -0,0 +1,97 @@
+require "Polycode/SceneMesh"
+
+class "SceneCurve" (SceneMesh)
+
+
+
+function SceneCurve:__getvar(name)
+	if name == "renderCurve" then
+		return Polycore.SceneCurve_get_renderCurve(self.__ptr)
+	elseif name == "curveResolution" then
+		return Polycore.SceneCurve_get_curveResolution(self.__ptr)
+	end
+	if SceneMesh["__getvar"] ~= nil then
+		return SceneMesh.__getvar(self, name)
+	end
+end
+
+
+function SceneCurve:__setvar(name,value)
+	if name == "renderCurve" then
+		Polycore.SceneCurve_set_renderCurve(self.__ptr, value)
+		return true
+	elseif name == "curveResolution" then
+		Polycore.SceneCurve_set_curveResolution(self.__ptr, value)
+		return true
+	end
+	if SceneMesh["__setvar"] ~= nil then
+		return SceneMesh.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function SceneCurve:SceneCurve(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "SceneMesh" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneCurve(unpack(arg))
+	end
+end
+
+function SceneCurve.SceneCurveWithCurve(curve)
+	local retVal = Polycore.SceneCurve_SceneCurveWithCurve(curve.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SceneCurve"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneCurve:getWorldPointAt(t)
+	local retVal = Polycore.SceneCurve_getWorldPointAt(self.__ptr, t)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneCurve:Update()
+	local retVal =  Polycore.SceneCurve_Update(self.__ptr)
+end
+
+function SceneCurve:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneCurve_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneCurve:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneCurve_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function SceneCurve:getCurve()
+	local retVal =  Polycore.SceneCurve_getCurve(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["BezierCurve"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneCurve:__delete()
+	if self then Polycore.delete_SceneCurve(self.__ptr) end
+end

+ 178 - 0
bindings/lua/Polycode/SceneEntityInstance.lua

@@ -0,0 +1,178 @@
+require "Polycode/Entity"
+
+class "SceneEntityInstance" (Entity)
+
+
+
+function SceneEntityInstance:__getvar(name)
+	if name == "cloneUsingReload" then
+		return Polycore.SceneEntityInstance_get_cloneUsingReload(self.__ptr)
+	elseif name == "fileName" then
+		return Polycore.SceneEntityInstance_get_fileName(self.__ptr)
+	end
+	if Entity["__getvar"] ~= nil then
+		return Entity.__getvar(self, name)
+	end
+end
+
+
+function SceneEntityInstance:__setvar(name,value)
+	if name == "cloneUsingReload" then
+		Polycore.SceneEntityInstance_set_cloneUsingReload(self.__ptr, value)
+		return true
+	elseif name == "fileName" then
+		Polycore.SceneEntityInstance_set_fileName(self.__ptr, value)
+		return true
+	end
+	if Entity["__setvar"] ~= nil then
+		return Entity.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function SceneEntityInstance:SceneEntityInstance(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Entity" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneEntityInstance(unpack(arg))
+	end
+end
+
+function SceneEntityInstance.BlankSceneEntityInstance(parentScene)
+	local retVal = Polycore.SceneEntityInstance_BlankSceneEntityInstance(parentScene.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SceneEntityInstance"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneEntityInstance:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneEntityInstance_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneEntityInstance:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneEntityInstance_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function SceneEntityInstance:reloadEntityInstance()
+	local retVal =  Polycore.SceneEntityInstance_reloadEntityInstance(self.__ptr)
+end
+
+function SceneEntityInstance:clearInstance()
+	local retVal =  Polycore.SceneEntityInstance_clearInstance(self.__ptr)
+end
+
+function SceneEntityInstance:parseObjectIntoCurve(entry, curve)
+	local retVal = Polycore.SceneEntityInstance_parseObjectIntoCurve(self.__ptr, entry.__ptr, curve.__ptr)
+end
+
+function SceneEntityInstance:loadObjectEntryIntoEntity(entry, targetEntity, entityFileVersion)
+	local retVal = Polycore.SceneEntityInstance_loadObjectEntryIntoEntity(self.__ptr, entry.__ptr, targetEntity.__ptr, entityFileVersion)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneEntityInstance:loadFromFile(fileName)
+	local retVal = Polycore.SceneEntityInstance_loadFromFile(self.__ptr, fileName)
+	return retVal
+end
+
+function SceneEntityInstance:applySceneMesh(entry, sceneMesh)
+	local retVal = Polycore.SceneEntityInstance_applySceneMesh(self.__ptr, entry.__ptr, sceneMesh.__ptr)
+end
+
+function SceneEntityInstance:linkResourcePool(pool)
+	local retVal = Polycore.SceneEntityInstance_linkResourcePool(self.__ptr, pool.__ptr)
+end
+
+function SceneEntityInstance:getNumLinkedResourePools()
+	local retVal =  Polycore.SceneEntityInstance_getNumLinkedResourePools(self.__ptr)
+	return retVal
+end
+
+function SceneEntityInstance:getLinkedResourcePoolAtIndex(index)
+	local retVal = Polycore.SceneEntityInstance_getLinkedResourcePoolAtIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["ResourcePool"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneEntityInstance:unlinkResourcePool(pool)
+	local retVal = Polycore.SceneEntityInstance_unlinkResourcePool(self.__ptr, pool.__ptr)
+end
+
+function SceneEntityInstance:getResourceEntry()
+	local retVal =  Polycore.SceneEntityInstance_getResourceEntry(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SceneEntityInstanceResourceEntry"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneEntityInstance:getTopLevelResourcePool()
+	local retVal =  Polycore.SceneEntityInstance_getTopLevelResourcePool(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["ResourcePool"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneEntityInstance:hasLayerID(layerID)
+	local retVal = Polycore.SceneEntityInstance_hasLayerID(self.__ptr, layerID.__ptr)
+	return retVal
+end
+
+function SceneEntityInstance:getNumLayers()
+	local retVal =  Polycore.SceneEntityInstance_getNumLayers(self.__ptr)
+	return retVal
+end
+
+function SceneEntityInstance:getLayerAtIndex(index)
+	local retVal = Polycore.SceneEntityInstance_getLayerAtIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["SceneEntityInstanceLayer"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneEntityInstance:removeLayer(layer)
+	local retVal = Polycore.SceneEntityInstance_removeLayer(self.__ptr, layer.__ptr)
+end
+
+function SceneEntityInstance:createNewLayer(name)
+	local retVal = Polycore.SceneEntityInstance_createNewLayer(self.__ptr, name)
+	if retVal == nil then return nil end
+	local __c = _G["SceneEntityInstanceLayer"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneEntityInstance:getFileName()
+	local retVal =  Polycore.SceneEntityInstance_getFileName(self.__ptr)
+	return retVal
+end
+
+function SceneEntityInstance:__delete()
+	if self then Polycore.delete_SceneEntityInstance(self.__ptr) end
+end

+ 61 - 0
bindings/lua/Polycode/SceneEntityInstanceLayer.lua

@@ -0,0 +1,61 @@
+class "SceneEntityInstanceLayer"
+
+
+
+function SceneEntityInstanceLayer:__getvar(name)
+	if name == "name" then
+		return Polycore.SceneEntityInstanceLayer_get_name(self.__ptr)
+	elseif name == "layerID" then
+		local retVal = Polycore.SceneEntityInstanceLayer_get_layerID(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["char"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "visible" then
+		return Polycore.SceneEntityInstanceLayer_get_visible(self.__ptr)
+	elseif name == "instance" then
+		local retVal = Polycore.SceneEntityInstanceLayer_get_instance(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["SceneEntityInstance"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+end
+
+
+function SceneEntityInstanceLayer:__setvar(name,value)
+	if name == "name" then
+		Polycore.SceneEntityInstanceLayer_set_name(self.__ptr, value)
+		return true
+	elseif name == "layerID" then
+		Polycore.SceneEntityInstanceLayer_set_layerID(self.__ptr, value.__ptr)
+		return true
+	elseif name == "visible" then
+		Polycore.SceneEntityInstanceLayer_set_visible(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function SceneEntityInstanceLayer:SceneEntityInstanceLayer(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneEntityInstanceLayer(unpack(arg))
+	end
+end
+
+function SceneEntityInstanceLayer:setLayerVisibility(val)
+	local retVal = Polycore.SceneEntityInstanceLayer_setLayerVisibility(self.__ptr, val)
+end
+
+function SceneEntityInstanceLayer:__delete()
+	if self then Polycore.delete_SceneEntityInstanceLayer(self.__ptr) end
+end

+ 45 - 0
bindings/lua/Polycode/SceneEntityInstanceResourceEntry.lua

@@ -0,0 +1,45 @@
+require "Polycode/Resource"
+
+class "SceneEntityInstanceResourceEntry" (Resource)
+
+
+
+
+
+
+
+function SceneEntityInstanceResourceEntry:SceneEntityInstanceResourceEntry(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Resource" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneEntityInstanceResourceEntry(unpack(arg))
+	end
+end
+
+function SceneEntityInstanceResourceEntry:getInstance()
+	local retVal =  Polycore.SceneEntityInstanceResourceEntry_getInstance(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SceneEntityInstance"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneEntityInstanceResourceEntry:reloadResource()
+	local retVal =  Polycore.SceneEntityInstanceResourceEntry_reloadResource(self.__ptr)
+end
+
+function SceneEntityInstanceResourceEntry:__delete()
+	if self then Polycore.delete_SceneEntityInstanceResourceEntry(self.__ptr) end
+end

+ 75 - 0
bindings/lua/Polycode/SceneImage.lua

@@ -0,0 +1,75 @@
+require "Polycode/ScenePrimitive"
+
+class "SceneImage" (ScenePrimitive)
+
+
+
+
+
+
+
+function SceneImage:SceneImage(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "ScenePrimitive" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneImage(unpack(arg))
+	end
+end
+
+function SceneImage.SceneImageWithImage(image)
+	local retVal = Polycore.SceneImage_SceneImageWithImage(image.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SceneImage"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneImage.SceneImageWithTexture(texture)
+	local retVal = Polycore.SceneImage_SceneImageWithTexture(texture.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SceneImage"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneImage:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneImage_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneImage:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneImage_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function SceneImage:setImageCoordinates(x, y, width, height, realWidth, realHeight)
+	local retVal = Polycore.SceneImage_setImageCoordinates(self.__ptr, x, y, width, height, realWidth, realHeight)
+end
+
+function SceneImage:getImageWidth()
+	local retVal =  Polycore.SceneImage_getImageWidth(self.__ptr)
+	return retVal
+end
+
+function SceneImage:getImageHeight()
+	local retVal =  Polycore.SceneImage_getImageHeight(self.__ptr)
+	return retVal
+end
+
+function SceneImage:__delete()
+	if self then Polycore.delete_SceneImage(self.__ptr) end
+end

+ 103 - 0
bindings/lua/Polycode/SceneLabel.lua

@@ -0,0 +1,103 @@
+require "Polycode/ScenePrimitive"
+
+class "SceneLabel" (ScenePrimitive)
+
+
+
+function SceneLabel:__getvar(name)
+	if name == "positionAtBaseline" then
+		return Polycore.SceneLabel_get_positionAtBaseline(self.__ptr)
+	end
+	if ScenePrimitive["__getvar"] ~= nil then
+		return ScenePrimitive.__getvar(self, name)
+	end
+end
+
+
+function SceneLabel:__setvar(name,value)
+	if name == "positionAtBaseline" then
+		Polycore.SceneLabel_set_positionAtBaseline(self.__ptr, value)
+		return true
+	end
+	if ScenePrimitive["__setvar"] ~= nil then
+		return ScenePrimitive.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function SceneLabel:SceneLabel(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "ScenePrimitive" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneLabel(unpack(arg))
+	end
+end
+
+function SceneLabel:getText()
+	local retVal =  Polycore.SceneLabel_getText(self.__ptr)
+	return retVal
+end
+
+function SceneLabel:setLabelActualHeight(actualHeight)
+	local retVal = Polycore.SceneLabel_setLabelActualHeight(self.__ptr, actualHeight)
+end
+
+function SceneLabel:getLabelActualHeight()
+	local retVal =  Polycore.SceneLabel_getLabelActualHeight(self.__ptr)
+	return retVal
+end
+
+function SceneLabel:Render(buffer)
+	local retVal = Polycore.SceneLabel_Render(self.__ptr, buffer.__ptr)
+end
+
+function SceneLabel:getTextWidthForString(text)
+	local retVal = Polycore.SceneLabel_getTextWidthForString(self.__ptr, text)
+	return retVal
+end
+
+function SceneLabel:setText(newText)
+	local retVal = Polycore.SceneLabel_setText(self.__ptr, newText)
+end
+
+function SceneLabel:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneLabel_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneLabel:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneLabel_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function SceneLabel:updateFromLabel()
+	local retVal =  Polycore.SceneLabel_updateFromLabel(self.__ptr)
+end
+
+function SceneLabel:getLabel()
+	local retVal =  Polycore.SceneLabel_getLabel(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Label"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneLabel:__delete()
+	if self then Polycore.delete_SceneLabel(self.__ptr) end
+end

+ 187 - 0
bindings/lua/Polycode/SceneLight.lua

@@ -0,0 +1,187 @@
+require "Polycode/Entity"
+
+class "SceneLight" (Entity)
+
+
+
+SceneLight.POINT_LIGHT = 0
+SceneLight.SPOT_LIGHT = 1
+
+
+
+
+function SceneLight:SceneLight(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Entity" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneLight(unpack(arg))
+	end
+end
+
+function SceneLight:getIntensity()
+	local retVal =  Polycore.SceneLight_getIntensity(self.__ptr)
+	return retVal
+end
+
+function SceneLight:setIntensity(newIntensity)
+	local retVal = Polycore.SceneLight_setIntensity(self.__ptr, newIntensity)
+end
+
+function SceneLight:setAttenuation(constantAttenuation, linearAttenuation, quadraticAttenuation)
+	local retVal = Polycore.SceneLight_setAttenuation(self.__ptr, constantAttenuation, linearAttenuation, quadraticAttenuation)
+end
+
+function SceneLight:getConstantAttenuation()
+	local retVal =  Polycore.SceneLight_getConstantAttenuation(self.__ptr)
+	return retVal
+end
+
+function SceneLight:getLinearAttenuation()
+	local retVal =  Polycore.SceneLight_getLinearAttenuation(self.__ptr)
+	return retVal
+end
+
+function SceneLight:getQuadraticAttenuation()
+	local retVal =  Polycore.SceneLight_getQuadraticAttenuation(self.__ptr)
+	return retVal
+end
+
+function SceneLight:getType()
+	local retVal =  Polycore.SceneLight_getType(self.__ptr)
+	return retVal
+end
+
+function SceneLight:renderDepthMap(scene)
+	local retVal = Polycore.SceneLight_renderDepthMap(self.__ptr, scene.__ptr)
+end
+
+function SceneLight:getZBufferTexture()
+	local retVal =  Polycore.SceneLight_getZBufferTexture(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Texture"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneLight:setSpecularLightColor(r, g, b, a)
+	local retVal = Polycore.SceneLight_setSpecularLightColor(self.__ptr, r, g, b, a)
+end
+
+function SceneLight:setDiffuseLightColor(r, g, b, a)
+	local retVal = Polycore.SceneLight_setDiffuseLightColor(self.__ptr, r, g, b, a)
+end
+
+function SceneLight:setLightColor(r, g, b, a)
+	local retVal = Polycore.SceneLight_setLightColor(self.__ptr, r, g, b, a)
+end
+
+function SceneLight:setSpotlightProperties(spotlightCutoff, spotlightExponent)
+	local retVal = Polycore.SceneLight_setSpotlightProperties(self.__ptr, spotlightCutoff, spotlightExponent)
+end
+
+function SceneLight:getSpotlightCutoff()
+	local retVal =  Polycore.SceneLight_getSpotlightCutoff(self.__ptr)
+	return retVal
+end
+
+function SceneLight:getSpotlightExponent()
+	local retVal =  Polycore.SceneLight_getSpotlightExponent(self.__ptr)
+	return retVal
+end
+
+function SceneLight:enableShadows(val, resolution)
+	local retVal = Polycore.SceneLight_enableShadows(self.__ptr, val, resolution)
+end
+
+function SceneLight:setShadowMapFOV(fov)
+	local retVal = Polycore.SceneLight_setShadowMapFOV(self.__ptr, fov)
+end
+
+function SceneLight:getShadowMapFOV()
+	local retVal =  Polycore.SceneLight_getShadowMapFOV(self.__ptr)
+	return retVal
+end
+
+function SceneLight:getShadowMapResolution()
+	local retVal =  Polycore.SceneLight_getShadowMapResolution(self.__ptr)
+	return retVal
+end
+
+function SceneLight:areShadowsEnabled()
+	local retVal =  Polycore.SceneLight_areShadowsEnabled(self.__ptr)
+	return retVal
+end
+
+function SceneLight:getLightType()
+	local retVal =  Polycore.SceneLight_getLightType(self.__ptr)
+	return retVal
+end
+
+function SceneLight:setLightImportance(newImportance)
+	local retVal = Polycore.SceneLight_setLightImportance(self.__ptr, newImportance)
+end
+
+function SceneLight:getLightImportance()
+	local retVal =  Polycore.SceneLight_getLightImportance(self.__ptr)
+	return retVal
+end
+
+function SceneLight:setLightType(lightType)
+	local retVal = Polycore.SceneLight_setLightType(self.__ptr, lightType)
+end
+
+function SceneLight:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneLight_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneLight:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneLight_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function SceneLight:getParentScene()
+	local retVal =  Polycore.SceneLight_getParentScene(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Scene"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneLight:setParentScene(scene)
+	local retVal = Polycore.SceneLight_setParentScene(self.__ptr, scene.__ptr)
+end
+
+function SceneLight:getSpotlightCamera()
+	local retVal =  Polycore.SceneLight_getSpotlightCamera(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Camera"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneLight:getLightInfo()
+	local retVal =  Polycore.SceneLight_getLightInfo(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["LightInfo"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneLight:__delete()
+	if self then Polycore.delete_SceneLight(self.__ptr) end
+end

+ 53 - 0
bindings/lua/Polycode/SceneLine.lua

@@ -0,0 +1,53 @@
+require "Polycode/SceneMesh"
+
+class "SceneLine" (SceneMesh)
+
+
+
+
+
+
+
+function SceneLine:SceneLine(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "SceneMesh" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneLine(unpack(arg))
+	end
+end
+
+function SceneLine.SceneLineWithPositions(start, _end)
+	local retVal = Polycore.SceneLine_SceneLineWithPositions(start.__ptr, _end.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SceneLine"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneLine:setStart(start)
+	local retVal = Polycore.SceneLine_setStart(self.__ptr, start.__ptr)
+end
+
+function SceneLine:setEnd(_end)
+	local retVal = Polycore.SceneLine_setEnd(self.__ptr, _end.__ptr)
+end
+
+function SceneLine:Update()
+	local retVal =  Polycore.SceneLine_Update(self.__ptr)
+end
+
+function SceneLine:__delete()
+	if self then Polycore.delete_SceneLine(self.__ptr) end
+end

+ 61 - 0
bindings/lua/Polycode/SceneManager.lua

@@ -0,0 +1,61 @@
+class "SceneManager"
+
+
+
+
+
+
+
+function SceneManager:SceneManager(...)
+	local arg = {...}
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneManager(unpack(arg))
+	end
+end
+
+function SceneManager:addScene(newScene)
+	local retVal = Polycore.SceneManager_addScene(self.__ptr, newScene.__ptr)
+end
+
+function SceneManager:removeScene(scene)
+	local retVal = Polycore.SceneManager_removeScene(self.__ptr, scene.__ptr)
+end
+
+function SceneManager:Update()
+	local retVal =  Polycore.SceneManager_Update(self.__ptr)
+end
+
+function SceneManager:fixedUpdate()
+	local retVal =  Polycore.SceneManager_fixedUpdate(self.__ptr)
+end
+
+function SceneManager:Render(viewport)
+	local retVal = Polycore.SceneManager_Render(self.__ptr, viewport.__ptr)
+end
+
+function SceneManager:renderVirtual()
+	local retVal =  Polycore.SceneManager_renderVirtual(self.__ptr)
+end
+
+function SceneManager:registerRenderTexture(r_enderTexture)
+	local retVal = Polycore.SceneManager_registerRenderTexture(self.__ptr, r_enderTexture.__ptr)
+end
+
+function SceneManager:unregisterRenderTexture(r_enderTexture)
+	local retVal = Polycore.SceneManager_unregisterRenderTexture(self.__ptr, r_enderTexture.__ptr)
+end
+
+function SceneManager:setRenderer(r_enderer)
+	local retVal = Polycore.SceneManager_setRenderer(self.__ptr, r_enderer.__ptr)
+end
+
+function SceneManager:__delete()
+	if self then Polycore.delete_SceneManager(self.__ptr) end
+end

+ 236 - 0
bindings/lua/Polycode/SceneMesh.lua

@@ -0,0 +1,236 @@
+require "Polycode/Entity"
+
+class "SceneMesh" (Entity)
+
+
+
+function SceneMesh:__getvar(name)
+	if name == "lineWidth" then
+		return Polycore.SceneMesh_get_lineWidth(self.__ptr)
+	elseif name == "lineSmooth" then
+		return Polycore.SceneMesh_get_lineSmooth(self.__ptr)
+	elseif name == "pointSmooth" then
+		return Polycore.SceneMesh_get_pointSmooth(self.__ptr)
+	elseif name == "ownsMesh" then
+		return Polycore.SceneMesh_get_ownsMesh(self.__ptr)
+	elseif name == "ownsSkeleton" then
+		return Polycore.SceneMesh_get_ownsSkeleton(self.__ptr)
+	elseif name == "useGeometryHitDetection" then
+		return Polycore.SceneMesh_get_useGeometryHitDetection(self.__ptr)
+	elseif name == "alphaTest" then
+		return Polycore.SceneMesh_get_alphaTest(self.__ptr)
+	elseif name == "backfaceCulled" then
+		return Polycore.SceneMesh_get_backfaceCulled(self.__ptr)
+	elseif name == "sendBoneMatricesToMaterial" then
+		return Polycore.SceneMesh_get_sendBoneMatricesToMaterial(self.__ptr)
+	end
+	if Entity["__getvar"] ~= nil then
+		return Entity.__getvar(self, name)
+	end
+end
+
+
+function SceneMesh:__setvar(name,value)
+	if name == "lineWidth" then
+		Polycore.SceneMesh_set_lineWidth(self.__ptr, value)
+		return true
+	elseif name == "lineSmooth" then
+		Polycore.SceneMesh_set_lineSmooth(self.__ptr, value)
+		return true
+	elseif name == "pointSmooth" then
+		Polycore.SceneMesh_set_pointSmooth(self.__ptr, value)
+		return true
+	elseif name == "ownsMesh" then
+		Polycore.SceneMesh_set_ownsMesh(self.__ptr, value)
+		return true
+	elseif name == "ownsSkeleton" then
+		Polycore.SceneMesh_set_ownsSkeleton(self.__ptr, value)
+		return true
+	elseif name == "useGeometryHitDetection" then
+		Polycore.SceneMesh_set_useGeometryHitDetection(self.__ptr, value)
+		return true
+	elseif name == "alphaTest" then
+		Polycore.SceneMesh_set_alphaTest(self.__ptr, value)
+		return true
+	elseif name == "backfaceCulled" then
+		Polycore.SceneMesh_set_backfaceCulled(self.__ptr, value)
+		return true
+	elseif name == "sendBoneMatricesToMaterial" then
+		Polycore.SceneMesh_set_sendBoneMatricesToMaterial(self.__ptr, value)
+		return true
+	end
+	if Entity["__setvar"] ~= nil then
+		return Entity.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function SceneMesh:SceneMesh(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "Entity" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneMesh(unpack(arg))
+	end
+end
+
+function SceneMesh.SceneMeshFromMesh(mesh)
+	local retVal = Polycore.SceneMesh_SceneMeshFromMesh(mesh.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["SceneMesh"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneMesh.SceneMeshWithType(meshType)
+	local retVal = Polycore.SceneMesh_SceneMeshWithType(meshType)
+	if retVal == nil then return nil end
+	local __c = _G["SceneMesh"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneMesh:Render(buffer)
+	local retVal = Polycore.SceneMesh_Render(self.__ptr, buffer.__ptr)
+end
+
+function SceneMesh:getShaderPass(index)
+	local retVal = Polycore.SceneMesh_getShaderPass(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["ShaderPass"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneMesh:getNumShaderPasses()
+	local retVal =  Polycore.SceneMesh_getNumShaderPasses(self.__ptr)
+	return retVal
+end
+
+function SceneMesh:addShaderPass(pass)
+	local retVal = Polycore.SceneMesh_addShaderPass(self.__ptr, pass.__ptr)
+end
+
+function SceneMesh:removeShaderPass(shaderIndex)
+	local retVal = Polycore.SceneMesh_removeShaderPass(self.__ptr, shaderIndex)
+end
+
+function SceneMesh:getMesh()
+	local retVal =  Polycore.SceneMesh_getMesh(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Mesh"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneMesh:getMaterial()
+	local retVal =  Polycore.SceneMesh_getMaterial(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Material"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneMesh:loadSkeleton(fileName)
+	local retVal = Polycore.SceneMesh_loadSkeleton(self.__ptr, fileName)
+	if retVal == nil then return nil end
+	local __c = _G["Skeleton"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneMesh:clearMaterial()
+	local retVal =  Polycore.SceneMesh_clearMaterial(self.__ptr)
+end
+
+function SceneMesh:setMaterial(material)
+	local retVal = Polycore.SceneMesh_setMaterial(self.__ptr, material.__ptr)
+end
+
+function SceneMesh:rebuildAttributes()
+	local retVal =  Polycore.SceneMesh_rebuildAttributes(self.__ptr)
+end
+
+function SceneMesh:setMaterialByName(materialName, resourcePool)
+	local retVal = Polycore.SceneMesh_setMaterialByName(self.__ptr, materialName, resourcePool.__ptr)
+end
+
+function SceneMesh:setMesh(mesh)
+	local retVal = Polycore.SceneMesh_setMesh(self.__ptr, mesh.__ptr)
+end
+
+function SceneMesh:setSkeleton(skeleton)
+	local retVal = Polycore.SceneMesh_setSkeleton(self.__ptr, skeleton.__ptr)
+end
+
+function SceneMesh:getSkeleton()
+	local retVal =  Polycore.SceneMesh_getSkeleton(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Skeleton"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneMesh:applySkeletonLocally()
+	local retVal =  Polycore.SceneMesh_applySkeletonLocally(self.__ptr)
+end
+
+function SceneMesh:setLineWidth(newWidth)
+	local retVal = Polycore.SceneMesh_setLineWidth(self.__ptr, newWidth)
+end
+
+function SceneMesh:getFilename()
+	local retVal =  Polycore.SceneMesh_getFilename(self.__ptr)
+	return retVal
+end
+
+function SceneMesh:setFilename(fileName)
+	local retVal = Polycore.SceneMesh_setFilename(self.__ptr, fileName)
+end
+
+function SceneMesh:loadFromFile(fileName)
+	local retVal = Polycore.SceneMesh_loadFromFile(self.__ptr, fileName)
+end
+
+function SceneMesh:customHitDetection(ray)
+	local retVal = Polycore.SceneMesh_customHitDetection(self.__ptr, ray.__ptr)
+	return retVal
+end
+
+function SceneMesh:setForceMaterial(forceMaterial)
+	local retVal = Polycore.SceneMesh_setForceMaterial(self.__ptr, forceMaterial)
+end
+
+function SceneMesh:getForceMaterial()
+	local retVal =  Polycore.SceneMesh_getForceMaterial(self.__ptr)
+	return retVal
+end
+
+function SceneMesh:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneMesh_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneMesh:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneMesh_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function SceneMesh:__delete()
+	if self then Polycore.delete_SceneMesh(self.__ptr) end
+end

+ 83 - 0
bindings/lua/Polycode/SceneParticle.lua

@@ -0,0 +1,83 @@
+class "SceneParticle"
+
+
+
+function SceneParticle:__getvar(name)
+	if name == "lifetime" then
+		return Polycore.SceneParticle_get_lifetime(self.__ptr)
+	elseif name == "position" then
+		local retVal = Polycore.SceneParticle_get_position(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "velocity" then
+		local retVal = Polycore.SceneParticle_get_velocity(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "perlinPos" then
+		local retVal = Polycore.SceneParticle_get_perlinPos(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "rotation" then
+		local retVal = Polycore.SceneParticle_get_rotation(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Vector3"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "brightnessDeviation" then
+		return Polycore.SceneParticle_get_brightnessDeviation(self.__ptr)
+	elseif name == "scale" then
+		return Polycore.SceneParticle_get_scale(self.__ptr)
+	elseif name == "color" then
+		local retVal = Polycore.SceneParticle_get_color(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "varianceIndex" then
+		return Polycore.SceneParticle_get_varianceIndex(self.__ptr)
+	end
+end
+
+
+function SceneParticle:__setvar(name,value)
+	if name == "lifetime" then
+		Polycore.SceneParticle_set_lifetime(self.__ptr, value)
+		return true
+	elseif name == "position" then
+		Polycore.SceneParticle_set_position(self.__ptr, value.__ptr)
+		return true
+	elseif name == "velocity" then
+		Polycore.SceneParticle_set_velocity(self.__ptr, value.__ptr)
+		return true
+	elseif name == "perlinPos" then
+		Polycore.SceneParticle_set_perlinPos(self.__ptr, value.__ptr)
+		return true
+	elseif name == "rotation" then
+		Polycore.SceneParticle_set_rotation(self.__ptr, value.__ptr)
+		return true
+	elseif name == "brightnessDeviation" then
+		Polycore.SceneParticle_set_brightnessDeviation(self.__ptr, value)
+		return true
+	elseif name == "scale" then
+		Polycore.SceneParticle_set_scale(self.__ptr, value)
+		return true
+	elseif name == "color" then
+		Polycore.SceneParticle_set_color(self.__ptr, value.__ptr)
+		return true
+	elseif name == "varianceIndex" then
+		Polycore.SceneParticle_set_varianceIndex(self.__ptr, value)
+		return true
+	end
+	return false
+end
+
+
+function SceneParticle:__delete()
+	if self then Polycore.delete_SceneParticle(self.__ptr) end
+end

+ 331 - 0
bindings/lua/Polycode/SceneParticleEmitter.lua

@@ -0,0 +1,331 @@
+require "Polycode/SceneMesh"
+
+class "SceneParticleEmitter" (SceneMesh)
+
+
+
+SceneParticleEmitter.PARTICLE_TYPE_POINT = 0
+SceneParticleEmitter.PARTICLE_TYPE_QUAD = 1
+SceneParticleEmitter.PARTICLE_TYPE_MESH = 2
+function SceneParticleEmitter:__getvar(name)
+	if name == "useScaleCurve" then
+		return Polycore.SceneParticleEmitter_get_useScaleCurve(self.__ptr)
+	elseif name == "scaleCurve" then
+		local retVal = Polycore.SceneParticleEmitter_get_scaleCurve(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "useColorCurves" then
+		return Polycore.SceneParticleEmitter_get_useColorCurves(self.__ptr)
+	elseif name == "colorCurveR" then
+		local retVal = Polycore.SceneParticleEmitter_get_colorCurveR(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "colorCurveG" then
+		local retVal = Polycore.SceneParticleEmitter_get_colorCurveG(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "colorCurveB" then
+		local retVal = Polycore.SceneParticleEmitter_get_colorCurveB(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "colorCurveA" then
+		local retVal = Polycore.SceneParticleEmitter_get_colorCurveA(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["BezierCurve"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	elseif name == "colorDeviation" then
+		local retVal = Polycore.SceneParticleEmitter_get_colorDeviation(self.__ptr)
+		if retVal == nil then return nil end
+		local __c = _G["Color"]("__skip_ptr__")
+		__c.__ptr = retVal
+		return __c
+	end
+	if SceneMesh["__getvar"] ~= nil then
+		return SceneMesh.__getvar(self, name)
+	end
+end
+
+
+function SceneParticleEmitter:__setvar(name,value)
+	if name == "useScaleCurve" then
+		Polycore.SceneParticleEmitter_set_useScaleCurve(self.__ptr, value)
+		return true
+	elseif name == "scaleCurve" then
+		Polycore.SceneParticleEmitter_set_scaleCurve(self.__ptr, value.__ptr)
+		return true
+	elseif name == "useColorCurves" then
+		Polycore.SceneParticleEmitter_set_useColorCurves(self.__ptr, value)
+		return true
+	elseif name == "colorCurveR" then
+		Polycore.SceneParticleEmitter_set_colorCurveR(self.__ptr, value.__ptr)
+		return true
+	elseif name == "colorCurveG" then
+		Polycore.SceneParticleEmitter_set_colorCurveG(self.__ptr, value.__ptr)
+		return true
+	elseif name == "colorCurveB" then
+		Polycore.SceneParticleEmitter_set_colorCurveB(self.__ptr, value.__ptr)
+		return true
+	elseif name == "colorCurveA" then
+		Polycore.SceneParticleEmitter_set_colorCurveA(self.__ptr, value.__ptr)
+		return true
+	elseif name == "colorDeviation" then
+		Polycore.SceneParticleEmitter_set_colorDeviation(self.__ptr, value.__ptr)
+		return true
+	end
+	if SceneMesh["__setvar"] ~= nil then
+		return SceneMesh.__setvar(self, name, value)
+	else
+		return false
+	end
+end
+
+
+function SceneParticleEmitter:SceneParticleEmitter(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "SceneMesh" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.SceneParticleEmitter(unpack(arg))
+	end
+end
+
+function SceneParticleEmitter:setParticleCount(newParticleCount)
+	local retVal = Polycore.SceneParticleEmitter_setParticleCount(self.__ptr, newParticleCount)
+end
+
+function SceneParticleEmitter:getParticleCount()
+	local retVal =  Polycore.SceneParticleEmitter_getParticleCount(self.__ptr)
+	return retVal
+end
+
+function SceneParticleEmitter:setParticleLifetime(lifetime)
+	local retVal = Polycore.SceneParticleEmitter_setParticleLifetime(self.__ptr, lifetime)
+end
+
+function SceneParticleEmitter:getParticleLifetime()
+	local retVal =  Polycore.SceneParticleEmitter_getParticleLifetime(self.__ptr)
+	return retVal
+end
+
+function SceneParticleEmitter:setDirectionDeviation(newDeviation)
+	local retVal = Polycore.SceneParticleEmitter_setDirectionDeviation(self.__ptr, newDeviation.__ptr)
+end
+
+function SceneParticleEmitter:getDirectionDeviation()
+	local retVal =  Polycore.SceneParticleEmitter_getDirectionDeviation(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneParticleEmitter:setEmitterSize(newSize)
+	local retVal = Polycore.SceneParticleEmitter_setEmitterSize(self.__ptr, newSize.__ptr)
+end
+
+function SceneParticleEmitter:getEmitterSize()
+	local retVal =  Polycore.SceneParticleEmitter_getEmitterSize(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneParticleEmitter:setGravity(newGravity)
+	local retVal = Polycore.SceneParticleEmitter_setGravity(self.__ptr, newGravity.__ptr)
+end
+
+function SceneParticleEmitter:getGravity()
+	local retVal =  Polycore.SceneParticleEmitter_getGravity(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneParticleEmitter:fixedUpdate()
+	local retVal =  Polycore.SceneParticleEmitter_fixedUpdate(self.__ptr)
+end
+
+function SceneParticleEmitter:Render(buffer)
+	local retVal = Polycore.SceneParticleEmitter_Render(self.__ptr, buffer.__ptr)
+end
+
+function SceneParticleEmitter:updateParticles()
+	local retVal =  Polycore.SceneParticleEmitter_updateParticles(self.__ptr)
+end
+
+function SceneParticleEmitter:rebuildParticles(buffer)
+	local retVal = Polycore.SceneParticleEmitter_rebuildParticles(self.__ptr, buffer.__ptr)
+end
+
+function SceneParticleEmitter:triggerParticles(allAtOnce)
+	local retVal = Polycore.SceneParticleEmitter_triggerParticles(self.__ptr, allAtOnce)
+end
+
+function SceneParticleEmitter:enableParticleSystem(val)
+	local retVal = Polycore.SceneParticleEmitter_enableParticleSystem(self.__ptr, val)
+end
+
+function SceneParticleEmitter:setUseFloorPlane(val)
+	local retVal = Polycore.SceneParticleEmitter_setUseFloorPlane(self.__ptr, val)
+end
+
+function SceneParticleEmitter:setFloorPlaneOffset(floorPlaneOffset)
+	local retVal = Polycore.SceneParticleEmitter_setFloorPlaneOffset(self.__ptr, floorPlaneOffset)
+end
+
+function SceneParticleEmitter:setFloorDamping(floorDamping)
+	local retVal = Polycore.SceneParticleEmitter_setFloorDamping(self.__ptr, floorDamping)
+end
+
+function SceneParticleEmitter:setParticlesInWorldSpace(val)
+	local retVal = Polycore.SceneParticleEmitter_setParticlesInWorldSpace(self.__ptr, val)
+end
+
+function SceneParticleEmitter:getParticlesInWorldSpace()
+	local retVal =  Polycore.SceneParticleEmitter_getParticlesInWorldSpace(self.__ptr)
+	return retVal
+end
+
+function SceneParticleEmitter:setPerlinEnabled(val)
+	local retVal = Polycore.SceneParticleEmitter_setPerlinEnabled(self.__ptr, val)
+end
+
+function SceneParticleEmitter:getPerlinEnabled()
+	local retVal =  Polycore.SceneParticleEmitter_getPerlinEnabled(self.__ptr)
+	return retVal
+end
+
+function SceneParticleEmitter:getParticleSpeed()
+	local retVal =  Polycore.SceneParticleEmitter_getParticleSpeed(self.__ptr)
+	return retVal
+end
+
+function SceneParticleEmitter:setParticleSpeed(speed)
+	local retVal = Polycore.SceneParticleEmitter_setParticleSpeed(self.__ptr, speed)
+end
+
+function SceneParticleEmitter:setPerlinValue(perlinValue)
+	local retVal = Polycore.SceneParticleEmitter_setPerlinValue(self.__ptr, perlinValue.__ptr)
+end
+
+function SceneParticleEmitter:getPerlinValue()
+	local retVal =  Polycore.SceneParticleEmitter_getPerlinValue(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneParticleEmitter:setParticleType(particleType)
+	local retVal = Polycore.SceneParticleEmitter_setParticleType(self.__ptr, particleType)
+end
+
+function SceneParticleEmitter:getParticleType()
+	local retVal =  Polycore.SceneParticleEmitter_getParticleType(self.__ptr)
+	return retVal
+end
+
+function SceneParticleEmitter:setParticleSize(particleSize)
+	local retVal = Polycore.SceneParticleEmitter_setParticleSize(self.__ptr, particleSize)
+end
+
+function SceneParticleEmitter:getParticleSize()
+	local retVal =  Polycore.SceneParticleEmitter_getParticleSize(self.__ptr)
+	return retVal
+end
+
+function SceneParticleEmitter:setParticleRotationSpeed(rotationSpeed)
+	local retVal = Polycore.SceneParticleEmitter_setParticleRotationSpeed(self.__ptr, rotationSpeed.__ptr)
+end
+
+function SceneParticleEmitter:getParticleRotationSpeed()
+	local retVal =  Polycore.SceneParticleEmitter_getParticleRotationSpeed(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneParticleEmitter:setParticleDirection(direction)
+	local retVal = Polycore.SceneParticleEmitter_setParticleDirection(self.__ptr, direction.__ptr)
+end
+
+function SceneParticleEmitter:getParticleDirection()
+	local retVal =  Polycore.SceneParticleEmitter_getParticleDirection(self.__ptr)
+	if retVal == nil then return nil end
+	local __c = _G["Vector3"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneParticleEmitter:setLoopParticles(val)
+	local retVal = Polycore.SceneParticleEmitter_setLoopParticles(self.__ptr, val)
+end
+
+function SceneParticleEmitter:getLoopParticles()
+	local retVal =  Polycore.SceneParticleEmitter_getLoopParticles(self.__ptr)
+	return retVal
+end
+
+function SceneParticleEmitter:addSourceMesh(mesh)
+	local retVal = Polycore.SceneParticleEmitter_addSourceMesh(self.__ptr, mesh.__ptr)
+end
+
+function SceneParticleEmitter:getNumSourceMeshes()
+	local retVal =  Polycore.SceneParticleEmitter_getNumSourceMeshes(self.__ptr)
+	return retVal
+end
+
+function SceneParticleEmitter:getSourcesMeshAtIndex(index)
+	local retVal = Polycore.SceneParticleEmitter_getSourcesMeshAtIndex(self.__ptr, index)
+	if retVal == nil then return nil end
+	local __c = _G["Mesh"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneParticleEmitter:removeSourceMeshAtIndex(index)
+	local retVal = Polycore.SceneParticleEmitter_removeSourceMeshAtIndex(self.__ptr, index)
+end
+
+function SceneParticleEmitter:positionParticle(index)
+	local retVal = Polycore.SceneParticleEmitter_positionParticle(self.__ptr, index)
+end
+
+function SceneParticleEmitter:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneParticleEmitter_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function SceneParticleEmitter:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.SceneParticleEmitter_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function SceneParticleEmitter:__delete()
+	if self then Polycore.delete_SceneParticleEmitter(self.__ptr) end
+end

+ 95 - 0
bindings/lua/Polycode/ScenePrimitive.lua

@@ -0,0 +1,95 @@
+require "Polycode/SceneMesh"
+
+class "ScenePrimitive" (SceneMesh)
+
+
+
+ScenePrimitive.TYPE_BOX = 0
+ScenePrimitive.TYPE_PLANE = 1
+ScenePrimitive.TYPE_VPLANE = 2
+ScenePrimitive.TYPE_CYLINDER = 3
+ScenePrimitive.TYPE_UNCAPPED_CYLINDER = 4
+ScenePrimitive.TYPE_SPHERE = 5
+ScenePrimitive.TYPE_TORUS = 6
+ScenePrimitive.TYPE_CONE = 7
+ScenePrimitive.TYPE_CIRCLE = 8
+ScenePrimitive.TYPE_ICOSPHERE = 9
+ScenePrimitive.TYPE_OCTOSPHERE = 10
+ScenePrimitive.TYPE_LINE_CIRCLE = 11
+
+
+
+
+function ScenePrimitive:ScenePrimitive(...)
+	local arg = {...}
+	if type(arg[1]) == "table" and count(arg) == 1 then
+		if ""..arg[1].__classname == "SceneMesh" then
+			self.__ptr = arg[1].__ptr
+			return
+		end
+	end
+	for k,v in pairs(arg) do
+		if type(v) == "table" then
+			if v.__ptr ~= nil then
+				arg[k] = v.__ptr
+			end
+		end
+	end
+	if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
+		self.__ptr = Polycore.ScenePrimitive(unpack(arg))
+	end
+end
+
+function ScenePrimitive:setPrimitiveOptions(type, v1, v2, v3, v4, v5)
+	local retVal = Polycore.ScenePrimitive_setPrimitiveOptions(self.__ptr, type, v1, v2, v3, v4, v5)
+end
+
+function ScenePrimitive:recreatePrimitive()
+	local retVal =  Polycore.ScenePrimitive_recreatePrimitive(self.__ptr)
+end
+
+function ScenePrimitive:getPrimitiveType()
+	local retVal =  Polycore.ScenePrimitive_getPrimitiveType(self.__ptr)
+	return retVal
+end
+
+function ScenePrimitive:getPrimitiveParameter1()
+	local retVal =  Polycore.ScenePrimitive_getPrimitiveParameter1(self.__ptr)
+	return retVal
+end
+
+function ScenePrimitive:getPrimitiveParameter2()
+	local retVal =  Polycore.ScenePrimitive_getPrimitiveParameter2(self.__ptr)
+	return retVal
+end
+
+function ScenePrimitive:getPrimitiveParameter3()
+	local retVal =  Polycore.ScenePrimitive_getPrimitiveParameter3(self.__ptr)
+	return retVal
+end
+
+function ScenePrimitive:getPrimitiveParameter4()
+	local retVal =  Polycore.ScenePrimitive_getPrimitiveParameter4(self.__ptr)
+	return retVal
+end
+
+function ScenePrimitive:getPrimitiveParameter5()
+	local retVal =  Polycore.ScenePrimitive_getPrimitiveParameter5(self.__ptr)
+	return retVal
+end
+
+function ScenePrimitive:Clone(deepClone, ignoreEditorOnly)
+	local retVal = Polycore.ScenePrimitive_Clone(self.__ptr, deepClone, ignoreEditorOnly)
+	if retVal == nil then return nil end
+	local __c = _G["Entity"]("__skip_ptr__")
+	__c.__ptr = retVal
+	return __c
+end
+
+function ScenePrimitive:applyClone(clone, deepClone, ignoreEditorOnly)
+	local retVal = Polycore.ScenePrimitive_applyClone(self.__ptr, clone.__ptr, deepClone, ignoreEditorOnly)
+end
+
+function ScenePrimitive:__delete()
+	if self then Polycore.delete_ScenePrimitive(self.__ptr) end
+end

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä