Просмотр исходного кода

Fixes for binding build on Mac OS X, removed lua files from repo

Ivan Safrin 13 лет назад
Родитель
Сommit
e8f410d869
100 измененных файлов с 85 добавлено и 20813 удалено
  1. 16 0
      .gitignore
  2. 0 87
      Bindings/Contents/LUA/API/Polycode.lua
  3. 0 98
      Bindings/Contents/LUA/API/Polycode/BezierCurve.lua
  4. 0 40
      Bindings/Contents/LUA/API/Polycode/BezierPathTween.lua
  5. 0 228
      Bindings/Contents/LUA/API/Polycode/Bone.lua
  6. 0 149
      Bindings/Contents/LUA/API/Polycode/BoneTrack.lua
  7. 0 122
      Bindings/Contents/LUA/API/Polycode/Camera.lua
  8. 0 93
      Bindings/Contents/LUA/API/Polycode/Color.lua
  9. 0 73
      Bindings/Contents/LUA/API/Polycode/Config.lua
  10. 0 210
      Bindings/Contents/LUA/API/Polycode/Core.lua
  11. 0 158
      Bindings/Contents/LUA/API/Polycode/CoreInput.lua
  12. 0 192
      Bindings/Contents/LUA/API/Polycode/CoreServices.lua
  13. 0 36
      Bindings/Contents/LUA/API/Polycode/Cubemap.lua
  14. 0 58
      Bindings/Contents/LUA/API/Polycode/Data.lua
  15. 0 506
      Bindings/Contents/LUA/API/Polycode/Entity.lua
  16. 0 67
      Bindings/Contents/LUA/API/Polycode/Event.lua
  17. 0 64
      Bindings/Contents/LUA/API/Polycode/EventDispatcher.lua
  18. 0 35
      Bindings/Contents/LUA/API/Polycode/EventHandler.lua
  19. 0 48
      Bindings/Contents/LUA/API/Polycode/FixedShader.lua
  20. 0 60
      Bindings/Contents/LUA/API/Polycode/FixedShaderBinding.lua
  21. 0 57
      Bindings/Contents/LUA/API/Polycode/Font.lua
  22. 0 44
      Bindings/Contents/LUA/API/Polycode/FontManager.lua
  23. 0 54
      Bindings/Contents/LUA/API/Polycode/GLSLProgram.lua
  24. 0 47
      Bindings/Contents/LUA/API/Polycode/GLSLShader.lua
  25. 0 52
      Bindings/Contents/LUA/API/Polycode/GLSLShaderBinding.lua
  26. 0 73
      Bindings/Contents/LUA/API/Polycode/GLSLShaderModule.lua
  27. 0 127
      Bindings/Contents/LUA/API/Polycode/GenericScene.lua
  28. 0 162
      Bindings/Contents/LUA/API/Polycode/Image.lua
  29. 0 166
      Bindings/Contents/LUA/API/Polycode/InputEvent.lua
  30. 0 76
      Bindings/Contents/LUA/API/Polycode/Label.lua
  31. 0 36
      Bindings/Contents/LUA/API/Polycode/Logger.lua
  32. 0 141
      Bindings/Contents/LUA/API/Polycode/Material.lua
  33. 0 176
      Bindings/Contents/LUA/API/Polycode/MaterialManager.lua
  34. 0 92
      Bindings/Contents/LUA/API/Polycode/Matrix4.lua
  35. 0 187
      Bindings/Contents/LUA/API/Polycode/Mesh.lua
  36. 0 64
      Bindings/Contents/LUA/API/Polycode/OSBasics.lua
  37. 0 46
      Bindings/Contents/LUA/API/Polycode/OSFILE.lua
  38. 0 67
      Bindings/Contents/LUA/API/Polycode/OSFileEntry.lua
  39. 0 88
      Bindings/Contents/LUA/API/Polycode/ObjectEntry.lua
  40. 0 47
      Bindings/Contents/LUA/API/Polycode/OpenGLCubemap.lua
  41. 0 106
      Bindings/Contents/LUA/API/Polycode/Particle.lua
  42. 0 228
      Bindings/Contents/LUA/API/Polycode/ParticleEmitter.lua
  43. 0 33
      Bindings/Contents/LUA/API/Polycode/Perlin.lua
  44. 0 35
      Bindings/Contents/LUA/API/Polycode/PolycodeModule.lua
  45. 0 28
      Bindings/Contents/LUA/API/Polycode/PolycodeViewBase.lua
  46. 0 125
      Bindings/Contents/LUA/API/Polycode/Polygon.lua
  47. 0 191
      Bindings/Contents/LUA/API/Polycode/Quaternion.lua
  48. 0 48
      Bindings/Contents/LUA/API/Polycode/QuaternionCurve.lua
  49. 0 40
      Bindings/Contents/LUA/API/Polycode/QuaternionTween.lua
  50. 0 59
      Bindings/Contents/LUA/API/Polycode/Rectangle.lua
  51. 0 532
      Bindings/Contents/LUA/API/Polycode/Renderer.lua
  52. 0 71
      Bindings/Contents/LUA/API/Polycode/Resource.lua
  53. 0 85
      Bindings/Contents/LUA/API/Polycode/ResourceManager.lua
  54. 0 287
      Bindings/Contents/LUA/API/Polycode/Scene.lua
  55. 0 53
      Bindings/Contents/LUA/API/Polycode/SceneEntity.lua
  56. 0 52
      Bindings/Contents/LUA/API/Polycode/SceneLabel.lua
  57. 0 184
      Bindings/Contents/LUA/API/Polycode/SceneLight.lua
  58. 0 40
      Bindings/Contents/LUA/API/Polycode/SceneLine.lua
  59. 0 52
      Bindings/Contents/LUA/API/Polycode/SceneManager.lua
  60. 0 157
      Bindings/Contents/LUA/API/Polycode/SceneMesh.lua
  61. 0 72
      Bindings/Contents/LUA/API/Polycode/SceneParticleEmitter.lua
  62. 0 43
      Bindings/Contents/LUA/API/Polycode/ScenePrimitive.lua
  63. 0 68
      Bindings/Contents/LUA/API/Polycode/SceneRenderTexture.lua
  64. 0 52
      Bindings/Contents/LUA/API/Polycode/SceneSound.lua
  65. 0 40
      Bindings/Contents/LUA/API/Polycode/SceneSoundListener.lua
  66. 0 189
      Bindings/Contents/LUA/API/Polycode/Screen.lua
  67. 0 36
      Bindings/Contents/LUA/API/Polycode/ScreenCurve.lua
  68. 0 236
      Bindings/Contents/LUA/API/Polycode/ScreenEntity.lua
  69. 0 40
      Bindings/Contents/LUA/API/Polycode/ScreenEvent.lua
  70. 0 50
      Bindings/Contents/LUA/API/Polycode/ScreenImage.lua
  71. 0 68
      Bindings/Contents/LUA/API/Polycode/ScreenLabel.lua
  72. 0 48
      Bindings/Contents/LUA/API/Polycode/ScreenLine.lua
  73. 0 48
      Bindings/Contents/LUA/API/Polycode/ScreenManager.lua
  74. 0 72
      Bindings/Contents/LUA/API/Polycode/ScreenMesh.lua
  75. 0 68
      Bindings/Contents/LUA/API/Polycode/ScreenParticleEmitter.lua
  76. 0 93
      Bindings/Contents/LUA/API/Polycode/ScreenShape.lua
  77. 0 52
      Bindings/Contents/LUA/API/Polycode/ScreenSound.lua
  78. 0 40
      Bindings/Contents/LUA/API/Polycode/ScreenSoundListener.lua
  79. 0 52
      Bindings/Contents/LUA/API/Polycode/ScreenSprite.lua
  80. 0 68
      Bindings/Contents/LUA/API/Polycode/Shader.lua
  81. 0 132
      Bindings/Contents/LUA/API/Polycode/ShaderBinding.lua
  82. 0 117
      Bindings/Contents/LUA/API/Polycode/Skeleton.lua
  83. 0 60
      Bindings/Contents/LUA/API/Polycode/SkeletonAnimation.lua
  84. 0 112
      Bindings/Contents/LUA/API/Polycode/Sound.lua
  85. 0 44
      Bindings/Contents/LUA/API/Polycode/SoundManager.lua
  86. 0 132
      Bindings/Contents/LUA/API/Polycode/String.lua
  87. 0 102
      Bindings/Contents/LUA/API/Polycode/Texture.lua
  88. 0 69
      Bindings/Contents/LUA/API/Polycode/Timer.lua
  89. 0 40
      Bindings/Contents/LUA/API/Polycode/TimerManager.lua
  90. 0 103
      Bindings/Contents/LUA/API/Polycode/Tween.lua
  91. 0 40
      Bindings/Contents/LUA/API/Polycode/TweenManager.lua
  92. 0 36
      Bindings/Contents/LUA/API/Polycode/Vector2.lua
  93. 0 85
      Bindings/Contents/LUA/API/Polycode/Vector3.lua
  94. 0 147
      Bindings/Contents/LUA/API/Polycode/Vertex.lua
  95. 0 50
      Bindings/Contents/LUA/API/Polycode/VertexBuffer.lua
  96. 0 170
      Bindings/Contents/LUA/API/Polycode/Win32Core.lua
  97. BIN
      Bindings/Contents/LUA/API/api.pak
  98. 0 9
      Bindings/Contents/LUA/Include/PolycodeLUA.h
  99. 0 11394
      Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h
  100. 69 4
      Bindings/Contents/LUA/Source/PolycodeLUA.cpp

+ 16 - 0
.gitignore

@@ -39,6 +39,22 @@
 UserInterfaceState.*
 Player/Build/Mac OS X/Polycode Player.xcodeproj/project.xcworkspace/xcuserdata/ivansafrin.xcuserdatad/UserInterfaceState.xcuserstate
 
+/Bindings/Contents/LUA/API/Polycode/*.lua
+/Bindings/Contents/LUA/API/Polycode.lua
+/Bindings/Contents/LUA/API/api.pak
+/Bindings/Contents/LUA/Include/*.h
+/Bindings/Contents/LUA/Source/*.cpp	
+
+/Modules/Bindings/2DPhysics/API/Physics2D/*.lua
+/Modules/Bindings/2DPhysics/API/Physics2D.lua
+/Modules/Bindings/2DPhysics/Include/*.h
+/Modules/Bindings/2DPhysics/Source/*.cpp
+
+/Modules/Bindings/3DPhysics/API/Physics3D/*.lua
+/Modules/Bindings/3DPhysics/API/Physics3D.lua
+/Modules/Bindings/3DPhysics/Include/*.h
+/Modules/Bindings/3DPhysics/Source/*.cpp
+
 /Player/Build
 /Standalone/Build
 

+ 0 - 87
Bindings/Contents/LUA/API/Polycode.lua

@@ -1,87 +0,0 @@
-require "Polycode/OSFILE"
-require "Polycode/OSFileEntry"
-require "Polycode/OSBasics"
-require "Polycode/BezierCurve"
-require "Polycode/Bone"
-require "Polycode/Camera"
-require "Polycode/Color"
-require "Polycode/Config"
-require "Polycode/PolycodeViewBase"
-require "Polycode/Core"
-require "Polycode/CoreInput"
-require "Polycode/CoreServices"
-require "Polycode/Cubemap"
-require "Polycode/Data"
-require "Polycode/Entity"
-require "Polycode/Event"
-require "Polycode/EventDispatcher"
-require "Polycode/EventHandler"
-require "Polycode/FixedShader"
-require "Polycode/FixedShaderBinding"
-require "Polycode/Font"
-require "Polycode/FontManager"
-require "Polycode/Image"
-require "Polycode/InputEvent"
-require "Polycode/Label"
-require "Polycode/Logger"
-require "Polycode/Material"
-require "Polycode/MaterialManager"
-require "Polycode/Matrix4"
-require "Polycode/VertexBuffer"
-require "Polycode/Mesh"
-require "Polycode/PolycodeModule"
-require "Polycode/ObjectEntry"
-require "Polycode/Particle"
-require "Polycode/ScreenParticleEmitter"
-require "Polycode/SceneParticleEmitter"
-require "Polycode/ParticleEmitter"
-require "Polycode/Perlin"
-require "Polycode/Polygon"
-require "Polycode/Quaternion"
-require "Polycode/QuaternionCurve"
-require "Polycode/Rectangle"
-require "Polycode/Renderer"
-require "Polycode/Resource"
-require "Polycode/ResourceManager"
-require "Polycode/Scene"
-require "Polycode/SceneEntity"
-require "Polycode/SceneLabel"
-require "Polycode/SceneLight"
-require "Polycode/SceneLine"
-require "Polycode/SceneManager"
-require "Polycode/SceneMesh"
-require "Polycode/ScenePrimitive"
-require "Polycode/SceneRenderTexture"
-require "Polycode/SceneSound"
-require "Polycode/SceneSoundListener"
-require "Polycode/Screen"
-require "Polycode/ScreenCurve"
-require "Polycode/ScreenEntity"
-require "Polycode/ScreenEvent"
-require "Polycode/ScreenImage"
-require "Polycode/ScreenLabel"
-require "Polycode/ScreenLine"
-require "Polycode/ScreenManager"
-require "Polycode/ScreenMesh"
-require "Polycode/ScreenShape"
-require "Polycode/ScreenSoundListener"
-require "Polycode/ScreenSound"
-require "Polycode/ScreenSprite"
-require "Polycode/Shader"
-require "Polycode/ShaderBinding"
-require "Polycode/SkeletonAnimation"
-require "Polycode/Skeleton"
-require "Polycode/BoneTrack"
-require "Polycode/Sound"
-require "Polycode/SoundManager"
-require "Polycode/String"
-require "Polycode/Texture"
-require "Polycode/Timer"
-require "Polycode/TimerManager"
-require "Polycode/QuaternionTween"
-require "Polycode/Tween"
-require "Polycode/BezierPathTween"
-require "Polycode/TweenManager"
-require "Polycode/Vector2"
-require "Polycode/Vector3"
-require "Polycode/Vertex"

+ 0 - 98
Bindings/Contents/LUA/API/Polycode/BezierCurve.lua

@@ -1,98 +0,0 @@
-class "BezierCurve"
-
-
-
-
-
-
-
-function BezierCurve:BezierCurve(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function BezierCurve:getControlPoint(index)
-	local retVal = Polycore.BezierCurve_getControlPoint(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = BezierPoint("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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:getHeightAt(a)
-	local retVal = Polycore.BezierCurve_getHeightAt(self.__ptr, a)
-	return retVal
-end
-
-function BezierCurve:getPointAt(a)
-	local retVal = Polycore.BezierCurve_getPointAt(self.__ptr, a)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function BezierCurve:rebuildBuffers()
-	local retVal =  Polycore.BezierCurve_rebuildBuffers(self.__ptr)
-end
-
-
-
-function BezierCurve:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_BezierCurve(self.__ptr)
-end

+ 0 - 40
Bindings/Contents/LUA/API/Polycode/BezierPathTween.lua

@@ -1,40 +0,0 @@
-require "Polycode/Tween"
-
-class "BezierPathTween" (Tween)
-
-
-
-
-
-
-
-function BezierPathTween:BezierPathTween(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "Tween" 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.BezierPathTween(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function BezierPathTween:updateCustomTween()
-	local retVal =  Polycore.BezierPathTween_updateCustomTween(self.__ptr)
-end
-
-
-
-function BezierPathTween:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_BezierPathTween(self.__ptr)
-end

+ 0 - 228
Bindings/Contents/LUA/API/Polycode/Bone.lua

@@ -1,228 +0,0 @@
-require "Polycode/SceneEntity"
-
-class "Bone" (SceneEntity)
-
-
-
-function Bone:__index__(name)
-	if name == "parentBoneId" then
-		return Polycore.Bone_get_parentBoneId(self.__ptr)
-	elseif name == "boneMatrix" then
-		retVal = Polycore.Bone_get_boneMatrix(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "restMatrix" then
-		retVal = Polycore.Bone_get_restMatrix(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "baseMatrix" then
-		retVal = Polycore.Bone_get_baseMatrix(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	end
-end
-
-
-function Bone:__set_callback(name,value)
-	if name == "parentBoneId" then
-		Polycore.Bone_set_parentBoneId(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Bone:Bone(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "SceneEntity" 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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Bone:enableBoneLabel(labelFont, size, scale, labelColor)
-	local retVal = Polycore.Bone_enableBoneLabel(self.__ptr, labelFont, size, scale, labelColor.__ptr)
-end
-
-function Bone:getName()
-	local retVal =  Polycore.Bone_getName(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Bone:Render()
-	local retVal =  Polycore.Bone_Render(self.__ptr)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Bone("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Bone("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Bone:getBoneMatrix()
-	local retVal =  Polycore.Bone_getBoneMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Bone:getFullRestMatrix()
-	local retVal =  Polycore.Bone_getFullRestMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Bone:getParentRestMatrix()
-	local retVal =  Polycore.Bone_getParentRestMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Bone:getFinalMatrix()
-	local retVal =  Polycore.Bone_getFinalMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Bone:getFullBaseMatrix()
-	local retVal =  Polycore.Bone_getFullBaseMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Bone:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Bone(self.__ptr)
-end

+ 0 - 149
Bindings/Contents/LUA/API/Polycode/BoneTrack.lua

@@ -1,149 +0,0 @@
-class "BoneTrack"
-
-
-
-function BoneTrack:__index__(name)
-	if name == "LocXVec" then
-		retVal = Polycore.BoneTrack_get_LocXVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "LocYVec" then
-		retVal = Polycore.BoneTrack_get_LocYVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "LocZVec" then
-		retVal = Polycore.BoneTrack_get_LocZVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "ScaleXVec" then
-		retVal = Polycore.BoneTrack_get_ScaleXVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "ScaleYVec" then
-		retVal = Polycore.BoneTrack_get_ScaleYVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "ScaleZVec" then
-		retVal = Polycore.BoneTrack_get_ScaleZVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "boneQuat" then
-		retVal = Polycore.BoneTrack_get_boneQuat(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Quaternion("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "QuatWVec" then
-		retVal = Polycore.BoneTrack_get_QuatWVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "QuatXVec" then
-		retVal = Polycore.BoneTrack_get_QuatXVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "QuatYVec" then
-		retVal = Polycore.BoneTrack_get_QuatYVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "QuatZVec" then
-		retVal = Polycore.BoneTrack_get_QuatZVec(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	end
-end
-
-
-function BoneTrack:__set_callback(name,value)
-	return false
-end
-
-
-function BoneTrack:BoneTrack(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	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()
-	local retVal =  Polycore.BoneTrack_Update(self.__ptr)
-end
-
-function BoneTrack:setSpeed(speed)
-	local retVal = Polycore.BoneTrack_setSpeed(self.__ptr, speed)
-end
-
-
-
-function BoneTrack:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_BoneTrack(self.__ptr)
-end

+ 0 - 122
Bindings/Contents/LUA/API/Polycode/Camera.lua

@@ -1,122 +0,0 @@
-require "Polycode/SceneEntity"
-
-class "Camera" (SceneEntity)
-
-
-
-
-
-
-
-function Camera:Camera(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "SceneEntity" 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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Camera:buildFrustrumPlanes()
-	local retVal =  Polycore.Camera_buildFrustrumPlanes(self.__ptr)
-end
-
-function Camera:isSphereInFrustrum(pos, fRadius)
-	local retVal = Polycore.Camera_isSphereInFrustrum(self.__ptr, pos.__ptr, fRadius)
-	return retVal
-end
-
-function Camera:canSee(entity)
-	local retVal = Polycore.Camera_canSee(self.__ptr, entity.__ptr)
-	return retVal
-end
-
-function Camera:setOrthoMode(mode)
-	local retVal = Polycore.Camera_setOrthoMode(self.__ptr, mode)
-end
-
-function Camera:getOrthoMode()
-	local retVal =  Polycore.Camera_getOrthoMode(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:setParentScene(parentScene)
-	local retVal = Polycore.Camera_setParentScene(self.__ptr, parentScene.__ptr)
-end
-
-function Camera:doCameraTransform()
-	local retVal =  Polycore.Camera_doCameraTransform(self.__ptr)
-end
-
-function Camera:setLightDepthTexture(texture)
-	local retVal = Polycore.Camera_setLightDepthTexture(self.__ptr, texture.__ptr)
-end
-
-function Camera:hasFilterShader()
-	local retVal =  Polycore.Camera_hasFilterShader(self.__ptr)
-	return retVal
-end
-
-function Camera:drawFilter(targetTexture, targetTextureWidth, targetTextureHeight)
-	local retVal = Polycore.Camera_drawFilter(self.__ptr, targetTexture.__ptr, targetTextureWidth, targetTextureHeight)
-end
-
-function Camera:setExposureLevel(level)
-	local retVal = Polycore.Camera_setExposureLevel(self.__ptr, level)
-end
-
-function Camera:getExposureLevel()
-	local retVal =  Polycore.Camera_getExposureLevel(self.__ptr)
-	return retVal
-end
-
-function Camera:createPostFilter(shaderMaterial)
-	local retVal = Polycore.Camera_createPostFilter(self.__ptr, shaderMaterial.__ptr)
-end
-
-function Camera:setPostFilter(shaderName)
-	local retVal = Polycore.Camera_setPostFilter(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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Material("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Camera:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Camera(self.__ptr)
-end

+ 0 - 93
Bindings/Contents/LUA/API/Polycode/Color.lua

@@ -1,93 +0,0 @@
-class "Color"
-
-
-
-function Color:__index__(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:__set_callback(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(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-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: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:Random()
-	local retVal =  Polycore.Color_Random(self.__ptr)
-end
-
-function Color:getBrightness()
-	local retVal =  Polycore.Color_getBrightness(self.__ptr)
-	return retVal
-end
-
-function Color:getUint()
-	local retVal =  Polycore.Color_getUint(self.__ptr)
-	return retVal
-end
-
-
-
-function Color:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Color(self.__ptr)
-end

+ 0 - 73
Bindings/Contents/LUA/API/Polycode/Config.lua

@@ -1,73 +0,0 @@
-class "Config"
-
-
-
-
-
-
-
-function Config:Config(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ConfigEntry("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Config:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Config(self.__ptr)
-end

+ 0 - 210
Bindings/Contents/LUA/API/Polycode/Core.lua

@@ -1,210 +0,0 @@
-require "Polycode/EventDispatcher"
-
-class "Core" (EventDispatcher)
-
-
-
-EVENT_CORE_RESIZE = 0
-
-
-
-
-function Core:Update()
-	local retVal =  Polycore.Core_Update(self.__ptr)
-	return retVal
-end
-
-function Core:enableMouse(newval)
-	local retVal = Polycore.Core_enableMouse(self.__ptr, newval)
-end
-
-function Core:setCursor(cursorType)
-	local retVal = Polycore.Core_setCursor(self.__ptr, cursorType)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = CoreMutex("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Core:copyStringToClipboard(str)
-	local retVal = Polycore.Core_copyStringToClipboard(self.__ptr, str)
-end
-
-function Core:getClipboardString()
-	local retVal =  Polycore.Core_getClipboardString(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Core:getServices()
-	local retVal =  Polycore.Core_getServices(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = CoreServices("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = CoreInput("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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:getNumVideoModes()
-	local retVal =  Polycore.Core_getNumVideoModes(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)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Core:setVideoModeIndex(index, fullScreen, vSync, aaLevel, anisotropyLevel)
-	local retVal = Polycore.Core_setVideoModeIndex(self.__ptr, index, fullScreen, vSync, aaLevel, anisotropyLevel)
-end
-
-function Core:setVideoMode(xRes, yRes, fullScreen, vSync, aaLevel, anisotropyLevel)
-	local retVal = Polycore.Core_setVideoMode(self.__ptr, xRes, yRes, fullScreen, vSync, aaLevel, anisotropyLevel)
-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:getElapsed()
-	local retVal =  Polycore.Core_getElapsed(self.__ptr)
-	return retVal
-end
-
-function Core:getTicks()
-	local retVal =  Polycore.Core_getTicks(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = unsignedint("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Core:getTicksFloat()
-	local retVal =  Polycore.Core_getTicksFloat(self.__ptr)
-	return retVal
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = void("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Core:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Core(self.__ptr)
-end

+ 0 - 158
Bindings/Contents/LUA/API/Polycode/CoreInput.lua

@@ -1,158 +0,0 @@
-require "Polycode/EventDispatcher"
-
-class "CoreInput" (EventDispatcher)
-
-
-
-MOUSE_BUTTON1 = 0
-MOUSE_BUTTON2 = 1
-MOUSE_BUTTON3 = 2
-
-
-
-
-function CoreInput:CoreInput(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function CoreInput:getMousePosition()
-	local retVal =  Polycore.CoreInput_getMousePosition(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector2("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreInput:getKeyState(keyCode)
-	local retVal = Polycore.CoreInput_getKeyState(self.__ptr, keyCode.__ptr)
-	return retVal
-end
-
-function CoreInput:getMouseDelta()
-	local retVal =  Polycore.CoreInput_getMouseDelta(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector2("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = JoystickInfo("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreInput:getJoystickInfoByID(deviceID)
-	local retVal = Polycore.CoreInput_getJoystickInfoByID(self.__ptr, deviceID)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = JoystickInfo("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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.__ptr, code.__ptr, newState, ticks)
-end
-
-function CoreInput:setDeltaPosition(x, y)
-	local retVal = Polycore.CoreInput_setDeltaPosition(self.__ptr, x, y)
-end
-
-function CoreInput:createEvent(event)
-	local retVal = Polycore.CoreInput_createEvent(event.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = InputEvent("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function CoreInput:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_CoreInput(self.__ptr)
-end

+ 0 - 192
Bindings/Contents/LUA/API/Polycode/CoreServices.lua

@@ -1,192 +0,0 @@
-require "Polycode/EventDispatcher"
-
-class "CoreServices" (EventDispatcher)
-
-
-
-
-
-
-
-function CoreServices:getInstance()
-	local retVal =  Polycore.CoreServices_getInstance()
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = CoreServices("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = CoreMutex("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Renderer("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:Update(elapsed)
-	local retVal = Polycore.CoreServices_Update(self.__ptr, elapsed)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Core("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:installModule(module)
-	local retVal = Polycore.CoreServices_installModule(self.__ptr, module.__ptr)
-end
-
-function CoreServices:getMaterialManager()
-	local retVal =  Polycore.CoreServices_getMaterialManager(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = MaterialManager("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:getScreenManager()
-	local retVal =  Polycore.CoreServices_getScreenManager(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ScreenManager("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:getSceneManager()
-	local retVal =  Polycore.CoreServices_getSceneManager(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneManager("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:getTimerManager()
-	local retVal =  Polycore.CoreServices_getTimerManager(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = TimerManager("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:getTweenManager()
-	local retVal =  Polycore.CoreServices_getTweenManager(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = TweenManager("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:getResourceManager()
-	local retVal =  Polycore.CoreServices_getResourceManager(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ResourceManager("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:getSoundManager()
-	local retVal =  Polycore.CoreServices_getSoundManager(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SoundManager("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:getFontManager()
-	local retVal =  Polycore.CoreServices_getFontManager(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = FontManager("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function CoreServices:getConfig()
-	local retVal =  Polycore.CoreServices_getConfig(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Config("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function CoreServices:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_CoreServices(self.__ptr)
-end

+ 0 - 36
Bindings/Contents/LUA/API/Polycode/Cubemap.lua

@@ -1,36 +0,0 @@
-require "Polycode/Resource"
-
-class "Cubemap" (Resource)
-
-
-
-
-
-
-
-function Cubemap:Cubemap(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-
-
-function Cubemap:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Cubemap(self.__ptr)
-end

+ 0 - 58
Bindings/Contents/LUA/API/Polycode/Data.lua

@@ -1,58 +0,0 @@
-class "Data"
-
-
-
-
-
-
-
-function Data:Data(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Data:loadFromFile(fileName)
-	local retVal = Polycore.Data_loadFromFile(self.__ptr, fileName)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = char("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Data:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Data(self.__ptr)
-end

+ 0 - 506
Bindings/Contents/LUA/API/Polycode/Entity.lua

@@ -1,506 +0,0 @@
-class "Entity"
-
-
-
-function Entity:__index__(name)
-	if name == "custEntityType" then
-		return Polycore.Entity_get_custEntityType(self.__ptr)
-	elseif name == "billboardMode" then
-		return Polycore.Entity_get_billboardMode(self.__ptr)
-	elseif name == "billboardRoll" then
-		return Polycore.Entity_get_billboardRoll(self.__ptr)
-	elseif name == "alphaTest" then
-		return Polycore.Entity_get_alphaTest(self.__ptr)
-	elseif name == "backfaceCulled" then
-		return Polycore.Entity_get_backfaceCulled(self.__ptr)
-	elseif name == "renderWireframe" then
-		return Polycore.Entity_get_renderWireframe(self.__ptr)
-	elseif name == "color" then
-		retVal = Polycore.Entity_get_color(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	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 == "blendingMode" then
-		return Polycore.Entity_get_blendingMode(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 == "depthOnly" then
-		return Polycore.Entity_get_depthOnly(self.__ptr)
-	elseif name == "bBox" then
-		retVal = Polycore.Entity_get_bBox(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "ignoreParentMatrix" then
-		return Polycore.Entity_get_ignoreParentMatrix(self.__ptr)
-	elseif name == "isMask" then
-		return Polycore.Entity_get_isMask(self.__ptr)
-	end
-end
-
-
-function Entity:__set_callback(name,value)
-	if name == "custEntityType" then
-		Polycore.Entity_set_custEntityType(self.__ptr, value)
-		return true
-	elseif name == "billboardMode" then
-		Polycore.Entity_set_billboardMode(self.__ptr, value)
-		return true
-	elseif name == "billboardRoll" then
-		Polycore.Entity_set_billboardRoll(self.__ptr, value)
-		return true
-	elseif name == "alphaTest" then
-		Polycore.Entity_set_alphaTest(self.__ptr, value)
-		return true
-	elseif name == "backfaceCulled" then
-		Polycore.Entity_set_backfaceCulled(self.__ptr, value)
-		return true
-	elseif name == "renderWireframe" then
-		Polycore.Entity_set_renderWireframe(self.__ptr, value)
-		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 == "blendingMode" then
-		Polycore.Entity_set_blendingMode(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 == "depthOnly" then
-		Polycore.Entity_set_depthOnly(self.__ptr, value)
-		return true
-	elseif name == "ignoreParentMatrix" then
-		Polycore.Entity_set_ignoreParentMatrix(self.__ptr, value)
-		return true
-	elseif name == "isMask" then
-		Polycore.Entity_set_isMask(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Entity:Entity(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Entity:Render()
-	local retVal =  Polycore.Entity_Render(self.__ptr)
-end
-
-function Entity:Update()
-	local retVal =  Polycore.Entity_Update(self.__ptr)
-end
-
-function Entity:transformAndRender()
-	local retVal =  Polycore.Entity_transformAndRender(self.__ptr)
-end
-
-function Entity:renderChildren()
-	local retVal =  Polycore.Entity_renderChildren(self.__ptr)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Entity:getConcatenatedMatrix()
-	local retVal =  Polycore.Entity_getConcatenatedMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Entity:getConcatenatedRollMatrix()
-	local retVal =  Polycore.Entity_getConcatenatedRollMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Entity:setTransformByMatrix(matrix)
-	local retVal = Polycore.Entity_setTransformByMatrix(self.__ptr, matrix.__ptr)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Entity:addEntity(newChild)
-	local retVal = Polycore.Entity_addEntity(self.__ptr, newChild.__ptr)
-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: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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Entity("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Entity:getPosition()
-	local retVal =  Polycore.Entity_getPosition(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Entity:getCombinedPosition()
-	local retVal =  Polycore.Entity_getCombinedPosition(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Entity:getScale()
-	local retVal =  Polycore.Entity_getScale(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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: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:setRotationQuat(w, x, y, z)
-	local retVal = Polycore.Entity_setRotationQuat(self.__ptr, w, x, y, z)
-end
-
-function Entity:getRotationQuat()
-	local retVal =  Polycore.Entity_getRotationQuat(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Quaternion("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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:recalculateBBox()
-	local retVal =  Polycore.Entity_recalculateBBox(self.__ptr)
-end
-
-function Entity:getBBoxRadius()
-	local retVal =  Polycore.Entity_getBBoxRadius(self.__ptr)
-	return retVal
-end
-
-function Entity:getCompoundBBoxRadius()
-	local retVal =  Polycore.Entity_getCompoundBBoxRadius(self.__ptr)
-	return retVal
-end
-
-function Entity:setBBoxRadius(rad)
-	local retVal = Polycore.Entity_setBBoxRadius(self.__ptr, rad)
-end
-
-function Entity:setMask(mask)
-	local retVal = Polycore.Entity_setMask(self.__ptr, mask.__ptr)
-end
-
-function Entity:clearMask()
-	local retVal =  Polycore.Entity_clearMask(self.__ptr)
-end
-
-function Entity:setBlendingMode(newBl_endingMode)
-	local retVal = Polycore.Entity_setBlendingMode(self.__ptr, newBl_endingMode)
-end
-
-function Entity:getChildCenter()
-	local retVal =  Polycore.Entity_getChildCenter(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Entity:getEntityProp(propName)
-	local retVal = Polycore.Entity_getEntityProp(self.__ptr, propName)
-	return retVal
-end
-
-function Entity:doUpdates()
-	local retVal =  Polycore.Entity_doUpdates(self.__ptr)
-end
-
-function Entity:buildPositionMatrix()
-	local retVal =  Polycore.Entity_buildPositionMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Entity:adjustMatrixForChildren()
-	local retVal =  Polycore.Entity_adjustMatrixForChildren(self.__ptr)
-end
-
-function Entity:setRenderer(r_enderer)
-	local retVal = Polycore.Entity_setRenderer(self.__ptr, r_enderer.__ptr)
-end
-
-
-
-function Entity:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Entity(self.__ptr)
-end

+ 0 - 67
Bindings/Contents/LUA/API/Polycode/Event.lua

@@ -1,67 +0,0 @@
-class "Event"
-
-
-
-COMPLETE_EVENT = 0
-CHANGE_EVENT = 1
-
-
-
-
-function Event:Event(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = EventDispatcher("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Event:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Event(self.__ptr)
-end

+ 0 - 64
Bindings/Contents/LUA/API/Polycode/EventDispatcher.lua

@@ -1,64 +0,0 @@
-require "Polycode/EventHandler"
-
-class "EventDispatcher" (EventHandler)
-
-
-
-
-
-
-
-function EventDispatcher:EventDispatcher(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "EventHandler" 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.EventDispatcher(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function EventDispatcher:removeAllHandlers()
-	local retVal =  Polycore.EventDispatcher_removeAllHandlers(self.__ptr)
-end
-
-function EventDispatcher:removeAllHandlersForListener(listener)
-	local retVal = Polycore.EventDispatcher_removeAllHandlersForListener(self.__ptr, listener.__ptr)
-end
-
-function EventDispatcher:addEventListener(handler, eventCode)
-	local retVal = Polycore.EventDispatcher_addEventListener(self.__ptr, handler.__ptr, eventCode)
-end
-
-function EventDispatcher:removeEventListener(handler, eventCode)
-	local retVal = Polycore.EventDispatcher_removeEventListener(self.__ptr, handler.__ptr, eventCode)
-end
-
-function EventDispatcher:__dispatchEvent(event, eventCode)
-	local retVal = Polycore.EventDispatcher___dispatchEvent(self.__ptr, event.__ptr, eventCode)
-end
-
-function EventDispatcher:dispatchEvent(event, eventCode)
-	local retVal = Polycore.EventDispatcher_dispatchEvent(self.__ptr, event.__ptr, eventCode)
-end
-
-function EventDispatcher:dispatchEventNoDelete(event, eventCode)
-	local retVal = Polycore.EventDispatcher_dispatchEventNoDelete(self.__ptr, event.__ptr, eventCode)
-end
-
-
-
-function EventDispatcher:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_EventDispatcher(self.__ptr)
-end

+ 0 - 35
Bindings/Contents/LUA/API/Polycode/EventHandler.lua

@@ -1,35 +0,0 @@
-class "EventHandler"
-
-
-
-
-
-
-
-function EventHandler:EventHandler(...)
-	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)
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-
-
-function EventHandler:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_EventHandler(self.__ptr)
-end
-
-
-function EventHandler:__handleEvent(event)
-	evt = Event("__skip_ptr__")
-	evt.__ptr = event
-	self:handleEvent(evt)
-end

+ 0 - 48
Bindings/Contents/LUA/API/Polycode/FixedShader.lua

@@ -1,48 +0,0 @@
-require "Polycode/Shader"
-
-class "FixedShader" (Shader)
-
-
-
-
-
-
-
-function FixedShader:FixedShader(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "Shader" 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.FixedShader(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function FixedShader:createBinding()
-	local retVal =  Polycore.FixedShader_createBinding(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ShaderBinding("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function FixedShader:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_FixedShader(self.__ptr)
-end

+ 0 - 60
Bindings/Contents/LUA/API/Polycode/FixedShaderBinding.lua

@@ -1,60 +0,0 @@
-require "Polycode/ShaderBinding"
-
-class "FixedShaderBinding" (ShaderBinding)
-
-
-
-
-
-
-
-function FixedShaderBinding:FixedShaderBinding(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ShaderBinding" 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.FixedShaderBinding(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function FixedShaderBinding:addTexture(name, texture)
-	local retVal = Polycore.FixedShaderBinding_addTexture(self.__ptr, name, texture.__ptr)
-end
-
-function FixedShaderBinding:addCubemap(name, cubemap)
-	local retVal = Polycore.FixedShaderBinding_addCubemap(self.__ptr, name, cubemap.__ptr)
-end
-
-function FixedShaderBinding:addParam(type, name, value)
-	local retVal = Polycore.FixedShaderBinding_addParam(self.__ptr, type, name, value)
-end
-
-function FixedShaderBinding:getDiffuseTexture()
-	local retVal =  Polycore.FixedShaderBinding_getDiffuseTexture(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function FixedShaderBinding:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_FixedShaderBinding(self.__ptr)
-end

+ 0 - 57
Bindings/Contents/LUA/API/Polycode/Font.lua

@@ -1,57 +0,0 @@
-class "Font"
-
-
-
-function Font:__index__(name)
-	if name == "loaded" then
-		return Polycore.Font_get_loaded(self.__ptr)
-	end
-end
-
-
-function Font:__set_callback(name,value)
-	if name == "loaded" then
-		Polycore.Font_set_loaded(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Font:Font(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Font:getFace()
-	local retVal =  Polycore.Font_getFace(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = FT_Face("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Font:isValid()
-	local retVal =  Polycore.Font_isValid(self.__ptr)
-	return retVal
-end
-
-
-
-function Font:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Font(self.__ptr)
-end

+ 0 - 44
Bindings/Contents/LUA/API/Polycode/FontManager.lua

@@ -1,44 +0,0 @@
-class "FontManager"
-
-
-
-
-
-
-
-function FontManager:FontManager(...)
-	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.FontManager(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function FontManager:registerFont(fontName, fontPath)
-	local retVal = Polycore.FontManager_registerFont(self.__ptr, fontName, fontPath)
-end
-
-function FontManager:getFontByName(fontName)
-	local retVal = Polycore.FontManager_getFontByName(self.__ptr, fontName)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Font("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function FontManager:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_FontManager(self.__ptr)
-end

+ 0 - 54
Bindings/Contents/LUA/API/Polycode/GLSLProgram.lua

@@ -1,54 +0,0 @@
-require "Polycode/Resource"
-
-class "GLSLProgram" (Resource)
-
-
-
-TYPE_VERT = 0
-TYPE_FRAG = 1
-function GLSLProgram:__index__(name)
-	if name == "type" then
-		return Polycore.GLSLProgram_get_type(self.__ptr)
-	end
-end
-
-
-function GLSLProgram:__set_callback(name,value)
-	if name == "type" then
-		Polycore.GLSLProgram_set_type(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function GLSLProgram:GLSLProgram(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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.GLSLProgram(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function GLSLProgram:addParam(name, isAuto, autoID, paramType, defaultData)
-	local retVal = Polycore.GLSLProgram_addParam(self.__ptr, name, isAuto, autoID, paramType, defaultData.__ptr)
-end
-
-
-
-function GLSLProgram:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_GLSLProgram(self.__ptr)
-end

+ 0 - 47
Bindings/Contents/LUA/API/Polycode/GLSLShader.lua

@@ -1,47 +0,0 @@
-require "Polycode/Shader"
-
-class "GLSLShader" (Shader)
-
-
-
-
-
-
-
-function GLSLShader:GLSLShader(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "Shader" 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.GLSLShader(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function GLSLShader:createBinding()
-	local retVal =  Polycore.GLSLShader_createBinding(self.__ptr)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ShaderBinding("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function GLSLShader:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_GLSLShader(self.__ptr)
-end

+ 0 - 52
Bindings/Contents/LUA/API/Polycode/GLSLShaderBinding.lua

@@ -1,52 +0,0 @@
-require "Polycode/ShaderBinding"
-
-class "GLSLShaderBinding" (ShaderBinding)
-
-
-
-
-
-
-
-function GLSLShaderBinding:GLSLShaderBinding(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ShaderBinding" 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.GLSLShaderBinding(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function GLSLShaderBinding:addTexture(name, texture)
-	local retVal = Polycore.GLSLShaderBinding_addTexture(self.__ptr, name, texture.__ptr)
-end
-
-function GLSLShaderBinding:addCubemap(name, cubemap)
-	local retVal = Polycore.GLSLShaderBinding_addCubemap(self.__ptr, name, cubemap.__ptr)
-end
-
-function GLSLShaderBinding:clearTexture(name)
-	local retVal = Polycore.GLSLShaderBinding_clearTexture(self.__ptr, name)
-end
-
-function GLSLShaderBinding:addParam(type, name, value)
-	local retVal = Polycore.GLSLShaderBinding_addParam(self.__ptr, type, name, value)
-end
-
-
-
-function GLSLShaderBinding:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_GLSLShaderBinding(self.__ptr)
-end

+ 0 - 73
Bindings/Contents/LUA/API/Polycode/GLSLShaderModule.lua

@@ -1,73 +0,0 @@
-class "GLSLShaderModule"
-
-
-
-
-
-
-
-function GLSLShaderModule:GLSLShaderModule(...)
-	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.GLSLShaderModule(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function GLSLShaderModule:acceptsExtension(extension)
-	local retVal = Polycore.GLSLShaderModule_acceptsExtension(self.__ptr, extension)
-	return retVal
-end
-
-function GLSLShaderModule:createProgramFromFile(extension, fullPath)
-	local retVal = Polycore.GLSLShaderModule_createProgramFromFile(self.__ptr, extension, fullPath)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Resource("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function GLSLShaderModule:reloadPrograms()
-	local retVal =  Polycore.GLSLShaderModule_reloadPrograms(self.__ptr)
-end
-
-function GLSLShaderModule:getShaderType()
-	local retVal =  Polycore.GLSLShaderModule_getShaderType(self.__ptr)
-	return retVal
-end
-
-function GLSLShaderModule:createShader(node)
-	local retVal = Polycore.GLSLShaderModule_createShader(self.__ptr, node.__ptr)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Shader("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function GLSLShaderModule:applyShaderMaterial(r_enderer, material, localOptions, shaderIndex)
-	local retVal = Polycore.GLSLShaderModule_applyShaderMaterial(self.__ptr, r_enderer.__ptr, material.__ptr, localOptions.__ptr, shaderIndex)
-	return retVal
-end
-
-function GLSLShaderModule:clearShader()
-	local retVal =  Polycore.GLSLShaderModule_clearShader(self.__ptr)
-end
-
-
-
-function GLSLShaderModule:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_GLSLShaderModule(self.__ptr)
-end

+ 0 - 127
Bindings/Contents/LUA/API/Polycode/GenericScene.lua

@@ -1,127 +0,0 @@
-require "Polycode/Scene"
-
-class "GenericScene" (Scene)
-
-
-
-ENTITY_MESH = 0
-ENTITY_LIGHT = 1
-ENTITY_CAMERA = 2
-ENTITY_ENTITY = 3
-ENTITY_COLLMESH = 4
-
-
-
-
-function GenericScene:GenericScene(...)
-	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.GenericScene(unpack(arg))
-	end
-end
-
-function GenericScene:Render()
-	local retVal =  Polycore.GenericScene_Render(self.__ptr)
-end
-
-function GenericScene:RenderDepthOnly(targetCamera)
-	local retVal = Polycore.GenericScene_RenderDepthOnly(self.__ptr, targetCamera.__ptr)
-end
-
-function GenericScene:addGrid(gridTexture)
-	local retVal = Polycore.GenericScene_addGrid(self.__ptr, gridTexture)
-end
-
-function GenericScene:readString(inFile)
-	local retVal = Polycore.GenericScene_readString(inFile.__ptr)
-	return retVal
-end
-
-function GenericScene:loadScene(fileName)
-	local retVal = Polycore.GenericScene_loadScene(self.__ptr, fileName)
-end
-
-function GenericScene:generateLightmaps(lightMapRes, lightMapQuality, numRadPasses)
-	local retVal = Polycore.GenericScene_generateLightmaps(self.__ptr, lightMapRes, lightMapQuality, numRadPasses)
-end
-
-function GenericScene:addLight(light)
-	local retVal = Polycore.GenericScene_addLight(self.__ptr, light.__ptr)
-end
-
-function GenericScene:getNearestLight(pos)
-	local retVal = Polycore.GenericScene_getNearestLight(self.__ptr, pos.__ptr)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneLight("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function GenericScene:writeEntityMatrix(entity, outFile)
-	local retVal = Polycore.GenericScene_writeEntityMatrix(self.__ptr, entity.__ptr, outFile.__ptr)
-end
-
-function GenericScene:writeString(str, outFile)
-	local retVal = Polycore.GenericScene_writeString(self.__ptr, str, outFile.__ptr)
-end
-
-function GenericScene:saveScene(fileName)
-	local retVal = Polycore.GenericScene_saveScene(self.__ptr, fileName)
-end
-
-function GenericScene:getNumStaticGeometry()
-	local retVal =  Polycore.GenericScene_getNumStaticGeometry(self.__ptr)
-	return retVal
-end
-
-function GenericScene:getStaticGeometry(index)
-	local retVal = Polycore.GenericScene_getStaticGeometry(self.__ptr, index)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneMesh("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function GenericScene:loadCollisionChild(entity, autoCollide, type)
-	local retVal = Polycore.GenericScene_loadCollisionChild(self.__ptr, entity.__ptr, autoCollide, type)
-end
-
-function GenericScene:getNumLights()
-	local retVal =  Polycore.GenericScene_getNumLights(self.__ptr)
-	return retVal
-end
-
-function GenericScene:getLight(index)
-	local retVal = Polycore.GenericScene_getLight(self.__ptr, index)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneLight("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function GenericScene:getCustomEntityByType(type)
-	local retVal = Polycore.GenericScene_getCustomEntityByType(self.__ptr, type)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneEntity("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-

+ 0 - 162
Bindings/Contents/LUA/API/Polycode/Image.lua

@@ -1,162 +0,0 @@
-class "Image"
-
-
-
-IMAGE_RGB = 0
-IMAGE_RGBA = 1
-
-
-
-
-function Image:Image(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Image:loadImage(fileName)
-	local retVal = Polycore.Image_loadImage(self.__ptr, fileName)
-	return retVal
-end
-
-function Image:loadPNG(fileName)
-	local retVal = Polycore.Image_loadPNG(self.__ptr, fileName)
-	return retVal
-end
-
-function Image:createEmpty(width, height)
-	local retVal = Polycore.Image_createEmpty(self.__ptr, width, height)
-end
-
-function Image:fill(r, g, b, a)
-	local retVal = Polycore.Image_fill(self.__ptr, r, g, b, a)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Image:swap(v1, v2)
-	local retVal = Polycore.Image_swap(self.__ptr, v1.__ptr, v2.__ptr)
-end
-
-function Image:line(x0, y0, x1, y1, col)
-	local retVal = Polycore.Image_line(self.__ptr, x0, y0, x1, y1, col.__ptr)
-end
-
-function Image:moveTo(x, y)
-	local retVal = Polycore.Image_moveTo(self.__ptr, x, y)
-end
-
-function Image:move(x, y)
-	local retVal = Polycore.Image_move(self.__ptr, x, y)
-end
-
-function Image:lineTo(x, y, col)
-	local retVal = Polycore.Image_lineTo(self.__ptr, x, y, col.__ptr)
-end
-
-function Image:drawRect(x, y, w, h, col)
-	local retVal = Polycore.Image_drawRect(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:darken(amt, color, alpha)
-	local retVal = Polycore.Image_darken(self.__ptr, amt, color, alpha)
-end
-
-function Image:lighten(amt, color, alpha)
-	local retVal = Polycore.Image_lighten(self.__ptr, amt, color, alpha)
-end
-
-function Image:multiply(amt, color, alpha)
-	local retVal = Polycore.Image_multiply(self.__ptr, amt, color, alpha)
-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:writeBMP(fileName)
-	local retVal = Polycore.Image_writeBMP(self.__ptr, fileName)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = char("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Image:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Image(self.__ptr)
-end

+ 0 - 166
Bindings/Contents/LUA/API/Polycode/InputEvent.lua

@@ -1,166 +0,0 @@
-require "Polycode/Event"
-
-class "InputEvent" (Event)
-
-
-
-EVENT_MOUSEDOWN = 0
-EVENT_MOUSEUP = 1
-EVENT_MOUSEMOVE = 2
-EVENT_MOUSEOVER = 3
-EVENT_MOUSEOUT = 4
-EVENT_DOUBLECLICK = 5
-EVENT_MOUSEUP_OUTSIDE = 6
-EVENT_MOUSEWHEEL_UP = 7
-EVENT_MOUSEWHEEL_DOWN = 8
-EVENT_KEYDOWN = 13
-EVENT_KEYUP = 14
-EVENT_JOYBUTTON_DOWN = 15
-EVENT_JOYBUTTON_UP = 16
-EVENT_JOYAXIS_MOVED = 17
-EVENT_JOYDEVICE_ATTACHED = 18
-EVENT_JOYDEVICE_DETACHED = 19
-function InputEvent:__index__(name)
-	if name == "mouseButton" then
-		return Polycore.InputEvent_get_mouseButton(self.__ptr)
-	elseif name == "mousePosition" then
-		retVal = Polycore.InputEvent_get_mousePosition(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector2("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "key" then
-		retVal = Polycore.InputEvent_get_key(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = PolyKEY("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "charCode" then
-		retVal = Polycore.InputEvent_get_charCode(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = wchar_t("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "timestamp" then
-		return Polycore.InputEvent_get_timestamp(self.__ptr)
-	elseif name == "joystickDeviceID" then
-		retVal = Polycore.InputEvent_get_joystickDeviceID(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = unsigned int("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "joystickAxisValue" then
-		retVal = Polycore.InputEvent_get_joystickAxisValue(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = float("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "joystickButton" then
-		retVal = Polycore.InputEvent_get_joystickButton(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = unsigned int("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "joystickAxis" then
-		retVal = Polycore.InputEvent_get_joystickAxis(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = unsigned int("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	end
-end
-
-
-function InputEvent:__set_callback(name,value)
-	if name == "mouseButton" then
-		Polycore.InputEvent_set_mouseButton(self.__ptr, value)
-		return true
-	elseif name == "timestamp" then
-		Polycore.InputEvent_set_timestamp(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function InputEvent:InputEvent(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function InputEvent:getMousePosition()
-	local retVal =  Polycore.InputEvent_getMousePosition(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector2("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function InputEvent:getKey()
-	local retVal =  Polycore.InputEvent_getKey(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = PolyKEY("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function InputEvent:getMouseButton()
-	local retVal =  Polycore.InputEvent_getMouseButton(self.__ptr)
-	return retVal
-end
-
-function InputEvent:keyCode()
-	local retVal =  Polycore.InputEvent_keyCode(self.__ptr)
-	return retVal
-end
-
-
-
-function InputEvent:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_InputEvent(self.__ptr)
-end

+ 0 - 76
Bindings/Contents/LUA/API/Polycode/Label.lua

@@ -1,76 +0,0 @@
-require "Polycode/Image"
-
-class "Label" (Image)
-
-
-
-ANTIALIAS_FULL = 0
-ANTIALIAS_NONE = 1
-
-
-
-
-function Label:Label(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Label:getTextWidth(font, text, size)
-	local retVal = Polycore.Label_getTextWidth(self.__ptr, font.__ptr, text, size)
-	return retVal
-end
-
-function Label:getTextHeight(font, text, size)
-	local retVal = Polycore.Label_getTextHeight(self.__ptr, font.__ptr, text, size)
-	return retVal
-end
-
-function Label:getFont()
-	local retVal =  Polycore.Label_getFont(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Font("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Label:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Label(self.__ptr)
-end

+ 0 - 36
Bindings/Contents/LUA/API/Polycode/Logger.lua

@@ -1,36 +0,0 @@
-class "Logger"
-
-
-
-
-
-
-
-function Logger:Logger(...)
-	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.Logger(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Logger:log(format)
-	local retVal = Polycore.Logger_log(format.__ptr)
-end
-
-function Logger:logw(str)
-	local retVal = Polycore.Logger_logw(str.__ptr)
-end
-
-
-
-function Logger:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Logger(self.__ptr)
-end

+ 0 - 141
Bindings/Contents/LUA/API/Polycode/Material.lua

@@ -1,141 +0,0 @@
-require "Polycode/Resource"
-
-class "Material" (Resource)
-
-
-
-function Material:__index__(name)
-	if name == "specularValue" then
-		return Polycore.Material_get_specularValue(self.__ptr)
-	elseif name == "specularStrength" then
-		return Polycore.Material_get_specularStrength(self.__ptr)
-	elseif name == "specularColor" then
-		retVal = Polycore.Material_get_specularColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "diffuseColor" then
-		retVal = Polycore.Material_get_diffuseColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	end
-end
-
-
-function Material:__set_callback(name,value)
-	if name == "specularValue" then
-		Polycore.Material_set_specularValue(self.__ptr, value)
-		return true
-	elseif name == "specularStrength" then
-		Polycore.Material_set_specularStrength(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Material:Material(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Material:addShader(shader, shaderBinding)
-	local retVal = Polycore.Material_addShader(self.__ptr, shader.__ptr, shaderBinding.__ptr)
-end
-
-function Material:getNumShaders()
-	local retVal =  Polycore.Material_getNumShaders(self.__ptr)
-	return retVal
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ShaderRenderTarget("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Material:getName()
-	local retVal =  Polycore.Material_getName(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Material:getShader(index)
-	local retVal = Polycore.Material_getShader(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Shader("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Material:getShaderBinding(index)
-	local retVal = Polycore.Material_getShaderBinding(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ShaderBinding("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Material:loadMaterial(fileName)
-	local retVal = Polycore.Material_loadMaterial(self.__ptr, fileName)
-end
-
-
-
-function Material:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Material(self.__ptr)
-end

+ 0 - 176
Bindings/Contents/LUA/API/Polycode/MaterialManager.lua

@@ -1,176 +0,0 @@
-class "MaterialManager"
-
-
-
-
-
-
-
-function MaterialManager:MaterialManager(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function MaterialManager:Update(elapsed)
-	local retVal = Polycore.MaterialManager_Update(self.__ptr, elapsed)
-end
-
-function MaterialManager:createFramebufferTexture(width, height, type)
-	local retVal = Polycore.MaterialManager_createFramebufferTexture(self.__ptr, width, height, type)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function MaterialManager:createTexture(width, height, imageData, clamp, type)
-	local retVal = Polycore.MaterialManager_createTexture(self.__ptr, width, height, imageData.__ptr, clamp, type)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function MaterialManager:createNewTexture(width, height, clamp, type)
-	local retVal = Polycore.MaterialManager_createNewTexture(self.__ptr, width, height, clamp, type)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function MaterialManager:createTextureFromImage(image, clamp)
-	local retVal = Polycore.MaterialManager_createTextureFromImage(self.__ptr, image.__ptr, clamp)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function MaterialManager:createTextureFromFile(fileName, clamp)
-	local retVal = Polycore.MaterialManager_createTextureFromFile(self.__ptr, fileName, clamp)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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:addShaderModule(module)
-	local retVal = Polycore.MaterialManager_addShaderModule(self.__ptr, module.__ptr)
-end
-
-function MaterialManager:getTextureByResourcePath(resourcePath)
-	local retVal = Polycore.MaterialManager_getTextureByResourcePath(self.__ptr, resourcePath)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function MaterialManager:cubemapFromXMLNode(node)
-	local retVal = Polycore.MaterialManager_cubemapFromXMLNode(self.__ptr, node.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Cubemap("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function MaterialManager:loadMaterialsFromFile(fileName)
-	local retVal = Polycore.MaterialManager_loadMaterialsFromFile(self.__ptr, fileName)
-end
-
-function MaterialManager:materialFromXMLNode(node)
-	local retVal = Polycore.MaterialManager_materialFromXMLNode(self.__ptr, node.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Material("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function MaterialManager:setShaderFromXMLNode(node)
-	local retVal = Polycore.MaterialManager_setShaderFromXMLNode(self.__ptr, node.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Shader("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function MaterialManager:createShaderFromXMLNode(node)
-	local retVal = Polycore.MaterialManager_createShaderFromXMLNode(self.__ptr, node.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Shader("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function MaterialManager:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_MaterialManager(self.__ptr)
-end

+ 0 - 92
Bindings/Contents/LUA/API/Polycode/Matrix4.lua

@@ -1,92 +0,0 @@
-class "Matrix4"
-
-
-
-
-
-
-
-function Matrix4:Matrix4(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Matrix4:getPosition()
-	local retVal =  Polycore.Matrix4_getPosition(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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:inverse()
-	local retVal =  Polycore.Matrix4_inverse(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Matrix4:inverseAffine()
-	local retVal =  Polycore.Matrix4_inverseAffine(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Matrix4:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Matrix4(self.__ptr)
-end

+ 0 - 187
Bindings/Contents/LUA/API/Polycode/Mesh.lua

@@ -1,187 +0,0 @@
-class "Mesh"
-
-
-
-QUAD_MESH = 0
-TRI_MESH = 1
-TRIFAN_MESH = 2
-TRISTRIP_MESH = 3
-LINE_MESH = 4
-POINT_MESH = 5
-function Mesh:__index__(name)
-	if name == "useVertexColors" then
-		return Polycore.Mesh_get_useVertexColors(self.__ptr)
-	end
-end
-
-
-function Mesh:__set_callback(name,value)
-	if name == "useVertexColors" then
-		Polycore.Mesh_set_useVertexColors(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Mesh:Mesh(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Mesh:addPolygon(newPolygon)
-	local retVal = Polycore.Mesh_addPolygon(self.__ptr, newPolygon.__ptr)
-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)
-	local retVal = Polycore.Mesh_saveToFile(self.__ptr, fileName)
-end
-
-function Mesh:loadFromFile(inFile)
-	local retVal = Polycore.Mesh_loadFromFile(self.__ptr, inFile.__ptr)
-end
-
-function Mesh:getPolygonCount()
-	local retVal =  Polycore.Mesh_getPolygonCount(self.__ptr)
-	return retVal
-end
-
-function Mesh:getVertexCount()
-	local retVal =  Polycore.Mesh_getVertexCount(self.__ptr)
-	return retVal
-end
-
-function Mesh:getPolygon(index)
-	local retVal = Polycore.Mesh_getPolygon(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Polygon("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Mesh:createPlane(w, h)
-	local retVal = Polycore.Mesh_createPlane(self.__ptr, w, h)
-end
-
-function Mesh:createVPlane(w, h)
-	local retVal = Polycore.Mesh_createVPlane(self.__ptr, w, h)
-end
-
-function Mesh:createTorus(radius, tubeRadius, rSegments, tSegments)
-	local retVal = Polycore.Mesh_createTorus(self.__ptr, radius, tubeRadius, rSegments, tSegments)
-end
-
-function Mesh:createBox(w, d, h)
-	local retVal = Polycore.Mesh_createBox(self.__ptr, w, d, h)
-end
-
-function Mesh:createSphere(radius, numRings, numSegments)
-	local retVal = Polycore.Mesh_createSphere(self.__ptr, radius, numRings, numSegments)
-end
-
-function Mesh:createCylinder(height, radius, numSegments)
-	local retVal = Polycore.Mesh_createCylinder(self.__ptr, height, radius, numSegments)
-end
-
-function Mesh:createCone(height, radius, numSegments)
-	local retVal = Polycore.Mesh_createCone(self.__ptr, height, radius, numSegments)
-end
-
-function Mesh:recenterMesh()
-	local retVal =  Polycore.Mesh_recenterMesh(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Mesh:useVertexNormals(val)
-	local retVal = Polycore.Mesh_useVertexNormals(self.__ptr, val)
-end
-
-function Mesh:setVertexBuffer(buffer)
-	local retVal = Polycore.Mesh_setVertexBuffer(self.__ptr, buffer.__ptr)
-end
-
-function Mesh:getVertexBuffer()
-	local retVal =  Polycore.Mesh_getVertexBuffer(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = VertexBuffer("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Mesh:getRadius()
-	local retVal =  Polycore.Mesh_getRadius(self.__ptr)
-	return retVal
-end
-
-function Mesh:calculateNormals(smooth, smoothAngle)
-	local retVal = Polycore.Mesh_calculateNormals(self.__ptr, smooth, smoothAngle)
-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:calculateBBox()
-	local retVal =  Polycore.Mesh_calculateBBox(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Mesh:hasVertexBuffer()
-	local retVal =  Polycore.Mesh_hasVertexBuffer(self.__ptr)
-	return retVal
-end
-
-
-
-function Mesh:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Mesh(self.__ptr)
-end

+ 0 - 64
Bindings/Contents/LUA/API/Polycode/OSBasics.lua

@@ -1,64 +0,0 @@
-class "OSBasics"
-
-
-
-
-
-
-
-function OSBasics:open(filename, opts)
-	local retVal = Polycore.OSBasics_open(filename, opts)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = OSFILE("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function OSBasics:close(file)
-	local retVal = Polycore.OSBasics_close(file.__ptr)
-	return retVal
-end
-
-function OSBasics:read(ptr, size, count, stream)
-	local retVal = Polycore.OSBasics_read(ptr.__ptr, size.__ptr, count.__ptr, stream.__ptr)
-	return retVal
-end
-
-function OSBasics:write(ptr, size, count, stream)
-	local retVal = Polycore.OSBasics_write(ptr.__ptr, size.__ptr, count.__ptr, stream.__ptr)
-	return retVal
-end
-
-function OSBasics:seek(stream, offset, origin)
-	local retVal = Polycore.OSBasics_seek(stream.__ptr, offset.__ptr, origin)
-	return retVal
-end
-
-function OSBasics:tell(stream)
-	local retVal = Polycore.OSBasics_tell(stream.__ptr)
-	return retVal
-end
-
-function OSBasics:isFolder(pathString)
-	local retVal = Polycore.OSBasics_isFolder(pathString)
-	return retVal
-end
-
-function OSBasics:createFolder(pathString)
-	local retVal = Polycore.OSBasics_createFolder(pathString)
-end
-
-function OSBasics:removeItem(pathString)
-	local retVal = Polycore.OSBasics_removeItem(pathString)
-end
-
-
-
-function OSBasics:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_OSBasics(self.__ptr)
-end

+ 0 - 46
Bindings/Contents/LUA/API/Polycode/OSFILE.lua

@@ -1,46 +0,0 @@
-class "OSFILE"
-
-
-
-TYPE_FILE = 0
-TYPE_ARCHIVE_FILE = 1
-function OSFILE:__index__(name)
-	if name == "fileType" then
-		return Polycore.OSFILE_get_fileType(self.__ptr)
-	end
-end
-
-
-function OSFILE:__set_callback(name,value)
-	if name == "fileType" then
-		Polycore.OSFILE_set_fileType(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function OSFILE:OSFILE(...)
-	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.OSFILE(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function OSFILE:debugDump()
-	local retVal =  Polycore.OSFILE_debugDump(self.__ptr)
-end
-
-
-
-function OSFILE:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_OSFILE(self.__ptr)
-end

+ 0 - 67
Bindings/Contents/LUA/API/Polycode/OSFileEntry.lua

@@ -1,67 +0,0 @@
-class "OSFileEntry"
-
-
-
-TYPE_FILE = 0
-TYPE_FOLDER = 1
-function OSFileEntry:__index__(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:__set_callback(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(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-
-
-function OSFileEntry:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_OSFileEntry(self.__ptr)
-end

+ 0 - 88
Bindings/Contents/LUA/API/Polycode/ObjectEntry.lua

@@ -1,88 +0,0 @@
-class "ObjectEntry"
-
-
-
-FLOAT_ENTRY = 0
-INT_ENTRY = 1
-BOOL_ENTRY = 2
-ARRAY_ENTRY = 3
-STRING_ENTRY = 4
-CONTAINER_ENTRY = 5
-function ObjectEntry:__index__(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:__set_callback(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(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ObjectEntry:addChild(name)
-	local retVal = Polycore.ObjectEntry_addChild(self.__ptr, name)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ObjectEntry("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function ObjectEntry:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ObjectEntry(self.__ptr)
-end

+ 0 - 47
Bindings/Contents/LUA/API/Polycode/OpenGLCubemap.lua

@@ -1,47 +0,0 @@
-require "Polycode/Cubemap"
-
-class "OpenGLCubemap" (Cubemap)
-
-
-
-
-
-
-
-function OpenGLCubemap:OpenGLCubemap(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "Cubemap" 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.OpenGLCubemap(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function OpenGLCubemap:getTextureID()
-	local retVal =  Polycore.OpenGLCubemap_getTextureID(self.__ptr)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = GLuint("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function OpenGLCubemap:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_OpenGLCubemap(self.__ptr)
-end

+ 0 - 106
Bindings/Contents/LUA/API/Polycode/Particle.lua

@@ -1,106 +0,0 @@
-class "Particle"
-
-
-
-BILLBOARD_PARTICLE = 0
-MESH_PARTICLE = 1
-function Particle:__index__(name)
-	if name == "velVector" then
-		retVal = Polycore.Particle_get_velVector(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "dirVector" then
-		retVal = Polycore.Particle_get_dirVector(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "deviation" then
-		retVal = Polycore.Particle_get_deviation(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "life" then
-		return Polycore.Particle_get_life(self.__ptr)
-	elseif name == "lifespan" then
-		return Polycore.Particle_get_lifespan(self.__ptr)
-	elseif name == "brightnessDeviation" then
-		return Polycore.Particle_get_brightnessDeviation(self.__ptr)
-	elseif name == "perlinPosX" then
-		return Polycore.Particle_get_perlinPosX(self.__ptr)
-	elseif name == "perlinPosY" then
-		return Polycore.Particle_get_perlinPosY(self.__ptr)
-	elseif name == "perlinPosZ" then
-		return Polycore.Particle_get_perlinPosZ(self.__ptr)
-	end
-end
-
-
-function Particle:__set_callback(name,value)
-	if name == "life" then
-		Polycore.Particle_set_life(self.__ptr, value)
-		return true
-	elseif name == "lifespan" then
-		Polycore.Particle_set_lifespan(self.__ptr, value)
-		return true
-	elseif name == "brightnessDeviation" then
-		Polycore.Particle_set_brightnessDeviation(self.__ptr, value)
-		return true
-	elseif name == "perlinPosX" then
-		Polycore.Particle_set_perlinPosX(self.__ptr, value)
-		return true
-	elseif name == "perlinPosY" then
-		Polycore.Particle_set_perlinPosY(self.__ptr, value)
-		return true
-	elseif name == "perlinPosZ" then
-		Polycore.Particle_set_perlinPosZ(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Particle:Particle(...)
-	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.Particle(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Particle:Reset(continuious)
-	local retVal = Polycore.Particle_Reset(self.__ptr, continuious)
-end
-
-function Particle:createSceneParticle(particleType, material, particleMesh)
-	local retVal = Polycore.Particle_createSceneParticle(self.__ptr, particleType, material.__ptr, particleMesh.__ptr)
-end
-
-function Particle:createScreenParticle(particleType, texture, particleMesh)
-	local retVal = Polycore.Particle_createScreenParticle(self.__ptr, particleType, texture.__ptr, particleMesh.__ptr)
-end
-
-
-
-function Particle:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Particle(self.__ptr)
-end

+ 0 - 228
Bindings/Contents/LUA/API/Polycode/ParticleEmitter.lua

@@ -1,228 +0,0 @@
-class "ParticleEmitter"
-
-
-
-CONTINUOUS_EMITTER = 0
-TRIGGERED_EMITTER = 1
-function ParticleEmitter:__index__(name)
-	if name == "particleSpeedMod" then
-		return Polycore.ParticleEmitter_get_particleSpeedMod(self.__ptr)
-	elseif name == "brightnessDeviation" then
-		return Polycore.ParticleEmitter_get_brightnessDeviation(self.__ptr)
-	elseif name == "deviation" then
-		retVal = Polycore.ParticleEmitter_get_deviation(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "dirVector" then
-		retVal = Polycore.ParticleEmitter_get_dirVector(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "gravVector" then
-		retVal = Polycore.ParticleEmitter_get_gravVector(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "lifespan" then
-		return Polycore.ParticleEmitter_get_lifespan(self.__ptr)
-	elseif name == "rotationFollowsPath" then
-		return Polycore.ParticleEmitter_get_rotationFollowsPath(self.__ptr)
-	elseif name == "scaleCurve" then
-		retVal = Polycore.ParticleEmitter_get_scaleCurve(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = BezierCurve("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "colorCurveR" then
-		retVal = Polycore.ParticleEmitter_get_colorCurveR(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = BezierCurve("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "colorCurveG" then
-		retVal = Polycore.ParticleEmitter_get_colorCurveG(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = BezierCurve("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "colorCurveB" then
-		retVal = Polycore.ParticleEmitter_get_colorCurveB(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = BezierCurve("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "colorCurveA" then
-		retVal = Polycore.ParticleEmitter_get_colorCurveA(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = BezierCurve("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "useColorCurves" then
-		return Polycore.ParticleEmitter_get_useColorCurves(self.__ptr)
-	elseif name == "useScaleCurves" then
-		return Polycore.ParticleEmitter_get_useScaleCurves(self.__ptr)
-	end
-end
-
-
-function ParticleEmitter:__set_callback(name,value)
-	if name == "particleSpeedMod" then
-		Polycore.ParticleEmitter_set_particleSpeedMod(self.__ptr, value)
-		return true
-	elseif name == "brightnessDeviation" then
-		Polycore.ParticleEmitter_set_brightnessDeviation(self.__ptr, value)
-		return true
-	elseif name == "lifespan" then
-		Polycore.ParticleEmitter_set_lifespan(self.__ptr, value)
-		return true
-	elseif name == "rotationFollowsPath" then
-		Polycore.ParticleEmitter_set_rotationFollowsPath(self.__ptr, value)
-		return true
-	elseif name == "useColorCurves" then
-		Polycore.ParticleEmitter_set_useColorCurves(self.__ptr, value)
-		return true
-	elseif name == "useScaleCurves" then
-		Polycore.ParticleEmitter_set_useScaleCurves(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function ParticleEmitter:ParticleEmitter(...)
-	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.ParticleEmitter(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ParticleEmitter:createParticles()
-	local retVal =  Polycore.ParticleEmitter_createParticles(self.__ptr)
-end
-
-function ParticleEmitter:setRotationSpeed(speed)
-	local retVal = Polycore.ParticleEmitter_setRotationSpeed(self.__ptr, speed)
-end
-
-function ParticleEmitter:setParticleBlendingMode(mode)
-	local retVal = Polycore.ParticleEmitter_setParticleBlendingMode(self.__ptr, mode)
-end
-
-function ParticleEmitter:setDepthWrite(val)
-	local retVal = Polycore.ParticleEmitter_setDepthWrite(self.__ptr, val)
-end
-
-function ParticleEmitter:setDepthTest(val)
-	local retVal = Polycore.ParticleEmitter_setDepthTest(self.__ptr, val)
-end
-
-function ParticleEmitter:setAlphaTest(val)
-	local retVal = Polycore.ParticleEmitter_setAlphaTest(self.__ptr, val)
-end
-
-function ParticleEmitter:enablePerlin(val)
-	local retVal = Polycore.ParticleEmitter_enablePerlin(self.__ptr, val)
-end
-
-function ParticleEmitter:setParticleVisibility(val)
-	local retVal = Polycore.ParticleEmitter_setParticleVisibility(self.__ptr, val)
-end
-
-function ParticleEmitter:setPerlinModSize(size)
-	local retVal = Polycore.ParticleEmitter_setPerlinModSize(self.__ptr, size)
-end
-
-function ParticleEmitter:setBillboardMode(mode)
-	local retVal = Polycore.ParticleEmitter_setBillboardMode(self.__ptr, mode)
-end
-
-function ParticleEmitter:enableEmitter(val)
-	local retVal = Polycore.ParticleEmitter_enableEmitter(self.__ptr, val)
-end
-
-function ParticleEmitter:emitterEnabled()
-	local retVal =  Polycore.ParticleEmitter_emitterEnabled(self.__ptr)
-	return retVal
-end
-
-function ParticleEmitter:setEmitterRadius(rad)
-	local retVal = Polycore.ParticleEmitter_setEmitterRadius(self.__ptr, rad.__ptr)
-end
-
-function ParticleEmitter:setAllAtOnce(val)
-	local retVal = Polycore.ParticleEmitter_setAllAtOnce(self.__ptr, val)
-end
-
-function ParticleEmitter:Trigger()
-	local retVal =  Polycore.ParticleEmitter_Trigger(self.__ptr)
-end
-
-function ParticleEmitter:resetParticle(particle)
-	local retVal = Polycore.ParticleEmitter_resetParticle(self.__ptr, particle.__ptr)
-end
-
-function ParticleEmitter:setParticleCount(count)
-	local retVal = Polycore.ParticleEmitter_setParticleCount(self.__ptr, count)
-end
-
-function ParticleEmitter:addParticleBody(particleBody)
-	local retVal = Polycore.ParticleEmitter_addParticleBody(self.__ptr, particleBody.__ptr)
-end
-
-function ParticleEmitter:getBaseMatrix()
-	local retVal =  Polycore.ParticleEmitter_getBaseMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ParticleEmitter:updateEmitter()
-	local retVal =  Polycore.ParticleEmitter_updateEmitter(self.__ptr)
-end
-
-
-
-function ParticleEmitter:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ParticleEmitter(self.__ptr)
-end

+ 0 - 33
Bindings/Contents/LUA/API/Polycode/Perlin.lua

@@ -1,33 +0,0 @@
-class "Perlin"
-
-
-
-
-
-
-
-function Perlin:Perlin(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Perlin:Get(x, y)
-	local retVal = Polycore.Perlin_Get(self.__ptr, x, y)
-	return retVal
-end
-
-
-
-function Perlin:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Perlin(self.__ptr)
-end

+ 0 - 35
Bindings/Contents/LUA/API/Polycode/PolycodeModule.lua

@@ -1,35 +0,0 @@
-class "PolycodeModule"
-
-
-
-TYPE_GENERIC = 0
-TYPE_SHADER = 0
-
-
-
-
-function PolycodeModule:PolycodeModule(...)
-	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.PolycodeModule(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function PolycodeModule:getType()
-	local retVal =  Polycore.PolycodeModule_getType(self.__ptr)
-	return retVal
-end
-
-
-
-function PolycodeModule:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_PolycodeModule(self.__ptr)
-end

+ 0 - 28
Bindings/Contents/LUA/API/Polycode/PolycodeViewBase.lua

@@ -1,28 +0,0 @@
-class "PolycodeViewBase"
-
-
-
-
-
-
-
-function PolycodeViewBase:PolycodeViewBase(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-
-
-function PolycodeViewBase:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_PolycodeViewBase(self.__ptr)
-end

+ 0 - 125
Bindings/Contents/LUA/API/Polycode/Polygon.lua

@@ -1,125 +0,0 @@
-class "Polygon"
-
-
-
-function Polygon:__index__(name)
-	if name == "useVertexNormals" then
-		return Polycore.Polygon_get_useVertexNormals(self.__ptr)
-	end
-end
-
-
-function Polygon:__set_callback(name,value)
-	if name == "useVertexNormals" then
-		Polycore.Polygon_set_useVertexNormals(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Polygon:Polygon(...)
-	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.Polygon(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Polygon:getVertexCount()
-	local retVal =  Polycore.Polygon_getVertexCount(self.__ptr)
-	return retVal
-end
-
-function Polygon:getVertex(index)
-	local retVal = Polycore.Polygon_getVertex(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vertex("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Polygon:addVertex(x, y, z)
-	local retVal = Polycore.Polygon_addVertex(self.__ptr, x, y, z)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vertex("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Polygon:removeVertex(index)
-	local retVal = Polycore.Polygon_removeVertex(self.__ptr, index)
-end
-
-function Polygon:calculateNormal()
-	local retVal =  Polycore.Polygon_calculateNormal(self.__ptr)
-end
-
-function Polygon:calculateTangent()
-	local retVal =  Polycore.Polygon_calculateTangent(self.__ptr)
-end
-
-function Polygon:getFaceNormal()
-	local retVal =  Polycore.Polygon_getFaceNormal(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Polygon:getFaceTangent()
-	local retVal =  Polycore.Polygon_getFaceTangent(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Polygon:getBounds2D()
-	local retVal =  Polycore.Polygon_getBounds2D(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Rectangle("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Polygon:setNormal(normal)
-	local retVal = Polycore.Polygon_setNormal(self.__ptr, normal.__ptr)
-end
-
-function Polygon:flipUVY()
-	local retVal =  Polycore.Polygon_flipUVY(self.__ptr)
-end
-
-
-
-function Polygon:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Polygon(self.__ptr)
-end

+ 0 - 191
Bindings/Contents/LUA/API/Polycode/Quaternion.lua

@@ -1,191 +0,0 @@
-class "Quaternion"
-
-
-
-function Quaternion:__index__(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:__set_callback(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(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Quaternion("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Quaternion("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Quaternion:Exp()
-	local retVal =  Polycore.Quaternion_Exp(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Quaternion("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Quaternion("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Quaternion:Inverse()
-	local retVal =  Polycore.Quaternion_Inverse(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Quaternion("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Quaternion:set(w, x, y, z)
-	local retVal = Polycore.Quaternion_set(self.__ptr, w, x, y, z)
-end
-
-function Quaternion:inverse()
-	local retVal =  Polycore.Quaternion_inverse(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Quaternion("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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: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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Quaternion:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Quaternion(self.__ptr)
-end

+ 0 - 48
Bindings/Contents/LUA/API/Polycode/QuaternionCurve.lua

@@ -1,48 +0,0 @@
-class "QuaternionCurve"
-
-
-
-
-
-
-
-function QuaternionCurve:QuaternionCurve(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function QuaternionCurve:interpolate(t, useShortestPath)
-	local retVal = Polycore.QuaternionCurve_interpolate(self.__ptr, t, useShortestPath)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Quaternion("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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:recalcTangents()
-	local retVal =  Polycore.QuaternionCurve_recalcTangents(self.__ptr)
-end
-
-
-
-function QuaternionCurve:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_QuaternionCurve(self.__ptr)
-end

+ 0 - 40
Bindings/Contents/LUA/API/Polycode/QuaternionTween.lua

@@ -1,40 +0,0 @@
-require "Polycode/Tween"
-
-class "QuaternionTween" (Tween)
-
-
-
-
-
-
-
-function QuaternionTween:QuaternionTween(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "Tween" 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.QuaternionTween(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function QuaternionTween:updateCustomTween()
-	local retVal =  Polycore.QuaternionTween_updateCustomTween(self.__ptr)
-end
-
-
-
-function QuaternionTween:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_QuaternionTween(self.__ptr)
-end

+ 0 - 59
Bindings/Contents/LUA/API/Polycode/Rectangle.lua

@@ -1,59 +0,0 @@
-class "Rectangle"
-
-
-
-function Rectangle:__index__(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:__set_callback(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(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Rectangle:setRect(x, y, w, h)
-	local retVal = Polycore.Rectangle_setRect(self.__ptr, x, y, w, h)
-end
-
-
-
-function Rectangle:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Rectangle(self.__ptr)
-end

+ 0 - 532
Bindings/Contents/LUA/API/Polycode/Renderer.lua

@@ -1,532 +0,0 @@
-class "Renderer"
-
-
-
-RENDER_MODE_NORMAL = 0
-RENDER_MODE_WIREFRAME = 1
-BLEND_MODE_NORMAL = 0
-BLEND_MODE_LIGHTEN = 1
-BLEND_MODE_COLOR = 2
-FOG_LINEAR = 0
-FOG_EXP = 1
-FOG_EXP2 = 2
-DEPTH_FUNCTION_GREATER = 0
-DEPTH_FUNCTION_LEQUAL = 1
-TEX_FILTERING_NEAREST = 0
-TEX_FILTERING_LINEAR = 1
-function Renderer:__index__(name)
-	if name == "ambientColor" then
-		retVal = Polycore.Renderer_get_ambientColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "clearColor" then
-		retVal = Polycore.Renderer_get_clearColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "exposureLevel" then
-		return Polycore.Renderer_get_exposureLevel(self.__ptr)
-	elseif name == "cameraPosition" then
-		retVal = Polycore.Renderer_get_cameraPosition(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	end
-end
-
-
-function Renderer:__set_callback(name,value)
-	if name == "exposureLevel" then
-		Polycore.Renderer_set_exposureLevel(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Renderer:Resize(xRes, yRes)
-	local retVal = Polycore.Renderer_Resize(self.__ptr, xRes, yRes)
-end
-
-function Renderer:BeginRender()
-	local retVal =  Polycore.Renderer_BeginRender(self.__ptr)
-end
-
-function Renderer:EndRender()
-	local retVal =  Polycore.Renderer_EndRender(self.__ptr)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Cubemap("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:createTexture(width, height, textureData, clamp, type)
-	local retVal = Polycore.Renderer_createTexture(self.__ptr, width, height, textureData.__ptr, clamp, type)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:destroyTexture(texture)
-	local retVal = Polycore.Renderer_destroyTexture(self.__ptr, texture.__ptr)
-end
-
-function Renderer:createRenderTextures(colorBuffer, depthBuffer, width, height)
-	local retVal = Polycore.Renderer_createRenderTextures(self.__ptr, colorBuffer.__ptr, depthBuffer.__ptr, width, height)
-end
-
-function Renderer:createFramebufferTexture(width, height)
-	local retVal = Polycore.Renderer_createFramebufferTexture(self.__ptr, width, height)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:bindFrameBufferTexture(texture)
-	local retVal = Polycore.Renderer_bindFrameBufferTexture(self.__ptr, texture.__ptr)
-end
-
-function Renderer:unbindFramebuffers()
-	local retVal =  Polycore.Renderer_unbindFramebuffers(self.__ptr)
-end
-
-function Renderer:renderToTexture(targetTexture)
-	local retVal = Polycore.Renderer_renderToTexture(self.__ptr, targetTexture.__ptr)
-end
-
-function Renderer:renderZBufferToTexture(targetTexture)
-	local retVal = Polycore.Renderer_renderZBufferToTexture(self.__ptr, targetTexture.__ptr)
-end
-
-function Renderer:setFOV(fov)
-	local retVal = Polycore.Renderer_setFOV(self.__ptr, fov)
-end
-
-function Renderer:setViewportSize(w, h)
-	local retVal = Polycore.Renderer_setViewportSize(self.__ptr, w, h)
-end
-
-function Renderer:setViewportSizeAndFOV(w, h, fov)
-	local retVal = Polycore.Renderer_setViewportSizeAndFOV(self.__ptr, w, h, fov)
-end
-
-function Renderer:resetViewport()
-	local retVal =  Polycore.Renderer_resetViewport(self.__ptr)
-end
-
-function Renderer:loadIdentity()
-	local retVal =  Polycore.Renderer_loadIdentity(self.__ptr)
-end
-
-function Renderer:setOrthoMode(xSize, ySize)
-	local retVal = Polycore.Renderer_setOrthoMode(self.__ptr, xSize, ySize)
-end
-
-function Renderer:_setOrthoMode()
-	local retVal =  Polycore.Renderer__setOrthoMode(self.__ptr)
-end
-
-function Renderer:setPerspectiveMode()
-	local retVal =  Polycore.Renderer_setPerspectiveMode(self.__ptr)
-end
-
-function Renderer:setTexture(texture)
-	local retVal = Polycore.Renderer_setTexture(self.__ptr, texture.__ptr)
-end
-
-function Renderer:enableBackfaceCulling(val)
-	local retVal = Polycore.Renderer_enableBackfaceCulling(self.__ptr, val)
-end
-
-function Renderer:setClearColor(r, g, b)
-	local retVal = Polycore.Renderer_setClearColor(self.__ptr, r, g, b)
-end
-
-function Renderer:setAmbientColor(r, g, b)
-	local retVal = Polycore.Renderer_setAmbientColor(self.__ptr, r, g, b)
-end
-
-function Renderer:clearScreen()
-	local retVal =  Polycore.Renderer_clearScreen(self.__ptr)
-end
-
-function Renderer:translate2D(x, y)
-	local retVal = Polycore.Renderer_translate2D(self.__ptr, x, y)
-end
-
-function Renderer:rotate2D(angle)
-	local retVal = Polycore.Renderer_rotate2D(self.__ptr, angle)
-end
-
-function Renderer:scale2D(scale)
-	local retVal = Polycore.Renderer_scale2D(self.__ptr, scale.__ptr)
-end
-
-function Renderer:setVertexColor(r, g, b, a)
-	local retVal = Polycore.Renderer_setVertexColor(self.__ptr, r, g, b, a)
-end
-
-function Renderer:pushDataArrayForMesh(mesh, arrayType)
-	local retVal = Polycore.Renderer_pushDataArrayForMesh(self.__ptr, mesh.__ptr, arrayType)
-end
-
-function Renderer:pushRenderDataArray(array)
-	local retVal = Polycore.Renderer_pushRenderDataArray(self.__ptr, array.__ptr)
-end
-
-function Renderer:createRenderDataArrayForMesh(mesh, arrayType)
-	local retVal = Polycore.Renderer_createRenderDataArrayForMesh(self.__ptr, mesh.__ptr, arrayType)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = RenderDataArray("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:createRenderDataArray(arrayType)
-	local retVal = Polycore.Renderer_createRenderDataArray(self.__ptr, arrayType)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = RenderDataArray("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:setRenderArrayData(array, arrayData)
-	local retVal = Polycore.Renderer_setRenderArrayData(self.__ptr, array.__ptr, arrayData.__ptr)
-end
-
-function Renderer:drawArrays(drawType)
-	local retVal = Polycore.Renderer_drawArrays(self.__ptr, drawType)
-end
-
-function Renderer:translate3D(position)
-	local retVal = Polycore.Renderer_translate3D(self.__ptr, position.__ptr)
-end
-
-function Renderer:scale3D(scale)
-	local retVal = Polycore.Renderer_scale3D(self.__ptr, scale.__ptr)
-end
-
-function Renderer:pushMatrix()
-	local retVal =  Polycore.Renderer_pushMatrix(self.__ptr)
-end
-
-function Renderer:popMatrix()
-	local retVal =  Polycore.Renderer_popMatrix(self.__ptr)
-end
-
-function Renderer:setLineSmooth(val)
-	local retVal = Polycore.Renderer_setLineSmooth(self.__ptr, val)
-end
-
-function Renderer:setLineSize(lineSize)
-	local retVal = Polycore.Renderer_setLineSize(self.__ptr, lineSize)
-end
-
-function Renderer:enableLighting(enable)
-	local retVal = Polycore.Renderer_enableLighting(self.__ptr, enable)
-end
-
-function Renderer:enableFog(enable)
-	local retVal = Polycore.Renderer_enableFog(self.__ptr, enable)
-end
-
-function Renderer:setFogProperties(fogMode, color, density, startDepth, _endDepth)
-	local retVal = Polycore.Renderer_setFogProperties(self.__ptr, fogMode, color.__ptr, density, startDepth, _endDepth)
-end
-
-function Renderer:multModelviewMatrix(m)
-	local retVal = Polycore.Renderer_multModelviewMatrix(self.__ptr, m.__ptr)
-end
-
-function Renderer:setModelviewMatrix(m)
-	local retVal = Polycore.Renderer_setModelviewMatrix(self.__ptr, m.__ptr)
-end
-
-function Renderer:setCurrentModelMatrix(m)
-	local retVal = Polycore.Renderer_setCurrentModelMatrix(self.__ptr, m.__ptr)
-end
-
-function Renderer:getCurrentModelMatrix()
-	local retVal =  Polycore.Renderer_getCurrentModelMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:setBlendingMode(bl_endingMode)
-	local retVal = Polycore.Renderer_setBlendingMode(self.__ptr, bl_endingMode)
-end
-
-function Renderer:applyMaterial(material, localOptions, shaderIndex)
-	local retVal = Polycore.Renderer_applyMaterial(self.__ptr, material.__ptr, localOptions.__ptr, shaderIndex)
-end
-
-function Renderer:clearShader()
-	local retVal =  Polycore.Renderer_clearShader(self.__ptr)
-end
-
-function Renderer:setDepthFunction(depthFunction)
-	local retVal = Polycore.Renderer_setDepthFunction(self.__ptr, depthFunction)
-end
-
-function Renderer:createVertexBufferForMesh(mesh)
-	local retVal = Polycore.Renderer_createVertexBufferForMesh(self.__ptr, mesh.__ptr)
-end
-
-function Renderer:drawVertexBuffer(buffer)
-	local retVal = Polycore.Renderer_drawVertexBuffer(self.__ptr, buffer.__ptr)
-end
-
-function Renderer:setRenderMode(newR_enderMode)
-	local retVal = Polycore.Renderer_setRenderMode(self.__ptr, newR_enderMode)
-end
-
-function Renderer:getRenderMode()
-	local retVal =  Polycore.Renderer_getRenderMode(self.__ptr)
-	return retVal
-end
-
-function Renderer:enableDepthTest(val)
-	local retVal = Polycore.Renderer_enableDepthTest(self.__ptr, val)
-end
-
-function Renderer:enableDepthWrite(val)
-	local retVal = Polycore.Renderer_enableDepthWrite(self.__ptr, val)
-end
-
-function Renderer:billboardMatrix()
-	local retVal =  Polycore.Renderer_billboardMatrix(self.__ptr)
-end
-
-function Renderer:billboardMatrixWithScale(scale)
-	local retVal = Polycore.Renderer_billboardMatrixWithScale(self.__ptr, scale.__ptr)
-end
-
-function Renderer:setTextureFilteringMode(mode)
-	local retVal = Polycore.Renderer_setTextureFilteringMode(self.__ptr, mode)
-end
-
-function Renderer:setClippingPlanes(near, far)
-	local retVal = Polycore.Renderer_setClippingPlanes(self.__ptr, near, far)
-end
-
-function Renderer:enableAlphaTest(val)
-	local retVal = Polycore.Renderer_enableAlphaTest(self.__ptr, val)
-end
-
-function Renderer:clearBuffer(colorBuffer, depthBuffer)
-	local retVal = Polycore.Renderer_clearBuffer(self.__ptr, colorBuffer, depthBuffer)
-end
-
-function Renderer:drawToColorBuffer(val)
-	local retVal = Polycore.Renderer_drawToColorBuffer(self.__ptr, val)
-end
-
-function Renderer:getCameraMatrix()
-	local retVal =  Polycore.Renderer_getCameraMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:setCameraMatrix(matrix)
-	local retVal = Polycore.Renderer_setCameraMatrix(self.__ptr, matrix.__ptr)
-end
-
-function Renderer:setCameraPosition(pos)
-	local retVal = Polycore.Renderer_setCameraPosition(self.__ptr, pos.__ptr)
-end
-
-function Renderer:drawScreenQuad(qx, qy)
-	local retVal = Polycore.Renderer_drawScreenQuad(self.__ptr, qx, qy)
-end
-
-function Renderer:getXRes()
-	local retVal =  Polycore.Renderer_getXRes(self.__ptr)
-	return retVal
-end
-
-function Renderer:getYRes()
-	local retVal =  Polycore.Renderer_getYRes(self.__ptr)
-	return retVal
-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:cullFrontFaces(val)
-	local retVal = Polycore.Renderer_cullFrontFaces(self.__ptr, val)
-end
-
-function Renderer:clearLights()
-	local retVal =  Polycore.Renderer_clearLights(self.__ptr)
-end
-
-function Renderer:addLight(lightImportance, position, direction, type, color, specularColor, constantAttenuation, linearAttenuation, quadraticAttenuation, intensity, spotlightCutoff, spotlightExponent, shadowsEnabled, textureMatrix, shadowMapTexture)
-	local retVal = Polycore.Renderer_addLight(self.__ptr, lightImportance, position.__ptr, direction.__ptr, type, color.__ptr, specularColor.__ptr, constantAttenuation, linearAttenuation, quadraticAttenuation, intensity, spotlightCutoff, spotlightExponent, shadowsEnabled, textureMatrix.__ptr, shadowMapTexture.__ptr)
-end
-
-function Renderer:setExposureLevel(level)
-	local retVal = Polycore.Renderer_setExposureLevel(self.__ptr, level)
-end
-
-function Renderer:rayTriangleIntersect(ray_origin, ray_direction, vert0, vert1, vert2, hitPoint)
-	local retVal = Polycore.Renderer_rayTriangleIntersect(self.__ptr, ray_origin.__ptr, ray_direction.__ptr, vert0.__ptr, vert1.__ptr, vert2.__ptr, hitPoint.__ptr)
-	return retVal
-end
-
-function Renderer:projectRayFrom2DCoordinate(x, y)
-	local retVal = Polycore.Renderer_projectRayFrom2DCoordinate(self.__ptr, x, y)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:enableShaders(flag)
-	local retVal = Polycore.Renderer_enableShaders(self.__ptr, flag)
-end
-
-function Renderer:getViewportWidth()
-	local retVal =  Polycore.Renderer_getViewportWidth(self.__ptr)
-	return retVal
-end
-
-function Renderer:getViewportHeight()
-	local retVal =  Polycore.Renderer_getViewportHeight(self.__ptr)
-	return retVal
-end
-
-function Renderer:initOSSpecific()
-	local retVal =  Polycore.Renderer_initOSSpecific(self.__ptr)
-end
-
-function Renderer:addShaderModule(module)
-	local retVal = Polycore.Renderer_addShaderModule(self.__ptr, module.__ptr)
-end
-
-function Renderer:test2DCoordinate(x, y, poly, matrix, billboardMode)
-	local retVal = Polycore.Renderer_test2DCoordinate(self.__ptr, x, y, poly.__ptr, matrix.__ptr, billboardMode)
-	return retVal
-end
-
-function Renderer:getProjectionMatrix()
-	local retVal =  Polycore.Renderer_getProjectionMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:getModelviewMatrix()
-	local retVal =  Polycore.Renderer_getModelviewMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:Unproject(x, y)
-	local retVal = Polycore.Renderer_Unproject(self.__ptr, x, y)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Renderer:sortLights()
-	local retVal =  Polycore.Renderer_sortLights(self.__ptr)
-end
-
-function Renderer:getNumAreaLights()
-	local retVal =  Polycore.Renderer_getNumAreaLights(self.__ptr)
-	return retVal
-end
-
-function Renderer:getNumSpotLights()
-	local retVal =  Polycore.Renderer_getNumSpotLights(self.__ptr)
-	return retVal
-end
-
-function Renderer:getNumLights()
-	local retVal =  Polycore.Renderer_getNumLights(self.__ptr)
-	return retVal
-end
-
-
-
-function Renderer:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Renderer(self.__ptr)
-end

+ 0 - 71
Bindings/Contents/LUA/API/Polycode/Resource.lua

@@ -1,71 +0,0 @@
-class "Resource"
-
-
-
-RESOURCE_TEXTURE = 0
-RESOURCE_MATERIAL = 1
-RESOURCE_SHADER = 2
-RESOURCE_PROGRAM = 3
-RESOURCE_MESH = 5
-RESOURCE_CUBEMAP = 6
-
-
-
-
-function Resource:Resource(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Resource:getResourceName()
-	local retVal =  Polycore.Resource_getResourceName(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Resource:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Resource(self.__ptr)
-end

+ 0 - 85
Bindings/Contents/LUA/API/Polycode/ResourceManager.lua

@@ -1,85 +0,0 @@
-class "ResourceManager"
-
-
-
-
-
-
-
-function ResourceManager:ResourceManager(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ResourceManager:addResource(resource)
-	local retVal = Polycore.ResourceManager_addResource(self.__ptr, resource.__ptr)
-end
-
-function ResourceManager:addDirResource(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_addDirResource(self.__ptr, dirPath, recursive)
-end
-
-function ResourceManager:addArchive(zipPath)
-	local retVal = Polycore.ResourceManager_addArchive(self.__ptr, zipPath)
-end
-
-function ResourceManager:readFile(fileName)
-	local retVal = Polycore.ResourceManager_readFile(self.__ptr, fileName)
-	return retVal
-end
-
-function ResourceManager:parseTextures(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseTextures(self.__ptr, dirPath, recursive)
-end
-
-function ResourceManager:parseMaterials(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseMaterials(self.__ptr, dirPath, recursive)
-end
-
-function ResourceManager:parseShaders(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseShaders(self.__ptr, dirPath, recursive)
-end
-
-function ResourceManager:parsePrograms(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parsePrograms(self.__ptr, dirPath, recursive)
-end
-
-function ResourceManager:parseCubemaps(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseCubemaps(self.__ptr, dirPath, recursive)
-end
-
-function ResourceManager:parseOthers(dirPath, recursive)
-	local retVal = Polycore.ResourceManager_parseOthers(self.__ptr, dirPath, recursive)
-end
-
-function ResourceManager:getResource(resourceType, resourceName)
-	local retVal = Polycore.ResourceManager_getResource(self.__ptr, resourceType, resourceName)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Resource("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ResourceManager:addShaderModule(module)
-	local retVal = Polycore.ResourceManager_addShaderModule(self.__ptr, module.__ptr)
-end
-
-
-
-function ResourceManager:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ResourceManager(self.__ptr)
-end

+ 0 - 287
Bindings/Contents/LUA/API/Polycode/Scene.lua

@@ -1,287 +0,0 @@
-require "Polycode/EventDispatcher"
-
-class "Scene" (EventDispatcher)
-
-
-
-ENTITY_MESH = 0
-ENTITY_LIGHT = 1
-ENTITY_CAMERA = 2
-ENTITY_ENTITY = 3
-ENTITY_COLLMESH = 4
-function Scene:__index__(name)
-	if name == "clearColor" then
-		retVal = Polycore.Scene_get_clearColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "useClearColor" then
-		return Polycore.Scene_get_useClearColor(self.__ptr)
-	elseif name == "ambientColor" then
-		retVal = Polycore.Scene_get_ambientColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "fogColor" then
-		retVal = Polycore.Scene_get_fogColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "enabled" then
-		return Polycore.Scene_get_enabled(self.__ptr)
-	end
-end
-
-
-function Scene:__set_callback(name,value)
-	if name == "useClearColor" then
-		Polycore.Scene_set_useClearColor(self.__ptr, value)
-		return true
-	elseif name == "enabled" then
-		Polycore.Scene_set_enabled(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Scene:Scene(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Scene:addEntity(entity)
-	local retVal = Polycore.Scene_addEntity(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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Camera("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Scene:getActiveCamera()
-	local retVal =  Polycore.Scene_getActiveCamera(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Camera("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Scene:setActiveCamera(camera)
-	local retVal = Polycore.Scene_setActiveCamera(self.__ptr, camera.__ptr)
-end
-
-function Scene:enableLighting(enable)
-	local retVal = Polycore.Scene_enableLighting(self.__ptr, enable)
-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: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:getNumEntities()
-	local retVal =  Polycore.Scene_getNumEntities(self.__ptr)
-	return retVal
-end
-
-function Scene:getEntity(index)
-	local retVal = Polycore.Scene_getEntity(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneEntity("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Scene:getEntityAtScreenPosition(x, y)
-	local retVal = Polycore.Scene_getEntityAtScreenPosition(self.__ptr, x, y)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneEntity("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Scene:Render(targetCamera)
-	local retVal = Polycore.Scene_Render(self.__ptr, targetCamera.__ptr)
-end
-
-function Scene:RenderDepthOnly(targetCamera)
-	local retVal = Polycore.Scene_RenderDepthOnly(self.__ptr, targetCamera.__ptr)
-end
-
-function Scene:readString(inFile)
-	local retVal = Polycore.Scene_readString(inFile.__ptr)
-	return retVal
-end
-
-function Scene:loadScene(fileName)
-	local retVal = Polycore.Scene_loadScene(self.__ptr, fileName)
-end
-
-function Scene:generateLightmaps(lightMapRes, lightMapQuality, numRadPasses)
-	local retVal = Polycore.Scene_generateLightmaps(self.__ptr, lightMapRes, lightMapQuality, numRadPasses)
-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:getNearestLight(pos)
-	local retVal = Polycore.Scene_getNearestLight(self.__ptr, pos.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneLight("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Scene:writeEntityMatrix(entity, outFile)
-	local retVal = Polycore.Scene_writeEntityMatrix(self.__ptr, entity.__ptr, outFile.__ptr)
-end
-
-function Scene:writeString(str, outFile)
-	local retVal = Polycore.Scene_writeString(self.__ptr, str, outFile.__ptr)
-end
-
-function Scene:saveScene(fileName)
-	local retVal = Polycore.Scene_saveScene(self.__ptr, fileName)
-end
-
-function Scene:getNumStaticGeometry()
-	local retVal =  Polycore.Scene_getNumStaticGeometry(self.__ptr)
-	return retVal
-end
-
-function Scene:getStaticGeometry(index)
-	local retVal = Polycore.Scene_getStaticGeometry(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneMesh("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Scene:loadCollisionChild(entity, autoCollide, type)
-	local retVal = Polycore.Scene_loadCollisionChild(self.__ptr, entity.__ptr, autoCollide, type)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneLight("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Scene:getCustomEntityByType(type)
-	local retVal = Polycore.Scene_getCustomEntityByType(self.__ptr, type)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SceneEntity("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Scene:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Scene(self.__ptr)
-end

+ 0 - 53
Bindings/Contents/LUA/API/Polycode/SceneEntity.lua

@@ -1,53 +0,0 @@
-require "Polycode/Entity"
-
-class "SceneEntity" (Entity)
-
-
-
-function SceneEntity:__index__(name)
-	if name == "castShadows" then
-		return Polycore.SceneEntity_get_castShadows(self.__ptr)
-	end
-end
-
-
-function SceneEntity:__set_callback(name,value)
-	if name == "castShadows" then
-		Polycore.SceneEntity_set_castShadows(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function SceneEntity:SceneEntity(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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.SceneEntity(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SceneEntity:testMouseCollision(x, y)
-	local retVal = Polycore.SceneEntity_testMouseCollision(self.__ptr, x, y)
-	return retVal
-end
-
-
-
-function SceneEntity:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneEntity(self.__ptr)
-end

+ 0 - 52
Bindings/Contents/LUA/API/Polycode/SceneLabel.lua

@@ -1,52 +0,0 @@
-require "Polycode/ScenePrimitive"
-
-class "SceneLabel" (ScenePrimitive)
-
-
-
-
-
-
-
-function SceneLabel:SceneLabel(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SceneLabel:setText(newText)
-	local retVal = Polycore.SceneLabel_setText(self.__ptr, newText)
-end
-
-function SceneLabel:getLabel()
-	local retVal =  Polycore.SceneLabel_getLabel(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Label("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function SceneLabel:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneLabel(self.__ptr)
-end

+ 0 - 184
Bindings/Contents/LUA/API/Polycode/SceneLight.lua

@@ -1,184 +0,0 @@
-require "Polycode/SceneEntity"
-
-class "SceneLight" (SceneEntity)
-
-
-
-AREA_LIGHT = 0
-SPOT_LIGHT = 1
-function SceneLight:__index__(name)
-	if name == "specularLightColor" then
-		retVal = Polycore.SceneLight_get_specularLightColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "lightColor" then
-		retVal = Polycore.SceneLight_get_lightColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	end
-end
-
-
-function SceneLight:__set_callback(name,value)
-	return false
-end
-
-
-function SceneLight:SceneLight(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "SceneEntity" 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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	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:Render()
-	local retVal =  Polycore.SceneLight_Render(self.__ptr)
-end
-
-function SceneLight:getLightViewMatrix()
-	local retVal =  Polycore.SceneLight_getLightViewMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneLight:getZBufferTexture()
-	local retVal =  Polycore.SceneLight_getZBufferTexture(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-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)
-	local retVal = Polycore.SceneLight_setDiffuseLightColor(self.__ptr, r, g, b)
-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: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:enableDebugDraw(val)
-	local retVal = Polycore.SceneLight_enableDebugDraw(self.__ptr, val)
-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:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneLight(self.__ptr)
-end

+ 0 - 40
Bindings/Contents/LUA/API/Polycode/SceneLine.lua

@@ -1,40 +0,0 @@
-require "Polycode/SceneEntity"
-
-class "SceneLine" (SceneEntity)
-
-
-
-
-
-
-
-function SceneLine:SceneLine(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "SceneEntity" 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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SceneLine:Render()
-	local retVal =  Polycore.SceneLine_Render(self.__ptr)
-end
-
-
-
-function SceneLine:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneLine(self.__ptr)
-end

+ 0 - 52
Bindings/Contents/LUA/API/Polycode/SceneManager.lua

@@ -1,52 +0,0 @@
-class "SceneManager"
-
-
-
-
-
-
-
-function SceneManager:SceneManager(...)
-	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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SceneManager:addScene(newScene)
-	local retVal = Polycore.SceneManager_addScene(self.__ptr, newScene.__ptr)
-end
-
-function SceneManager:Update()
-	local retVal =  Polycore.SceneManager_Update(self.__ptr)
-end
-
-function SceneManager:UpdateVirtual()
-	local retVal =  Polycore.SceneManager_UpdateVirtual(self.__ptr)
-end
-
-function SceneManager:removeScene(scene)
-	local retVal = Polycore.SceneManager_removeScene(self.__ptr, scene.__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:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneManager(self.__ptr)
-end

+ 0 - 157
Bindings/Contents/LUA/API/Polycode/SceneMesh.lua

@@ -1,157 +0,0 @@
-require "Polycode/SceneEntity"
-
-class "SceneMesh" (SceneEntity)
-
-
-
-function SceneMesh:__index__(name)
-	if name == "lightmapIndex" then
-		retVal = Polycore.SceneMesh_get_lightmapIndex(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = unsigned int("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "showVertexNormals" then
-		return Polycore.SceneMesh_get_showVertexNormals(self.__ptr)
-	end
-end
-
-
-function SceneMesh:__set_callback(name,value)
-	if name == "showVertexNormals" then
-		Polycore.SceneMesh_set_showVertexNormals(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function SceneMesh:SceneMesh(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "SceneEntity" 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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SceneMesh:Render()
-	local retVal =  Polycore.SceneMesh_Render(self.__ptr)
-end
-
-function SceneMesh:getLocalShaderOptions()
-	local retVal =  Polycore.SceneMesh_getLocalShaderOptions(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ShaderBinding("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneMesh:getMesh()
-	local retVal =  Polycore.SceneMesh_getMesh(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Mesh("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneMesh:getTexture()
-	local retVal =  Polycore.SceneMesh_getTexture(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneMesh:getMaterial()
-	local retVal =  Polycore.SceneMesh_getMaterial(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Material("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneMesh:loadTexture(fileName, clamp)
-	local retVal = Polycore.SceneMesh_loadTexture(self.__ptr, fileName, clamp)
-end
-
-function SceneMesh:loadSkeleton(fileName)
-	local retVal = Polycore.SceneMesh_loadSkeleton(self.__ptr, fileName)
-end
-
-function SceneMesh:setTexture(texture)
-	local retVal = Polycore.SceneMesh_setTexture(self.__ptr, texture.__ptr)
-end
-
-function SceneMesh:setMaterial(material)
-	local retVal = Polycore.SceneMesh_setMaterial(self.__ptr, material.__ptr)
-end
-
-function SceneMesh:setMaterialByName(materialName)
-	local retVal = Polycore.SceneMesh_setMaterialByName(self.__ptr, materialName)
-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
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Skeleton("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneMesh:renderMeshLocally()
-	local retVal =  Polycore.SceneMesh_renderMeshLocally(self.__ptr)
-end
-
-function SceneMesh:cacheToVertexBuffer(cache)
-	local retVal = Polycore.SceneMesh_cacheToVertexBuffer(self.__ptr, cache)
-end
-
-
-
-function SceneMesh:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneMesh(self.__ptr)
-end

+ 0 - 72
Bindings/Contents/LUA/API/Polycode/SceneParticleEmitter.lua

@@ -1,72 +0,0 @@
-require "Polycode/SceneEntity"
-
-class "SceneParticleEmitter" (SceneEntity)
-
-
-
-
-
-
-
-function SceneParticleEmitter:SceneParticleEmitter(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "SceneEntity" 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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SceneParticleEmitter:getEmitter()
-	local retVal =  Polycore.SceneParticleEmitter_getEmitter(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ParticleEmitter("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneParticleEmitter:respawnSceneParticles()
-	local retVal =  Polycore.SceneParticleEmitter_respawnSceneParticles(self.__ptr)
-end
-
-function SceneParticleEmitter:addParticleBody(particleBody)
-	local retVal = Polycore.SceneParticleEmitter_addParticleBody(self.__ptr, particleBody.__ptr)
-end
-
-function SceneParticleEmitter:getBaseMatrix()
-	local retVal =  Polycore.SceneParticleEmitter_getBaseMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneParticleEmitter:Update()
-	local retVal =  Polycore.SceneParticleEmitter_Update(self.__ptr)
-end
-
-
-
-function SceneParticleEmitter:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneParticleEmitter(self.__ptr)
-end

+ 0 - 43
Bindings/Contents/LUA/API/Polycode/ScenePrimitive.lua

@@ -1,43 +0,0 @@
-require "Polycode/SceneMesh"
-
-class "ScenePrimitive" (SceneMesh)
-
-
-
-TYPE_BOX = 0
-TYPE_PLANE = 1
-TYPE_SPHERE = 2
-TYPE_CYLINDER = 3
-TYPE_CONE = 4
-TYPE_VPLANE = 5
-TYPE_TORUS = 6
-
-
-
-
-function ScenePrimitive:ScenePrimitive(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-
-
-function ScenePrimitive:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScenePrimitive(self.__ptr)
-end

+ 0 - 68
Bindings/Contents/LUA/API/Polycode/SceneRenderTexture.lua

@@ -1,68 +0,0 @@
-class "SceneRenderTexture"
-
-
-
-
-
-
-
-function SceneRenderTexture:SceneRenderTexture(...)
-	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.SceneRenderTexture(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SceneRenderTexture:drawScreen()
-	local retVal =  Polycore.SceneRenderTexture_drawScreen(self.__ptr)
-end
-
-function SceneRenderTexture:getTargetTexture()
-	local retVal =  Polycore.SceneRenderTexture_getTargetTexture(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneRenderTexture:getTargetScene()
-	local retVal =  Polycore.SceneRenderTexture_getTargetScene(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Scene("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SceneRenderTexture:getTargetCamera()
-	local retVal =  Polycore.SceneRenderTexture_getTargetCamera(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Camera("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function SceneRenderTexture:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneRenderTexture(self.__ptr)
-end

+ 0 - 52
Bindings/Contents/LUA/API/Polycode/SceneSound.lua

@@ -1,52 +0,0 @@
-require "Polycode/SceneEntity"
-
-class "SceneSound" (SceneEntity)
-
-
-
-
-
-
-
-function SceneSound:SceneSound(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "SceneEntity" 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.SceneSound(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SceneSound:Update()
-	local retVal =  Polycore.SceneSound_Update(self.__ptr)
-end
-
-function SceneSound:getSound()
-	local retVal =  Polycore.SceneSound_getSound(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Sound("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function SceneSound:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneSound(self.__ptr)
-end

+ 0 - 40
Bindings/Contents/LUA/API/Polycode/SceneSoundListener.lua

@@ -1,40 +0,0 @@
-require "Polycode/SceneEntity"
-
-class "SceneSoundListener" (SceneEntity)
-
-
-
-
-
-
-
-function SceneSoundListener:SceneSoundListener(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "SceneEntity" 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.SceneSoundListener(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SceneSoundListener:Update()
-	local retVal =  Polycore.SceneSoundListener_Update(self.__ptr)
-end
-
-
-
-function SceneSoundListener:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SceneSoundListener(self.__ptr)
-end

+ 0 - 189
Bindings/Contents/LUA/API/Polycode/Screen.lua

@@ -1,189 +0,0 @@
-require "Polycode/EventDispatcher"
-
-class "Screen" (EventDispatcher)
-
-
-
-function Screen:__index__(name)
-	if name == "enabled" then
-		return Polycore.Screen_get_enabled(self.__ptr)
-	end
-end
-
-
-function Screen:__set_callback(name,value)
-	if name == "enabled" then
-		Polycore.Screen_set_enabled(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Screen:Screen(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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.Screen(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Screen:addChild(newEntity)
-	local retVal = Polycore.Screen_addChild(self.__ptr, newEntity.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ScreenEntity("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Screen:removeChild(entityToRemove)
-	local retVal = Polycore.Screen_removeChild(self.__ptr, entityToRemove.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ScreenEntity("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Screen:setScreenOffset(x, y)
-	local retVal = Polycore.Screen_setScreenOffset(self.__ptr, x, y)
-end
-
-function Screen:getScreenOffset()
-	local retVal =  Polycore.Screen_getScreenOffset(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector2("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Screen:Shutdown()
-	local retVal =  Polycore.Screen_Shutdown(self.__ptr)
-end
-
-function Screen:Update()
-	local retVal =  Polycore.Screen_Update(self.__ptr)
-end
-
-function Screen:getEntityAt(x, y)
-	local retVal = Polycore.Screen_getEntityAt(self.__ptr, x, y)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ScreenEntity("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Screen:Render()
-	local retVal =  Polycore.Screen_Render(self.__ptr)
-end
-
-function Screen:setRenderer(r_enderer)
-	local retVal = Polycore.Screen_setRenderer(self.__ptr, r_enderer.__ptr)
-end
-
-function Screen:setNormalizedCoordinates(newVal, yCoordinateSize)
-	local retVal = Polycore.Screen_setNormalizedCoordinates(self.__ptr, newVal, yCoordinateSize)
-end
-
-function Screen:setScreenShader(shaderName)
-	local retVal = Polycore.Screen_setScreenShader(self.__ptr, shaderName)
-end
-
-function Screen:clearScreenShader()
-	local retVal =  Polycore.Screen_clearScreenShader(self.__ptr)
-end
-
-function Screen:getHighestZIndex()
-	local retVal =  Polycore.Screen_getHighestZIndex(self.__ptr)
-	return retVal
-end
-
-function Screen:sortChildren()
-	local retVal =  Polycore.Screen_sortChildren(self.__ptr)
-end
-
-function Screen:cmpZindex(left, right)
-	local retVal = Polycore.Screen_cmpZindex(left.__ptr, right.__ptr)
-	return retVal
-end
-
-function Screen:handleInputEvent(inputEvent)
-	local retVal = Polycore.Screen_handleInputEvent(self.__ptr, inputEvent.__ptr)
-end
-
-function Screen:hasFilterShader()
-	local retVal =  Polycore.Screen_hasFilterShader(self.__ptr)
-	return retVal
-end
-
-function Screen:drawFilter()
-	local retVal =  Polycore.Screen_drawFilter(self.__ptr)
-end
-
-function Screen:usesNormalizedCoordinates()
-	local retVal =  Polycore.Screen_usesNormalizedCoordinates(self.__ptr)
-	return retVal
-end
-
-function Screen:getYCoordinateSize()
-	local retVal =  Polycore.Screen_getYCoordinateSize(self.__ptr)
-	return retVal
-end
-
-function Screen:getRootEntity()
-	local retVal =  Polycore.Screen_getRootEntity(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ScreenEntity("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Screen:getScreenShaderMaterial()
-	local retVal =  Polycore.Screen_getScreenShaderMaterial(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Material("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Screen:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Screen(self.__ptr)
-end

+ 0 - 36
Bindings/Contents/LUA/API/Polycode/ScreenCurve.lua

@@ -1,36 +0,0 @@
-require "Polycode/ScreenShape"
-
-class "ScreenCurve" (ScreenShape)
-
-
-
-
-
-
-
-function ScreenCurve:ScreenCurve(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenShape" 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.ScreenCurve(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-
-
-function ScreenCurve:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenCurve(self.__ptr)
-end

+ 0 - 236
Bindings/Contents/LUA/API/Polycode/ScreenEntity.lua

@@ -1,236 +0,0 @@
-require "Polycode/Entity"
-
-class "ScreenEntity" (Entity)
-
-
-
-POSITION_TOPLEFT = 0
-POSITION_CENTER = 1
-function ScreenEntity:__index__(name)
-	if name == "hasFocus" then
-		return Polycore.ScreenEntity_get_hasFocus(self.__ptr)
-	elseif name == "blockMouseInput" then
-		return Polycore.ScreenEntity_get_blockMouseInput(self.__ptr)
-	elseif name == "zindex" then
-		return Polycore.ScreenEntity_get_zindex(self.__ptr)
-	elseif name == "snapToPixels" then
-		return Polycore.ScreenEntity_get_snapToPixels(self.__ptr)
-	end
-end
-
-
-function ScreenEntity:__set_callback(name,value)
-	if name == "hasFocus" then
-		Polycore.ScreenEntity_set_hasFocus(self.__ptr, value)
-		return true
-	elseif name == "blockMouseInput" then
-		Polycore.ScreenEntity_set_blockMouseInput(self.__ptr, value)
-		return true
-	elseif name == "zindex" then
-		Polycore.ScreenEntity_set_zindex(self.__ptr, value)
-		return true
-	elseif name == "snapToPixels" then
-		Polycore.ScreenEntity_set_snapToPixels(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function ScreenEntity:ScreenEntity(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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.ScreenEntity(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenEntity:setPosition(x, y)
-	local retVal = Polycore.ScreenEntity_setPosition(self.__ptr, x, y)
-end
-
-function ScreenEntity:setScale(x, y)
-	local retVal = Polycore.ScreenEntity_setScale(self.__ptr, x, y)
-end
-
-function ScreenEntity:setRotation(roatation)
-	local retVal = Polycore.ScreenEntity_setRotation(self.__ptr, roatation)
-end
-
-function ScreenEntity:getRotation()
-	local retVal =  Polycore.ScreenEntity_getRotation(self.__ptr)
-	return retVal
-end
-
-function ScreenEntity:_onMouseDown(x, y, mouseButton, timestamp)
-	local retVal = Polycore.ScreenEntity__onMouseDown(self.__ptr, x, y, mouseButton, timestamp)
-	return retVal
-end
-
-function ScreenEntity:_onMouseUp(x, y, mouseButton, timestamp)
-	local retVal = Polycore.ScreenEntity__onMouseUp(self.__ptr, x, y, mouseButton, timestamp)
-	return retVal
-end
-
-function ScreenEntity:_onMouseMove(x, y, timestamp)
-	local retVal = Polycore.ScreenEntity__onMouseMove(self.__ptr, x, y, timestamp)
-end
-
-function ScreenEntity:_onMouseWheelUp(x, y, timestamp)
-	local retVal = Polycore.ScreenEntity__onMouseWheelUp(self.__ptr, x, y, timestamp)
-end
-
-function ScreenEntity:_onMouseWheelDown(x, y, timestamp)
-	local retVal = Polycore.ScreenEntity__onMouseWheelDown(self.__ptr, x, y, timestamp)
-end
-
-function ScreenEntity:onMouseDown(x, y)
-	local retVal = Polycore.ScreenEntity_onMouseDown(self.__ptr, x, y)
-end
-
-function ScreenEntity:onMouseUp(x, y)
-	local retVal = Polycore.ScreenEntity_onMouseUp(self.__ptr, x, y)
-end
-
-function ScreenEntity:onMouseMove(x, y)
-	local retVal = Polycore.ScreenEntity_onMouseMove(self.__ptr, x, y)
-end
-
-function ScreenEntity:onMouseWheelUp(x, y)
-	local retVal = Polycore.ScreenEntity_onMouseWheelUp(self.__ptr, x, y)
-end
-
-function ScreenEntity:onMouseWheelDown(x, y)
-	local retVal = Polycore.ScreenEntity_onMouseWheelDown(self.__ptr, x, y)
-end
-
-function ScreenEntity:_onKeyDown(key, charCode)
-	local retVal = Polycore.ScreenEntity__onKeyDown(self.__ptr, key.__ptr, charCode.__ptr)
-end
-
-function ScreenEntity:_onKeyUp(key, charCode)
-	local retVal = Polycore.ScreenEntity__onKeyUp(self.__ptr, key.__ptr, charCode.__ptr)
-end
-
-function ScreenEntity:onKeyDown(key, charCode)
-	local retVal = Polycore.ScreenEntity_onKeyDown(self.__ptr, key.__ptr, charCode.__ptr)
-end
-
-function ScreenEntity:onKeyUp(key, charCode)
-	local retVal = Polycore.ScreenEntity_onKeyUp(self.__ptr, key.__ptr, charCode.__ptr)
-end
-
-function ScreenEntity:hitTest(x, y)
-	local retVal = Polycore.ScreenEntity_hitTest(self.__ptr, x, y)
-	return retVal
-end
-
-function ScreenEntity:buildPositionMatrix()
-	local retVal =  Polycore.ScreenEntity_buildPositionMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ScreenEntity:adjustMatrixForChildren()
-	local retVal =  Polycore.ScreenEntity_adjustMatrixForChildren(self.__ptr)
-end
-
-function ScreenEntity:getWidth()
-	local retVal =  Polycore.ScreenEntity_getWidth(self.__ptr)
-	return retVal
-end
-
-function ScreenEntity:getHeight()
-	local retVal =  Polycore.ScreenEntity_getHeight(self.__ptr)
-	return retVal
-end
-
-function ScreenEntity:setWidth(w)
-	local retVal = Polycore.ScreenEntity_setWidth(self.__ptr, w)
-end
-
-function ScreenEntity:setHeight(h)
-	local retVal = Polycore.ScreenEntity_setHeight(self.__ptr, h)
-end
-
-function ScreenEntity:onGainFocus()
-	local retVal =  Polycore.ScreenEntity_onGainFocus(self.__ptr)
-end
-
-function ScreenEntity:onLoseFocus()
-	local retVal =  Polycore.ScreenEntity_onLoseFocus(self.__ptr)
-end
-
-function ScreenEntity:startDrag(xOffset, yOffset)
-	local retVal = Polycore.ScreenEntity_startDrag(self.__ptr, xOffset, yOffset)
-end
-
-function ScreenEntity:stopDrag()
-	local retVal =  Polycore.ScreenEntity_stopDrag(self.__ptr)
-end
-
-function ScreenEntity:setBlendingMode(newBl_endingMode)
-	local retVal = Polycore.ScreenEntity_setBlendingMode(self.__ptr, newBl_endingMode)
-end
-
-function ScreenEntity:setPositionMode(newPositionMode)
-	local retVal = Polycore.ScreenEntity_setPositionMode(self.__ptr, newPositionMode)
-end
-
-function ScreenEntity:setDragLimits(rect)
-	local retVal = Polycore.ScreenEntity_setDragLimits(self.__ptr, rect.__ptr)
-end
-
-function ScreenEntity:clearDragLimits()
-	local retVal =  Polycore.ScreenEntity_clearDragLimits(self.__ptr)
-end
-
-function ScreenEntity:focusChild(child)
-	local retVal = Polycore.ScreenEntity_focusChild(self.__ptr, child.__ptr)
-end
-
-function ScreenEntity:focusNextChild()
-	local retVal =  Polycore.ScreenEntity_focusNextChild(self.__ptr)
-end
-
-function ScreenEntity:getPosition2D()
-	local retVal =  Polycore.ScreenEntity_getPosition2D(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector2("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ScreenEntity:isFocusable()
-	local retVal =  Polycore.ScreenEntity_isFocusable(self.__ptr)
-	return retVal
-end
-
-
-
-function ScreenEntity:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenEntity(self.__ptr)
-end

+ 0 - 40
Bindings/Contents/LUA/API/Polycode/ScreenEvent.lua

@@ -1,40 +0,0 @@
-require "Polycode/Event"
-
-class "ScreenEvent" (Event)
-
-
-
-ENTITY_MOVE_TOP = 0
-ENTITY_MOVE_BOTTOM = 1
-ENTITY_MOVE_UP = 2
-ENTITY_MOVE_DOWN = 3
-
-
-
-
-function ScreenEvent:ScreenEvent(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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.ScreenEvent(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-
-
-function ScreenEvent:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenEvent(self.__ptr)
-end

+ 0 - 50
Bindings/Contents/LUA/API/Polycode/ScreenImage.lua

@@ -1,50 +0,0 @@
-require "Polycode/ScreenShape"
-
-class "ScreenImage" (ScreenShape)
-
-
-
-
-
-
-
-function ScreenImage:ScreenImage(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenShape" 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.ScreenImage(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenImage:setImageCoordinates(x, y, width, height)
-	local retVal = Polycore.ScreenImage_setImageCoordinates(self.__ptr, x, y, width, height)
-end
-
-function ScreenImage:getImageWidth()
-	local retVal =  Polycore.ScreenImage_getImageWidth(self.__ptr)
-	return retVal
-end
-
-function ScreenImage:getImageHeight()
-	local retVal =  Polycore.ScreenImage_getImageHeight(self.__ptr)
-	return retVal
-end
-
-
-
-function ScreenImage:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenImage(self.__ptr)
-end

+ 0 - 68
Bindings/Contents/LUA/API/Polycode/ScreenLabel.lua

@@ -1,68 +0,0 @@
-require "Polycode/ScreenShape"
-
-class "ScreenLabel" (ScreenShape)
-
-
-
-
-
-
-
-function ScreenLabel:ScreenLabel(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenShape" 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.ScreenLabel(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenLabel:addDropShadow(color, size, offsetX, offsetY)
-	local retVal = Polycore.ScreenLabel_addDropShadow(self.__ptr, color.__ptr, size, offsetX, offsetY)
-end
-
-function ScreenLabel:setText(newText)
-	local retVal = Polycore.ScreenLabel_setText(self.__ptr, newText)
-end
-
-function ScreenLabel:getText()
-	local retVal =  Polycore.ScreenLabel_getText(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ScreenLabel:getLabel()
-	local retVal =  Polycore.ScreenLabel_getLabel(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Label("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function ScreenLabel:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenLabel(self.__ptr)
-end

+ 0 - 48
Bindings/Contents/LUA/API/Polycode/ScreenLine.lua

@@ -1,48 +0,0 @@
-require "Polycode/ScreenMesh"
-
-class "ScreenLine" (ScreenMesh)
-
-
-
-
-
-
-
-function ScreenLine:ScreenLine(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenMesh" 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.ScreenLine(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenLine:Update()
-	local retVal =  Polycore.ScreenLine_Update(self.__ptr)
-end
-
-function ScreenLine:Render()
-	local retVal =  Polycore.ScreenLine_Render(self.__ptr)
-end
-
-function ScreenLine:setLineWidth(width)
-	local retVal = Polycore.ScreenLine_setLineWidth(self.__ptr, width)
-end
-
-
-
-function ScreenLine:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenLine(self.__ptr)
-end

+ 0 - 48
Bindings/Contents/LUA/API/Polycode/ScreenManager.lua

@@ -1,48 +0,0 @@
-require "Polycode/EventDispatcher"
-
-class "ScreenManager" (EventDispatcher)
-
-
-
-
-
-
-
-function ScreenManager:ScreenManager(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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.ScreenManager(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenManager:removeScreen(screen)
-	local retVal = Polycore.ScreenManager_removeScreen(self.__ptr, screen.__ptr)
-end
-
-function ScreenManager:addScreen(screen)
-	local retVal = Polycore.ScreenManager_addScreen(self.__ptr, screen.__ptr)
-end
-
-function ScreenManager:Update()
-	local retVal =  Polycore.ScreenManager_Update(self.__ptr)
-end
-
-
-
-function ScreenManager:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenManager(self.__ptr)
-end

+ 0 - 72
Bindings/Contents/LUA/API/Polycode/ScreenMesh.lua

@@ -1,72 +0,0 @@
-require "Polycode/ScreenEntity"
-
-class "ScreenMesh" (ScreenEntity)
-
-
-
-
-
-
-
-function ScreenMesh:ScreenMesh(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenEntity" 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.ScreenMesh(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenMesh:Render()
-	local retVal =  Polycore.ScreenMesh_Render(self.__ptr)
-end
-
-function ScreenMesh:getMesh()
-	local retVal =  Polycore.ScreenMesh_getMesh(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Mesh("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ScreenMesh:getTexture()
-	local retVal =  Polycore.ScreenMesh_getTexture(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Texture("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ScreenMesh:loadTexture(fileName)
-	local retVal = Polycore.ScreenMesh_loadTexture(self.__ptr, fileName)
-end
-
-function ScreenMesh:setTexture(texture)
-	local retVal = Polycore.ScreenMesh_setTexture(self.__ptr, texture.__ptr)
-end
-
-
-
-function ScreenMesh:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenMesh(self.__ptr)
-end

+ 0 - 68
Bindings/Contents/LUA/API/Polycode/ScreenParticleEmitter.lua

@@ -1,68 +0,0 @@
-require "Polycode/ScreenEntity"
-
-class "ScreenParticleEmitter" (ScreenEntity)
-
-
-
-
-
-
-
-function ScreenParticleEmitter:ScreenParticleEmitter(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenEntity" 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.ScreenParticleEmitter(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenParticleEmitter:getEmitter()
-	local retVal =  Polycore.ScreenParticleEmitter_getEmitter(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ParticleEmitter("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ScreenParticleEmitter:addParticleBody(particleBody)
-	local retVal = Polycore.ScreenParticleEmitter_addParticleBody(self.__ptr, particleBody.__ptr)
-end
-
-function ScreenParticleEmitter:getBaseMatrix()
-	local retVal =  Polycore.ScreenParticleEmitter_getBaseMatrix(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Matrix4("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ScreenParticleEmitter:Update()
-	local retVal =  Polycore.ScreenParticleEmitter_Update(self.__ptr)
-end
-
-
-
-function ScreenParticleEmitter:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenParticleEmitter(self.__ptr)
-end

+ 0 - 93
Bindings/Contents/LUA/API/Polycode/ScreenShape.lua

@@ -1,93 +0,0 @@
-require "Polycode/ScreenMesh"
-
-class "ScreenShape" (ScreenMesh)
-
-
-
-SHAPE_RECT = 1
-SHAPE_CIRCLE = 2
-SHAPE_CUSTOM = 4
-function ScreenShape:__index__(name)
-	if name == "strokeEnabled" then
-		return Polycore.ScreenShape_get_strokeEnabled(self.__ptr)
-	elseif name == "strokeColor" then
-		retVal = Polycore.ScreenShape_get_strokeColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "lineSmooth" then
-		return Polycore.ScreenShape_get_lineSmooth(self.__ptr)
-	end
-end
-
-
-function ScreenShape:__set_callback(name,value)
-	if name == "strokeEnabled" then
-		Polycore.ScreenShape_set_strokeEnabled(self.__ptr, value)
-		return true
-	elseif name == "lineSmooth" then
-		Polycore.ScreenShape_set_lineSmooth(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function ScreenShape:ScreenShape(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenMesh" 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.ScreenShape(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenShape:Render()
-	local retVal =  Polycore.ScreenShape_Render(self.__ptr)
-end
-
-function ScreenShape:setStrokeColor(r, g, b, a)
-	local retVal = Polycore.ScreenShape_setStrokeColor(self.__ptr, r, g, b, a)
-end
-
-function ScreenShape:setStrokeWidth(width)
-	local retVal = Polycore.ScreenShape_setStrokeWidth(self.__ptr, width)
-end
-
-function ScreenShape:setGradient(r1, g1, b1, a1, r2, g2, b2, a2)
-	local retVal = Polycore.ScreenShape_setGradient(self.__ptr, r1, g1, b1, a1, r2, g2, b2, a2)
-end
-
-function ScreenShape:clearGradient()
-	local retVal =  Polycore.ScreenShape_clearGradient(self.__ptr)
-end
-
-function ScreenShape:setShapeSize(newWidth, newHeight)
-	local retVal = Polycore.ScreenShape_setShapeSize(self.__ptr, newWidth, newHeight)
-end
-
-function ScreenShape:addShapePoint(x, y)
-	local retVal = Polycore.ScreenShape_addShapePoint(self.__ptr, x, y)
-end
-
-
-
-function ScreenShape:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenShape(self.__ptr)
-end

+ 0 - 52
Bindings/Contents/LUA/API/Polycode/ScreenSound.lua

@@ -1,52 +0,0 @@
-require "Polycode/ScreenEntity"
-
-class "ScreenSound" (ScreenEntity)
-
-
-
-
-
-
-
-function ScreenSound:ScreenSound(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenEntity" 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.ScreenSound(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenSound:Update()
-	local retVal =  Polycore.ScreenSound_Update(self.__ptr)
-end
-
-function ScreenSound:getSound()
-	local retVal =  Polycore.ScreenSound_getSound(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Sound("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function ScreenSound:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenSound(self.__ptr)
-end

+ 0 - 40
Bindings/Contents/LUA/API/Polycode/ScreenSoundListener.lua

@@ -1,40 +0,0 @@
-require "Polycode/ScreenEntity"
-
-class "ScreenSoundListener" (ScreenEntity)
-
-
-
-
-
-
-
-function ScreenSoundListener:ScreenSoundListener(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenEntity" 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.ScreenSoundListener(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenSoundListener:Update()
-	local retVal =  Polycore.ScreenSoundListener_Update(self.__ptr)
-end
-
-
-
-function ScreenSoundListener:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenSoundListener(self.__ptr)
-end

+ 0 - 52
Bindings/Contents/LUA/API/Polycode/ScreenSprite.lua

@@ -1,52 +0,0 @@
-require "Polycode/ScreenShape"
-
-class "ScreenSprite" (ScreenShape)
-
-
-
-
-
-
-
-function ScreenSprite:ScreenSprite(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "ScreenShape" 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.ScreenSprite(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ScreenSprite:addAnimation(name, frames, speed)
-	local retVal = Polycore.ScreenSprite_addAnimation(self.__ptr, name, frames, speed)
-end
-
-function ScreenSprite:playAnimation(name, startFrame, once)
-	local retVal = Polycore.ScreenSprite_playAnimation(self.__ptr, name, startFrame, once)
-end
-
-function ScreenSprite:Update()
-	local retVal =  Polycore.ScreenSprite_Update(self.__ptr)
-end
-
-function ScreenSprite:Pause(val)
-	local retVal = Polycore.ScreenSprite_Pause(self.__ptr, val)
-end
-
-
-
-function ScreenSprite:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ScreenSprite(self.__ptr)
-end

+ 0 - 68
Bindings/Contents/LUA/API/Polycode/Shader.lua

@@ -1,68 +0,0 @@
-require "Polycode/Resource"
-
-class "Shader" (Resource)
-
-
-
-FIXED_SHADER = 0
-MODULE_SHADER = 1
-function Shader:__index__(name)
-	if name == "numSpotLights" then
-		return Polycore.Shader_get_numSpotLights(self.__ptr)
-	elseif name == "numAreaLights" then
-		return Polycore.Shader_get_numAreaLights(self.__ptr)
-	end
-end
-
-
-function Shader:__set_callback(name,value)
-	if name == "numSpotLights" then
-		Polycore.Shader_set_numSpotLights(self.__ptr, value)
-		return true
-	elseif name == "numAreaLights" then
-		Polycore.Shader_set_numAreaLights(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Shader:getType()
-	local retVal =  Polycore.Shader_getType(self.__ptr)
-	return retVal
-end
-
-function Shader:setName(name)
-	local retVal = Polycore.Shader_setName(self.__ptr, name)
-end
-
-function Shader:getName()
-	local retVal =  Polycore.Shader_getName(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Shader:createBinding()
-	local retVal =  Polycore.Shader_createBinding(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ShaderBinding("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Shader:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Shader(self.__ptr)
-end

+ 0 - 132
Bindings/Contents/LUA/API/Polycode/ShaderBinding.lua

@@ -1,132 +0,0 @@
-class "ShaderBinding"
-
-
-
-
-
-
-
-function ShaderBinding:ShaderBinding(...)
-	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.ShaderBinding(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function ShaderBinding:clearTexture(name)
-	local retVal = Polycore.ShaderBinding_clearTexture(self.__ptr, name)
-end
-
-function ShaderBinding:addTexture(name, texture)
-	local retVal = Polycore.ShaderBinding_addTexture(self.__ptr, name, texture.__ptr)
-end
-
-function ShaderBinding:addParam(type, name, value)
-	local retVal = Polycore.ShaderBinding_addParam(self.__ptr, type, name, value)
-end
-
-function ShaderBinding:addCubemap(name, cubemap)
-	local retVal = Polycore.ShaderBinding_addCubemap(self.__ptr, name, cubemap.__ptr)
-end
-
-function ShaderBinding:getNumLocalParams()
-	local retVal =  Polycore.ShaderBinding_getNumLocalParams(self.__ptr)
-	return retVal
-end
-
-function ShaderBinding:getLocalParam(index)
-	local retVal = Polycore.ShaderBinding_getLocalParam(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = LocalShaderParam("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ShaderBinding:getLocalParamByName(name)
-	local retVal = Polycore.ShaderBinding_getLocalParamByName(self.__ptr, name)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = LocalShaderParam("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ShaderBinding:addRenderTargetBinding(binding)
-	local retVal = Polycore.ShaderBinding_addRenderTargetBinding(self.__ptr, binding.__ptr)
-end
-
-function ShaderBinding:getNumRenderTargetBindings()
-	local retVal =  Polycore.ShaderBinding_getNumRenderTargetBindings(self.__ptr)
-	return retVal
-end
-
-function ShaderBinding:getRenderTargetBinding(index)
-	local retVal = Polycore.ShaderBinding_getRenderTargetBinding(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = RenderTargetBinding("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ShaderBinding:getNumInTargetBindings()
-	local retVal =  Polycore.ShaderBinding_getNumInTargetBindings(self.__ptr)
-	return retVal
-end
-
-function ShaderBinding:getInTargetBinding(index)
-	local retVal = Polycore.ShaderBinding_getInTargetBinding(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = RenderTargetBinding("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ShaderBinding:getNumOutTargetBindings()
-	local retVal =  Polycore.ShaderBinding_getNumOutTargetBindings(self.__ptr)
-	return retVal
-end
-
-function ShaderBinding:getOutTargetBinding(index)
-	local retVal = Polycore.ShaderBinding_getOutTargetBinding(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = RenderTargetBinding("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function ShaderBinding:addLocalParam(name, ptr)
-	local retVal = Polycore.ShaderBinding_addLocalParam(self.__ptr, name, ptr.__ptr)
-end
-
-
-
-function ShaderBinding:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_ShaderBinding(self.__ptr)
-end

+ 0 - 117
Bindings/Contents/LUA/API/Polycode/Skeleton.lua

@@ -1,117 +0,0 @@
-require "Polycode/SceneEntity"
-
-class "Skeleton" (SceneEntity)
-
-
-
-
-
-
-
-function Skeleton:Skeleton(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "SceneEntity" 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.Skeleton(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Skeleton:loadSkeleton(fileName)
-	local retVal = Polycore.Skeleton_loadSkeleton(self.__ptr, fileName)
-end
-
-function Skeleton:playAnimation(animName, once)
-	local retVal = Polycore.Skeleton_playAnimation(self.__ptr, animName, once)
-end
-
-function Skeleton:playAnimationByIndex(index, once)
-	local retVal = Polycore.Skeleton_playAnimationByIndex(self.__ptr, index, once)
-end
-
-function Skeleton:addAnimation(name, fileName)
-	local retVal = Polycore.Skeleton_addAnimation(self.__ptr, name, fileName)
-end
-
-function Skeleton:getAnimation(name)
-	local retVal = Polycore.Skeleton_getAnimation(self.__ptr, name)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SkeletonAnimation("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Skeleton:Update()
-	local retVal =  Polycore.Skeleton_Update(self.__ptr)
-end
-
-function Skeleton:getBoneByName(name)
-	local retVal = Polycore.Skeleton_getBoneByName(self.__ptr, name)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Bone("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Skeleton:bonesVisible(val)
-	local retVal = Polycore.Skeleton_bonesVisible(self.__ptr, val)
-end
-
-function Skeleton:enableBoneLabels(labelFont, size, scale, labelColor)
-	local retVal = Polycore.Skeleton_enableBoneLabels(self.__ptr, labelFont, size, scale, labelColor.__ptr)
-end
-
-function Skeleton:getNumBones()
-	local retVal =  Polycore.Skeleton_getNumBones(self.__ptr)
-	return retVal
-end
-
-function Skeleton:getBone(index)
-	local retVal = Polycore.Skeleton_getBone(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Bone("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Skeleton:getCurrentAnimation()
-	local retVal =  Polycore.Skeleton_getCurrentAnimation(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = SkeletonAnimation("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-
-
-function Skeleton:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Skeleton(self.__ptr)
-end

+ 0 - 60
Bindings/Contents/LUA/API/Polycode/SkeletonAnimation.lua

@@ -1,60 +0,0 @@
-class "SkeletonAnimation"
-
-
-
-
-
-
-
-function SkeletonAnimation:SkeletonAnimation(...)
-	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.SkeletonAnimation(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SkeletonAnimation:addBoneTrack(boneTrack)
-	local retVal = Polycore.SkeletonAnimation_addBoneTrack(self.__ptr, boneTrack.__ptr)
-end
-
-function SkeletonAnimation:getName()
-	local retVal =  Polycore.SkeletonAnimation_getName(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function SkeletonAnimation:Play(once)
-	local retVal = Polycore.SkeletonAnimation_Play(self.__ptr, once)
-end
-
-function SkeletonAnimation:Stop()
-	local retVal =  Polycore.SkeletonAnimation_Stop(self.__ptr)
-end
-
-function SkeletonAnimation:Update()
-	local retVal =  Polycore.SkeletonAnimation_Update(self.__ptr)
-end
-
-function SkeletonAnimation:setSpeed(speed)
-	local retVal = Polycore.SkeletonAnimation_setSpeed(self.__ptr, speed)
-end
-
-
-
-function SkeletonAnimation:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SkeletonAnimation(self.__ptr)
-end

+ 0 - 112
Bindings/Contents/LUA/API/Polycode/Sound.lua

@@ -1,112 +0,0 @@
-class "Sound"
-
-
-
-
-
-
-
-function Sound:Sound(...)
-	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.Sound(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Sound:Play(loop)
-	local retVal = Polycore.Sound_Play(self.__ptr, loop)
-end
-
-function Sound:Stop()
-	local retVal =  Polycore.Sound_Stop(self.__ptr)
-end
-
-function Sound:setVolume(newVolume)
-	local retVal = Polycore.Sound_setVolume(self.__ptr, newVolume)
-end
-
-function Sound:setPitch(newPitch)
-	local retVal = Polycore.Sound_setPitch(self.__ptr, newPitch)
-end
-
-function Sound:setIsPositional(isPositional)
-	local retVal = Polycore.Sound_setIsPositional(self.__ptr, isPositional)
-end
-
-function Sound:setSoundPosition(position)
-	local retVal = Polycore.Sound_setSoundPosition(self.__ptr, position.__ptr)
-end
-
-function Sound:setSoundVelocity(velocity)
-	local retVal = Polycore.Sound_setSoundVelocity(self.__ptr, velocity.__ptr)
-end
-
-function Sound:setSoundDirection(direction)
-	local retVal = Polycore.Sound_setSoundDirection(self.__ptr, direction.__ptr)
-end
-
-function Sound:setPositionalProperties(referenceDistance, maxDistance)
-	local retVal = Polycore.Sound_setPositionalProperties(self.__ptr, referenceDistance, maxDistance)
-end
-
-function Sound:loadWAV(fileName)
-	local retVal = Polycore.Sound_loadWAV(self.__ptr, fileName)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ALuint("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Sound:loadOGG(fileName)
-	local retVal = Polycore.Sound_loadOGG(self.__ptr, fileName)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ALuint("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Sound:GenSource(buffer)
-	local retVal = Polycore.Sound_GenSource(self.__ptr, buffer.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = ALuint("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Sound:checkALError(operation)
-	local retVal = Polycore.Sound_checkALError(self.__ptr, operation)
-end
-
-function Sound:soundError(err)
-	local retVal = Polycore.Sound_soundError(self.__ptr, err)
-end
-
-function Sound:soundCheck(result, err)
-	local retVal = Polycore.Sound_soundCheck(self.__ptr, result, err)
-end
-
-
-
-function Sound:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Sound(self.__ptr)
-end

+ 0 - 44
Bindings/Contents/LUA/API/Polycode/SoundManager.lua

@@ -1,44 +0,0 @@
-class "SoundManager"
-
-
-
-
-
-
-
-function SoundManager:SoundManager(...)
-	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.SoundManager(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function SoundManager:setListenerPosition(position)
-	local retVal = Polycore.SoundManager_setListenerPosition(self.__ptr, position.__ptr)
-end
-
-function SoundManager:setListenerOrientation(orientation)
-	local retVal = Polycore.SoundManager_setListenerOrientation(self.__ptr, orientation.__ptr)
-end
-
-function SoundManager:initAL()
-	local retVal =  Polycore.SoundManager_initAL(self.__ptr)
-end
-
-function SoundManager:setGlobalVolume(globalVolume)
-	local retVal = Polycore.SoundManager_setGlobalVolume(self.__ptr, globalVolume)
-end
-
-
-
-function SoundManager:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_SoundManager(self.__ptr)
-end

+ 0 - 132
Bindings/Contents/LUA/API/Polycode/String.lua

@@ -1,132 +0,0 @@
-class "String"
-
-
-
-ENCODING_UTF8 = 0
-function String:__index__(name)
-	if name == "contents" then
-		retVal = Polycore.String_get_contents(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = string("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	end
-end
-
-
-function String:__set_callback(name,value)
-	return false
-end
-
-
-function String:String(...)
-	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.String(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function String:size()
-	local retVal =  Polycore.String_size(self.__ptr)
-	return retVal
-end
-
-function String:length()
-	local retVal =  Polycore.String_length(self.__ptr)
-	return retVal
-end
-
-function String:substr(pos, n)
-	local retVal = Polycore.String_substr(self.__ptr, pos.__ptr, n.__ptr)
-	return retVal
-end
-
-function String:rfind(str, pos)
-	local retVal = Polycore.String_rfind(self.__ptr, str, pos.__ptr)
-	return retVal
-end
-
-function String:find(str, pos)
-	local retVal = Polycore.String_find(self.__ptr, str, pos.__ptr)
-	return retVal
-end
-
-function String:find_last_of(str, pos)
-	local retVal = Polycore.String_find_last_of(self.__ptr, str, pos.__ptr)
-	return retVal
-end
-
-function String:toLowerCase()
-	local retVal =  Polycore.String_toLowerCase(self.__ptr)
-	return retVal
-end
-
-function String:toUpperCase()
-	local retVal =  Polycore.String_toUpperCase(self.__ptr)
-	return retVal
-end
-
-function String:replace(what, withWhat)
-	local retVal = Polycore.String_replace(self.__ptr, what, withWhat)
-	return retVal
-end
-
-function String:NumberToString(value)
-	local retVal = Polycore.String_NumberToString(value)
-	return retVal
-end
-
-function String:IntToString(value)
-	local retVal = Polycore.String_IntToString(value)
-	return retVal
-end
-
-function String:c_str()
-	local retVal =  Polycore.String_c_str(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = char("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function String:getDataWithEncoding(encoding)
-	local retVal = Polycore.String_getDataWithEncoding(self.__ptr, encoding)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = char("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function String:getDataSizeWithEncoding(encoding)
-	local retVal = Polycore.String_getDataSizeWithEncoding(self.__ptr, encoding)
-	return retVal
-end
-
-function String:setDataWithEncoding(data, encoding)
-	local retVal = Polycore.String_setDataWithEncoding(self.__ptr, data.__ptr, encoding)
-end
-
-
-
-function String:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_String(self.__ptr)
-end

+ 0 - 102
Bindings/Contents/LUA/API/Polycode/Texture.lua

@@ -1,102 +0,0 @@
-require "Polycode/Resource"
-
-class "Texture" (Resource)
-
-
-
-function Texture:__index__(name)
-	if name == "scrollSpeedX" then
-		return Polycore.Texture_get_scrollSpeedX(self.__ptr)
-	elseif name == "scrollSpeedY" then
-		return Polycore.Texture_get_scrollSpeedY(self.__ptr)
-	elseif name == "clamp" then
-		return Polycore.Texture_get_clamp(self.__ptr)
-	end
-end
-
-
-function Texture:__set_callback(name,value)
-	if name == "scrollSpeedX" then
-		Polycore.Texture_set_scrollSpeedX(self.__ptr, value)
-		return true
-	elseif name == "scrollSpeedY" then
-		Polycore.Texture_set_scrollSpeedY(self.__ptr, value)
-		return true
-	elseif name == "clamp" then
-		Polycore.Texture_set_clamp(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Texture:setTextureData(data)
-	local retVal = Polycore.Texture_setTextureData(self.__ptr, data.__ptr)
-end
-
-function Texture:recreateFromImageData()
-	local retVal =  Polycore.Texture_recreateFromImageData(self.__ptr)
-end
-
-function Texture:getScrollOffsetX()
-	local retVal =  Polycore.Texture_getScrollOffsetX(self.__ptr)
-	return retVal
-end
-
-function Texture:getScrollOffsetY()
-	local retVal =  Polycore.Texture_getScrollOffsetY(self.__ptr)
-	return retVal
-end
-
-function Texture:setImageData(data)
-	local retVal = Polycore.Texture_setImageData(self.__ptr, data.__ptr)
-end
-
-function Texture:updateScroll(elapsed)
-	local retVal = Polycore.Texture_updateScroll(self.__ptr, elapsed)
-end
-
-function Texture:setResourcePath(newPath)
-	local retVal = Polycore.Texture_setResourcePath(self.__ptr, newPath)
-end
-
-function Texture:getResourcePath()
-	local retVal =  Polycore.Texture_getResourcePath(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = String("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Texture:getTextureData()
-	local retVal =  Polycore.Texture_getTextureData(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = char("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Texture:getWidth()
-	local retVal =  Polycore.Texture_getWidth(self.__ptr)
-	return retVal
-end
-
-function Texture:getHeight()
-	local retVal =  Polycore.Texture_getHeight(self.__ptr)
-	return retVal
-end
-
-
-
-function Texture:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Texture(self.__ptr)
-end

+ 0 - 69
Bindings/Contents/LUA/API/Polycode/Timer.lua

@@ -1,69 +0,0 @@
-require "Polycode/EventDispatcher"
-
-class "Timer" (EventDispatcher)
-
-
-
-EVENT_TRIGGER = 0
-
-
-
-
-function Timer:Timer(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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.Timer(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Timer:Pause(paused)
-	local retVal = Polycore.Timer_Pause(self.__ptr, paused)
-end
-
-function Timer:isPaused()
-	local retVal =  Polycore.Timer_isPaused(self.__ptr)
-	return retVal
-end
-
-function Timer:getTicks()
-	local retVal =  Polycore.Timer_getTicks(self.__ptr)
-	return retVal
-end
-
-function Timer:Update(ticks)
-	local retVal = Polycore.Timer_Update(self.__ptr, ticks)
-end
-
-function Timer:Reset()
-	local retVal =  Polycore.Timer_Reset(self.__ptr)
-end
-
-function Timer:hasElapsed()
-	local retVal =  Polycore.Timer_hasElapsed(self.__ptr)
-	return retVal
-end
-
-function Timer:getElapsedf()
-	local retVal =  Polycore.Timer_getElapsedf(self.__ptr)
-	return retVal
-end
-
-
-
-function Timer:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Timer(self.__ptr)
-end

+ 0 - 40
Bindings/Contents/LUA/API/Polycode/TimerManager.lua

@@ -1,40 +0,0 @@
-class "TimerManager"
-
-
-
-
-
-
-
-function TimerManager:TimerManager(...)
-	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.TimerManager(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function TimerManager:removeTimer(timer)
-	local retVal = Polycore.TimerManager_removeTimer(self.__ptr, timer.__ptr)
-end
-
-function TimerManager:addTimer(timer)
-	local retVal = Polycore.TimerManager_addTimer(self.__ptr, timer.__ptr)
-end
-
-function TimerManager:Update()
-	local retVal =  Polycore.TimerManager_Update(self.__ptr)
-end
-
-
-
-function TimerManager:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_TimerManager(self.__ptr)
-end

+ 0 - 103
Bindings/Contents/LUA/API/Polycode/Tween.lua

@@ -1,103 +0,0 @@
-require "Polycode/EventDispatcher"
-
-class "Tween" (EventDispatcher)
-
-
-
-EASE_NONE = 0
-EASE_IN_QUAD = 1
-EASE_OUT_QUAD = 2
-EASE_INOUT_QUAD = 3
-EASE_IN_CUBIC = 4
-EASE_OUT_CUBIC = 5
-EASE_INOUT_CUBIC = 6
-EASE_IN_QUART = 7
-EASE_OUT_QUART = 8
-EASE_INOUT_QUART = 9
-EASE_IN_QUINT = 10
-EASE_OUT_QUINT = 11
-EASE_INOUT_QUINT = 12
-EASE_IN_SINE = 13
-EASE_OUT_SINE = 14
-EASE_INOUT_SINE = 15
-EASE_IN_EXPO = 16
-EASE_OUT_EXPO = 17
-EASE_INOUT_EXPO = 18
-EASE_IN_CIRC = 19
-EASE_OUT_CIRC = 20
-EASE_INOUT_CIRC = 21
-EASE_IN_BOUNCE = 22
-EASE_OUT_BOUNCE = 23
-EASE_INOUT_BOUNCE = 24
-function Tween:__index__(name)
-	if name == "repeat" then
-		return Polycore.Tween_get_repeat(self.__ptr)
-	end
-end
-
-
-function Tween:__set_callback(name,value)
-	if name == "repeat" then
-		Polycore.Tween_set_repeat(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Tween:Tween(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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.Tween(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Tween:interpolateTween()
-	local retVal =  Polycore.Tween_interpolateTween(self.__ptr)
-	return retVal
-end
-
-function Tween:updateCustomTween()
-	local retVal =  Polycore.Tween_updateCustomTween(self.__ptr)
-end
-
-function Tween:doOnComplete()
-	local retVal =  Polycore.Tween_doOnComplete(self.__ptr)
-end
-
-function Tween:Pause(pauseVal)
-	local retVal = Polycore.Tween_Pause(self.__ptr, pauseVal)
-end
-
-function Tween:Reset()
-	local retVal =  Polycore.Tween_Reset(self.__ptr)
-end
-
-function Tween:isComplete()
-	local retVal =  Polycore.Tween_isComplete(self.__ptr)
-	return retVal
-end
-
-function Tween:setSpeed(speed)
-	local retVal = Polycore.Tween_setSpeed(self.__ptr, speed)
-end
-
-
-
-function Tween:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Tween(self.__ptr)
-end

+ 0 - 40
Bindings/Contents/LUA/API/Polycode/TweenManager.lua

@@ -1,40 +0,0 @@
-class "TweenManager"
-
-
-
-
-
-
-
-function TweenManager:TweenManager(...)
-	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.TweenManager(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function TweenManager:addTween(tween)
-	local retVal = Polycore.TweenManager_addTween(self.__ptr, tween.__ptr)
-end
-
-function TweenManager:removeTween(tween)
-	local retVal = Polycore.TweenManager_removeTween(self.__ptr, tween.__ptr)
-end
-
-function TweenManager:Update()
-	local retVal =  Polycore.TweenManager_Update(self.__ptr)
-end
-
-
-
-function TweenManager:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_TweenManager(self.__ptr)
-end

+ 0 - 36
Bindings/Contents/LUA/API/Polycode/Vector2.lua

@@ -1,36 +0,0 @@
-require "Polycode/Vector3"
-
-class "Vector2" (Vector3)
-
-
-
-
-
-
-
-function Vector2:Vector2(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "Vector3" 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.Vector2(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-
-
-function Vector2:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Vector2(self.__ptr)
-end

+ 0 - 85
Bindings/Contents/LUA/API/Polycode/Vector3.lua

@@ -1,85 +0,0 @@
-class "Vector3"
-
-
-
-function Vector3:__index__(name)
-	if name == "x" then
-		return Polycore.Vector3_get_x(self.__ptr)
-	elseif name == "y" then
-		return Polycore.Vector3_get_y(self.__ptr)
-	elseif name == "z" then
-		return Polycore.Vector3_get_z(self.__ptr)
-	end
-end
-
-
-function Vector3:__set_callback(name,value)
-	if name == "x" then
-		Polycore.Vector3_set_x(self.__ptr, value)
-		return true
-	elseif name == "y" then
-		Polycore.Vector3_set_y(self.__ptr, value)
-		return true
-	elseif name == "z" then
-		Polycore.Vector3_set_z(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Vector3:Vector3(...)
-	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.Vector3(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Vector3:set(x, y, z)
-	local retVal = Polycore.Vector3_set(self.__ptr, x, y, z)
-end
-
-function Vector3:distance(vec2)
-	local retVal = Polycore.Vector3_distance(self.__ptr, vec2.__ptr)
-	return retVal
-end
-
-function Vector3:length()
-	local retVal =  Polycore.Vector3_length(self.__ptr)
-	return retVal
-end
-
-function Vector3:dot(u)
-	local retVal = Polycore.Vector3_dot(self.__ptr, u.__ptr)
-	return retVal
-end
-
-function Vector3:crossProduct(vec2)
-	local retVal = Polycore.Vector3_crossProduct(self.__ptr, vec2.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Vector3:Normalize()
-	local retVal =  Polycore.Vector3_Normalize(self.__ptr)
-end
-
-
-
-function Vector3:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Vector3(self.__ptr)
-end

+ 0 - 147
Bindings/Contents/LUA/API/Polycode/Vertex.lua

@@ -1,147 +0,0 @@
-require "Polycode/Vector3"
-
-class "Vertex" (Vector3)
-
-
-
-function Vertex:__index__(name)
-	if name == "restNormal" then
-		retVal = Polycore.Vertex_get_restNormal(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "restPosition" then
-		retVal = Polycore.Vertex_get_restPosition(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "normal" then
-		retVal = Polycore.Vertex_get_normal(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "tangent" then
-		retVal = Polycore.Vertex_get_tangent(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector3("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "vertexColor" then
-		retVal = Polycore.Vertex_get_vertexColor(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Color("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "texCoord" then
-		retVal = Polycore.Vertex_get_texCoord(self.__ptr)
-		if Polycore.__ptr_lookup[retVal] ~= nil then
-			return Polycore.__ptr_lookup[retVal]
-		else
-			Polycore.__ptr_lookup[retVal] = Vector2("__skip_ptr__")
-			Polycore.__ptr_lookup[retVal].__ptr = retVal
-			return Polycore.__ptr_lookup[retVal]
-		end
-	elseif name == "useVertexColor" then
-		return Polycore.Vertex_get_useVertexColor(self.__ptr)
-	end
-end
-
-
-function Vertex:__set_callback(name,value)
-	if name == "useVertexColor" then
-		Polycore.Vertex_set_useVertexColor(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function Vertex:Vertex(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "Vector3" 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.Vertex(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Vertex:addBoneAssignment(boneID, boneWeight)
-	local retVal = Polycore.Vertex_addBoneAssignment(self.__ptr, boneID, boneWeight)
-end
-
-function Vertex:getNumBoneAssignments()
-	local retVal =  Polycore.Vertex_getNumBoneAssignments(self.__ptr)
-	return retVal
-end
-
-function Vertex:getBoneAssignment(index)
-	local retVal = Polycore.Vertex_getBoneAssignment(self.__ptr, index)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = BoneAssignment("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Vertex:normalizeWeights()
-	local retVal =  Polycore.Vertex_normalizeWeights(self.__ptr)
-end
-
-function Vertex:getTexCoord()
-	local retVal =  Polycore.Vertex_getTexCoord(self.__ptr)
-	if retVal == nil then return nil end
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = Vector2("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Vertex:setTexCoord(u, v)
-	local retVal = Polycore.Vertex_setTexCoord(self.__ptr, u, v)
-end
-
-function Vertex:setNormal(x, y, z)
-	local retVal = Polycore.Vertex_setNormal(self.__ptr, x, y, z)
-end
-
-
-
-function Vertex:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Vertex(self.__ptr)
-end

+ 0 - 50
Bindings/Contents/LUA/API/Polycode/VertexBuffer.lua

@@ -1,50 +0,0 @@
-class "VertexBuffer"
-
-
-
-function VertexBuffer:__index__(name)
-	if name == "verticesPerFace" then
-		return Polycore.VertexBuffer_get_verticesPerFace(self.__ptr)
-	elseif name == "meshType" then
-		return Polycore.VertexBuffer_get_meshType(self.__ptr)
-	end
-end
-
-
-function VertexBuffer:__set_callback(name,value)
-	if name == "verticesPerFace" then
-		Polycore.VertexBuffer_set_verticesPerFace(self.__ptr, value)
-		return true
-	elseif name == "meshType" then
-		Polycore.VertexBuffer_set_meshType(self.__ptr, value)
-		return true
-	end
-	return false
-end
-
-
-function VertexBuffer:VertexBuffer(...)
-	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.VertexBuffer(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function VertexBuffer:getVertexCount()
-	local retVal =  Polycore.VertexBuffer_getVertexCount(self.__ptr)
-	return retVal
-end
-
-
-
-function VertexBuffer:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_VertexBuffer(self.__ptr)
-end

+ 0 - 170
Bindings/Contents/LUA/API/Polycode/Win32Core.lua

@@ -1,170 +0,0 @@
-require "Polycode/Core"
-
-class "Win32Core" (Core)
-
-
-
-
-
-
-
-function Win32Core:Win32Core(...)
-	if type(arg[1]) == "table" and count(arg) == 1 then
-		if ""..arg[1]:class() == "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.Win32Core(unpack(arg))
-		Polycore.__ptr_lookup[self.__ptr] = self
-	end
-end
-
-function Win32Core:enableMouse(newval)
-	local retVal = Polycore.Win32Core_enableMouse(self.__ptr, newval)
-end
-
-function Win32Core:getTicks()
-	local retVal =  Polycore.Win32Core_getTicks(self.__ptr)
-	return retVal
-end
-
-function Win32Core:Update()
-	local retVal =  Polycore.Win32Core_Update(self.__ptr)
-	return retVal
-end
-
-function Win32Core:handleKeyDown(lParam, wParam)
-	local retVal = Polycore.Win32Core_handleKeyDown(self.__ptr, lParam.__ptr, wParam.__ptr)
-end
-
-function Win32Core:handleKeyUp(lParam, wParam)
-	local retVal = Polycore.Win32Core_handleKeyUp(self.__ptr, lParam.__ptr, wParam.__ptr)
-end
-
-function Win32Core:handleMouseMove(lParam, wParam)
-	local retVal = Polycore.Win32Core_handleMouseMove(self.__ptr, lParam.__ptr, wParam.__ptr)
-end
-
-function Win32Core:handleMouseWheel(lParam, wParam)
-	local retVal = Polycore.Win32Core_handleMouseWheel(self.__ptr, lParam.__ptr, wParam.__ptr)
-end
-
-function Win32Core:handleMouseDown(mouseCode, lParam, wParam)
-	local retVal = Polycore.Win32Core_handleMouseDown(self.__ptr, mouseCode, lParam.__ptr, wParam.__ptr)
-end
-
-function Win32Core:handleMouseUp(mouseCode, lParam, wParam)
-	local retVal = Polycore.Win32Core_handleMouseUp(self.__ptr, mouseCode, lParam.__ptr, wParam.__ptr)
-end
-
-function Win32Core:setVideoMode(xRes, yRes, fullScreen, aaLevel)
-	local retVal = Polycore.Win32Core_setVideoMode(self.__ptr, xRes, yRes, fullScreen, aaLevel)
-end
-
-function Win32Core:initContext(usePixelFormat, pixelFormat)
-	local retVal = Polycore.Win32Core_initContext(self.__ptr, usePixelFormat, pixelFormat)
-end
-
-function Win32Core:destroyContext()
-	local retVal =  Polycore.Win32Core_destroyContext(self.__ptr)
-end
-
-function Win32Core:createThread(target)
-	local retVal = Polycore.Win32Core_createThread(self.__ptr, target.__ptr)
-end
-
-function Win32Core:mapKey(lParam, wParam)
-	local retVal = Polycore.Win32Core_mapKey(self.__ptr, lParam.__ptr, wParam.__ptr)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = PolyKEY("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Win32Core:lockMutex(mutex)
-	local retVal = Polycore.Win32Core_lockMutex(self.__ptr, mutex.__ptr)
-end
-
-function Win32Core:unlockMutex(mutex)
-	local retVal = Polycore.Win32Core_unlockMutex(self.__ptr, mutex.__ptr)
-end
-
-function Win32Core:createMutex()
-	local retVal =  Polycore.Win32Core_createMutex(self.__ptr)
-	if Polycore.__ptr_lookup[retVal] ~= nil then
-		return Polycore.__ptr_lookup[retVal]
-	else
-		Polycore.__ptr_lookup[retVal] = CoreMutex("__skip_ptr__")
-		Polycore.__ptr_lookup[retVal].__ptr = retVal
-		return Polycore.__ptr_lookup[retVal]
-	end
-end
-
-function Win32Core:checkEvents()
-	local retVal =  Polycore.Win32Core_checkEvents(self.__ptr)
-end
-
-function Win32Core:initKeymap()
-	local retVal =  Polycore.Win32Core_initKeymap(self.__ptr)
-end
-
-function Win32Core:platformSleep(msecs)
-	local retVal = Polycore.Win32Core_platformSleep(self.__ptr, msecs)
-end
-
-function Win32Core:setCursor(cursorType)
-	local retVal = Polycore.Win32Core_setCursor(self.__ptr, cursorType)
-end
-
-function Win32Core:copyStringToClipboard(str)
-	local retVal = Polycore.Win32Core_copyStringToClipboard(self.__ptr, str)
-end
-
-function Win32Core:getClipboardString()
-	local retVal =  Polycore.Win32Core_getClipboardString(self.__ptr)
-	return retVal
-end
-
-function Win32Core:createFolder(folderPath)
-	local retVal = Polycore.Win32Core_createFolder(self.__ptr, folderPath)
-end
-
-function Win32Core:copyDiskItem(itemPath, destItemPath)
-	local retVal = Polycore.Win32Core_copyDiskItem(self.__ptr, itemPath, destItemPath)
-end
-
-function Win32Core:moveDiskItem(itemPath, destItemPath)
-	local retVal = Polycore.Win32Core_moveDiskItem(self.__ptr, itemPath, destItemPath)
-end
-
-function Win32Core:openFolderPicker()
-	local retVal =  Polycore.Win32Core_openFolderPicker(self.__ptr)
-	return retVal
-end
-
-function Win32Core:removeDiskItem(itemPath)
-	local retVal = Polycore.Win32Core_removeDiskItem(self.__ptr, itemPath)
-end
-
-function Win32Core:resizeTo(xRes, yRes)
-	local retVal = Polycore.Win32Core_resizeTo(self.__ptr, xRes, yRes)
-end
-
-
-
-function Win32Core:__delete()
-	Polycore.__ptr_lookup[self.__ptr] = nil
-	Polycore.delete_Win32Core(self.__ptr)
-end

BIN
Bindings/Contents/LUA/API/api.pak


+ 0 - 9
Bindings/Contents/LUA/Include/PolycodeLUA.h

@@ -1,9 +0,0 @@
-#pragma once
-#include <Polycode.h>
-extern "C" {
-#include <stdio.h>
-#include "lua.h"
-#include "lualib.h"
-#include "lauxlib.h"
-int _PolyExport luaopen_Polycode(lua_State *L);
-}

+ 0 - 11394
Bindings/Contents/LUA/Include/PolycodeLUAWrappers.h

@@ -1,11394 +0,0 @@
-#pragma once
-
-extern "C" {
-
-#include <stdio.h>
-#include "lua.h"
-#include "lualib.h"
-#include "lauxlib.h"
-} // extern "C" 
-
-#include "OSBasics.h"
-#include "PolyBasics.h"
-#include "PolyBezierCurve.h"
-#include "PolyBone.h"
-#include "PolyCamera.h"
-#include "Polycode.h"
-#include "PolyColor.h"
-#include "PolyConfig.h"
-#include "PolyCore.h"
-#include "PolyCoreInput.h"
-#include "PolyCoreServices.h"
-#include "PolyCubemap.h"
-#include "PolyData.h"
-#include "PolyEntity.h"
-#include "PolyEvent.h"
-#include "PolyEventDispatcher.h"
-#include "PolyEventHandler.h"
-#include "PolyFixedShader.h"
-#include "PolyFont.h"
-#include "PolyFontManager.h"
-#include "PolyGLCubemap.h"
-#include "PolyGlobals.h"
-#include "PolyImage.h"
-#include "PolyInputEvent.h"
-#include "PolyInputKeys.h"
-#include "PolyLabel.h"
-#include "PolyLogger.h"
-#include "PolyMaterial.h"
-#include "PolyMaterialManager.h"
-#include "PolyMatrix4.h"
-#include "PolyMesh.h"
-#include "PolyModule.h"
-#include "PolyObject.h"
-#include "PolyParticle.h"
-#include "PolyParticleEmitter.h"
-#include "PolyPerlin.h"
-#include "PolyPolygon.h"
-#include "PolyQuaternion.h"
-#include "PolyQuaternionCurve.h"
-#include "PolyRectangle.h"
-#include "PolyRenderer.h"
-#include "PolyResource.h"
-#include "PolyResourceManager.h"
-#include "PolyScene.h"
-#include "PolySceneEntity.h"
-#include "PolySceneLabel.h"
-#include "PolySceneLight.h"
-#include "PolySceneLine.h"
-#include "PolySceneManager.h"
-#include "PolySceneMesh.h"
-#include "PolyScenePrimitive.h"
-#include "PolySceneRenderTexture.h"
-#include "PolySceneSound.h"
-#include "PolyScreen.h"
-#include "PolyScreenCurve.h"
-#include "PolyScreenEntity.h"
-#include "PolyScreenEvent.h"
-#include "PolyScreenImage.h"
-#include "PolyScreenLabel.h"
-#include "PolyScreenLine.h"
-#include "PolyScreenManager.h"
-#include "PolyScreenMesh.h"
-#include "PolyScreenShape.h"
-#include "PolyScreenSound.h"
-#include "PolyScreenSprite.h"
-#include "PolyShader.h"
-#include "PolySkeleton.h"
-#include "PolySound.h"
-#include "PolySoundManager.h"
-#include "PolyString.h"
-#include "PolyTexture.h"
-#include "PolyTimer.h"
-#include "PolyTimerManager.h"
-#include "PolyTween.h"
-#include "PolyTweenManager.h"
-#include "PolyVector2.h"
-#include "PolyVector3.h"
-#include "PolyVertex.h"
-
-namespace Polycode {
-
-class LuaEventHandler : public EventHandler {
-public:
-	LuaEventHandler() : EventHandler() {}
-	~LuaEventHandler();
-	void handleEvent(Event *e) {
-		lua_rawgeti( L, LUA_REGISTRYINDEX, wrapperIndex );
-		lua_getfield(L, -1, "__handleEvent");
-		lua_rawgeti( L, LUA_REGISTRYINDEX, wrapperIndex );
-		lua_pushlightuserdata(L, e);
-		lua_call(L, 2, 0);
-	}
-	int wrapperIndex;
-	lua_State *L;
-};
-
-static int Polycore_OSFILE_get_fileType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFILE *inst = (OSFILE*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->fileType);
-	return 1;
-}
-
-static int Polycore_OSFILE_set_fileType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFILE *inst = (OSFILE*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->fileType = param;
-	return 0;
-}
-
-static int Polycore_OSFILE(lua_State *L) {
-	OSFILE *inst = new OSFILE();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_OSFILE_debugDump(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFILE *inst = (OSFILE*)lua_topointer(L, 1);
-	inst->debugDump();
-	return 0;
-}
-
-static int Polycore_delete_OSFILE(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFILE *inst = (OSFILE*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_OSFileEntry_get_name(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->name.c_str());
-	return 1;
-}
-
-static int Polycore_OSFileEntry_get_extension(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->extension.c_str());
-	return 1;
-}
-
-static int Polycore_OSFileEntry_get_nameWithoutExtension(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->nameWithoutExtension.c_str());
-	return 1;
-}
-
-static int Polycore_OSFileEntry_get_basePath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->basePath.c_str());
-	return 1;
-}
-
-static int Polycore_OSFileEntry_get_fullPath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->fullPath.c_str());
-	return 1;
-}
-
-static int Polycore_OSFileEntry_get_type(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->type);
-	return 1;
-}
-
-static int Polycore_OSFileEntry_set_name(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	String param = lua_tostring(L, 2);
-	inst->name = param;
-	return 0;
-}
-
-static int Polycore_OSFileEntry_set_extension(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	String param = lua_tostring(L, 2);
-	inst->extension = param;
-	return 0;
-}
-
-static int Polycore_OSFileEntry_set_nameWithoutExtension(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	String param = lua_tostring(L, 2);
-	inst->nameWithoutExtension = param;
-	return 0;
-}
-
-static int Polycore_OSFileEntry_set_basePath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	String param = lua_tostring(L, 2);
-	inst->basePath = param;
-	return 0;
-}
-
-static int Polycore_OSFileEntry_set_fullPath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	String param = lua_tostring(L, 2);
-	inst->fullPath = param;
-	return 0;
-}
-
-static int Polycore_OSFileEntry_set_type(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->type = param;
-	return 0;
-}
-
-static int Polycore_OSFileEntry(lua_State *L) {
-	OSFileEntry *inst = new OSFileEntry();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_delete_OSFileEntry(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSFileEntry *inst = (OSFileEntry*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_OSBasics_open(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String filename = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String opts = String(lua_tostring(L, 3));
-	void *ptrRetVal = (void*)OSBasics::open(filename, opts);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_OSBasics_close(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	OSFILE* file = (OSFILE*)lua_topointer(L, 2);
-	lua_pushinteger(L, OSBasics::close(file));
-	return 1;
-}
-
-static int Polycore_OSBasics_read(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	void* ptr = (void*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	size_t size = *(size_t*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	size_t count = *(size_t*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	OSFILE* stream = (OSFILE*)lua_topointer(L, 5);
-	lua_pushinteger(L, OSBasics::read(ptr, size, count, stream));
-	return 1;
-}
-
-static int Polycore_OSBasics_write(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	void* ptr = (void*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	size_t size = *(size_t*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	size_t count = *(size_t*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	OSFILE* stream = (OSFILE*)lua_topointer(L, 5);
-	lua_pushinteger(L, OSBasics::write(ptr, size, count, stream));
-	return 1;
-}
-
-static int Polycore_OSBasics_seek(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	OSFILE* stream = (OSFILE*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	long int offset = *(long int*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int origin = lua_tointeger(L, 4);
-	lua_pushinteger(L, OSBasics::seek(stream, offset, origin));
-	return 1;
-}
-
-static int Polycore_OSBasics_tell(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	OSFILE* stream = (OSFILE*)lua_topointer(L, 2);
-	lua_pushinteger(L, OSBasics::tell(stream));
-	return 1;
-}
-
-static int Polycore_OSBasics_isFolder(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String pathString = String(lua_tostring(L, 2));
-	lua_pushboolean(L, OSBasics::isFolder(pathString));
-	return 1;
-}
-
-static int Polycore_OSBasics_createFolder(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String pathString = String(lua_tostring(L, 2));
-	OSBasics::createFolder(pathString);
-	return 0;
-}
-
-static int Polycore_OSBasics_removeItem(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String pathString = String(lua_tostring(L, 2));
-	OSBasics::removeItem(pathString);
-	return 0;
-}
-
-static int Polycore_delete_OSBasics(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	OSBasics *inst = (OSBasics*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_BezierCurve(lua_State *L) {
-	BezierCurve *inst = new BezierCurve();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_BezierCurve_getControlPoint(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getControlPoint(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_BezierCurve_getNumControlPoints(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumControlPoints());
-	return 1;
-}
-
-static int Polycore_BezierCurve_addControlPoint(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number p1x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number p1y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number p1z = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number p2x = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	Number p2y = lua_tonumber(L, 6);
-	luaL_checktype(L, 7, LUA_TNUMBER);
-	Number p2z = lua_tonumber(L, 7);
-	luaL_checktype(L, 8, LUA_TNUMBER);
-	Number p3x = lua_tonumber(L, 8);
-	luaL_checktype(L, 9, LUA_TNUMBER);
-	Number p3y = lua_tonumber(L, 9);
-	luaL_checktype(L, 10, LUA_TNUMBER);
-	Number p3z = lua_tonumber(L, 10);
-	inst->addControlPoint(p1x, p1y, p1z, p2x, p2y, p2z, p3x, p3y, p3z);
-	return 0;
-}
-
-static int Polycore_BezierCurve_addControlPoint3dWithHandles(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number p1x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number p1y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number p1z = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number p2x = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	Number p2y = lua_tonumber(L, 6);
-	luaL_checktype(L, 7, LUA_TNUMBER);
-	Number p2z = lua_tonumber(L, 7);
-	luaL_checktype(L, 8, LUA_TNUMBER);
-	Number p3x = lua_tonumber(L, 8);
-	luaL_checktype(L, 9, LUA_TNUMBER);
-	Number p3y = lua_tonumber(L, 9);
-	luaL_checktype(L, 10, LUA_TNUMBER);
-	Number p3z = lua_tonumber(L, 10);
-	inst->addControlPoint3dWithHandles(p1x, p1y, p1z, p2x, p2y, p2z, p3x, p3y, p3z);
-	return 0;
-}
-
-static int Polycore_BezierCurve_addControlPoint3d(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	inst->addControlPoint3d(x, y, z);
-	return 0;
-}
-
-static int Polycore_BezierCurve_addControlPoint2dWithHandles(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number p1x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number p1y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number p2x = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number p2y = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	Number p3x = lua_tonumber(L, 6);
-	luaL_checktype(L, 7, LUA_TNUMBER);
-	Number p3y = lua_tonumber(L, 7);
-	inst->addControlPoint2dWithHandles(p1x, p1y, p2x, p2y, p3x, p3y);
-	return 0;
-}
-
-static int Polycore_BezierCurve_addControlPoint2d(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->addControlPoint2d(x, y);
-	return 0;
-}
-
-static int Polycore_BezierCurve_getHeightAt(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 2);
-	lua_pushnumber(L, inst->getHeightAt(a));
-	return 1;
-}
-
-static int Polycore_BezierCurve_getPointAt(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 2);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->getPointAt(a);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_BezierCurve_getPointBetween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	BezierPoint* bp1 = (BezierPoint*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	BezierPoint* bp2 = (BezierPoint*)lua_topointer(L, 4);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->getPointBetween(a, bp1, bp2);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_BezierCurve_rebuildBuffers(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	inst->rebuildBuffers();
-	return 0;
-}
-
-static int Polycore_delete_BezierCurve(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve *inst = (BezierCurve*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Bone_get_parentBoneId(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->parentBoneId);
-	return 1;
-}
-
-static int Polycore_Bone_get_boneMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->boneMatrix);
-	return 1;
-}
-
-static int Polycore_Bone_get_restMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->restMatrix);
-	return 1;
-}
-
-static int Polycore_Bone_get_baseMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->baseMatrix);
-	return 1;
-}
-
-static int Polycore_Bone_set_parentBoneId(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->parentBoneId = param;
-	return 0;
-}
-
-static int Polycore_Bone(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String boneName = String(lua_tostring(L, 1));
-	Bone *inst = new Bone(boneName);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Bone_enableBoneLabel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String labelFont = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number size = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number scale = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	Color labelColor = *(Color*)lua_topointer(L, 5);
-	inst->enableBoneLabel(labelFont, size, scale, labelColor);
-	return 0;
-}
-
-static int Polycore_Bone_getName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getName();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Bone_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	inst->Render();
-	return 0;
-}
-
-static int Polycore_Bone_setParentBone(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Bone* bone = (Bone*)lua_topointer(L, 2);
-	inst->setParentBone(bone);
-	return 0;
-}
-
-static int Polycore_Bone_addChildBone(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Bone* bone = (Bone*)lua_topointer(L, 2);
-	inst->addChildBone(bone);
-	return 0;
-}
-
-static int Polycore_Bone_getParentBone(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getParentBone();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Bone_getNumChildBones(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumChildBones());
-	return 1;
-}
-
-static int Polycore_Bone_getChildBone(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getChildBone(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Bone_getBoneMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getBoneMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Bone_setBoneMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 matrix = *(Matrix4*)lua_topointer(L, 2);
-	inst->setBoneMatrix(matrix);
-	return 0;
-}
-
-static int Polycore_Bone_getRestMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getRestMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Bone_getFullRestMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getFullRestMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Bone_getParentRestMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getParentRestMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Bone_getFinalMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getFinalMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Bone_setRestMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 matrix = *(Matrix4*)lua_topointer(L, 2);
-	inst->setRestMatrix(matrix);
-	return 0;
-}
-
-static int Polycore_Bone_setBaseMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 matrix = *(Matrix4*)lua_topointer(L, 2);
-	inst->setBaseMatrix(matrix);
-	return 0;
-}
-
-static int Polycore_Bone_getBaseMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	 Matrix4  *retInst = new  Matrix4 ();
-	*retInst = inst->getBaseMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Bone_getFullBaseMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getFullBaseMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_delete_Bone(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone *inst = (Bone*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Camera(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene* parentScene = (Scene*)lua_topointer(L, 1);
-	Camera *inst = new Camera(parentScene);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Camera_buildFrustrumPlanes(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	inst->buildFrustrumPlanes();
-	return 0;
-}
-
-static int Polycore_Camera_isSphereInFrustrum(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 pos = *(Vector3*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number fRadius = lua_tonumber(L, 3);
-	lua_pushboolean(L, inst->isSphereInFrustrum(pos, fRadius));
-	return 1;
-}
-
-static int Polycore_Camera_canSee(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneEntity* entity = (SceneEntity*)lua_topointer(L, 2);
-	lua_pushboolean(L, inst->canSee(entity));
-	return 1;
-}
-
-static int Polycore_Camera_setOrthoMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool mode = lua_toboolean(L, 2);
-	inst->setOrthoMode(mode);
-	return 0;
-}
-
-static int Polycore_Camera_getOrthoMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->getOrthoMode());
-	return 1;
-}
-
-static int Polycore_Camera_setFOV(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number fov = lua_tonumber(L, 2);
-	inst->setFOV(fov);
-	return 0;
-}
-
-static int Polycore_Camera_getFOV(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getFOV());
-	return 1;
-}
-
-static int Polycore_Camera_setParentScene(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Scene* parentScene = (Scene*)lua_topointer(L, 2);
-	inst->setParentScene(parentScene);
-	return 0;
-}
-
-static int Polycore_Camera_doCameraTransform(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	inst->doCameraTransform();
-	return 0;
-}
-
-static int Polycore_Camera_setLightDepthTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 2);
-	inst->setLightDepthTexture(texture);
-	return 0;
-}
-
-static int Polycore_Camera_hasFilterShader(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->hasFilterShader());
-	return 1;
-}
-
-static int Polycore_Camera_drawFilter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	Texture* targetTexture;
-	if(lua_islightuserdata(L, 2)) {
-		targetTexture = (Texture*)lua_topointer(L, 2);
-	} else {
-		targetTexture = NULL;
-	}
-	Number targetTextureWidth;
-	if(lua_isnumber(L, 3)) {
-		targetTextureWidth = lua_tonumber(L, 3);
-	} else {
-		targetTextureWidth = 0.0;
-	}
-	Number targetTextureHeight;
-	if(lua_isnumber(L, 4)) {
-		targetTextureHeight = lua_tonumber(L, 4);
-	} else {
-		targetTextureHeight = 0.0;
-	}
-	inst->drawFilter(targetTexture, targetTextureWidth, targetTextureHeight);
-	return 0;
-}
-
-static int Polycore_Camera_setExposureLevel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number level = lua_tonumber(L, 2);
-	inst->setExposureLevel(level);
-	return 0;
-}
-
-static int Polycore_Camera_getExposureLevel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getExposureLevel());
-	return 1;
-}
-
-static int Polycore_Camera_createPostFilter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Material* shaderMaterial = (Material*)lua_topointer(L, 2);
-	inst->createPostFilter(shaderMaterial);
-	return 0;
-}
-
-static int Polycore_Camera_setPostFilter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String shaderName = String(lua_tostring(L, 2));
-	inst->setPostFilter(shaderName);
-	return 0;
-}
-
-static int Polycore_Camera_removePostFilter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	inst->removePostFilter();
-	return 0;
-}
-
-static int Polycore_Camera_getScreenShaderMaterial(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getScreenShaderMaterial();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_Camera(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Camera *inst = (Camera*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Color_get_r(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->r);
-	return 1;
-}
-
-static int Polycore_Color_get_g(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->g);
-	return 1;
-}
-
-static int Polycore_Color_get_b(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->b);
-	return 1;
-}
-
-static int Polycore_Color_get_a(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->a);
-	return 1;
-}
-
-static int Polycore_Color_set_r(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->r = param;
-	return 0;
-}
-
-static int Polycore_Color_set_g(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->g = param;
-	return 0;
-}
-
-static int Polycore_Color_set_b(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->b = param;
-	return 0;
-}
-
-static int Polycore_Color_set_a(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->a = param;
-	return 0;
-}
-
-static int Polycore_Color(lua_State *L) {
-	Color *inst = new Color();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Color_setColorHex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int hex = lua_tointeger(L, 2);
-	inst->setColorHex(hex);
-	return 0;
-}
-
-static int Polycore_Color_setColorHexRGB(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int hex = lua_tointeger(L, 2);
-	inst->setColorHexRGB(hex);
-	return 0;
-}
-
-static int Polycore_Color_setColorHSV(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number h = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number s = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number v = lua_tonumber(L, 4);
-	inst->setColorHSV(h, s, v);
-	return 0;
-}
-
-static int Polycore_Color_setColorRGBA(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int r = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int g = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int b = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int a = lua_tointeger(L, 5);
-	inst->setColorRGBA(r, g, b, a);
-	return 0;
-}
-
-static int Polycore_Color_setColorRGB(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int r = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int g = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int b = lua_tointeger(L, 4);
-	inst->setColorRGB(r, g, b);
-	return 0;
-}
-
-static int Polycore_Color_setColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 5);
-	inst->setColor(r, g, b, a);
-	return 0;
-}
-
-static int Polycore_Color_Random(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	inst->Random();
-	return 0;
-}
-
-static int Polycore_Color_getBrightness(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getBrightness());
-	return 1;
-}
-
-static int Polycore_Color_getUint(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getUint());
-	return 1;
-}
-
-static int Polycore_delete_Color(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Color *inst = (Color*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Config(lua_State *L) {
-	Config *inst = new Config();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Config_loadConfig(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Config *inst = (Config*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String configNamespace = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 3));
-	inst->loadConfig(configNamespace, fileName);
-	return 0;
-}
-
-static int Polycore_Config_saveConfig(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Config *inst = (Config*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String configNamespace = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 3));
-	inst->saveConfig(configNamespace, fileName);
-	return 0;
-}
-
-static int Polycore_Config_getEntry(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Config *inst = (Config*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String configNamespace = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String key = String(lua_tostring(L, 3));
-	void *ptrRetVal = (void*)inst->getEntry(configNamespace, key);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Config_setStringValue(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Config *inst = (Config*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String configNamespace = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String key = String(lua_tostring(L, 3));
-	luaL_checktype(L, 4, LUA_TSTRING);
-	String value = String(lua_tostring(L, 4));
-	inst->setStringValue(configNamespace, key, value);
-	return 0;
-}
-
-static int Polycore_Config_setNumericValue(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Config *inst = (Config*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String configNamespace = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String key = String(lua_tostring(L, 3));
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number value = lua_tonumber(L, 4);
-	inst->setNumericValue(configNamespace, key, value);
-	return 0;
-}
-
-static int Polycore_Config_getNumericValue(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Config *inst = (Config*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String configNamespace = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String key = String(lua_tostring(L, 3));
-	lua_pushnumber(L, inst->getNumericValue(configNamespace, key));
-	return 1;
-}
-
-static int Polycore_Config_getStringValue(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Config *inst = (Config*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String configNamespace = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String key = String(lua_tostring(L, 3));
-	 String  *retInst = new  String ();
-	*retInst = inst->getStringValue(configNamespace, key);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_delete_Config(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Config *inst = (Config*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_PolycodeViewBase(lua_State *L) {
-	PolycodeViewBase *inst = new PolycodeViewBase();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_delete_PolycodeViewBase(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	PolycodeViewBase *inst = (PolycodeViewBase*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Core_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->Update());
-	return 1;
-}
-
-static int Polycore_Core_enableMouse(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool newval = lua_toboolean(L, 2);
-	inst->enableMouse(newval);
-	return 0;
-}
-
-static int Polycore_Core_setCursor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int cursorType = lua_tointeger(L, 2);
-	inst->setCursor(cursorType);
-	return 0;
-}
-
-static int Polycore_Core_createThread(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Threaded* target = (Threaded*)lua_topointer(L, 2);
-	inst->createThread(target);
-	return 0;
-}
-
-static int Polycore_Core_lockMutex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	CoreMutex* mutex = (CoreMutex*)lua_topointer(L, 2);
-	inst->lockMutex(mutex);
-	return 0;
-}
-
-static int Polycore_Core_unlockMutex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	CoreMutex* mutex = (CoreMutex*)lua_topointer(L, 2);
-	inst->unlockMutex(mutex);
-	return 0;
-}
-
-static int Polycore_Core_createMutex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->createMutex();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Core_copyStringToClipboard(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String str = String(lua_tostring(L, 2));
-	inst->copyStringToClipboard(str);
-	return 0;
-}
-
-static int Polycore_Core_getClipboardString(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	 String *retInst = new  String();
-	*retInst = inst->getClipboardString();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Core_getServices(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getServices();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Core_getFPS(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getFPS());
-	return 1;
-}
-
-static int Polycore_Core_Shutdown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	inst->Shutdown();
-	return 0;
-}
-
-static int Polycore_Core_isFullscreen(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->isFullscreen());
-	return 1;
-}
-
-static int Polycore_Core_getAALevel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getAALevel());
-	return 1;
-}
-
-static int Polycore_Core_getInput(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getInput();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Core_getXRes(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getXRes());
-	return 1;
-}
-
-static int Polycore_Core_getYRes(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getYRes());
-	return 1;
-}
-
-static int Polycore_Core_getNumVideoModes(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumVideoModes());
-	return 1;
-}
-
-static int Polycore_Core_createFolder(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String folderPath = String(lua_tostring(L, 2));
-	inst->createFolder(folderPath);
-	return 0;
-}
-
-static int Polycore_Core_copyDiskItem(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String itemPath = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String destItemPath = String(lua_tostring(L, 3));
-	inst->copyDiskItem(itemPath, destItemPath);
-	return 0;
-}
-
-static int Polycore_Core_moveDiskItem(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String itemPath = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String destItemPath = String(lua_tostring(L, 3));
-	inst->moveDiskItem(itemPath, destItemPath);
-	return 0;
-}
-
-static int Polycore_Core_removeDiskItem(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String itemPath = String(lua_tostring(L, 2));
-	inst->removeDiskItem(itemPath);
-	return 0;
-}
-
-static int Polycore_Core_openFolderPicker(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	 String *retInst = new  String();
-	*retInst = inst->openFolderPicker();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Core_setVideoModeIndex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int index = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool fullScreen = lua_toboolean(L, 3);
-	luaL_checktype(L, 4, LUA_TBOOLEAN);
-	bool vSync = lua_toboolean(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int aaLevel = lua_tointeger(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	int anisotropyLevel = lua_tointeger(L, 6);
-	inst->setVideoModeIndex(index, fullScreen, vSync, aaLevel, anisotropyLevel);
-	return 0;
-}
-
-static int Polycore_Core_setVideoMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int xRes = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int yRes = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TBOOLEAN);
-	bool fullScreen = lua_toboolean(L, 4);
-	luaL_checktype(L, 5, LUA_TBOOLEAN);
-	bool vSync = lua_toboolean(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	int aaLevel = lua_tointeger(L, 6);
-	luaL_checktype(L, 7, LUA_TNUMBER);
-	int anisotropyLevel = lua_tointeger(L, 7);
-	inst->setVideoMode(xRes, yRes, fullScreen, vSync, aaLevel, anisotropyLevel);
-	return 0;
-}
-
-static int Polycore_Core_resizeTo(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int xRes = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int yRes = lua_tointeger(L, 3);
-	inst->resizeTo(xRes, yRes);
-	return 0;
-}
-
-static int Polycore_Core_doSleep(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	inst->doSleep();
-	return 0;
-}
-
-static int Polycore_Core_getElapsed(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getElapsed());
-	return 1;
-}
-
-static int Polycore_Core_getTicks(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	 unsigned int *retInst = new  unsigned int();
-	*retInst = inst->getTicks();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Core_getTicksFloat(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getTicksFloat());
-	return 1;
-}
-
-static int Polycore_Core_setUserPointer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	void* ptr = (void*)lua_topointer(L, 2);
-	inst->setUserPointer(ptr);
-	return 0;
-}
-
-static int Polycore_Core_getUserPointer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getUserPointer();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_Core(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Core *inst = (Core*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_CoreInput(lua_State *L) {
-	CoreInput *inst = new CoreInput();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_CoreInput_getMousePosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	Vector2 *retInst = new Vector2();
-	*retInst = inst->getMousePosition();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_CoreInput_getKeyState(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolyKEY keyCode = *(PolyKEY*)lua_topointer(L, 2);
-	lua_pushboolean(L, inst->getKeyState(keyCode));
-	return 1;
-}
-
-static int Polycore_CoreInput_getMouseDelta(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	Vector2 *retInst = new Vector2();
-	*retInst = inst->getMouseDelta();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_CoreInput_getMouseButtonState(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int mouseButton = lua_tointeger(L, 2);
-	lua_pushboolean(L, inst->getMouseButtonState(mouseButton));
-	return 1;
-}
-
-static int Polycore_CoreInput_getNumJoysticks(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumJoysticks());
-	return 1;
-}
-
-static int Polycore_CoreInput_getJoystickInfoByIndex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getJoystickInfoByIndex(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreInput_getJoystickInfoByID(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int deviceID = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getJoystickInfoByID(deviceID);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreInput_addJoystick(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int deviceID = lua_tointeger(L, 2);
-	inst->addJoystick(deviceID);
-	return 0;
-}
-
-static int Polycore_CoreInput_removeJoystick(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int deviceID = lua_tointeger(L, 2);
-	inst->removeJoystick(deviceID);
-	return 0;
-}
-
-static int Polycore_CoreInput_joystickAxisMoved(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int axisID = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	float value = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	unsigned int deviceID = lua_tointeger(L, 4);
-	inst->joystickAxisMoved(axisID, value, deviceID);
-	return 0;
-}
-
-static int Polycore_CoreInput_joystickButtonDown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int buttonID = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	unsigned int deviceID = lua_tointeger(L, 3);
-	inst->joystickButtonDown(buttonID, deviceID);
-	return 0;
-}
-
-static int Polycore_CoreInput_joystickButtonUp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int buttonID = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	unsigned int deviceID = lua_tointeger(L, 3);
-	inst->joystickButtonUp(buttonID, deviceID);
-	return 0;
-}
-
-static int Polycore_CoreInput_mouseWheelUp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int ticks = lua_tointeger(L, 2);
-	inst->mouseWheelUp(ticks);
-	return 0;
-}
-
-static int Polycore_CoreInput_mouseWheelDown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int ticks = lua_tointeger(L, 2);
-	inst->mouseWheelDown(ticks);
-	return 0;
-}
-
-static int Polycore_CoreInput_setMouseButtonState(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int mouseButton = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool state = lua_toboolean(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int ticks = lua_tointeger(L, 4);
-	inst->setMouseButtonState(mouseButton, state, ticks);
-	return 0;
-}
-
-static int Polycore_CoreInput_setMousePosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int x = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int y = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int ticks = lua_tointeger(L, 4);
-	inst->setMousePosition(x, y, ticks);
-	return 0;
-}
-
-static int Polycore_CoreInput_setKeyState(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolyKEY keyCode = *(PolyKEY*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	wchar_t code = *(wchar_t*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TBOOLEAN);
-	bool newState = lua_toboolean(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int ticks = lua_tointeger(L, 5);
-	inst->setKeyState(keyCode, code, newState, ticks);
-	return 0;
-}
-
-static int Polycore_CoreInput_setDeltaPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int x = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int y = lua_tointeger(L, 3);
-	inst->setDeltaPosition(x, y);
-	return 0;
-}
-
-static int Polycore_CoreInput_createEvent(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event* event = (Event*)lua_topointer(L, 2);
-	void *ptrRetVal = (void*)CoreInput::createEvent(event);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_CoreInput(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreInput *inst = (CoreInput*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_CoreServices_getInstance(lua_State *L) {
-	void *ptrRetVal = (void*)CoreServices::getInstance();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_setInstance(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	CoreServices* _instance = (CoreServices*)lua_topointer(L, 2);
-	CoreServices::setInstance(_instance);
-	return 0;
-}
-
-static int Polycore_CoreServices_getRenderMutex(lua_State *L) {
-	void *ptrRetVal = (void*)CoreServices::getRenderMutex();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_setRenderer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Renderer* r_enderer = (Renderer*)lua_topointer(L, 2);
-	inst->setRenderer(r_enderer);
-	return 0;
-}
-
-static int Polycore_CoreServices_getRenderer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getRenderer();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int elapsed = lua_tointeger(L, 2);
-	inst->Update(elapsed);
-	return 0;
-}
-
-static int Polycore_CoreServices_setCore(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Core* core = (Core*)lua_topointer(L, 2);
-	inst->setCore(core);
-	return 0;
-}
-
-static int Polycore_CoreServices_getCore(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getCore();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_installModule(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolycodeModule* module = (PolycodeModule*)lua_topointer(L, 2);
-	inst->installModule(module);
-	return 0;
-}
-
-static int Polycore_CoreServices_getMaterialManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getMaterialManager();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_getScreenManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getScreenManager();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_getSceneManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getSceneManager();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_getTimerManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getTimerManager();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_getTweenManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getTweenManager();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_getResourceManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getResourceManager();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_getSoundManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getSoundManager();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_getFontManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getFontManager();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_CoreServices_getConfig(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getConfig();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_CoreServices(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	CoreServices *inst = (CoreServices*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Cubemap(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture* t0 = (Texture*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* t1 = (Texture*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Texture* t2 = (Texture*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Texture* t3 = (Texture*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	Texture* t4 = (Texture*)lua_topointer(L, 5);
-	luaL_checktype(L, 6, LUA_TLIGHTUSERDATA);
-	Texture* t5 = (Texture*)lua_topointer(L, 6);
-	Cubemap *inst = new Cubemap(t0, t1, t2, t3, t4, t5);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_delete_Cubemap(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Cubemap *inst = (Cubemap*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Data(lua_State *L) {
-	Data *inst = new Data();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Data_loadFromFile(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Data *inst = (Data*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->loadFromFile(fileName);
-	return 0;
-}
-
-static int Polycore_Data_getAsString(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Data *inst = (Data*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int encoding = lua_tointeger(L, 2);
-	lua_pushstring(L, inst->getAsString(encoding).c_str());
-	return 1;
-}
-
-static int Polycore_Data_setFromString(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Data *inst = (Data*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String str = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int encoding = lua_tointeger(L, 3);
-	inst->setFromString(str, encoding);
-	return 0;
-}
-
-static int Polycore_Data_saveToFile(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Data *inst = (Data*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	lua_pushboolean(L, inst->saveToFile(fileName));
-	return 1;
-}
-
-static int Polycore_Data_getData(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Data *inst = (Data*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getData();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_Data(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Data *inst = (Data*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Entity_get_custEntityType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->custEntityType.c_str());
-	return 1;
-}
-
-static int Polycore_Entity_get_billboardMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->billboardMode);
-	return 1;
-}
-
-static int Polycore_Entity_get_billboardRoll(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->billboardRoll);
-	return 1;
-}
-
-static int Polycore_Entity_get_alphaTest(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->alphaTest);
-	return 1;
-}
-
-static int Polycore_Entity_get_backfaceCulled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->backfaceCulled);
-	return 1;
-}
-
-static int Polycore_Entity_get_renderWireframe(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->renderWireframe);
-	return 1;
-}
-
-static int Polycore_Entity_get_color(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->color);
-	return 1;
-}
-
-static int Polycore_Entity_get_enabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->enabled);
-	return 1;
-}
-
-static int Polycore_Entity_get_visible(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->visible);
-	return 1;
-}
-
-static int Polycore_Entity_get_depthWrite(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->depthWrite);
-	return 1;
-}
-
-static int Polycore_Entity_get_depthTest(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->depthTest);
-	return 1;
-}
-
-static int Polycore_Entity_get_blendingMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->blendingMode);
-	return 1;
-}
-
-static int Polycore_Entity_get_colorAffectsChildren(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->colorAffectsChildren);
-	return 1;
-}
-
-static int Polycore_Entity_get_visibilityAffectsChildren(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->visibilityAffectsChildren);
-	return 1;
-}
-
-static int Polycore_Entity_get_depthOnly(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->depthOnly);
-	return 1;
-}
-
-static int Polycore_Entity_get_bBox(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->bBox);
-	return 1;
-}
-
-static int Polycore_Entity_get_ignoreParentMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->ignoreParentMatrix);
-	return 1;
-}
-
-static int Polycore_Entity_get_isMask(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->isMask);
-	return 1;
-}
-
-static int Polycore_Entity_set_custEntityType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	String param = lua_tostring(L, 2);
-	inst->custEntityType = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_billboardMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->billboardMode = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_billboardRoll(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->billboardRoll = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_alphaTest(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->alphaTest = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_backfaceCulled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->backfaceCulled = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_renderWireframe(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->renderWireframe = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_enabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->enabled = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_visible(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->visible = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_depthWrite(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->depthWrite = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_depthTest(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->depthTest = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_blendingMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->blendingMode = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_colorAffectsChildren(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->colorAffectsChildren = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_visibilityAffectsChildren(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->visibilityAffectsChildren = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_depthOnly(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->depthOnly = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_ignoreParentMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->ignoreParentMatrix = param;
-	return 0;
-}
-
-static int Polycore_Entity_set_isMask(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->isMask = param;
-	return 0;
-}
-
-static int Polycore_Entity(lua_State *L) {
-	Entity *inst = new Entity();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Entity_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->Render();
-	return 0;
-}
-
-static int Polycore_Entity_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_Entity_transformAndRender(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->transformAndRender();
-	return 0;
-}
-
-static int Polycore_Entity_renderChildren(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->renderChildren();
-	return 0;
-}
-
-static int Polycore_Entity_dirtyMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->dirtyMatrix(val);
-	return 0;
-}
-
-static int Polycore_Entity_rebuildTransformMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->rebuildTransformMatrix();
-	return 0;
-}
-
-static int Polycore_Entity_updateEntityMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->updateEntityMatrix();
-	return 0;
-}
-
-static int Polycore_Entity_getTransformMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	 Matrix4  *retInst = new  Matrix4 ();
-	*retInst = inst->getTransformMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_getConcatenatedMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getConcatenatedMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_getConcatenatedRollMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getConcatenatedRollMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_setTransformByMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 matrix = *(Matrix4*)lua_topointer(L, 2);
-	inst->setTransformByMatrix(matrix);
-	return 0;
-}
-
-static int Polycore_Entity_setTransformByMatrixPure(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 matrix = *(Matrix4*)lua_topointer(L, 2);
-	inst->setTransformByMatrixPure(matrix);
-	return 0;
-}
-
-static int Polycore_Entity_getLookAtMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 loc = *(Vector3*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Vector3 upVector = *(Vector3*)lua_topointer(L, 3);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getLookAtMatrix(loc, upVector);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_addEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Entity* newChild = (Entity*)lua_topointer(L, 2);
-	inst->addEntity(newChild);
-	return 0;
-}
-
-static int Polycore_Entity_addChild(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Entity* newChild = (Entity*)lua_topointer(L, 2);
-	inst->addChild(newChild);
-	return 0;
-}
-
-static int Polycore_Entity_removeChild(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Entity* entityToRemove = (Entity*)lua_topointer(L, 2);
-	inst->removeChild(entityToRemove);
-	return 0;
-}
-
-static int Polycore_Entity_setParentEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Entity* entity = (Entity*)lua_topointer(L, 2);
-	inst->setParentEntity(entity);
-	return 0;
-}
-
-static int Polycore_Entity_getParentEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getParentEntity();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Entity_getPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->getPosition();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_getCombinedPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->getCombinedPosition();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_setPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	inst->setPosition(x, y, z);
-	return 0;
-}
-
-static int Polycore_Entity_setPositionX(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	inst->setPositionX(x);
-	return 0;
-}
-
-static int Polycore_Entity_setPositionY(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 2);
-	inst->setPositionY(y);
-	return 0;
-}
-
-static int Polycore_Entity_Translate(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	inst->Translate(x, y, z);
-	return 0;
-}
-
-static int Polycore_Entity_setPositionZ(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 2);
-	inst->setPositionZ(z);
-	return 0;
-}
-
-static int Polycore_Entity_setScaleX(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	inst->setScaleX(x);
-	return 0;
-}
-
-static int Polycore_Entity_setScaleY(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 2);
-	inst->setScaleY(y);
-	return 0;
-}
-
-static int Polycore_Entity_setScaleZ(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 2);
-	inst->setScaleZ(z);
-	return 0;
-}
-
-static int Polycore_Entity_Scale(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	inst->Scale(x, y, z);
-	return 0;
-}
-
-static int Polycore_Entity_setScale(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	inst->setScale(x, y, z);
-	return 0;
-}
-
-static int Polycore_Entity_getCompoundScale(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->getCompoundScale();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_getScale(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->getScale();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_getCombinedPitch(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getCombinedPitch());
-	return 1;
-}
-
-static int Polycore_Entity_getCombinedYaw(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getCombinedYaw());
-	return 1;
-}
-
-static int Polycore_Entity_getCombinedRoll(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getCombinedRoll());
-	return 1;
-}
-
-static int Polycore_Entity_rebuildRotation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->rebuildRotation();
-	return 0;
-}
-
-static int Polycore_Entity_setPitch(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number pitch = lua_tonumber(L, 2);
-	inst->setPitch(pitch);
-	return 0;
-}
-
-static int Polycore_Entity_setYaw(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number yaw = lua_tonumber(L, 2);
-	inst->setYaw(yaw);
-	return 0;
-}
-
-static int Polycore_Entity_setRoll(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number roll = lua_tonumber(L, 2);
-	inst->setRoll(roll);
-	return 0;
-}
-
-static int Polycore_Entity_Roll(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number roll = lua_tonumber(L, 2);
-	inst->Roll(roll);
-	return 0;
-}
-
-static int Polycore_Entity_Yaw(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number yaw = lua_tonumber(L, 2);
-	inst->Yaw(yaw);
-	return 0;
-}
-
-static int Polycore_Entity_Pitch(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number pitch = lua_tonumber(L, 2);
-	inst->Pitch(pitch);
-	return 0;
-}
-
-static int Polycore_Entity_getPitch(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getPitch());
-	return 1;
-}
-
-static int Polycore_Entity_getYaw(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getYaw());
-	return 1;
-}
-
-static int Polycore_Entity_getRoll(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getRoll());
-	return 1;
-}
-
-static int Polycore_Entity_setRotationQuat(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number w = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 5);
-	inst->setRotationQuat(w, x, y, z);
-	return 0;
-}
-
-static int Polycore_Entity_getRotationQuat(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	Quaternion *retInst = new Quaternion();
-	*retInst = inst->getRotationQuat();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_lookAt(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 loc = *(Vector3*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Vector3 upVector = *(Vector3*)lua_topointer(L, 3);
-	inst->lookAt(loc, upVector);
-	return 0;
-}
-
-static int Polycore_Entity_lookAtEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Entity* entity = (Entity*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Vector3 upVector = *(Vector3*)lua_topointer(L, 3);
-	inst->lookAtEntity(entity, upVector);
-	return 0;
-}
-
-static int Polycore_Entity_getCombinedColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	Color *retInst = new Color();
-	*retInst = inst->getCombinedColor();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_setColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 5);
-	inst->setColor(r, g, b, a);
-	return 0;
-}
-
-static int Polycore_Entity_setColorInt(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int r = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int g = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int b = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int a = lua_tointeger(L, 5);
-	inst->setColorInt(r, g, b, a);
-	return 0;
-}
-
-static int Polycore_Entity_recalculateBBox(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->recalculateBBox();
-	return 0;
-}
-
-static int Polycore_Entity_getBBoxRadius(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getBBoxRadius());
-	return 1;
-}
-
-static int Polycore_Entity_getCompoundBBoxRadius(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getCompoundBBoxRadius());
-	return 1;
-}
-
-static int Polycore_Entity_setBBoxRadius(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number rad = lua_tonumber(L, 2);
-	inst->setBBoxRadius(rad);
-	return 0;
-}
-
-static int Polycore_Entity_setMask(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Entity* mask = (Entity*)lua_topointer(L, 2);
-	inst->setMask(mask);
-	return 0;
-}
-
-static int Polycore_Entity_clearMask(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->clearMask();
-	return 0;
-}
-
-static int Polycore_Entity_setBlendingMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int newBl_endingMode = lua_tointeger(L, 2);
-	inst->setBlendingMode(newBl_endingMode);
-	return 0;
-}
-
-static int Polycore_Entity_getChildCenter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->getChildCenter();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_getEntityProp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String propName = String(lua_tostring(L, 2));
-	lua_pushstring(L, inst->getEntityProp(propName).c_str());
-	return 1;
-}
-
-static int Polycore_Entity_doUpdates(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->doUpdates();
-	return 0;
-}
-
-static int Polycore_Entity_buildPositionMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	 Matrix4 *retInst = new  Matrix4();
-	*retInst = inst->buildPositionMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Entity_adjustMatrixForChildren(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	inst->adjustMatrixForChildren();
-	return 0;
-}
-
-static int Polycore_Entity_setRenderer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Renderer* r_enderer = (Renderer*)lua_topointer(L, 2);
-	inst->setRenderer(r_enderer);
-	return 0;
-}
-
-static int Polycore_delete_Entity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Entity *inst = (Entity*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Event(lua_State *L) {
-	Event *inst = new Event();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Event_getEventCode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Event *inst = (Event*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getEventCode());
-	return 1;
-}
-
-static int Polycore_Event_getDispatcher(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Event *inst = (Event*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getDispatcher();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Event_setEventCode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Event *inst = (Event*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int eventCode = lua_tointeger(L, 2);
-	inst->setEventCode(eventCode);
-	return 0;
-}
-
-static int Polycore_Event_setDispatcher(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Event *inst = (Event*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	EventDispatcher* dispatcher = (EventDispatcher*)lua_topointer(L, 2);
-	inst->setDispatcher(dispatcher);
-	return 0;
-}
-
-static int Polycore_Event_getEventType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Event *inst = (Event*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getEventType();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_delete_Event(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Event *inst = (Event*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_EventDispatcher(lua_State *L) {
-	EventDispatcher *inst = new EventDispatcher();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_EventDispatcher_removeAllHandlers(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventDispatcher *inst = (EventDispatcher*)lua_topointer(L, 1);
-	inst->removeAllHandlers();
-	return 0;
-}
-
-static int Polycore_EventDispatcher_removeAllHandlersForListener(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventDispatcher *inst = (EventDispatcher*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	void* listener = (void*)lua_topointer(L, 2);
-	inst->removeAllHandlersForListener(listener);
-	return 0;
-}
-
-static int Polycore_EventDispatcher_addEventListener(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventDispatcher *inst = (EventDispatcher*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	EventHandler* handler = (EventHandler*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int eventCode = lua_tointeger(L, 3);
-	inst->addEventListener(handler, eventCode);
-	return 0;
-}
-
-static int Polycore_EventDispatcher_removeEventListener(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventDispatcher *inst = (EventDispatcher*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	EventHandler* handler = (EventHandler*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int eventCode = lua_tointeger(L, 3);
-	inst->removeEventListener(handler, eventCode);
-	return 0;
-}
-
-static int Polycore_EventDispatcher___dispatchEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventDispatcher *inst = (EventDispatcher*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event* event = (Event*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int eventCode = lua_tointeger(L, 3);
-	inst->__dispatchEvent(event, eventCode);
-	return 0;
-}
-
-static int Polycore_EventDispatcher_dispatchEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventDispatcher *inst = (EventDispatcher*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event* event = (Event*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int eventCode = lua_tointeger(L, 3);
-	inst->dispatchEvent(event, eventCode);
-	return 0;
-}
-
-static int Polycore_EventDispatcher_dispatchEventNoDelete(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventDispatcher *inst = (EventDispatcher*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Event* event = (Event*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int eventCode = lua_tointeger(L, 3);
-	inst->dispatchEventNoDelete(event, eventCode);
-	return 0;
-}
-
-static int Polycore_delete_EventDispatcher(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventDispatcher *inst = (EventDispatcher*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_EventHandler(lua_State *L) {
-	LuaEventHandler *inst = new LuaEventHandler();
-	inst->wrapperIndex = luaL_ref(L, LUA_REGISTRYINDEX );
-	inst->L = L;
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_delete_EventHandler(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	EventHandler *inst = (EventHandler*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_FixedShader(lua_State *L) {
-	FixedShader *inst = new FixedShader();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_FixedShader_createBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FixedShader *inst = (FixedShader*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->createBinding();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_FixedShader(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FixedShader *inst = (FixedShader*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_FixedShaderBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FixedShader* shader = (FixedShader*)lua_topointer(L, 1);
-	FixedShaderBinding *inst = new FixedShaderBinding(shader);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_FixedShaderBinding_addTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FixedShaderBinding *inst = (FixedShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 3);
-	inst->addTexture(name, texture);
-	return 0;
-}
-
-static int Polycore_FixedShaderBinding_addCubemap(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FixedShaderBinding *inst = (FixedShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Cubemap* cubemap = (Cubemap*)lua_topointer(L, 3);
-	inst->addCubemap(name, cubemap);
-	return 0;
-}
-
-static int Polycore_FixedShaderBinding_addParam(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FixedShaderBinding *inst = (FixedShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String type = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String name = String(lua_tostring(L, 3));
-	luaL_checktype(L, 4, LUA_TSTRING);
-	String value = String(lua_tostring(L, 4));
-	inst->addParam(type, name, value);
-	return 0;
-}
-
-static int Polycore_FixedShaderBinding_getDiffuseTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FixedShaderBinding *inst = (FixedShaderBinding*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getDiffuseTexture();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_FixedShaderBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FixedShaderBinding *inst = (FixedShaderBinding*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Font_get_loaded(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Font *inst = (Font*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->loaded);
-	return 1;
-}
-
-static int Polycore_Font_set_loaded(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Font *inst = (Font*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->loaded = param;
-	return 0;
-}
-
-static int Polycore_Font(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	Font *inst = new Font(fileName);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Font_getFace(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Font *inst = (Font*)lua_topointer(L, 1);
-	FT_Face *retInst = new FT_Face();
-	*retInst = inst->getFace();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Font_isValid(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Font *inst = (Font*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->isValid());
-	return 1;
-}
-
-static int Polycore_delete_Font(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Font *inst = (Font*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_FontManager(lua_State *L) {
-	FontManager *inst = new FontManager();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_FontManager_registerFont(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FontManager *inst = (FontManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fontName = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String fontPath = String(lua_tostring(L, 3));
-	inst->registerFont(fontName, fontPath);
-	return 0;
-}
-
-static int Polycore_FontManager_getFontByName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FontManager *inst = (FontManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fontName = String(lua_tostring(L, 2));
-	void *ptrRetVal = (void*)inst->getFontByName(fontName);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_FontManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	FontManager *inst = (FontManager*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Image(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	Image *inst = new Image(fileName);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Image_loadImage(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	lua_pushboolean(L, inst->loadImage(fileName));
-	return 1;
-}
-
-static int Polycore_Image_loadPNG(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	lua_pushboolean(L, inst->loadPNG(fileName));
-	return 1;
-}
-
-static int Polycore_Image_createEmpty(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int width = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	unsigned int height = lua_tointeger(L, 3);
-	inst->createEmpty(width, height);
-	return 0;
-}
-
-static int Polycore_Image_fill(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 5);
-	inst->fill(r, g, b, a);
-	return 0;
-}
-
-static int Polycore_Image_setPixel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int x = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int y = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 6);
-	luaL_checktype(L, 7, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 7);
-	inst->setPixel(x, y, r, g, b, a);
-	return 0;
-}
-
-static int Polycore_Image_getPixel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int x = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int y = lua_tointeger(L, 3);
-	Color *retInst = new Color();
-	*retInst = inst->getPixel(x, y);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Image_swap(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	int* v1 = (int*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	int* v2 = (int*)lua_topointer(L, 3);
-	inst->swap(v1, v2);
-	return 0;
-}
-
-static int Polycore_Image_line(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int x0 = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int y0 = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int x1 = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int y1 = lua_tointeger(L, 5);
-	luaL_checktype(L, 6, LUA_TLIGHTUSERDATA);
-	Color col = *(Color*)lua_topointer(L, 6);
-	inst->line(x0, y0, x1, y1, col);
-	return 0;
-}
-
-static int Polycore_Image_moveTo(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int x = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int y = lua_tointeger(L, 3);
-	inst->moveTo(x, y);
-	return 0;
-}
-
-static int Polycore_Image_move(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int x = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int y = lua_tointeger(L, 3);
-	inst->move(x, y);
-	return 0;
-}
-
-static int Polycore_Image_lineTo(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int x = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int y = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Color col = *(Color*)lua_topointer(L, 4);
-	inst->lineTo(x, y, col);
-	return 0;
-}
-
-static int Polycore_Image_drawRect(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int x = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int y = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int w = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int h = lua_tointeger(L, 5);
-	luaL_checktype(L, 6, LUA_TLIGHTUSERDATA);
-	Color col = *(Color*)lua_topointer(L, 6);
-	inst->drawRect(x, y, w, h, col);
-	return 0;
-}
-
-static int Polycore_Image_perlinNoise(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int seed = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool alpha = lua_toboolean(L, 3);
-	inst->perlinNoise(seed, alpha);
-	return 0;
-}
-
-static int Polycore_Image_fastBlur(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int blurSize = lua_tointeger(L, 2);
-	inst->fastBlur(blurSize);
-	return 0;
-}
-
-static int Polycore_Image_fastBlurVert(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int blurSize = lua_tointeger(L, 2);
-	inst->fastBlurVert(blurSize);
-	return 0;
-}
-
-static int Polycore_Image_fastBlurHor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int blurSize = lua_tointeger(L, 2);
-	inst->fastBlurHor(blurSize);
-	return 0;
-}
-
-static int Polycore_Image_darken(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number amt = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool color = lua_toboolean(L, 3);
-	luaL_checktype(L, 4, LUA_TBOOLEAN);
-	bool alpha = lua_toboolean(L, 4);
-	inst->darken(amt, color, alpha);
-	return 0;
-}
-
-static int Polycore_Image_lighten(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number amt = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool color = lua_toboolean(L, 3);
-	luaL_checktype(L, 4, LUA_TBOOLEAN);
-	bool alpha = lua_toboolean(L, 4);
-	inst->lighten(amt, color, alpha);
-	return 0;
-}
-
-static int Polycore_Image_multiply(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number amt = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool color = lua_toboolean(L, 3);
-	luaL_checktype(L, 4, LUA_TBOOLEAN);
-	bool alpha = lua_toboolean(L, 4);
-	inst->multiply(amt, color, alpha);
-	return 0;
-}
-
-static int Polycore_Image_getBrushX(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getBrushX());
-	return 1;
-}
-
-static int Polycore_Image_getBrushY(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getBrushY());
-	return 1;
-}
-
-static int Polycore_Image_isLoaded(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->isLoaded());
-	return 1;
-}
-
-static int Polycore_Image_getType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getType());
-	return 1;
-}
-
-static int Polycore_Image_writeBMP(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->writeBMP(fileName);
-	return 0;
-}
-
-static int Polycore_Image_getWidth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getWidth());
-	return 1;
-}
-
-static int Polycore_Image_getHeight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getHeight());
-	return 1;
-}
-
-static int Polycore_Image_getPixels(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getPixels();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_Image(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Image *inst = (Image*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_InputEvent_get_mouseButton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->mouseButton);
-	return 1;
-}
-
-static int Polycore_InputEvent_get_mousePosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->mousePosition);
-	return 1;
-}
-
-static int Polycore_InputEvent_get_key(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->key);
-	return 1;
-}
-
-static int Polycore_InputEvent_get_charCode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->charCode);
-	return 1;
-}
-
-static int Polycore_InputEvent_get_timestamp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->timestamp);
-	return 1;
-}
-
-static int Polycore_InputEvent_get_joystickDeviceID(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->joystickDeviceID);
-	return 1;
-}
-
-static int Polycore_InputEvent_get_joystickAxisValue(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->joystickAxisValue);
-	return 1;
-}
-
-static int Polycore_InputEvent_get_joystickButton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->joystickButton);
-	return 1;
-}
-
-static int Polycore_InputEvent_get_joystickAxis(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->joystickAxis);
-	return 1;
-}
-
-static int Polycore_InputEvent_set_mouseButton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->mouseButton = param;
-	return 0;
-}
-
-static int Polycore_InputEvent_set_timestamp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->timestamp = param;
-	return 0;
-}
-
-static int Polycore_InputEvent(lua_State *L) {
-	InputEvent *inst = new InputEvent();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_InputEvent_getMousePosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	Vector2 *retInst = new Vector2();
-	*retInst = inst->getMousePosition();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_InputEvent_getKey(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	PolyKEY *retInst = new PolyKEY();
-	*retInst = inst->getKey();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_InputEvent_getMouseButton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getMouseButton());
-	return 1;
-}
-
-static int Polycore_InputEvent_keyCode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->keyCode());
-	return 1;
-}
-
-static int Polycore_delete_InputEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	InputEvent *inst = (InputEvent*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Label(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Font* font = (Font*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String text = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int size = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int antiAliasMode = lua_tointeger(L, 4);
-	Label *inst = new Label(font, text, size, antiAliasMode);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Label_setText(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Label *inst = (Label*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String text = String(lua_tostring(L, 2));
-	inst->setText(text);
-	return 0;
-}
-
-static int Polycore_Label_getText(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Label *inst = (Label*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getText();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Label_getTextWidth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Label *inst = (Label*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Font* font = (Font*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String text = String(lua_tostring(L, 3));
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int size = lua_tointeger(L, 4);
-	lua_pushinteger(L, inst->getTextWidth(font, text, size));
-	return 1;
-}
-
-static int Polycore_Label_getTextHeight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Label *inst = (Label*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Font* font = (Font*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String text = String(lua_tostring(L, 3));
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int size = lua_tointeger(L, 4);
-	lua_pushinteger(L, inst->getTextHeight(font, text, size));
-	return 1;
-}
-
-static int Polycore_Label_getFont(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Label *inst = (Label*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getFont();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_Label(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Label *inst = (Label*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Logger(lua_State *L) {
-	Logger *inst = new Logger();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Logger_log(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	char* format = (char*)lua_topointer(L, 2);
-	Logger::log(format);
-	return 0;
-}
-
-static int Polycore_Logger_logw(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	char* str = (char*)lua_topointer(L, 2);
-	Logger::logw(str);
-	return 0;
-}
-
-static int Polycore_delete_Logger(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Logger *inst = (Logger*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Material_get_specularValue(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->specularValue);
-	return 1;
-}
-
-static int Polycore_Material_get_specularStrength(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->specularStrength);
-	return 1;
-}
-
-static int Polycore_Material_get_specularColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->specularColor);
-	return 1;
-}
-
-static int Polycore_Material_get_diffuseColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->diffuseColor);
-	return 1;
-}
-
-static int Polycore_Material_set_specularValue(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->specularValue = param;
-	return 0;
-}
-
-static int Polycore_Material_set_specularStrength(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->specularStrength = param;
-	return 0;
-}
-
-static int Polycore_Material(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String name = String(lua_tostring(L, 1));
-	Material *inst = new Material(name);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Material_addShader(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Shader* shader = (Shader*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	ShaderBinding* shaderBinding = (ShaderBinding*)lua_topointer(L, 3);
-	inst->addShader(shader, shaderBinding);
-	return 0;
-}
-
-static int Polycore_Material_getNumShaders(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumShaders());
-	return 1;
-}
-
-static int Polycore_Material_addShaderRenderTarget(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	ShaderRenderTarget* newTarget = (ShaderRenderTarget*)lua_topointer(L, 2);
-	inst->addShaderRenderTarget(newTarget);
-	return 0;
-}
-
-static int Polycore_Material_getNumShaderRenderTargets(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumShaderRenderTargets());
-	return 1;
-}
-
-static int Polycore_Material_getShaderRenderTarget(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getShaderRenderTarget(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Material_getName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getName();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Material_getShader(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getShader(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Material_getShaderBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getShaderBinding(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Material_loadMaterial(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->loadMaterial(fileName);
-	return 0;
-}
-
-static int Polycore_delete_Material(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Material *inst = (Material*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_MaterialManager(lua_State *L) {
-	MaterialManager *inst = new MaterialManager();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_MaterialManager_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int elapsed = lua_tointeger(L, 2);
-	inst->Update(elapsed);
-	return 0;
-}
-
-static int Polycore_MaterialManager_createFramebufferTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int width = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int height = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int type = lua_tointeger(L, 4);
-	void *ptrRetVal = (void*)inst->createFramebufferTexture(width, height, type);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_MaterialManager_createTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int width = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int height = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	char* imageData = (char*)lua_topointer(L, 4);
-	bool clamp;
-	if(lua_isboolean(L, 5)) {
-		clamp = lua_toboolean(L, 5);
-	} else {
-		clamp = true;
-	}
-	int type;
-	if(lua_isnumber(L, 6)) {
-		type = lua_tointeger(L, 6);
-	} else {
-		type = Image :: IMAGE_RGBA;
-	}
-	void *ptrRetVal = (void*)inst->createTexture(width, height, imageData, clamp, type);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_MaterialManager_createNewTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int width = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int height = lua_tointeger(L, 3);
-	bool clamp;
-	if(lua_isboolean(L, 4)) {
-		clamp = lua_toboolean(L, 4);
-	} else {
-		clamp = true;
-	}
-	int type;
-	if(lua_isnumber(L, 5)) {
-		type = lua_tointeger(L, 5);
-	} else {
-		type = Image :: IMAGE_RGBA;
-	}
-	void *ptrRetVal = (void*)inst->createNewTexture(width, height, clamp, type);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_MaterialManager_createTextureFromImage(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Image* image = (Image*)lua_topointer(L, 2);
-	bool clamp;
-	if(lua_isboolean(L, 3)) {
-		clamp = lua_toboolean(L, 3);
-	} else {
-		clamp = true;
-	}
-	void *ptrRetVal = (void*)inst->createTextureFromImage(image, clamp);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_MaterialManager_createTextureFromFile(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	bool clamp;
-	if(lua_isboolean(L, 3)) {
-		clamp = lua_toboolean(L, 3);
-	} else {
-		clamp = true;
-	}
-	void *ptrRetVal = (void*)inst->createTextureFromFile(fileName, clamp);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_MaterialManager_deleteTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 2);
-	inst->deleteTexture(texture);
-	return 0;
-}
-
-static int Polycore_MaterialManager_reloadTextures(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	inst->reloadTextures();
-	return 0;
-}
-
-static int Polycore_MaterialManager_reloadProgramsAndTextures(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	inst->reloadProgramsAndTextures();
-	return 0;
-}
-
-static int Polycore_MaterialManager_reloadPrograms(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	inst->reloadPrograms();
-	return 0;
-}
-
-static int Polycore_MaterialManager_addShaderModule(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolycodeShaderModule* module = (PolycodeShaderModule*)lua_topointer(L, 2);
-	inst->addShaderModule(module);
-	return 0;
-}
-
-static int Polycore_MaterialManager_getTextureByResourcePath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String resourcePath = String(lua_tostring(L, 2));
-	void *ptrRetVal = (void*)inst->getTextureByResourcePath(resourcePath);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_MaterialManager_cubemapFromXMLNode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	TiXmlNode* node = (TiXmlNode*)lua_topointer(L, 2);
-	void *ptrRetVal = (void*)inst->cubemapFromXMLNode(node);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_MaterialManager_loadMaterialsFromFile(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->loadMaterialsFromFile(fileName);
-	return 0;
-}
-
-static int Polycore_MaterialManager_materialFromXMLNode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	TiXmlNode* node = (TiXmlNode*)lua_topointer(L, 2);
-	void *ptrRetVal = (void*)inst->materialFromXMLNode(node);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_MaterialManager_setShaderFromXMLNode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	TiXmlNode* node = (TiXmlNode*)lua_topointer(L, 2);
-	void *ptrRetVal = (void*)inst->setShaderFromXMLNode(node);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_MaterialManager_createShaderFromXMLNode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	TiXmlNode* node = (TiXmlNode*)lua_topointer(L, 2);
-	void *ptrRetVal = (void*)inst->createShaderFromXMLNode(node);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_MaterialManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	MaterialManager *inst = (MaterialManager*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Matrix4(lua_State *L) {
-	Matrix4 *inst = new Matrix4();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Matrix4_identity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Matrix4 *inst = (Matrix4*)lua_topointer(L, 1);
-	inst->identity();
-	return 0;
-}
-
-static int Polycore_Matrix4_rotateVector(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Matrix4 *inst = (Matrix4*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 v2 = *(Vector3*)lua_topointer(L, 2);
-	 Vector3 *retInst = new  Vector3();
-	*retInst = inst->rotateVector(v2);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Matrix4_getPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Matrix4 *inst = (Matrix4*)lua_topointer(L, 1);
-	 Vector3 *retInst = new  Vector3();
-	*retInst = inst->getPosition();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Matrix4_setPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Matrix4 *inst = (Matrix4*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	inst->setPosition(x, y, z);
-	return 0;
-}
-
-static int Polycore_Matrix4_setScale(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Matrix4 *inst = (Matrix4*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 scale = *(Vector3*)lua_topointer(L, 2);
-	inst->setScale(scale);
-	return 0;
-}
-
-static int Polycore_Matrix4_getEulerAngles(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Matrix4 *inst = (Matrix4*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Number* ax = (Number*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Number* ay = (Number*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Number* az = (Number*)lua_topointer(L, 4);
-	inst->getEulerAngles(ax, ay, az);
-	return 0;
-}
-
-static int Polycore_Matrix4_inverse(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Matrix4 *inst = (Matrix4*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->inverse();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Matrix4_inverseAffine(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Matrix4 *inst = (Matrix4*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->inverseAffine();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_delete_Matrix4(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Matrix4 *inst = (Matrix4*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_VertexBuffer_get_verticesPerFace(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	VertexBuffer *inst = (VertexBuffer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->verticesPerFace);
-	return 1;
-}
-
-static int Polycore_VertexBuffer_get_meshType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	VertexBuffer *inst = (VertexBuffer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->meshType);
-	return 1;
-}
-
-static int Polycore_VertexBuffer_set_verticesPerFace(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	VertexBuffer *inst = (VertexBuffer*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->verticesPerFace = param;
-	return 0;
-}
-
-static int Polycore_VertexBuffer_set_meshType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	VertexBuffer *inst = (VertexBuffer*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->meshType = param;
-	return 0;
-}
-
-static int Polycore_VertexBuffer(lua_State *L) {
-	VertexBuffer *inst = new VertexBuffer();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_VertexBuffer_getVertexCount(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	VertexBuffer *inst = (VertexBuffer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getVertexCount());
-	return 1;
-}
-
-static int Polycore_delete_VertexBuffer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	VertexBuffer *inst = (VertexBuffer*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Mesh_get_useVertexColors(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->useVertexColors);
-	return 1;
-}
-
-static int Polycore_Mesh_set_useVertexColors(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->useVertexColors = param;
-	return 0;
-}
-
-static int Polycore_Mesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TNUMBER);
-	int meshType = lua_tointeger(L, 1);
-	Mesh *inst = new Mesh(meshType);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Mesh_addPolygon(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Polycode::Polygon* newPolygon = (Polycode::Polygon*)lua_topointer(L, 2);
-	inst->addPolygon(newPolygon);
-	return 0;
-}
-
-static int Polycore_Mesh_loadMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->loadMesh(fileName);
-	return 0;
-}
-
-static int Polycore_Mesh_clearMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	inst->clearMesh();
-	return 0;
-}
-
-static int Polycore_Mesh_saveToFile(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->saveToFile(fileName);
-	return 0;
-}
-
-static int Polycore_Mesh_loadFromFile(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	OSFILE* inFile = (OSFILE*)lua_topointer(L, 2);
-	inst->loadFromFile(inFile);
-	return 0;
-}
-
-static int Polycore_Mesh_getPolygonCount(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getPolygonCount());
-	return 1;
-}
-
-static int Polycore_Mesh_getVertexCount(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getVertexCount());
-	return 1;
-}
-
-static int Polycore_Mesh_getPolygon(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getPolygon(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Mesh_createPlane(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number w = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number h = lua_tonumber(L, 3);
-	inst->createPlane(w, h);
-	return 0;
-}
-
-static int Polycore_Mesh_createVPlane(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number w = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number h = lua_tonumber(L, 3);
-	inst->createVPlane(w, h);
-	return 0;
-}
-
-static int Polycore_Mesh_createTorus(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number radius = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number tubeRadius = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int rSegments = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int tSegments = lua_tointeger(L, 5);
-	inst->createTorus(radius, tubeRadius, rSegments, tSegments);
-	return 0;
-}
-
-static int Polycore_Mesh_createBox(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number w = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number d = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number h = lua_tonumber(L, 4);
-	inst->createBox(w, d, h);
-	return 0;
-}
-
-static int Polycore_Mesh_createSphere(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number radius = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int numRings = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int numSegments = lua_tointeger(L, 4);
-	inst->createSphere(radius, numRings, numSegments);
-	return 0;
-}
-
-static int Polycore_Mesh_createCylinder(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number height = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number radius = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int numSegments = lua_tointeger(L, 4);
-	inst->createCylinder(height, radius, numSegments);
-	return 0;
-}
-
-static int Polycore_Mesh_createCone(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number height = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number radius = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int numSegments = lua_tointeger(L, 4);
-	inst->createCone(height, radius, numSegments);
-	return 0;
-}
-
-static int Polycore_Mesh_recenterMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->recenterMesh();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Mesh_useVertexNormals(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->useVertexNormals(val);
-	return 0;
-}
-
-static int Polycore_Mesh_setVertexBuffer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	VertexBuffer* buffer = (VertexBuffer*)lua_topointer(L, 2);
-	inst->setVertexBuffer(buffer);
-	return 0;
-}
-
-static int Polycore_Mesh_getVertexBuffer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getVertexBuffer();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Mesh_getRadius(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getRadius());
-	return 1;
-}
-
-static int Polycore_Mesh_calculateNormals(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	bool smooth;
-	if(lua_isboolean(L, 2)) {
-		smooth = lua_toboolean(L, 2);
-	} else {
-		smooth = true;
-	}
-	Number smoothAngle;
-	if(lua_isnumber(L, 3)) {
-		smoothAngle = lua_tonumber(L, 3);
-	} else {
-		smoothAngle = 90.0;
-	}
-	inst->calculateNormals(smooth, smoothAngle);
-	return 0;
-}
-
-static int Polycore_Mesh_calculateTangents(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	inst->calculateTangents();
-	return 0;
-}
-
-static int Polycore_Mesh_getMeshType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getMeshType());
-	return 1;
-}
-
-static int Polycore_Mesh_setMeshType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int newType = lua_tointeger(L, 2);
-	inst->setMeshType(newType);
-	return 0;
-}
-
-static int Polycore_Mesh_calculateBBox(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->calculateBBox();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Mesh_hasVertexBuffer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->hasVertexBuffer());
-	return 1;
-}
-
-static int Polycore_delete_Mesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Mesh *inst = (Mesh*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_PolycodeModule(lua_State *L) {
-	PolycodeModule *inst = new PolycodeModule();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_PolycodeModule_getType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	PolycodeModule *inst = (PolycodeModule*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getType());
-	return 1;
-}
-
-static int Polycore_delete_PolycodeModule(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	PolycodeModule *inst = (PolycodeModule*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ObjectEntry_get_type(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->type);
-	return 1;
-}
-
-static int Polycore_ObjectEntry_get_name(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->name.c_str());
-	return 1;
-}
-
-static int Polycore_ObjectEntry_get_NumberVal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->NumberVal);
-	return 1;
-}
-
-static int Polycore_ObjectEntry_get_intVal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->intVal);
-	return 1;
-}
-
-static int Polycore_ObjectEntry_get_stringVal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->stringVal.c_str());
-	return 1;
-}
-
-static int Polycore_ObjectEntry_get_boolVal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->boolVal);
-	return 1;
-}
-
-static int Polycore_ObjectEntry_get_length(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->length);
-	return 1;
-}
-
-static int Polycore_ObjectEntry_set_type(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->type = param;
-	return 0;
-}
-
-static int Polycore_ObjectEntry_set_name(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	String param = lua_tostring(L, 2);
-	inst->name = param;
-	return 0;
-}
-
-static int Polycore_ObjectEntry_set_NumberVal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->NumberVal = param;
-	return 0;
-}
-
-static int Polycore_ObjectEntry_set_intVal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->intVal = param;
-	return 0;
-}
-
-static int Polycore_ObjectEntry_set_stringVal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	String param = lua_tostring(L, 2);
-	inst->stringVal = param;
-	return 0;
-}
-
-static int Polycore_ObjectEntry_set_boolVal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->boolVal = param;
-	return 0;
-}
-
-static int Polycore_ObjectEntry_set_length(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->length = param;
-	return 0;
-}
-
-static int Polycore_ObjectEntry(lua_State *L) {
-	ObjectEntry *inst = new ObjectEntry();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ObjectEntry_addChild(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	void *ptrRetVal = (void*)inst->addChild(name);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_ObjectEntry(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ObjectEntry *inst = (ObjectEntry*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Particle_get_velVector(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->velVector);
-	return 1;
-}
-
-static int Polycore_Particle_get_dirVector(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->dirVector);
-	return 1;
-}
-
-static int Polycore_Particle_get_deviation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->deviation);
-	return 1;
-}
-
-static int Polycore_Particle_get_life(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->life);
-	return 1;
-}
-
-static int Polycore_Particle_get_lifespan(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->lifespan);
-	return 1;
-}
-
-static int Polycore_Particle_get_brightnessDeviation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->brightnessDeviation);
-	return 1;
-}
-
-static int Polycore_Particle_get_perlinPosX(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->perlinPosX);
-	return 1;
-}
-
-static int Polycore_Particle_get_perlinPosY(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->perlinPosY);
-	return 1;
-}
-
-static int Polycore_Particle_get_perlinPosZ(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->perlinPosZ);
-	return 1;
-}
-
-static int Polycore_Particle_set_life(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->life = param;
-	return 0;
-}
-
-static int Polycore_Particle_set_lifespan(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->lifespan = param;
-	return 0;
-}
-
-static int Polycore_Particle_set_brightnessDeviation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->brightnessDeviation = param;
-	return 0;
-}
-
-static int Polycore_Particle_set_perlinPosX(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->perlinPosX = param;
-	return 0;
-}
-
-static int Polycore_Particle_set_perlinPosY(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->perlinPosY = param;
-	return 0;
-}
-
-static int Polycore_Particle_set_perlinPosZ(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->perlinPosZ = param;
-	return 0;
-}
-
-static int Polycore_Particle(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TNUMBER);
-	int particleType = lua_tointeger(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool isScreenParticle = lua_toboolean(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Material* material = (Material*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	Mesh* particleMesh = (Mesh*)lua_topointer(L, 5);
-	Particle *inst = new Particle(particleType, isScreenParticle, material, texture, particleMesh);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Particle_Reset(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool continuious = lua_toboolean(L, 2);
-	inst->Reset(continuious);
-	return 0;
-}
-
-static int Polycore_Particle_createSceneParticle(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int particleType = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Material* material = (Material*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Mesh* particleMesh = (Mesh*)lua_topointer(L, 4);
-	inst->createSceneParticle(particleType, material, particleMesh);
-	return 0;
-}
-
-static int Polycore_Particle_createScreenParticle(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int particleType = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Mesh* particleMesh = (Mesh*)lua_topointer(L, 4);
-	inst->createScreenParticle(particleType, texture, particleMesh);
-	return 0;
-}
-
-static int Polycore_delete_Particle(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Particle *inst = (Particle*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenParticleEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String imageFile = String(lua_tostring(L, 1));
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Screen* particleParentScreen = (Screen*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int particleType = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int emitterType = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number lifespan = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	unsigned int numParticles = lua_tointeger(L, 6);
-	luaL_checktype(L, 7, LUA_TLIGHTUSERDATA);
-	Vector3 direction = *(Vector3*)lua_topointer(L, 7);
-	luaL_checktype(L, 8, LUA_TLIGHTUSERDATA);
-	Vector3 gravity = *(Vector3*)lua_topointer(L, 8);
-	luaL_checktype(L, 9, LUA_TLIGHTUSERDATA);
-	Vector3 deviation = *(Vector3*)lua_topointer(L, 9);
-	Mesh* particleMesh;
-	if(lua_islightuserdata(L, 10)) {
-		particleMesh = (Mesh*)lua_topointer(L, 10);
-	} else {
-		particleMesh = NULL;
-	}
-	ScreenMesh* emitter;
-	if(lua_islightuserdata(L, 11)) {
-		emitter = (ScreenMesh*)lua_topointer(L, 11);
-	} else {
-		emitter = NULL;
-	}
-	ScreenParticleEmitter *inst = new ScreenParticleEmitter(imageFile, particleParentScreen, particleType, emitterType, lifespan, numParticles, direction, gravity, deviation, particleMesh, emitter);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenParticleEmitter_getEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenParticleEmitter *inst = (ScreenParticleEmitter*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getEmitter();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_ScreenParticleEmitter_addParticleBody(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenParticleEmitter *inst = (ScreenParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Entity* particleBody = (Entity*)lua_topointer(L, 2);
-	inst->addParticleBody(particleBody);
-	return 0;
-}
-
-static int Polycore_ScreenParticleEmitter_getBaseMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenParticleEmitter *inst = (ScreenParticleEmitter*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getBaseMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_ScreenParticleEmitter_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenParticleEmitter *inst = (ScreenParticleEmitter*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_delete_ScreenParticleEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenParticleEmitter *inst = (ScreenParticleEmitter*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneParticleEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String materialName = String(lua_tostring(L, 1));
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Scene* particleParentScene = (Scene*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int particleType = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int emitterType = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number lifespan = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	unsigned int numParticles = lua_tointeger(L, 6);
-	luaL_checktype(L, 7, LUA_TLIGHTUSERDATA);
-	Vector3 direction = *(Vector3*)lua_topointer(L, 7);
-	luaL_checktype(L, 8, LUA_TLIGHTUSERDATA);
-	Vector3 gravity = *(Vector3*)lua_topointer(L, 8);
-	luaL_checktype(L, 9, LUA_TLIGHTUSERDATA);
-	Vector3 deviation = *(Vector3*)lua_topointer(L, 9);
-	Mesh* particleMesh;
-	if(lua_islightuserdata(L, 10)) {
-		particleMesh = (Mesh*)lua_topointer(L, 10);
-	} else {
-		particleMesh = NULL;
-	}
-	SceneMesh* emitter;
-	if(lua_islightuserdata(L, 11)) {
-		emitter = (SceneMesh*)lua_topointer(L, 11);
-	} else {
-		emitter = NULL;
-	}
-	SceneParticleEmitter *inst = new SceneParticleEmitter(materialName, particleParentScene, particleType, emitterType, lifespan, numParticles, direction, gravity, deviation, particleMesh, emitter);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneParticleEmitter_getEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneParticleEmitter *inst = (SceneParticleEmitter*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getEmitter();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_SceneParticleEmitter_respawnSceneParticles(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneParticleEmitter *inst = (SceneParticleEmitter*)lua_topointer(L, 1);
-	inst->respawnSceneParticles();
-	return 0;
-}
-
-static int Polycore_SceneParticleEmitter_addParticleBody(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneParticleEmitter *inst = (SceneParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Entity* particleBody = (Entity*)lua_topointer(L, 2);
-	inst->addParticleBody(particleBody);
-	return 0;
-}
-
-static int Polycore_SceneParticleEmitter_getBaseMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneParticleEmitter *inst = (SceneParticleEmitter*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getBaseMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_SceneParticleEmitter_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneParticleEmitter *inst = (SceneParticleEmitter*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_delete_SceneParticleEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneParticleEmitter *inst = (SceneParticleEmitter*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_get_particleSpeedMod(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->particleSpeedMod);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_brightnessDeviation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->brightnessDeviation);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_deviation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->deviation);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_dirVector(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->dirVector);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_gravVector(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->gravVector);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_lifespan(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->lifespan);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_rotationFollowsPath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->rotationFollowsPath);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_scaleCurve(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->scaleCurve);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_colorCurveR(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->colorCurveR);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_colorCurveG(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->colorCurveG);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_colorCurveB(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->colorCurveB);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_colorCurveA(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->colorCurveA);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_useColorCurves(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->useColorCurves);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_get_useScaleCurves(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->useScaleCurves);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_set_particleSpeedMod(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->particleSpeedMod = param;
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_set_brightnessDeviation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->brightnessDeviation = param;
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_set_lifespan(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->lifespan = param;
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_set_rotationFollowsPath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->rotationFollowsPath = param;
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_set_useColorCurves(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->useColorCurves = param;
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_set_useScaleCurves(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->useScaleCurves = param;
-	return 0;
-}
-
-static int Polycore_ParticleEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String imageFile = String(lua_tostring(L, 1));
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Mesh* particleMesh = (Mesh*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int particleType = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int emitterType = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number lifespan = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	unsigned int numParticles = lua_tointeger(L, 6);
-	luaL_checktype(L, 7, LUA_TLIGHTUSERDATA);
-	Vector3 direction = *(Vector3*)lua_topointer(L, 7);
-	luaL_checktype(L, 8, LUA_TLIGHTUSERDATA);
-	Vector3 gravity = *(Vector3*)lua_topointer(L, 8);
-	luaL_checktype(L, 9, LUA_TLIGHTUSERDATA);
-	Vector3 deviation = *(Vector3*)lua_topointer(L, 9);
-	ParticleEmitter *inst = new ParticleEmitter(imageFile, particleMesh, particleType, emitterType, lifespan, numParticles, direction, gravity, deviation);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_createParticles(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	inst->createParticles();
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setRotationSpeed(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number speed = lua_tonumber(L, 2);
-	inst->setRotationSpeed(speed);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setParticleBlendingMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int mode = lua_tointeger(L, 2);
-	inst->setParticleBlendingMode(mode);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setDepthWrite(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->setDepthWrite(val);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setDepthTest(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->setDepthTest(val);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setAlphaTest(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->setAlphaTest(val);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_enablePerlin(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->enablePerlin(val);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setParticleVisibility(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->setParticleVisibility(val);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setPerlinModSize(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number size = lua_tonumber(L, 2);
-	inst->setPerlinModSize(size);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setBillboardMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool mode = lua_toboolean(L, 2);
-	inst->setBillboardMode(mode);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_enableEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->enableEmitter(val);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_emitterEnabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->emitterEnabled());
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_setEmitterRadius(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 rad = *(Vector3*)lua_topointer(L, 2);
-	inst->setEmitterRadius(rad);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setAllAtOnce(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->setAllAtOnce(val);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_Trigger(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	inst->Trigger();
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_resetParticle(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Particle* particle = (Particle*)lua_topointer(L, 2);
-	inst->resetParticle(particle);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_setParticleCount(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int count = lua_tointeger(L, 2);
-	inst->setParticleCount(count);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_addParticleBody(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Entity* particleBody = (Entity*)lua_topointer(L, 2);
-	inst->addParticleBody(particleBody);
-	return 0;
-}
-
-static int Polycore_ParticleEmitter_getBaseMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	 Matrix4 *retInst = new  Matrix4();
-	*retInst = inst->getBaseMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_ParticleEmitter_updateEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	inst->updateEmitter();
-	return 0;
-}
-
-static int Polycore_delete_ParticleEmitter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ParticleEmitter *inst = (ParticleEmitter*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Perlin(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TNUMBER);
-	int octaves = lua_tointeger(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number freq = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number amp = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int seed = lua_tointeger(L, 4);
-	Perlin *inst = new Perlin(octaves, freq, amp, seed);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Perlin_Get(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Perlin *inst = (Perlin*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	lua_pushnumber(L, inst->Get(x, y));
-	return 1;
-}
-
-static int Polycore_delete_Perlin(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Perlin *inst = (Perlin*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Polygon_get_useVertexNormals(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->useVertexNormals);
-	return 1;
-}
-
-static int Polycore_Polygon_set_useVertexNormals(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->useVertexNormals = param;
-	return 0;
-}
-
-static int Polycore_Polygon(lua_State *L) {
-	Polygon *inst = new Polygon();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Polygon_getVertexCount(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getVertexCount());
-	return 1;
-}
-
-static int Polycore_Polygon_getVertex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getVertex(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Polygon_addVertex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	void *ptrRetVal = (void*)inst->addVertex(x, y, z);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Polygon_removeVertex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int index = lua_tointeger(L, 2);
-	inst->removeVertex(index);
-	return 0;
-}
-
-static int Polycore_Polygon_calculateNormal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	inst->calculateNormal();
-	return 0;
-}
-
-static int Polycore_Polygon_calculateTangent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	inst->calculateTangent();
-	return 0;
-}
-
-static int Polycore_Polygon_getFaceNormal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->getFaceNormal();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Polygon_getFaceTangent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	Vector3 *retInst = new Vector3();
-	*retInst = inst->getFaceTangent();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Polygon_getBounds2D(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	Polycode::Rectangle *retInst = new Polycode::Rectangle();
-	*retInst = inst->getBounds2D();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Polygon_setNormal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 normal = *(Vector3*)lua_topointer(L, 2);
-	inst->setNormal(normal);
-	return 0;
-}
-
-static int Polycore_Polygon_flipUVY(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	inst->flipUVY();
-	return 0;
-}
-
-static int Polycore_delete_Polygon(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Polygon *inst = (Polygon*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Quaternion_get_x(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->x);
-	return 1;
-}
-
-static int Polycore_Quaternion_get_y(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->y);
-	return 1;
-}
-
-static int Polycore_Quaternion_get_z(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->z);
-	return 1;
-}
-
-static int Polycore_Quaternion_get_w(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->w);
-	return 1;
-}
-
-static int Polycore_Quaternion_set_x(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->x = param;
-	return 0;
-}
-
-static int Polycore_Quaternion_set_y(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->y = param;
-	return 0;
-}
-
-static int Polycore_Quaternion_set_z(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->z = param;
-	return 0;
-}
-
-static int Polycore_Quaternion_set_w(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->w = param;
-	return 0;
-}
-
-static int Polycore_Quaternion(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TNUMBER);
-	Number w = lua_tonumber(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	Quaternion *inst = new Quaternion(w, x, y, z);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Quaternion_setFromMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 _mat = *(Matrix4*)lua_topointer(L, 2);
-	inst->setFromMatrix(_mat);
-	return 0;
-}
-
-static int Polycore_Quaternion_Slerp(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number fT = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Quaternion rkP = *(Quaternion*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Quaternion rkQ = *(Quaternion*)lua_topointer(L, 4);
-	bool shortestPath;
-	if(lua_isboolean(L, 5)) {
-		shortestPath = lua_toboolean(L, 5);
-	} else {
-		shortestPath = false;
-	}
-	 Quaternion *retInst = new  Quaternion();
-	*retInst = Quaternion::Slerp(fT, rkP, rkQ, shortestPath);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Quaternion_Dot(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Quaternion rkQ = *(Quaternion*)lua_topointer(L, 2);
-	lua_pushnumber(L, inst->Dot(rkQ));
-	return 1;
-}
-
-static int Polycore_Quaternion_Log(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	Quaternion *retInst = new Quaternion();
-	*retInst = inst->Log();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Quaternion_Exp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	Quaternion *retInst = new Quaternion();
-	*retInst = inst->Exp();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Quaternion_Norm(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->Norm());
-	return 1;
-}
-
-static int Polycore_Quaternion_normalize(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->normalize());
-	return 1;
-}
-
-static int Polycore_Quaternion_lookAt(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 D = *(Vector3*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Vector3 upVector = *(Vector3*)lua_topointer(L, 3);
-	inst->lookAt(D, upVector);
-	return 0;
-}
-
-static int Polycore_Quaternion_createFromMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 matrix = *(Matrix4*)lua_topointer(L, 2);
-	inst->createFromMatrix(matrix);
-	return 0;
-}
-
-static int Polycore_Quaternion_Squad(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number fT = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Quaternion rkP = *(Quaternion*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Quaternion rkA = *(Quaternion*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	Quaternion rkB = *(Quaternion*)lua_topointer(L, 5);
-	luaL_checktype(L, 6, LUA_TLIGHTUSERDATA);
-	Quaternion rkQ = *(Quaternion*)lua_topointer(L, 6);
-	luaL_checktype(L, 7, LUA_TBOOLEAN);
-	bool shortestPath = lua_toboolean(L, 7);
-	 Quaternion *retInst = new  Quaternion();
-	*retInst = Quaternion::Squad(fT, rkP, rkA, rkB, rkQ, shortestPath);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Quaternion_Inverse(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	Quaternion *retInst = new Quaternion();
-	*retInst = inst->Inverse();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Quaternion_set(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number w = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 5);
-	inst->set(w, x, y, z);
-	return 0;
-}
-
-static int Polycore_Quaternion_inverse(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	Quaternion *retInst = new Quaternion();
-	*retInst = inst->inverse();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Quaternion_InvSqrt(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	lua_pushnumber(L, inst->InvSqrt(x));
-	return 1;
-}
-
-static int Polycore_Quaternion_fromAxes(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number az = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number ay = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number ax = lua_tonumber(L, 4);
-	inst->fromAxes(az, ay, ax);
-	return 0;
-}
-
-static int Polycore_Quaternion_FromAngleAxis(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number rfAngle = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Vector3 rkAxis = *(Vector3*)lua_topointer(L, 3);
-	inst->FromAngleAxis(rfAngle, rkAxis);
-	return 0;
-}
-
-static int Polycore_Quaternion_ToAngleAxis(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number rfAngle = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Vector3 rkAxis = *(Vector3*)lua_topointer(L, 3);
-	inst->ToAngleAxis(rfAngle, rkAxis);
-	return 0;
-}
-
-static int Polycore_Quaternion_createFromAxisAngle(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number degrees = lua_tonumber(L, 5);
-	inst->createFromAxisAngle(x, y, z, degrees);
-	return 0;
-}
-
-static int Polycore_Quaternion_createMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->createMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_delete_Quaternion(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion *inst = (Quaternion*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_QuaternionCurve(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve* wCurve = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	BezierCurve* xCurve = (BezierCurve*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	BezierCurve* yCurve = (BezierCurve*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	BezierCurve* zCurve = (BezierCurve*)lua_topointer(L, 4);
-	QuaternionCurve *inst = new QuaternionCurve(wCurve, xCurve, yCurve, zCurve);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_QuaternionCurve_interpolate(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	QuaternionCurve *inst = (QuaternionCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number t = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool useShortestPath = lua_toboolean(L, 3);
-	Quaternion *retInst = new Quaternion();
-	*retInst = inst->interpolate(t, useShortestPath);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_QuaternionCurve_generatePointsFromCurves(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	QuaternionCurve *inst = (QuaternionCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	BezierCurve* wCurve = (BezierCurve*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	BezierCurve* xCurve = (BezierCurve*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	BezierCurve* yCurve = (BezierCurve*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	BezierCurve* zCurve = (BezierCurve*)lua_topointer(L, 5);
-	inst->generatePointsFromCurves(wCurve, xCurve, yCurve, zCurve);
-	return 0;
-}
-
-static int Polycore_QuaternionCurve_recalcTangents(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	QuaternionCurve *inst = (QuaternionCurve*)lua_topointer(L, 1);
-	inst->recalcTangents();
-	return 0;
-}
-
-static int Polycore_delete_QuaternionCurve(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	QuaternionCurve *inst = (QuaternionCurve*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Rectangle_get_x(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->x);
-	return 1;
-}
-
-static int Polycore_Rectangle_get_y(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->y);
-	return 1;
-}
-
-static int Polycore_Rectangle_get_w(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->w);
-	return 1;
-}
-
-static int Polycore_Rectangle_get_h(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->h);
-	return 1;
-}
-
-static int Polycore_Rectangle_set_x(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->x = param;
-	return 0;
-}
-
-static int Polycore_Rectangle_set_y(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->y = param;
-	return 0;
-}
-
-static int Polycore_Rectangle_set_w(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->w = param;
-	return 0;
-}
-
-static int Polycore_Rectangle_set_h(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->h = param;
-	return 0;
-}
-
-static int Polycore_Rectangle(lua_State *L) {
-	Rectangle *inst = new Rectangle();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Rectangle_setRect(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number w = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number h = lua_tonumber(L, 5);
-	inst->setRect(x, y, w, h);
-	return 0;
-}
-
-static int Polycore_delete_Rectangle(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Rectangle *inst = (Rectangle*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Renderer_get_ambientColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->ambientColor);
-	return 1;
-}
-
-static int Polycore_Renderer_get_clearColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->clearColor);
-	return 1;
-}
-
-static int Polycore_Renderer_get_exposureLevel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->exposureLevel);
-	return 1;
-}
-
-static int Polycore_Renderer_get_cameraPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->cameraPosition);
-	return 1;
-}
-
-static int Polycore_Renderer_set_exposureLevel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->exposureLevel = param;
-	return 0;
-}
-
-static int Polycore_Renderer_Resize(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int xRes = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int yRes = lua_tointeger(L, 3);
-	inst->Resize(xRes, yRes);
-	return 0;
-}
-
-static int Polycore_Renderer_BeginRender(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->BeginRender();
-	return 0;
-}
-
-static int Polycore_Renderer_EndRender(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->EndRender();
-	return 0;
-}
-
-static int Polycore_Renderer_createCubemap(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* t0 = (Texture*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Texture* t1 = (Texture*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Texture* t2 = (Texture*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	Texture* t3 = (Texture*)lua_topointer(L, 5);
-	luaL_checktype(L, 6, LUA_TLIGHTUSERDATA);
-	Texture* t4 = (Texture*)lua_topointer(L, 6);
-	luaL_checktype(L, 7, LUA_TLIGHTUSERDATA);
-	Texture* t5 = (Texture*)lua_topointer(L, 7);
-	void *ptrRetVal = (void*)inst->createCubemap(t0, t1, t2, t3, t4, t5);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Renderer_createTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int width = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	unsigned int height = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	char* textureData = (char*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TBOOLEAN);
-	bool clamp = lua_toboolean(L, 5);
-	int type;
-	if(lua_isnumber(L, 6)) {
-		type = lua_tointeger(L, 6);
-	} else {
-		type = Image :: IMAGE_RGBA;
-	}
-	void *ptrRetVal = (void*)inst->createTexture(width, height, textureData, clamp, type);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Renderer_destroyTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 2);
-	inst->destroyTexture(texture);
-	return 0;
-}
-
-static int Polycore_Renderer_createRenderTextures(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture** colorBuffer = (Texture**)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Texture** depthBuffer = (Texture**)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int width = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int height = lua_tointeger(L, 5);
-	inst->createRenderTextures(colorBuffer, depthBuffer, width, height);
-	return 0;
-}
-
-static int Polycore_Renderer_createFramebufferTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int width = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	unsigned int height = lua_tointeger(L, 3);
-	void *ptrRetVal = (void*)inst->createFramebufferTexture(width, height);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Renderer_bindFrameBufferTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 2);
-	inst->bindFrameBufferTexture(texture);
-	return 0;
-}
-
-static int Polycore_Renderer_unbindFramebuffers(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->unbindFramebuffers();
-	return 0;
-}
-
-static int Polycore_Renderer_renderToTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* targetTexture = (Texture*)lua_topointer(L, 2);
-	inst->renderToTexture(targetTexture);
-	return 0;
-}
-
-static int Polycore_Renderer_renderZBufferToTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* targetTexture = (Texture*)lua_topointer(L, 2);
-	inst->renderZBufferToTexture(targetTexture);
-	return 0;
-}
-
-static int Polycore_Renderer_setFOV(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number fov = lua_tonumber(L, 2);
-	inst->setFOV(fov);
-	return 0;
-}
-
-static int Polycore_Renderer_setViewportSize(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int w = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int h = lua_tointeger(L, 3);
-	inst->setViewportSize(w, h);
-	return 0;
-}
-
-static int Polycore_Renderer_setViewportSizeAndFOV(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int w = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int h = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number fov = lua_tonumber(L, 4);
-	inst->setViewportSizeAndFOV(w, h, fov);
-	return 0;
-}
-
-static int Polycore_Renderer_resetViewport(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->resetViewport();
-	return 0;
-}
-
-static int Polycore_Renderer_loadIdentity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->loadIdentity();
-	return 0;
-}
-
-static int Polycore_Renderer_setOrthoMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	Number xSize;
-	if(lua_isnumber(L, 2)) {
-		xSize = lua_tonumber(L, 2);
-	} else {
-		xSize = 0.0f;
-	}
-	Number ySize;
-	if(lua_isnumber(L, 3)) {
-		ySize = lua_tonumber(L, 3);
-	} else {
-		ySize = 0.0f;
-	}
-	inst->setOrthoMode(xSize, ySize);
-	return 0;
-}
-
-static int Polycore_Renderer__setOrthoMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->_setOrthoMode();
-	return 0;
-}
-
-static int Polycore_Renderer_setPerspectiveMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->setPerspectiveMode();
-	return 0;
-}
-
-static int Polycore_Renderer_setTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 2);
-	inst->setTexture(texture);
-	return 0;
-}
-
-static int Polycore_Renderer_enableBackfaceCulling(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->enableBackfaceCulling(val);
-	return 0;
-}
-
-static int Polycore_Renderer_setClearColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	inst->setClearColor(r, g, b);
-	return 0;
-}
-
-static int Polycore_Renderer_setAmbientColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	inst->setAmbientColor(r, g, b);
-	return 0;
-}
-
-static int Polycore_Renderer_clearScreen(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->clearScreen();
-	return 0;
-}
-
-static int Polycore_Renderer_translate2D(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->translate2D(x, y);
-	return 0;
-}
-
-static int Polycore_Renderer_rotate2D(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number angle = lua_tonumber(L, 2);
-	inst->rotate2D(angle);
-	return 0;
-}
-
-static int Polycore_Renderer_scale2D(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector2* scale = (Vector2*)lua_topointer(L, 2);
-	inst->scale2D(scale);
-	return 0;
-}
-
-static int Polycore_Renderer_setVertexColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 5);
-	inst->setVertexColor(r, g, b, a);
-	return 0;
-}
-
-static int Polycore_Renderer_pushDataArrayForMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Mesh* mesh = (Mesh*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int arrayType = lua_tointeger(L, 3);
-	inst->pushDataArrayForMesh(mesh, arrayType);
-	return 0;
-}
-
-static int Polycore_Renderer_pushRenderDataArray(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	RenderDataArray* array = (RenderDataArray*)lua_topointer(L, 2);
-	inst->pushRenderDataArray(array);
-	return 0;
-}
-
-static int Polycore_Renderer_createRenderDataArrayForMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Mesh* mesh = (Mesh*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int arrayType = lua_tointeger(L, 3);
-	void *ptrRetVal = (void*)inst->createRenderDataArrayForMesh(mesh, arrayType);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Renderer_createRenderDataArray(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int arrayType = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->createRenderDataArray(arrayType);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Renderer_setRenderArrayData(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	RenderDataArray* array = (RenderDataArray*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Number* arrayData = (Number*)lua_topointer(L, 3);
-	inst->setRenderArrayData(array, arrayData);
-	return 0;
-}
-
-static int Polycore_Renderer_drawArrays(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int drawType = lua_tointeger(L, 2);
-	inst->drawArrays(drawType);
-	return 0;
-}
-
-static int Polycore_Renderer_translate3D(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3* position = (Vector3*)lua_topointer(L, 2);
-	inst->translate3D(position);
-	return 0;
-}
-
-static int Polycore_Renderer_scale3D(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3* scale = (Vector3*)lua_topointer(L, 2);
-	inst->scale3D(scale);
-	return 0;
-}
-
-static int Polycore_Renderer_pushMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->pushMatrix();
-	return 0;
-}
-
-static int Polycore_Renderer_popMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->popMatrix();
-	return 0;
-}
-
-static int Polycore_Renderer_setLineSmooth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->setLineSmooth(val);
-	return 0;
-}
-
-static int Polycore_Renderer_setLineSize(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number lineSize = lua_tonumber(L, 2);
-	inst->setLineSize(lineSize);
-	return 0;
-}
-
-static int Polycore_Renderer_enableLighting(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool enable = lua_toboolean(L, 2);
-	inst->enableLighting(enable);
-	return 0;
-}
-
-static int Polycore_Renderer_enableFog(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool enable = lua_toboolean(L, 2);
-	inst->enableFog(enable);
-	return 0;
-}
-
-static int Polycore_Renderer_setFogProperties(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int fogMode = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Color color = *(Color*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number density = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number startDepth = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	Number _endDepth = lua_tonumber(L, 6);
-	inst->setFogProperties(fogMode, color, density, startDepth, _endDepth);
-	return 0;
-}
-
-static int Polycore_Renderer_multModelviewMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 m = *(Matrix4*)lua_topointer(L, 2);
-	inst->multModelviewMatrix(m);
-	return 0;
-}
-
-static int Polycore_Renderer_setModelviewMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 m = *(Matrix4*)lua_topointer(L, 2);
-	inst->setModelviewMatrix(m);
-	return 0;
-}
-
-static int Polycore_Renderer_setCurrentModelMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 m = *(Matrix4*)lua_topointer(L, 2);
-	inst->setCurrentModelMatrix(m);
-	return 0;
-}
-
-static int Polycore_Renderer_getCurrentModelMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->getCurrentModelMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Renderer_setBlendingMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int bl_endingMode = lua_tointeger(L, 2);
-	inst->setBlendingMode(bl_endingMode);
-	return 0;
-}
-
-static int Polycore_Renderer_applyMaterial(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Material* material = (Material*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	ShaderBinding* localOptions = (ShaderBinding*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	unsigned int shaderIndex = lua_tointeger(L, 4);
-	inst->applyMaterial(material, localOptions, shaderIndex);
-	return 0;
-}
-
-static int Polycore_Renderer_clearShader(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->clearShader();
-	return 0;
-}
-
-static int Polycore_Renderer_setDepthFunction(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int depthFunction = lua_tointeger(L, 2);
-	inst->setDepthFunction(depthFunction);
-	return 0;
-}
-
-static int Polycore_Renderer_createVertexBufferForMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Mesh* mesh = (Mesh*)lua_topointer(L, 2);
-	inst->createVertexBufferForMesh(mesh);
-	return 0;
-}
-
-static int Polycore_Renderer_drawVertexBuffer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	VertexBuffer* buffer = (VertexBuffer*)lua_topointer(L, 2);
-	inst->drawVertexBuffer(buffer);
-	return 0;
-}
-
-static int Polycore_Renderer_setRenderMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int newR_enderMode = lua_tointeger(L, 2);
-	inst->setRenderMode(newR_enderMode);
-	return 0;
-}
-
-static int Polycore_Renderer_getRenderMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getRenderMode());
-	return 1;
-}
-
-static int Polycore_Renderer_enableDepthTest(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->enableDepthTest(val);
-	return 0;
-}
-
-static int Polycore_Renderer_enableDepthWrite(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->enableDepthWrite(val);
-	return 0;
-}
-
-static int Polycore_Renderer_billboardMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->billboardMatrix();
-	return 0;
-}
-
-static int Polycore_Renderer_billboardMatrixWithScale(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 scale = *(Vector3*)lua_topointer(L, 2);
-	inst->billboardMatrixWithScale(scale);
-	return 0;
-}
-
-static int Polycore_Renderer_setTextureFilteringMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int mode = lua_tointeger(L, 2);
-	inst->setTextureFilteringMode(mode);
-	return 0;
-}
-
-static int Polycore_Renderer_setClippingPlanes(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number near = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number far = lua_tonumber(L, 3);
-	inst->setClippingPlanes(near, far);
-	return 0;
-}
-
-static int Polycore_Renderer_enableAlphaTest(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->enableAlphaTest(val);
-	return 0;
-}
-
-static int Polycore_Renderer_clearBuffer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool colorBuffer = lua_toboolean(L, 2);
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool depthBuffer = lua_toboolean(L, 3);
-	inst->clearBuffer(colorBuffer, depthBuffer);
-	return 0;
-}
-
-static int Polycore_Renderer_drawToColorBuffer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->drawToColorBuffer(val);
-	return 0;
-}
-
-static int Polycore_Renderer_getCameraMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	 Matrix4  *retInst = new  Matrix4 ();
-	*retInst = inst->getCameraMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Renderer_setCameraMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Matrix4 matrix = *(Matrix4*)lua_topointer(L, 2);
-	inst->setCameraMatrix(matrix);
-	return 0;
-}
-
-static int Polycore_Renderer_setCameraPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 pos = *(Vector3*)lua_topointer(L, 2);
-	inst->setCameraPosition(pos);
-	return 0;
-}
-
-static int Polycore_Renderer_drawScreenQuad(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number qx = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number qy = lua_tonumber(L, 3);
-	inst->drawScreenQuad(qx, qy);
-	return 0;
-}
-
-static int Polycore_Renderer_getXRes(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getXRes());
-	return 1;
-}
-
-static int Polycore_Renderer_getYRes(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getYRes());
-	return 1;
-}
-
-static int Polycore_Renderer_setAnisotropyAmount(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number amount = lua_tonumber(L, 2);
-	inst->setAnisotropyAmount(amount);
-	return 0;
-}
-
-static int Polycore_Renderer_getAnisotropyAmount(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getAnisotropyAmount());
-	return 1;
-}
-
-static int Polycore_Renderer_cullFrontFaces(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->cullFrontFaces(val);
-	return 0;
-}
-
-static int Polycore_Renderer_clearLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->clearLights();
-	return 0;
-}
-
-static int Polycore_Renderer_addLight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int lightImportance = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Vector3 position = *(Vector3*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Vector3 direction = *(Vector3*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int type = lua_tointeger(L, 5);
-	luaL_checktype(L, 6, LUA_TLIGHTUSERDATA);
-	Color color = *(Color*)lua_topointer(L, 6);
-	luaL_checktype(L, 7, LUA_TLIGHTUSERDATA);
-	Color specularColor = *(Color*)lua_topointer(L, 7);
-	luaL_checktype(L, 8, LUA_TNUMBER);
-	Number constantAttenuation = lua_tonumber(L, 8);
-	luaL_checktype(L, 9, LUA_TNUMBER);
-	Number linearAttenuation = lua_tonumber(L, 9);
-	luaL_checktype(L, 10, LUA_TNUMBER);
-	Number quadraticAttenuation = lua_tonumber(L, 10);
-	luaL_checktype(L, 11, LUA_TNUMBER);
-	Number intensity = lua_tonumber(L, 11);
-	luaL_checktype(L, 12, LUA_TNUMBER);
-	Number spotlightCutoff = lua_tonumber(L, 12);
-	luaL_checktype(L, 13, LUA_TNUMBER);
-	Number spotlightExponent = lua_tonumber(L, 13);
-	luaL_checktype(L, 14, LUA_TBOOLEAN);
-	bool shadowsEnabled = lua_toboolean(L, 14);
-	luaL_checktype(L, 15, LUA_TLIGHTUSERDATA);
-	Matrix4* textureMatrix = (Matrix4*)lua_topointer(L, 15);
-	luaL_checktype(L, 16, LUA_TLIGHTUSERDATA);
-	Texture* shadowMapTexture = (Texture*)lua_topointer(L, 16);
-	inst->addLight(lightImportance, position, direction, type, color, specularColor, constantAttenuation, linearAttenuation, quadraticAttenuation, intensity, spotlightCutoff, spotlightExponent, shadowsEnabled, textureMatrix, shadowMapTexture);
-	return 0;
-}
-
-static int Polycore_Renderer_setExposureLevel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number level = lua_tonumber(L, 2);
-	inst->setExposureLevel(level);
-	return 0;
-}
-
-static int Polycore_Renderer_rayTriangleIntersect(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 ray_origin = *(Vector3*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Vector3 ray_direction = *(Vector3*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Vector3 vert0 = *(Vector3*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	Vector3 vert1 = *(Vector3*)lua_topointer(L, 5);
-	luaL_checktype(L, 6, LUA_TLIGHTUSERDATA);
-	Vector3 vert2 = *(Vector3*)lua_topointer(L, 6);
-	luaL_checktype(L, 7, LUA_TLIGHTUSERDATA);
-	Vector3* hitPoint = (Vector3*)lua_topointer(L, 7);
-	lua_pushboolean(L, inst->rayTriangleIntersect(ray_origin, ray_direction, vert0, vert1, vert2, hitPoint));
-	return 1;
-}
-
-static int Polycore_Renderer_projectRayFrom2DCoordinate(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	 Vector3 *retInst = new  Vector3();
-	*retInst = inst->projectRayFrom2DCoordinate(x, y);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Renderer_enableShaders(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool flag = lua_toboolean(L, 2);
-	inst->enableShaders(flag);
-	return 0;
-}
-
-static int Polycore_Renderer_getViewportWidth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getViewportWidth());
-	return 1;
-}
-
-static int Polycore_Renderer_getViewportHeight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getViewportHeight());
-	return 1;
-}
-
-static int Polycore_Renderer_initOSSpecific(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->initOSSpecific();
-	return 0;
-}
-
-static int Polycore_Renderer_addShaderModule(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolycodeShaderModule* module = (PolycodeShaderModule*)lua_topointer(L, 2);
-	inst->addShaderModule(module);
-	return 0;
-}
-
-static int Polycore_Renderer_test2DCoordinate(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	Polycode::Polygon* poly = (Polycode::Polygon*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	Matrix4 matrix = *(Matrix4*)lua_topointer(L, 5);
-	luaL_checktype(L, 6, LUA_TBOOLEAN);
-	bool billboardMode = lua_toboolean(L, 6);
-	lua_pushboolean(L, inst->test2DCoordinate(x, y, poly, matrix, billboardMode));
-	return 1;
-}
-
-static int Polycore_Renderer_getProjectionMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	 Matrix4 *retInst = new  Matrix4();
-	*retInst = inst->getProjectionMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Renderer_getModelviewMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	 Matrix4 *retInst = new  Matrix4();
-	*retInst = inst->getModelviewMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Renderer_Unproject(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	 Vector3 *retInst = new  Vector3();
-	*retInst = inst->Unproject(x, y);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Renderer_sortLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	inst->sortLights();
-	return 0;
-}
-
-static int Polycore_Renderer_getNumAreaLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumAreaLights());
-	return 1;
-}
-
-static int Polycore_Renderer_getNumSpotLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumSpotLights());
-	return 1;
-}
-
-static int Polycore_Renderer_getNumLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumLights());
-	return 1;
-}
-
-static int Polycore_delete_Renderer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Renderer *inst = (Renderer*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Resource(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TNUMBER);
-	int type = lua_tointeger(L, 1);
-	Resource *inst = new Resource(type);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Resource_getResourceName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Resource *inst = (Resource*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getResourceName();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Resource_getResourceType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Resource *inst = (Resource*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getResourceType());
-	return 1;
-}
-
-static int Polycore_Resource_setResourceName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Resource *inst = (Resource*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String newName = String(lua_tostring(L, 2));
-	inst->setResourceName(newName);
-	return 0;
-}
-
-static int Polycore_Resource_setResourcePath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Resource *inst = (Resource*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String path = String(lua_tostring(L, 2));
-	inst->setResourcePath(path);
-	return 0;
-}
-
-static int Polycore_Resource_getResourcePath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Resource *inst = (Resource*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getResourcePath();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_delete_Resource(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Resource *inst = (Resource*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ResourceManager(lua_State *L) {
-	ResourceManager *inst = new ResourceManager();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ResourceManager_addResource(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Resource* resource = (Resource*)lua_topointer(L, 2);
-	inst->addResource(resource);
-	return 0;
-}
-
-static int Polycore_ResourceManager_addDirResource(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String dirPath = String(lua_tostring(L, 2));
-	bool recursive;
-	if(lua_isboolean(L, 3)) {
-		recursive = lua_toboolean(L, 3);
-	} else {
-		recursive = true;
-	}
-	inst->addDirResource(dirPath, recursive);
-	return 0;
-}
-
-static int Polycore_ResourceManager_addArchive(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String zipPath = String(lua_tostring(L, 2));
-	inst->addArchive(zipPath);
-	return 0;
-}
-
-static int Polycore_ResourceManager_readFile(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	lua_pushboolean(L, inst->readFile(fileName));
-	return 1;
-}
-
-static int Polycore_ResourceManager_parseTextures(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String dirPath = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool recursive = lua_toboolean(L, 3);
-	inst->parseTextures(dirPath, recursive);
-	return 0;
-}
-
-static int Polycore_ResourceManager_parseMaterials(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String dirPath = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool recursive = lua_toboolean(L, 3);
-	inst->parseMaterials(dirPath, recursive);
-	return 0;
-}
-
-static int Polycore_ResourceManager_parseShaders(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String dirPath = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool recursive = lua_toboolean(L, 3);
-	inst->parseShaders(dirPath, recursive);
-	return 0;
-}
-
-static int Polycore_ResourceManager_parsePrograms(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String dirPath = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool recursive = lua_toboolean(L, 3);
-	inst->parsePrograms(dirPath, recursive);
-	return 0;
-}
-
-static int Polycore_ResourceManager_parseCubemaps(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String dirPath = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool recursive = lua_toboolean(L, 3);
-	inst->parseCubemaps(dirPath, recursive);
-	return 0;
-}
-
-static int Polycore_ResourceManager_parseOthers(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String dirPath = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TBOOLEAN);
-	bool recursive = lua_toboolean(L, 3);
-	inst->parseOthers(dirPath, recursive);
-	return 0;
-}
-
-static int Polycore_ResourceManager_getResource(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int resourceType = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String resourceName = String(lua_tostring(L, 3));
-	void *ptrRetVal = (void*)inst->getResource(resourceType, resourceName);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_ResourceManager_addShaderModule(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolycodeShaderModule* module = (PolycodeShaderModule*)lua_topointer(L, 2);
-	inst->addShaderModule(module);
-	return 0;
-}
-
-static int Polycore_delete_ResourceManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ResourceManager *inst = (ResourceManager*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Scene_get_clearColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->clearColor);
-	return 1;
-}
-
-static int Polycore_Scene_get_useClearColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->useClearColor);
-	return 1;
-}
-
-static int Polycore_Scene_get_ambientColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->ambientColor);
-	return 1;
-}
-
-static int Polycore_Scene_get_fogColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->fogColor);
-	return 1;
-}
-
-static int Polycore_Scene_get_enabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->enabled);
-	return 1;
-}
-
-static int Polycore_Scene_set_useClearColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->useClearColor = param;
-	return 0;
-}
-
-static int Polycore_Scene_set_enabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->enabled = param;
-	return 0;
-}
-
-static int Polycore_Scene(lua_State *L) {
-	Scene *inst = new Scene();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Scene_addEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneEntity* entity = (SceneEntity*)lua_topointer(L, 2);
-	inst->addEntity(entity);
-	return 0;
-}
-
-static int Polycore_Scene_removeEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneEntity* entity = (SceneEntity*)lua_topointer(L, 2);
-	inst->removeEntity(entity);
-	return 0;
-}
-
-static int Polycore_Scene_getDefaultCamera(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getDefaultCamera();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Scene_getActiveCamera(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getActiveCamera();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Scene_setActiveCamera(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Camera* camera = (Camera*)lua_topointer(L, 2);
-	inst->setActiveCamera(camera);
-	return 0;
-}
-
-static int Polycore_Scene_enableLighting(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool enable = lua_toboolean(L, 2);
-	inst->enableLighting(enable);
-	return 0;
-}
-
-static int Polycore_Scene_enableFog(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool enable = lua_toboolean(L, 2);
-	inst->enableFog(enable);
-	return 0;
-}
-
-static int Polycore_Scene_setFogProperties(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int fogMode = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Color color = *(Color*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number density = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number startDepth = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	Number _endDepth = lua_tonumber(L, 6);
-	inst->setFogProperties(fogMode, color, density, startDepth, _endDepth);
-	return 0;
-}
-
-static int Polycore_Scene_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_Scene_setVirtual(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->setVirtual(val);
-	return 0;
-}
-
-static int Polycore_Scene_isVirtual(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->isVirtual());
-	return 1;
-}
-
-static int Polycore_Scene_isEnabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->isEnabled());
-	return 1;
-}
-
-static int Polycore_Scene_setEnabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool enabled = lua_toboolean(L, 2);
-	inst->setEnabled(enabled);
-	return 0;
-}
-
-static int Polycore_Scene_getNumEntities(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumEntities());
-	return 1;
-}
-
-static int Polycore_Scene_getEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getEntity(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Scene_getEntityAtScreenPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	void *ptrRetVal = (void*)inst->getEntityAtScreenPosition(x, y);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Scene_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	Camera* targetCamera;
-	if(lua_islightuserdata(L, 2)) {
-		targetCamera = (Camera*)lua_topointer(L, 2);
-	} else {
-		targetCamera = NULL;
-	}
-	inst->Render(targetCamera);
-	return 0;
-}
-
-static int Polycore_Scene_RenderDepthOnly(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Camera* targetCamera = (Camera*)lua_topointer(L, 2);
-	inst->RenderDepthOnly(targetCamera);
-	return 0;
-}
-
-static int Polycore_Scene_readString(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	OSFILE* inFile = (OSFILE*)lua_topointer(L, 2);
-	lua_pushstring(L, Scene::readString(inFile).c_str());
-	return 1;
-}
-
-static int Polycore_Scene_loadScene(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->loadScene(fileName);
-	return 0;
-}
-
-static int Polycore_Scene_generateLightmaps(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number lightMapRes = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number lightMapQuality = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int numRadPasses = lua_tointeger(L, 4);
-	inst->generateLightmaps(lightMapRes, lightMapQuality, numRadPasses);
-	return 0;
-}
-
-static int Polycore_Scene_addLight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneLight* light = (SceneLight*)lua_topointer(L, 2);
-	inst->addLight(light);
-	return 0;
-}
-
-static int Polycore_Scene_removeLight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneLight* light = (SceneLight*)lua_topointer(L, 2);
-	inst->removeLight(light);
-	return 0;
-}
-
-static int Polycore_Scene_getNearestLight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 pos = *(Vector3*)lua_topointer(L, 2);
-	void *ptrRetVal = (void*)inst->getNearestLight(pos);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Scene_writeEntityMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneEntity* entity = (SceneEntity*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	OSFILE* outFile = (OSFILE*)lua_topointer(L, 3);
-	inst->writeEntityMatrix(entity, outFile);
-	return 0;
-}
-
-static int Polycore_Scene_writeString(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String str = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	OSFILE* outFile = (OSFILE*)lua_topointer(L, 3);
-	inst->writeString(str, outFile);
-	return 0;
-}
-
-static int Polycore_Scene_saveScene(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->saveScene(fileName);
-	return 0;
-}
-
-static int Polycore_Scene_getNumStaticGeometry(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumStaticGeometry());
-	return 1;
-}
-
-static int Polycore_Scene_getStaticGeometry(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getStaticGeometry(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Scene_loadCollisionChild(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneEntity* entity = (SceneEntity*)lua_topointer(L, 2);
-	bool autoCollide;
-	if(lua_isboolean(L, 3)) {
-		autoCollide = lua_toboolean(L, 3);
-	} else {
-		autoCollide = false;
-	}
-	int type;
-	if(lua_isnumber(L, 4)) {
-		type = lua_tointeger(L, 4);
-	} else {
-		type = 0;
-	}
-	inst->loadCollisionChild(entity, autoCollide, type);
-	return 0;
-}
-
-static int Polycore_Scene_getNumLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumLights());
-	return 1;
-}
-
-static int Polycore_Scene_getLight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getLight(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Scene_getCustomEntityByType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String type = String(lua_tostring(L, 2));
-	void *ptrRetVal = (void*)inst->getCustomEntityByType(type);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_Scene(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene *inst = (Scene*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneEntity_get_castShadows(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneEntity *inst = (SceneEntity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->castShadows);
-	return 1;
-}
-
-static int Polycore_SceneEntity_set_castShadows(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneEntity *inst = (SceneEntity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->castShadows = param;
-	return 0;
-}
-
-static int Polycore_SceneEntity(lua_State *L) {
-	SceneEntity *inst = new SceneEntity();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneEntity_testMouseCollision(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneEntity *inst = (SceneEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	lua_pushboolean(L, inst->testMouseCollision(x, y));
-	return 1;
-}
-
-static int Polycore_delete_SceneEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneEntity *inst = (SceneEntity*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneLabel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fontName = String(lua_tostring(L, 1));
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String text = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int size = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number scale = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int amode = lua_tointeger(L, 5);
-	SceneLabel *inst = new SceneLabel(fontName, text, size, scale, amode);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneLabel_setText(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLabel *inst = (SceneLabel*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String newText = String(lua_tostring(L, 2));
-	inst->setText(newText);
-	return 0;
-}
-
-static int Polycore_SceneLabel_getLabel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLabel *inst = (SceneLabel*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getLabel();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_SceneLabel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLabel *inst = (SceneLabel*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneLight_get_specularLightColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->specularLightColor);
-	return 1;
-}
-
-static int Polycore_SceneLight_get_lightColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->lightColor);
-	return 1;
-}
-
-static int Polycore_SceneLight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TNUMBER);
-	int type = lua_tointeger(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Scene* parentScene = (Scene*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number intensity = lua_tonumber(L, 3);
-	Number constantAttenuation;
-	if(lua_isnumber(L, 4)) {
-		constantAttenuation = lua_tonumber(L, 4);
-	} else {
-		constantAttenuation = 1;
-	}
-	Number linearAttenuation;
-	if(lua_isnumber(L, 5)) {
-		linearAttenuation = lua_tonumber(L, 5);
-	} else {
-		linearAttenuation = 1;
-	}
-	Number quadraticAttenuation;
-	if(lua_isnumber(L, 6)) {
-		quadraticAttenuation = lua_tonumber(L, 6);
-	} else {
-		quadraticAttenuation = 1;
-	}
-	SceneLight *inst = new SceneLight(type, parentScene, intensity, constantAttenuation, linearAttenuation, quadraticAttenuation);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneLight_getIntensity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getIntensity());
-	return 1;
-}
-
-static int Polycore_SceneLight_setIntensity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number newIntensity = lua_tonumber(L, 2);
-	inst->setIntensity(newIntensity);
-	return 0;
-}
-
-static int Polycore_SceneLight_setAttenuation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number constantAttenuation = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number linearAttenuation = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number quadraticAttenuation = lua_tonumber(L, 4);
-	inst->setAttenuation(constantAttenuation, linearAttenuation, quadraticAttenuation);
-	return 0;
-}
-
-static int Polycore_SceneLight_getConstantAttenuation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getConstantAttenuation());
-	return 1;
-}
-
-static int Polycore_SceneLight_getLinearAttenuation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getLinearAttenuation());
-	return 1;
-}
-
-static int Polycore_SceneLight_getQuadraticAttenuation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getQuadraticAttenuation());
-	return 1;
-}
-
-static int Polycore_SceneLight_getType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getType());
-	return 1;
-}
-
-static int Polycore_SceneLight_renderDepthMap(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Scene* scene = (Scene*)lua_topointer(L, 2);
-	inst->renderDepthMap(scene);
-	return 0;
-}
-
-static int Polycore_SceneLight_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	inst->Render();
-	return 0;
-}
-
-static int Polycore_SceneLight_getLightViewMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	 Matrix4  *retInst = new  Matrix4 ();
-	*retInst = inst->getLightViewMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_SceneLight_getZBufferTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getZBufferTexture();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_SceneLight_setSpecularLightColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 5);
-	inst->setSpecularLightColor(r, g, b, a);
-	return 0;
-}
-
-static int Polycore_SceneLight_setDiffuseLightColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	inst->setDiffuseLightColor(r, g, b);
-	return 0;
-}
-
-static int Polycore_SceneLight_setLightColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	Number a;
-	if(lua_isnumber(L, 5)) {
-		a = lua_tonumber(L, 5);
-	} else {
-		a = 1.0;
-	}
-	inst->setLightColor(r, g, b, a);
-	return 0;
-}
-
-static int Polycore_SceneLight_setSpotlightProperties(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number spotlightCutoff = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number spotlightExponent = lua_tonumber(L, 3);
-	inst->setSpotlightProperties(spotlightCutoff, spotlightExponent);
-	return 0;
-}
-
-static int Polycore_SceneLight_getSpotlightCutoff(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getSpotlightCutoff());
-	return 1;
-}
-
-static int Polycore_SceneLight_getSpotlightExponent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getSpotlightExponent());
-	return 1;
-}
-
-static int Polycore_SceneLight_enableShadows(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	Number resolution;
-	if(lua_isnumber(L, 3)) {
-		resolution = lua_tonumber(L, 3);
-	} else {
-		resolution = 256;
-	}
-	inst->enableShadows(val, resolution);
-	return 0;
-}
-
-static int Polycore_SceneLight_setShadowMapFOV(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number fov = lua_tonumber(L, 2);
-	inst->setShadowMapFOV(fov);
-	return 0;
-}
-
-static int Polycore_SceneLight_areShadowsEnabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->areShadowsEnabled());
-	return 1;
-}
-
-static int Polycore_SceneLight_getLightType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getLightType());
-	return 1;
-}
-
-static int Polycore_SceneLight_enableDebugDraw(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->enableDebugDraw(val);
-	return 0;
-}
-
-static int Polycore_SceneLight_setLightImportance(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int newImportance = lua_tointeger(L, 2);
-	inst->setLightImportance(newImportance);
-	return 0;
-}
-
-static int Polycore_SceneLight_getLightImportance(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getLightImportance());
-	return 1;
-}
-
-static int Polycore_delete_SceneLight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLight *inst = (SceneLight*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneLine(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneEntity* ent1 = (SceneEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneEntity* ent2 = (SceneEntity*)lua_topointer(L, 2);
-	SceneLine *inst = new SceneLine(ent1, ent2);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneLine_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLine *inst = (SceneLine*)lua_topointer(L, 1);
-	inst->Render();
-	return 0;
-}
-
-static int Polycore_delete_SceneLine(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneLine *inst = (SceneLine*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneManager(lua_State *L) {
-	SceneManager *inst = new SceneManager();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneManager_addScene(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneManager *inst = (SceneManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Scene* newScene = (Scene*)lua_topointer(L, 2);
-	inst->addScene(newScene);
-	return 0;
-}
-
-static int Polycore_SceneManager_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneManager *inst = (SceneManager*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_SceneManager_UpdateVirtual(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneManager *inst = (SceneManager*)lua_topointer(L, 1);
-	inst->UpdateVirtual();
-	return 0;
-}
-
-static int Polycore_SceneManager_removeScene(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneManager *inst = (SceneManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Scene* scene = (Scene*)lua_topointer(L, 2);
-	inst->removeScene(scene);
-	return 0;
-}
-
-static int Polycore_SceneManager_registerRenderTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneManager *inst = (SceneManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneRenderTexture* r_enderTexture = (SceneRenderTexture*)lua_topointer(L, 2);
-	inst->registerRenderTexture(r_enderTexture);
-	return 0;
-}
-
-static int Polycore_SceneManager_unregisterRenderTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneManager *inst = (SceneManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	SceneRenderTexture* r_enderTexture = (SceneRenderTexture*)lua_topointer(L, 2);
-	inst->unregisterRenderTexture(r_enderTexture);
-	return 0;
-}
-
-static int Polycore_delete_SceneManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneManager *inst = (SceneManager*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneMesh_get_lightmapIndex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->lightmapIndex);
-	return 1;
-}
-
-static int Polycore_SceneMesh_get_showVertexNormals(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->showVertexNormals);
-	return 1;
-}
-
-static int Polycore_SceneMesh_set_showVertexNormals(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->showVertexNormals = param;
-	return 0;
-}
-
-static int Polycore_SceneMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	SceneMesh *inst = new SceneMesh(fileName);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneMesh_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	inst->Render();
-	return 0;
-}
-
-static int Polycore_SceneMesh_getLocalShaderOptions(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getLocalShaderOptions();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_SceneMesh_getMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getMesh();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_SceneMesh_getTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getTexture();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_SceneMesh_getMaterial(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getMaterial();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_SceneMesh_loadTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	bool clamp;
-	if(lua_isboolean(L, 3)) {
-		clamp = lua_toboolean(L, 3);
-	} else {
-		clamp = true;
-	}
-	inst->loadTexture(fileName, clamp);
-	return 0;
-}
-
-static int Polycore_SceneMesh_loadSkeleton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->loadSkeleton(fileName);
-	return 0;
-}
-
-static int Polycore_SceneMesh_setTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 2);
-	inst->setTexture(texture);
-	return 0;
-}
-
-static int Polycore_SceneMesh_setMaterial(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Material* material = (Material*)lua_topointer(L, 2);
-	inst->setMaterial(material);
-	return 0;
-}
-
-static int Polycore_SceneMesh_setMaterialByName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String materialName = String(lua_tostring(L, 2));
-	inst->setMaterialByName(materialName);
-	return 0;
-}
-
-static int Polycore_SceneMesh_setMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Mesh* mesh = (Mesh*)lua_topointer(L, 2);
-	inst->setMesh(mesh);
-	return 0;
-}
-
-static int Polycore_SceneMesh_setSkeleton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Skeleton* skeleton = (Skeleton*)lua_topointer(L, 2);
-	inst->setSkeleton(skeleton);
-	return 0;
-}
-
-static int Polycore_SceneMesh_getSkeleton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getSkeleton();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_SceneMesh_renderMeshLocally(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	inst->renderMeshLocally();
-	return 0;
-}
-
-static int Polycore_SceneMesh_cacheToVertexBuffer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool cache = lua_toboolean(L, 2);
-	inst->cacheToVertexBuffer(cache);
-	return 0;
-}
-
-static int Polycore_delete_SceneMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneMesh *inst = (SceneMesh*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScenePrimitive(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TNUMBER);
-	int type = lua_tointeger(L, 1);
-	Number v1;
-	if(lua_isnumber(L, 2)) {
-		v1 = lua_tonumber(L, 2);
-	} else {
-		v1 = 1.0f;
-	}
-	Number v2;
-	if(lua_isnumber(L, 3)) {
-		v2 = lua_tonumber(L, 3);
-	} else {
-		v2 = 1.0f;
-	}
-	Number v3;
-	if(lua_isnumber(L, 4)) {
-		v3 = lua_tonumber(L, 4);
-	} else {
-		v3 = 1.0f;
-	}
-	Number v4;
-	if(lua_isnumber(L, 5)) {
-		v4 = lua_tonumber(L, 5);
-	} else {
-		v4 = 0.0f;
-	}
-	Number v5;
-	if(lua_isnumber(L, 6)) {
-		v5 = lua_tonumber(L, 6);
-	} else {
-		v5 = 0.0f;
-	}
-	ScenePrimitive *inst = new ScenePrimitive(type, v1, v2, v3, v4, v5);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_delete_ScenePrimitive(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScenePrimitive *inst = (ScenePrimitive*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneRenderTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Scene* targetScene = (Scene*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Camera* targetCamera = (Camera*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int r_enderWidth = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int r_enderHeight = lua_tointeger(L, 4);
-	SceneRenderTexture *inst = new SceneRenderTexture(targetScene, targetCamera, r_enderWidth, r_enderHeight);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneRenderTexture_drawScreen(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneRenderTexture *inst = (SceneRenderTexture*)lua_topointer(L, 1);
-	inst->drawScreen();
-	return 0;
-}
-
-static int Polycore_SceneRenderTexture_getTargetTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneRenderTexture *inst = (SceneRenderTexture*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getTargetTexture();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_SceneRenderTexture_getTargetScene(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneRenderTexture *inst = (SceneRenderTexture*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getTargetScene();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_SceneRenderTexture_getTargetCamera(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneRenderTexture *inst = (SceneRenderTexture*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getTargetCamera();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_SceneRenderTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneRenderTexture *inst = (SceneRenderTexture*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneSound(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number referenceDistance = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number maxDistance = lua_tonumber(L, 3);
-	SceneSound *inst = new SceneSound(fileName, referenceDistance, maxDistance);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneSound_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneSound *inst = (SceneSound*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_SceneSound_getSound(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneSound *inst = (SceneSound*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getSound();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_SceneSound(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneSound *inst = (SceneSound*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SceneSoundListener(lua_State *L) {
-	SceneSoundListener *inst = new SceneSoundListener();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SceneSoundListener_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneSoundListener *inst = (SceneSoundListener*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_delete_SceneSoundListener(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SceneSoundListener *inst = (SceneSoundListener*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Screen_get_enabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->enabled);
-	return 1;
-}
-
-static int Polycore_Screen_set_enabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->enabled = param;
-	return 0;
-}
-
-static int Polycore_Screen(lua_State *L) {
-	Screen *inst = new Screen();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Screen_addChild(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	ScreenEntity* newEntity = (ScreenEntity*)lua_topointer(L, 2);
-	void *ptrRetVal = (void*)inst->addChild(newEntity);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Screen_removeChild(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	ScreenEntity* entityToRemove = (ScreenEntity*)lua_topointer(L, 2);
-	void *ptrRetVal = (void*)inst->removeChild(entityToRemove);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Screen_setScreenOffset(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->setScreenOffset(x, y);
-	return 0;
-}
-
-static int Polycore_Screen_getScreenOffset(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	Vector2 *retInst = new Vector2();
-	*retInst = inst->getScreenOffset();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Screen_Shutdown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	inst->Shutdown();
-	return 0;
-}
-
-static int Polycore_Screen_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_Screen_getEntityAt(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	void *ptrRetVal = (void*)inst->getEntityAt(x, y);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Screen_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	inst->Render();
-	return 0;
-}
-
-static int Polycore_Screen_setRenderer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Renderer* r_enderer = (Renderer*)lua_topointer(L, 2);
-	inst->setRenderer(r_enderer);
-	return 0;
-}
-
-static int Polycore_Screen_setNormalizedCoordinates(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool newVal = lua_toboolean(L, 2);
-	Number yCoordinateSize;
-	if(lua_isnumber(L, 3)) {
-		yCoordinateSize = lua_tonumber(L, 3);
-	} else {
-		yCoordinateSize = 1.0f;
-	}
-	inst->setNormalizedCoordinates(newVal, yCoordinateSize);
-	return 0;
-}
-
-static int Polycore_Screen_setScreenShader(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String shaderName = String(lua_tostring(L, 2));
-	inst->setScreenShader(shaderName);
-	return 0;
-}
-
-static int Polycore_Screen_clearScreenShader(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	inst->clearScreenShader();
-	return 0;
-}
-
-static int Polycore_Screen_getHighestZIndex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getHighestZIndex());
-	return 1;
-}
-
-static int Polycore_Screen_sortChildren(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	inst->sortChildren();
-	return 0;
-}
-
-static int Polycore_Screen_cmpZindex(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	ScreenEntity* left = (ScreenEntity*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	ScreenEntity* right = (ScreenEntity*)lua_topointer(L, 3);
-	lua_pushboolean(L, Screen::cmpZindex(left, right));
-	return 1;
-}
-
-static int Polycore_Screen_handleInputEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	InputEvent* inputEvent = (InputEvent*)lua_topointer(L, 2);
-	inst->handleInputEvent(inputEvent);
-	return 0;
-}
-
-static int Polycore_Screen_hasFilterShader(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->hasFilterShader());
-	return 1;
-}
-
-static int Polycore_Screen_drawFilter(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	inst->drawFilter();
-	return 0;
-}
-
-static int Polycore_Screen_usesNormalizedCoordinates(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->usesNormalizedCoordinates());
-	return 1;
-}
-
-static int Polycore_Screen_getYCoordinateSize(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getYCoordinateSize());
-	return 1;
-}
-
-static int Polycore_Screen_getRootEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getRootEntity();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Screen_getScreenShaderMaterial(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getScreenShaderMaterial();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_Screen(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Screen *inst = (Screen*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenCurve(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierCurve* curve = (BezierCurve*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int numVertices = lua_tointeger(L, 2);
-	ScreenCurve *inst = new ScreenCurve(curve, numVertices);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_delete_ScreenCurve(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenCurve *inst = (ScreenCurve*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenEntity_get_hasFocus(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->hasFocus);
-	return 1;
-}
-
-static int Polycore_ScreenEntity_get_blockMouseInput(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->blockMouseInput);
-	return 1;
-}
-
-static int Polycore_ScreenEntity_get_zindex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->zindex);
-	return 1;
-}
-
-static int Polycore_ScreenEntity_get_snapToPixels(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->snapToPixels);
-	return 1;
-}
-
-static int Polycore_ScreenEntity_set_hasFocus(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->hasFocus = param;
-	return 0;
-}
-
-static int Polycore_ScreenEntity_set_blockMouseInput(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->blockMouseInput = param;
-	return 0;
-}
-
-static int Polycore_ScreenEntity_set_zindex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->zindex = param;
-	return 0;
-}
-
-static int Polycore_ScreenEntity_set_snapToPixels(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->snapToPixels = param;
-	return 0;
-}
-
-static int Polycore_ScreenEntity(lua_State *L) {
-	ScreenEntity *inst = new ScreenEntity();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenEntity_setPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->setPosition(x, y);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_setScale(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->setScale(x, y);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_setRotation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number roatation = lua_tonumber(L, 2);
-	inst->setRotation(roatation);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_getRotation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getRotation());
-	return 1;
-}
-
-static int Polycore_ScreenEntity__onMouseDown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int mouseButton = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int timestamp = lua_tointeger(L, 5);
-	lua_pushboolean(L, inst->_onMouseDown(x, y, mouseButton, timestamp));
-	return 1;
-}
-
-static int Polycore_ScreenEntity__onMouseUp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int mouseButton = lua_tointeger(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	int timestamp = lua_tointeger(L, 5);
-	lua_pushboolean(L, inst->_onMouseUp(x, y, mouseButton, timestamp));
-	return 1;
-}
-
-static int Polycore_ScreenEntity__onMouseMove(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int timestamp = lua_tointeger(L, 4);
-	inst->_onMouseMove(x, y, timestamp);
-	return 0;
-}
-
-static int Polycore_ScreenEntity__onMouseWheelUp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int timestamp = lua_tointeger(L, 4);
-	inst->_onMouseWheelUp(x, y, timestamp);
-	return 0;
-}
-
-static int Polycore_ScreenEntity__onMouseWheelDown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	int timestamp = lua_tointeger(L, 4);
-	inst->_onMouseWheelDown(x, y, timestamp);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_onMouseDown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->onMouseDown(x, y);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_onMouseUp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->onMouseUp(x, y);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_onMouseMove(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->onMouseMove(x, y);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_onMouseWheelUp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->onMouseWheelUp(x, y);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_onMouseWheelDown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->onMouseWheelDown(x, y);
-	return 0;
-}
-
-static int Polycore_ScreenEntity__onKeyDown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolyKEY key = *(PolyKEY*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	wchar_t charCode = *(wchar_t*)lua_topointer(L, 3);
-	inst->_onKeyDown(key, charCode);
-	return 0;
-}
-
-static int Polycore_ScreenEntity__onKeyUp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolyKEY key = *(PolyKEY*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	wchar_t charCode = *(wchar_t*)lua_topointer(L, 3);
-	inst->_onKeyUp(key, charCode);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_onKeyDown(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolyKEY key = *(PolyKEY*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	wchar_t charCode = *(wchar_t*)lua_topointer(L, 3);
-	inst->onKeyDown(key, charCode);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_onKeyUp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	PolyKEY key = *(PolyKEY*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	wchar_t charCode = *(wchar_t*)lua_topointer(L, 3);
-	inst->onKeyUp(key, charCode);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_hitTest(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	lua_pushboolean(L, inst->hitTest(x, y));
-	return 1;
-}
-
-static int Polycore_ScreenEntity_buildPositionMatrix(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	Matrix4 *retInst = new Matrix4();
-	*retInst = inst->buildPositionMatrix();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_ScreenEntity_adjustMatrixForChildren(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	inst->adjustMatrixForChildren();
-	return 0;
-}
-
-static int Polycore_ScreenEntity_getWidth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getWidth());
-	return 1;
-}
-
-static int Polycore_ScreenEntity_getHeight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getHeight());
-	return 1;
-}
-
-static int Polycore_ScreenEntity_setWidth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number w = lua_tonumber(L, 2);
-	inst->setWidth(w);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_setHeight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number h = lua_tonumber(L, 2);
-	inst->setHeight(h);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_onGainFocus(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	inst->onGainFocus();
-	return 0;
-}
-
-static int Polycore_ScreenEntity_onLoseFocus(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	inst->onLoseFocus();
-	return 0;
-}
-
-static int Polycore_ScreenEntity_startDrag(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number xOffset = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number yOffset = lua_tonumber(L, 3);
-	inst->startDrag(xOffset, yOffset);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_stopDrag(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	inst->stopDrag();
-	return 0;
-}
-
-static int Polycore_ScreenEntity_setBlendingMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int newBl_endingMode = lua_tointeger(L, 2);
-	inst->setBlendingMode(newBl_endingMode);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_setPositionMode(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int newPositionMode = lua_tointeger(L, 2);
-	inst->setPositionMode(newPositionMode);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_setDragLimits(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Polycode::Rectangle rect = *(Polycode::Rectangle*)lua_topointer(L, 2);
-	inst->setDragLimits(rect);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_clearDragLimits(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	inst->clearDragLimits();
-	return 0;
-}
-
-static int Polycore_ScreenEntity_focusChild(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	ScreenEntity* child = (ScreenEntity*)lua_topointer(L, 2);
-	inst->focusChild(child);
-	return 0;
-}
-
-static int Polycore_ScreenEntity_focusNextChild(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	inst->focusNextChild();
-	return 0;
-}
-
-static int Polycore_ScreenEntity_getPosition2D(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	Vector2 *retInst = new Vector2();
-	*retInst = inst->getPosition2D();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_ScreenEntity_isFocusable(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->isFocusable());
-	return 1;
-}
-
-static int Polycore_delete_ScreenEntity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEntity *inst = (ScreenEntity*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenEvent(lua_State *L) {
-	ScreenEvent *inst = new ScreenEvent();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_delete_ScreenEvent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenEvent *inst = (ScreenEvent*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenImage(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	ScreenImage *inst = new ScreenImage(fileName);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenImage_setImageCoordinates(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenImage *inst = (ScreenImage*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number width = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number height = lua_tonumber(L, 5);
-	inst->setImageCoordinates(x, y, width, height);
-	return 0;
-}
-
-static int Polycore_ScreenImage_getImageWidth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenImage *inst = (ScreenImage*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getImageWidth());
-	return 1;
-}
-
-static int Polycore_ScreenImage_getImageHeight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenImage *inst = (ScreenImage*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getImageHeight());
-	return 1;
-}
-
-static int Polycore_delete_ScreenImage(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenImage *inst = (ScreenImage*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenLabel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String text = String(lua_tostring(L, 1));
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int size = lua_tointeger(L, 2);
-	String fontName;
-	if(lua_isstring(L, 3)) {
-		fontName = lua_tostring(L, 3);
-	} else {
-		fontName = "sans";
-	}
-	int amode;
-	if(lua_isnumber(L, 4)) {
-		amode = lua_tointeger(L, 4);
-	} else {
-		amode = 0;
-	}
-	ScreenLabel *inst = new ScreenLabel(text, size, fontName, amode);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenLabel_addDropShadow(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenLabel *inst = (ScreenLabel*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Color color = *(Color*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number size = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number offsetX = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number offsetY = lua_tonumber(L, 5);
-	inst->addDropShadow(color, size, offsetX, offsetY);
-	return 0;
-}
-
-static int Polycore_ScreenLabel_setText(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenLabel *inst = (ScreenLabel*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String newText = String(lua_tostring(L, 2));
-	inst->setText(newText);
-	return 0;
-}
-
-static int Polycore_ScreenLabel_getText(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenLabel *inst = (ScreenLabel*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getText();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_ScreenLabel_getLabel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenLabel *inst = (ScreenLabel*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getLabel();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_ScreenLabel(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenLabel *inst = (ScreenLabel*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenLine(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector2* start = (Vector2*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector2* _end = (Vector2*)lua_topointer(L, 2);
-	ScreenLine *inst = new ScreenLine(start, _end);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenLine_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenLine *inst = (ScreenLine*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_ScreenLine_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenLine *inst = (ScreenLine*)lua_topointer(L, 1);
-	inst->Render();
-	return 0;
-}
-
-static int Polycore_ScreenLine_setLineWidth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenLine *inst = (ScreenLine*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number width = lua_tonumber(L, 2);
-	inst->setLineWidth(width);
-	return 0;
-}
-
-static int Polycore_delete_ScreenLine(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenLine *inst = (ScreenLine*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenManager(lua_State *L) {
-	ScreenManager *inst = new ScreenManager();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenManager_removeScreen(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenManager *inst = (ScreenManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Screen* screen = (Screen*)lua_topointer(L, 2);
-	inst->removeScreen(screen);
-	return 0;
-}
-
-static int Polycore_ScreenManager_addScreen(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenManager *inst = (ScreenManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Screen* screen = (Screen*)lua_topointer(L, 2);
-	inst->addScreen(screen);
-	return 0;
-}
-
-static int Polycore_ScreenManager_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenManager *inst = (ScreenManager*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_delete_ScreenManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenManager *inst = (ScreenManager*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	ScreenMesh *inst = new ScreenMesh(fileName);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenMesh_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenMesh *inst = (ScreenMesh*)lua_topointer(L, 1);
-	inst->Render();
-	return 0;
-}
-
-static int Polycore_ScreenMesh_getMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenMesh *inst = (ScreenMesh*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getMesh();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_ScreenMesh_getTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenMesh *inst = (ScreenMesh*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getTexture();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_ScreenMesh_loadTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenMesh *inst = (ScreenMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->loadTexture(fileName);
-	return 0;
-}
-
-static int Polycore_ScreenMesh_setTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenMesh *inst = (ScreenMesh*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 2);
-	inst->setTexture(texture);
-	return 0;
-}
-
-static int Polycore_delete_ScreenMesh(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenMesh *inst = (ScreenMesh*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenShape_get_strokeEnabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->strokeEnabled);
-	return 1;
-}
-
-static int Polycore_ScreenShape_get_strokeColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->strokeColor);
-	return 1;
-}
-
-static int Polycore_ScreenShape_get_lineSmooth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->lineSmooth);
-	return 1;
-}
-
-static int Polycore_ScreenShape_set_strokeEnabled(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->strokeEnabled = param;
-	return 0;
-}
-
-static int Polycore_ScreenShape_set_lineSmooth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->lineSmooth = param;
-	return 0;
-}
-
-static int Polycore_ScreenShape(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TNUMBER);
-	int shapeType = lua_tointeger(L, 1);
-	Number option1;
-	if(lua_isnumber(L, 2)) {
-		option1 = lua_tonumber(L, 2);
-	} else {
-		option1 = 0;
-	}
-	Number option2;
-	if(lua_isnumber(L, 3)) {
-		option2 = lua_tonumber(L, 3);
-	} else {
-		option2 = 0;
-	}
-	Number option3;
-	if(lua_isnumber(L, 4)) {
-		option3 = lua_tonumber(L, 4);
-	} else {
-		option3 = 0;
-	}
-	Number option4;
-	if(lua_isnumber(L, 5)) {
-		option4 = lua_tonumber(L, 5);
-	} else {
-		option4 = 0;
-	}
-	ScreenShape *inst = new ScreenShape(shapeType, option1, option2, option3, option4);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenShape_Render(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	inst->Render();
-	return 0;
-}
-
-static int Polycore_ScreenShape_setStrokeColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number a = lua_tonumber(L, 5);
-	inst->setStrokeColor(r, g, b, a);
-	return 0;
-}
-
-static int Polycore_ScreenShape_setStrokeWidth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number width = lua_tonumber(L, 2);
-	inst->setStrokeWidth(width);
-	return 0;
-}
-
-static int Polycore_ScreenShape_setGradient(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number r1 = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number g1 = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number b1 = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number a1 = lua_tonumber(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	Number r2 = lua_tonumber(L, 6);
-	luaL_checktype(L, 7, LUA_TNUMBER);
-	Number g2 = lua_tonumber(L, 7);
-	luaL_checktype(L, 8, LUA_TNUMBER);
-	Number b2 = lua_tonumber(L, 8);
-	luaL_checktype(L, 9, LUA_TNUMBER);
-	Number a2 = lua_tonumber(L, 9);
-	inst->setGradient(r1, g1, b1, a1, r2, g2, b2, a2);
-	return 0;
-}
-
-static int Polycore_ScreenShape_clearGradient(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	inst->clearGradient();
-	return 0;
-}
-
-static int Polycore_ScreenShape_setShapeSize(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number newWidth = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number newHeight = lua_tonumber(L, 3);
-	inst->setShapeSize(newWidth, newHeight);
-	return 0;
-}
-
-static int Polycore_ScreenShape_addShapePoint(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	inst->addShapePoint(x, y);
-	return 0;
-}
-
-static int Polycore_delete_ScreenShape(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenShape *inst = (ScreenShape*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenSoundListener(lua_State *L) {
-	ScreenSoundListener *inst = new ScreenSoundListener();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenSoundListener_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSoundListener *inst = (ScreenSoundListener*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_delete_ScreenSoundListener(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSoundListener *inst = (ScreenSoundListener*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenSound(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number referenceDistance = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number maxDistance = lua_tonumber(L, 3);
-	ScreenSound *inst = new ScreenSound(fileName, referenceDistance, maxDistance);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenSound_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSound *inst = (ScreenSound*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_ScreenSound_getSound(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSound *inst = (ScreenSound*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getSound();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_ScreenSound(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSound *inst = (ScreenSound*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ScreenSprite(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number spriteWidth = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number spriteHeight = lua_tonumber(L, 3);
-	ScreenSprite *inst = new ScreenSprite(fileName, spriteWidth, spriteHeight);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ScreenSprite_addAnimation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSprite *inst = (ScreenSprite*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String frames = String(lua_tostring(L, 3));
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number speed = lua_tonumber(L, 4);
-	inst->addAnimation(name, frames, speed);
-	return 0;
-}
-
-static int Polycore_ScreenSprite_playAnimation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSprite *inst = (ScreenSprite*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int startFrame = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TBOOLEAN);
-	bool once = lua_toboolean(L, 4);
-	inst->playAnimation(name, startFrame, once);
-	return 0;
-}
-
-static int Polycore_ScreenSprite_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSprite *inst = (ScreenSprite*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_ScreenSprite_Pause(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSprite *inst = (ScreenSprite*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->Pause(val);
-	return 0;
-}
-
-static int Polycore_delete_ScreenSprite(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ScreenSprite *inst = (ScreenSprite*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Shader_get_numSpotLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader *inst = (Shader*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->numSpotLights);
-	return 1;
-}
-
-static int Polycore_Shader_get_numAreaLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader *inst = (Shader*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->numAreaLights);
-	return 1;
-}
-
-static int Polycore_Shader_set_numSpotLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader *inst = (Shader*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->numSpotLights = param;
-	return 0;
-}
-
-static int Polycore_Shader_set_numAreaLights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader *inst = (Shader*)lua_topointer(L, 1);
-	int param = lua_tointeger(L, 2);
-	inst->numAreaLights = param;
-	return 0;
-}
-
-static int Polycore_Shader_getType(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader *inst = (Shader*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getType());
-	return 1;
-}
-
-static int Polycore_Shader_setName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader *inst = (Shader*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	inst->setName(name);
-	return 0;
-}
-
-static int Polycore_Shader_getName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader *inst = (Shader*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getName();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Shader_createBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader *inst = (Shader*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->createBinding();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_Shader(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader *inst = (Shader*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_ShaderBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Shader* shader = (Shader*)lua_topointer(L, 1);
-	ShaderBinding *inst = new ShaderBinding(shader);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_ShaderBinding_clearTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	inst->clearTexture(name);
-	return 0;
-}
-
-static int Polycore_ShaderBinding_addTexture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Texture* texture = (Texture*)lua_topointer(L, 3);
-	inst->addTexture(name, texture);
-	return 0;
-}
-
-static int Polycore_ShaderBinding_addParam(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String type = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String name = String(lua_tostring(L, 3));
-	luaL_checktype(L, 4, LUA_TSTRING);
-	String value = String(lua_tostring(L, 4));
-	inst->addParam(type, name, value);
-	return 0;
-}
-
-static int Polycore_ShaderBinding_addCubemap(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	Cubemap* cubemap = (Cubemap*)lua_topointer(L, 3);
-	inst->addCubemap(name, cubemap);
-	return 0;
-}
-
-static int Polycore_ShaderBinding_getNumLocalParams(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumLocalParams());
-	return 1;
-}
-
-static int Polycore_ShaderBinding_getLocalParam(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getLocalParam(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_ShaderBinding_getLocalParamByName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	void *ptrRetVal = (void*)inst->getLocalParamByName(name);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_ShaderBinding_addRenderTargetBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	RenderTargetBinding* binding = (RenderTargetBinding*)lua_topointer(L, 2);
-	inst->addRenderTargetBinding(binding);
-	return 0;
-}
-
-static int Polycore_ShaderBinding_getNumRenderTargetBindings(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumRenderTargetBindings());
-	return 1;
-}
-
-static int Polycore_ShaderBinding_getRenderTargetBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getRenderTargetBinding(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_ShaderBinding_getNumInTargetBindings(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumInTargetBindings());
-	return 1;
-}
-
-static int Polycore_ShaderBinding_getInTargetBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getInTargetBinding(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_ShaderBinding_getNumOutTargetBindings(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumOutTargetBindings());
-	return 1;
-}
-
-static int Polycore_ShaderBinding_getOutTargetBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getOutTargetBinding(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_ShaderBinding_addLocalParam(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	void* ptr = (void*)lua_topointer(L, 3);
-	inst->addLocalParam(name, ptr);
-	return 0;
-}
-
-static int Polycore_delete_ShaderBinding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	ShaderBinding *inst = (ShaderBinding*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SkeletonAnimation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String name = String(lua_tostring(L, 1));
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number duration = lua_tonumber(L, 2);
-	SkeletonAnimation *inst = new SkeletonAnimation(name, duration);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SkeletonAnimation_addBoneTrack(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SkeletonAnimation *inst = (SkeletonAnimation*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	BoneTrack* boneTrack = (BoneTrack*)lua_topointer(L, 2);
-	inst->addBoneTrack(boneTrack);
-	return 0;
-}
-
-static int Polycore_SkeletonAnimation_getName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SkeletonAnimation *inst = (SkeletonAnimation*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getName();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_SkeletonAnimation_Play(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SkeletonAnimation *inst = (SkeletonAnimation*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool once = lua_toboolean(L, 2);
-	inst->Play(once);
-	return 0;
-}
-
-static int Polycore_SkeletonAnimation_Stop(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SkeletonAnimation *inst = (SkeletonAnimation*)lua_topointer(L, 1);
-	inst->Stop();
-	return 0;
-}
-
-static int Polycore_SkeletonAnimation_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SkeletonAnimation *inst = (SkeletonAnimation*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_SkeletonAnimation_setSpeed(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SkeletonAnimation *inst = (SkeletonAnimation*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number speed = lua_tonumber(L, 2);
-	inst->setSpeed(speed);
-	return 0;
-}
-
-static int Polycore_delete_SkeletonAnimation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SkeletonAnimation *inst = (SkeletonAnimation*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Skeleton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	Skeleton *inst = new Skeleton(fileName);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Skeleton_loadSkeleton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	inst->loadSkeleton(fileName);
-	return 0;
-}
-
-static int Polycore_Skeleton_playAnimation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String animName = String(lua_tostring(L, 2));
-	bool once;
-	if(lua_isboolean(L, 3)) {
-		once = lua_toboolean(L, 3);
-	} else {
-		once = false;
-	}
-	inst->playAnimation(animName, once);
-	return 0;
-}
-
-static int Polycore_Skeleton_playAnimationByIndex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int index = lua_tointeger(L, 2);
-	bool once;
-	if(lua_isboolean(L, 3)) {
-		once = lua_toboolean(L, 3);
-	} else {
-		once = false;
-	}
-	inst->playAnimationByIndex(index, once);
-	return 0;
-}
-
-static int Polycore_Skeleton_addAnimation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 3));
-	inst->addAnimation(name, fileName);
-	return 0;
-}
-
-static int Polycore_Skeleton_getAnimation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	void *ptrRetVal = (void*)inst->getAnimation(name);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Skeleton_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_Skeleton_getBoneByName(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String name = String(lua_tostring(L, 2));
-	void *ptrRetVal = (void*)inst->getBoneByName(name);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Skeleton_bonesVisible(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool val = lua_toboolean(L, 2);
-	inst->bonesVisible(val);
-	return 0;
-}
-
-static int Polycore_Skeleton_enableBoneLabels(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String labelFont = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number size = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number scale = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	Color labelColor = *(Color*)lua_topointer(L, 5);
-	inst->enableBoneLabels(labelFont, size, scale, labelColor);
-	return 0;
-}
-
-static int Polycore_Skeleton_getNumBones(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumBones());
-	return 1;
-}
-
-static int Polycore_Skeleton_getBone(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getBone(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Skeleton_getCurrentAnimation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getCurrentAnimation();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_delete_Skeleton(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Skeleton *inst = (Skeleton*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_BoneTrack_get_LocXVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->LocXVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_LocYVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->LocYVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_LocZVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->LocZVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_ScaleXVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->ScaleXVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_ScaleYVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->ScaleYVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_ScaleZVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->ScaleZVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_boneQuat(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->boneQuat);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_QuatWVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->QuatWVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_QuatXVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->QuatXVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_QuatYVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->QuatYVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack_get_QuatZVec(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->QuatZVec);
-	return 1;
-}
-
-static int Polycore_BoneTrack(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Bone* bone = (Bone*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number length = lua_tonumber(L, 2);
-	BoneTrack *inst = new BoneTrack(bone, length);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_BoneTrack_Play(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	bool once;
-	if(lua_isboolean(L, 2)) {
-		once = lua_toboolean(L, 2);
-	} else {
-		once = false;
-	}
-	inst->Play(once);
-	return 0;
-}
-
-static int Polycore_BoneTrack_Stop(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	inst->Stop();
-	return 0;
-}
-
-static int Polycore_BoneTrack_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_BoneTrack_setSpeed(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number speed = lua_tonumber(L, 2);
-	inst->setSpeed(speed);
-	return 0;
-}
-
-static int Polycore_delete_BoneTrack(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BoneTrack *inst = (BoneTrack*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Sound(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 1));
-	Sound *inst = new Sound(fileName);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Sound_Play(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	bool loop;
-	if(lua_isboolean(L, 2)) {
-		loop = lua_toboolean(L, 2);
-	} else {
-		loop = false;
-	}
-	inst->Play(loop);
-	return 0;
-}
-
-static int Polycore_Sound_Stop(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	inst->Stop();
-	return 0;
-}
-
-static int Polycore_Sound_setVolume(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number newVolume = lua_tonumber(L, 2);
-	inst->setVolume(newVolume);
-	return 0;
-}
-
-static int Polycore_Sound_setPitch(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number newPitch = lua_tonumber(L, 2);
-	inst->setPitch(newPitch);
-	return 0;
-}
-
-static int Polycore_Sound_setIsPositional(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool isPositional = lua_toboolean(L, 2);
-	inst->setIsPositional(isPositional);
-	return 0;
-}
-
-static int Polycore_Sound_setSoundPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 position = *(Vector3*)lua_topointer(L, 2);
-	inst->setSoundPosition(position);
-	return 0;
-}
-
-static int Polycore_Sound_setSoundVelocity(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 velocity = *(Vector3*)lua_topointer(L, 2);
-	inst->setSoundVelocity(velocity);
-	return 0;
-}
-
-static int Polycore_Sound_setSoundDirection(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 direction = *(Vector3*)lua_topointer(L, 2);
-	inst->setSoundDirection(direction);
-	return 0;
-}
-
-static int Polycore_Sound_setPositionalProperties(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number referenceDistance = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number maxDistance = lua_tonumber(L, 3);
-	inst->setPositionalProperties(referenceDistance, maxDistance);
-	return 0;
-}
-
-static int Polycore_Sound_loadWAV(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	ALuint *retInst = new ALuint();
-	*retInst = inst->loadWAV(fileName);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Sound_loadOGG(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String fileName = String(lua_tostring(L, 2));
-	ALuint *retInst = new ALuint();
-	*retInst = inst->loadOGG(fileName);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Sound_GenSource(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	ALuint buffer = *(ALuint*)lua_topointer(L, 2);
-	ALuint *retInst = new ALuint();
-	*retInst = inst->GenSource(buffer);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Sound_checkALError(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String operation = String(lua_tostring(L, 2));
-	inst->checkALError(operation);
-	return 0;
-}
-
-static int Polycore_Sound_soundError(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String err = String(lua_tostring(L, 2));
-	inst->soundError(err);
-	return 0;
-}
-
-static int Polycore_Sound_soundCheck(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool result = lua_toboolean(L, 2);
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String err = String(lua_tostring(L, 3));
-	inst->soundCheck(result, err);
-	return 0;
-}
-
-static int Polycore_delete_Sound(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Sound *inst = (Sound*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_SoundManager(lua_State *L) {
-	SoundManager *inst = new SoundManager();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_SoundManager_setListenerPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 position = *(Vector3*)lua_topointer(L, 2);
-	inst->setListenerPosition(position);
-	return 0;
-}
-
-static int Polycore_SoundManager_setListenerOrientation(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 orientation = *(Vector3*)lua_topointer(L, 2);
-	inst->setListenerOrientation(orientation);
-	return 0;
-}
-
-static int Polycore_SoundManager_initAL(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);
-	inst->initAL();
-	return 0;
-}
-
-static int Polycore_SoundManager_setGlobalVolume(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number globalVolume = lua_tonumber(L, 2);
-	inst->setGlobalVolume(globalVolume);
-	return 0;
-}
-
-static int Polycore_delete_SoundManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	SoundManager *inst = (SoundManager*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_String_get_contents(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->contents);
-	return 1;
-}
-
-static int Polycore_String(lua_State *L) {
-	String *inst = new String();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_String_size(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->size());
-	return 1;
-}
-
-static int Polycore_String_length(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->length());
-	return 1;
-}
-
-static int Polycore_String_substr(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	size_t pos = *(size_t*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	size_t n = *(size_t*)lua_topointer(L, 3);
-	lua_pushstring(L, inst->substr(pos, n).c_str());
-	return 1;
-}
-
-static int Polycore_String_rfind(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String str = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	size_t pos = *(size_t*)lua_topointer(L, 3);
-	lua_pushinteger(L, inst->rfind(str, pos));
-	return 1;
-}
-
-static int Polycore_String_find(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String str = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	size_t pos = *(size_t*)lua_topointer(L, 3);
-	lua_pushinteger(L, inst->find(str, pos));
-	return 1;
-}
-
-static int Polycore_String_find_last_of(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String str = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	size_t pos = *(size_t*)lua_topointer(L, 3);
-	lua_pushinteger(L, inst->find_last_of(str, pos));
-	return 1;
-}
-
-static int Polycore_String_toLowerCase(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->toLowerCase().c_str());
-	return 1;
-}
-
-static int Polycore_String_toUpperCase(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	lua_pushstring(L, inst->toUpperCase().c_str());
-	return 1;
-}
-
-static int Polycore_String_replace(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String what = String(lua_tostring(L, 2));
-	luaL_checktype(L, 3, LUA_TSTRING);
-	String withWhat = String(lua_tostring(L, 3));
-	lua_pushstring(L, inst->replace(what, withWhat).c_str());
-	return 1;
-}
-
-static int Polycore_String_NumberToString(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number value = lua_tonumber(L, 2);
-	lua_pushstring(L, String::NumberToString(value).c_str());
-	return 1;
-}
-
-static int Polycore_String_IntToString(lua_State *L) {
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int value = lua_tointeger(L, 2);
-	lua_pushstring(L, String::IntToString(value).c_str());
-	return 1;
-}
-
-static int Polycore_String_c_str(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->c_str();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_String_getDataWithEncoding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int encoding = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getDataWithEncoding(encoding);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_String_getDataSizeWithEncoding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int encoding = lua_tointeger(L, 2);
-	lua_pushinteger(L, inst->getDataSizeWithEncoding(encoding));
-	return 1;
-}
-
-static int Polycore_String_setDataWithEncoding(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	char* data = (char*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int encoding = lua_tointeger(L, 3);
-	inst->setDataWithEncoding(data, encoding);
-	return 0;
-}
-
-static int Polycore_delete_String(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	String *inst = (String*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Texture_get_scrollSpeedX(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->scrollSpeedX);
-	return 1;
-}
-
-static int Polycore_Texture_get_scrollSpeedY(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->scrollSpeedY);
-	return 1;
-}
-
-static int Polycore_Texture_get_clamp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->clamp);
-	return 1;
-}
-
-static int Polycore_Texture_set_scrollSpeedX(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->scrollSpeedX = param;
-	return 0;
-}
-
-static int Polycore_Texture_set_scrollSpeedY(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->scrollSpeedY = param;
-	return 0;
-}
-
-static int Polycore_Texture_set_clamp(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->clamp = param;
-	return 0;
-}
-
-static int Polycore_Texture_setTextureData(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	char* data = (char*)lua_topointer(L, 2);
-	inst->setTextureData(data);
-	return 0;
-}
-
-static int Polycore_Texture_recreateFromImageData(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	inst->recreateFromImageData();
-	return 0;
-}
-
-static int Polycore_Texture_getScrollOffsetX(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getScrollOffsetX());
-	return 1;
-}
-
-static int Polycore_Texture_getScrollOffsetY(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getScrollOffsetY());
-	return 1;
-}
-
-static int Polycore_Texture_setImageData(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Image* data = (Image*)lua_topointer(L, 2);
-	inst->setImageData(data);
-	return 0;
-}
-
-static int Polycore_Texture_updateScroll(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int elapsed = lua_tointeger(L, 2);
-	inst->updateScroll(elapsed);
-	return 0;
-}
-
-static int Polycore_Texture_setResourcePath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TSTRING);
-	String newPath = String(lua_tostring(L, 2));
-	inst->setResourcePath(newPath);
-	return 0;
-}
-
-static int Polycore_Texture_getResourcePath(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	 String  *retInst = new  String ();
-	*retInst = inst->getResourcePath();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Texture_getTextureData(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	void *ptrRetVal = (void*)inst->getTextureData();
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Texture_getWidth(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getWidth());
-	return 1;
-}
-
-static int Polycore_Texture_getHeight(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getHeight());
-	return 1;
-}
-
-static int Polycore_delete_Texture(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Texture *inst = (Texture*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Timer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TBOOLEAN);
-	bool triggerMode = lua_toboolean(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int msecs = lua_tointeger(L, 2);
-	Timer *inst = new Timer(triggerMode, msecs);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Timer_Pause(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Timer *inst = (Timer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool paused = lua_toboolean(L, 2);
-	inst->Pause(paused);
-	return 0;
-}
-
-static int Polycore_Timer_isPaused(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Timer *inst = (Timer*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->isPaused());
-	return 1;
-}
-
-static int Polycore_Timer_getTicks(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Timer *inst = (Timer*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getTicks());
-	return 1;
-}
-
-static int Polycore_Timer_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Timer *inst = (Timer*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int ticks = lua_tointeger(L, 2);
-	inst->Update(ticks);
-	return 0;
-}
-
-static int Polycore_Timer_Reset(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Timer *inst = (Timer*)lua_topointer(L, 1);
-	inst->Reset();
-	return 0;
-}
-
-static int Polycore_Timer_hasElapsed(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Timer *inst = (Timer*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->hasElapsed());
-	return 1;
-}
-
-static int Polycore_Timer_getElapsedf(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Timer *inst = (Timer*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->getElapsedf());
-	return 1;
-}
-
-static int Polycore_delete_Timer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Timer *inst = (Timer*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_TimerManager(lua_State *L) {
-	TimerManager *inst = new TimerManager();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_TimerManager_removeTimer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	TimerManager *inst = (TimerManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Timer* timer = (Timer*)lua_topointer(L, 2);
-	inst->removeTimer(timer);
-	return 0;
-}
-
-static int Polycore_TimerManager_addTimer(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	TimerManager *inst = (TimerManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Timer* timer = (Timer*)lua_topointer(L, 2);
-	inst->addTimer(timer);
-	return 0;
-}
-
-static int Polycore_TimerManager_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	TimerManager *inst = (TimerManager*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_delete_TimerManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	TimerManager *inst = (TimerManager*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_QuaternionTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Quaternion* target = (Quaternion*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	BezierCurve* wCurve = (BezierCurve*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
-	BezierCurve* xCurve = (BezierCurve*)lua_topointer(L, 3);
-	luaL_checktype(L, 4, LUA_TLIGHTUSERDATA);
-	BezierCurve* yCurve = (BezierCurve*)lua_topointer(L, 4);
-	luaL_checktype(L, 5, LUA_TLIGHTUSERDATA);
-	BezierCurve* zCurve = (BezierCurve*)lua_topointer(L, 5);
-	luaL_checktype(L, 6, LUA_TNUMBER);
-	int easeType = lua_tointeger(L, 6);
-	luaL_checktype(L, 7, LUA_TNUMBER);
-	Number time = lua_tonumber(L, 7);
-	bool _repeat;
-	if(lua_isboolean(L, 8)) {
-		_repeat = lua_toboolean(L, 8);
-	} else {
-		_repeat = false;
-	}
-	QuaternionTween *inst = new QuaternionTween(target, wCurve, xCurve, yCurve, zCurve, easeType, time, _repeat);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_QuaternionTween_updateCustomTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	QuaternionTween *inst = (QuaternionTween*)lua_topointer(L, 1);
-	inst->updateCustomTween();
-	return 0;
-}
-
-static int Polycore_delete_QuaternionTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	QuaternionTween *inst = (QuaternionTween*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Tween_get_repeat(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->repeat);
-	return 1;
-}
-
-static int Polycore_Tween_set_repeat(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->repeat = param;
-	return 0;
-}
-
-static int Polycore_Tween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Number* target = (Number*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	int easeType = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number startVal = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number _endVal = lua_tonumber(L, 4);
-	luaL_checktype(L, 5, LUA_TNUMBER);
-	Number time = lua_tonumber(L, 5);
-	bool _repeat;
-	if(lua_isboolean(L, 6)) {
-		_repeat = lua_toboolean(L, 6);
-	} else {
-		_repeat = false;
-	}
-	Tween *inst = new Tween(target, easeType, startVal, _endVal, time, _repeat);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Tween_interpolateTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->interpolateTween());
-	return 1;
-}
-
-static int Polycore_Tween_updateCustomTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	inst->updateCustomTween();
-	return 0;
-}
-
-static int Polycore_Tween_doOnComplete(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	inst->doOnComplete();
-	return 0;
-}
-
-static int Polycore_Tween_Pause(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TBOOLEAN);
-	bool pauseVal = lua_toboolean(L, 2);
-	inst->Pause(pauseVal);
-	return 0;
-}
-
-static int Polycore_Tween_Reset(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	inst->Reset();
-	return 0;
-}
-
-static int Polycore_Tween_isComplete(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->isComplete());
-	return 1;
-}
-
-static int Polycore_Tween_setSpeed(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number speed = lua_tonumber(L, 2);
-	inst->setSpeed(speed);
-	return 0;
-}
-
-static int Polycore_delete_Tween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Tween *inst = (Tween*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_BezierPathTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3* target = (Vector3*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	BezierCurve* curve = (BezierCurve*)lua_topointer(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	int easeType = lua_tointeger(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number time = lua_tonumber(L, 4);
-	bool _repeat;
-	if(lua_isboolean(L, 5)) {
-		_repeat = lua_toboolean(L, 5);
-	} else {
-		_repeat = false;
-	}
-	BezierPathTween *inst = new BezierPathTween(target, curve, easeType, time, _repeat);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_BezierPathTween_updateCustomTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierPathTween *inst = (BezierPathTween*)lua_topointer(L, 1);
-	inst->updateCustomTween();
-	return 0;
-}
-
-static int Polycore_delete_BezierPathTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	BezierPathTween *inst = (BezierPathTween*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_TweenManager(lua_State *L) {
-	TweenManager *inst = new TweenManager();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_TweenManager_addTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	TweenManager *inst = (TweenManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Tween* tween = (Tween*)lua_topointer(L, 2);
-	inst->addTween(tween);
-	return 0;
-}
-
-static int Polycore_TweenManager_removeTween(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	TweenManager *inst = (TweenManager*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Tween* tween = (Tween*)lua_topointer(L, 2);
-	inst->removeTween(tween);
-	return 0;
-}
-
-static int Polycore_TweenManager_Update(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	TweenManager *inst = (TweenManager*)lua_topointer(L, 1);
-	inst->Update();
-	return 0;
-}
-
-static int Polycore_delete_TweenManager(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	TweenManager *inst = (TweenManager*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Vector2(lua_State *L) {
-	Vector2 *inst = new Vector2();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_delete_Vector2(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector2 *inst = (Vector2*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Vector3_get_x(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->x);
-	return 1;
-}
-
-static int Polycore_Vector3_get_y(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->y);
-	return 1;
-}
-
-static int Polycore_Vector3_get_z(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->z);
-	return 1;
-}
-
-static int Polycore_Vector3_set_x(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->x = param;
-	return 0;
-}
-
-static int Polycore_Vector3_set_y(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->y = param;
-	return 0;
-}
-
-static int Polycore_Vector3_set_z(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	Number param = lua_tonumber(L, 2);
-	inst->z = param;
-	return 0;
-}
-
-static int Polycore_Vector3(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 3);
-	Vector3 *inst = new Vector3(x, y, z);
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Vector3_set(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	inst->set(x, y, z);
-	return 0;
-}
-
-static int Polycore_Vector3_distance(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 vec2 = *(Vector3*)lua_topointer(L, 2);
-	lua_pushnumber(L, inst->distance(vec2));
-	return 1;
-}
-
-static int Polycore_Vector3_length(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	lua_pushnumber(L, inst->length());
-	return 1;
-}
-
-static int Polycore_Vector3_dot(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 u = *(Vector3*)lua_topointer(L, 2);
-	lua_pushnumber(L, inst->dot(u));
-	return 1;
-}
-
-static int Polycore_Vector3_crossProduct(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TLIGHTUSERDATA);
-	Vector3 vec2 = *(Vector3*)lua_topointer(L, 2);
-	 Vector3 *retInst = new  Vector3();
-	*retInst = inst->crossProduct(vec2);
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Vector3_Normalize(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	inst->Normalize();
-	return 0;
-}
-
-static int Polycore_delete_Vector3(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vector3 *inst = (Vector3*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-static int Polycore_Vertex_get_restNormal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->restNormal);
-	return 1;
-}
-
-static int Polycore_Vertex_get_restPosition(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->restPosition);
-	return 1;
-}
-
-static int Polycore_Vertex_get_normal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->normal);
-	return 1;
-}
-
-static int Polycore_Vertex_get_tangent(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->tangent);
-	return 1;
-}
-
-static int Polycore_Vertex_get_vertexColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->vertexColor);
-	return 1;
-}
-
-static int Polycore_Vertex_get_texCoord(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	lua_pushlightuserdata(L, &inst->texCoord);
-	return 1;
-}
-
-static int Polycore_Vertex_get_useVertexColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	lua_pushboolean(L, inst->useVertexColor);
-	return 1;
-}
-
-static int Polycore_Vertex_set_useVertexColor(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	bool param = lua_toboolean(L, 2);
-	inst->useVertexColor = param;
-	return 0;
-}
-
-static int Polycore_Vertex(lua_State *L) {
-	Vertex *inst = new Vertex();
-	lua_pushlightuserdata(L, (void*)inst);
-	return 1;
-}
-
-static int Polycore_Vertex_addBoneAssignment(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int boneID = lua_tointeger(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number boneWeight = lua_tonumber(L, 3);
-	inst->addBoneAssignment(boneID, boneWeight);
-	return 0;
-}
-
-static int Polycore_Vertex_getNumBoneAssignments(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	lua_pushinteger(L, inst->getNumBoneAssignments());
-	return 1;
-}
-
-static int Polycore_Vertex_getBoneAssignment(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	unsigned int index = lua_tointeger(L, 2);
-	void *ptrRetVal = (void*)inst->getBoneAssignment(index);
-	if(ptrRetVal == NULL) {
-		lua_pushnil(L);
-	} else {
-		lua_pushlightuserdata(L, ptrRetVal);
-	}
-	return 1;
-}
-
-static int Polycore_Vertex_normalizeWeights(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	inst->normalizeWeights();
-	return 0;
-}
-
-static int Polycore_Vertex_getTexCoord(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	Vector2 *retInst = new Vector2();
-	*retInst = inst->getTexCoord();
-	lua_pushlightuserdata(L, retInst);
-	return 1;
-}
-
-static int Polycore_Vertex_setTexCoord(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number u = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number v = lua_tonumber(L, 3);
-	inst->setTexCoord(u, v);
-	return 0;
-}
-
-static int Polycore_Vertex_setNormal(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	luaL_checktype(L, 2, LUA_TNUMBER);
-	Number x = lua_tonumber(L, 2);
-	luaL_checktype(L, 3, LUA_TNUMBER);
-	Number y = lua_tonumber(L, 3);
-	luaL_checktype(L, 4, LUA_TNUMBER);
-	Number z = lua_tonumber(L, 4);
-	inst->setNormal(x, y, z);
-	return 0;
-}
-
-static int Polycore_delete_Vertex(lua_State *L) {
-	luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
-	Vertex *inst = (Vertex*)lua_topointer(L, 1);
-	delete inst;
-	return 0;
-}
-
-} // namespace Polycode

+ 69 - 4
Bindings/Contents/LUA/Source/PolycodeLUA.cpp

@@ -109,6 +109,10 @@ int luaopen_Polycode(lua_State *L) {
 		{"Color_setColor", Polycore_Color_setColor},
 		{"Color_Random", Polycore_Color_Random},
 		{"Color_getBrightness", Polycore_Color_getBrightness},
+		{"Color_RGBtoHSV", Polycore_Color_RGBtoHSV},
+		{"Color_getHue", Polycore_Color_getHue},
+		{"Color_getSaturation", Polycore_Color_getSaturation},
+		{"Color_getValue", Polycore_Color_getValue},
 		{"Color_getUint", Polycore_Color_getUint},
 		{"delete_Color", Polycore_delete_Color},
 		{"Config", Polycore_Config},
@@ -149,11 +153,14 @@ int luaopen_Polycode(lua_State *L) {
 		{"Core_setVideoMode", Polycore_Core_setVideoMode},
 		{"Core_resizeTo", Polycore_Core_resizeTo},
 		{"Core_doSleep", Polycore_Core_doSleep},
+		{"Core_openURL", Polycore_Core_openURL},
 		{"Core_getElapsed", Polycore_Core_getElapsed},
 		{"Core_getTicks", Polycore_Core_getTicks},
 		{"Core_getTicksFloat", Polycore_Core_getTicksFloat},
 		{"Core_setUserPointer", Polycore_Core_setUserPointer},
 		{"Core_getUserPointer", Polycore_Core_getUserPointer},
+		{"Core_getDefaultWorkingDirectory", Polycore_Core_getDefaultWorkingDirectory},
+		{"Core_getUserHomeDirectory", Polycore_Core_getUserHomeDirectory},
 		{"delete_Core", Polycore_delete_Core},
 		{"CoreInput", Polycore_CoreInput},
 		{"CoreInput_getMousePosition", Polycore_CoreInput_getMousePosition},
@@ -174,6 +181,9 @@ int luaopen_Polycode(lua_State *L) {
 		{"CoreInput_setMousePosition", Polycore_CoreInput_setMousePosition},
 		{"CoreInput_setKeyState", Polycore_CoreInput_setKeyState},
 		{"CoreInput_setDeltaPosition", Polycore_CoreInput_setDeltaPosition},
+		{"CoreInput_touchesBegan", Polycore_CoreInput_touchesBegan},
+		{"CoreInput_touchesMoved", Polycore_CoreInput_touchesMoved},
+		{"CoreInput_touchesEnded", Polycore_CoreInput_touchesEnded},
 		{"CoreInput_createEvent", Polycore_CoreInput_createEvent},
 		{"delete_CoreInput", Polycore_delete_CoreInput},
 		{"CoreServices_getInstance", Polycore_CoreServices_getInstance},
@@ -257,6 +267,8 @@ int luaopen_Polycode(lua_State *L) {
 		{"Entity_removeChild", Polycore_Entity_removeChild},
 		{"Entity_setParentEntity", Polycore_Entity_setParentEntity},
 		{"Entity_getParentEntity", Polycore_Entity_getParentEntity},
+		{"Entity_getNumChildren", Polycore_Entity_getNumChildren},
+		{"Entity_getChildAtIndex", Polycore_Entity_getChildAtIndex},
 		{"Entity_getPosition", Polycore_Entity_getPosition},
 		{"Entity_getCombinedPosition", Polycore_Entity_getCombinedPosition},
 		{"Entity_setPosition", Polycore_Entity_setPosition},
@@ -297,6 +309,8 @@ int luaopen_Polycode(lua_State *L) {
 		{"Entity_setBBoxRadius", Polycore_Entity_setBBoxRadius},
 		{"Entity_setMask", Polycore_Entity_setMask},
 		{"Entity_clearMask", Polycore_Entity_clearMask},
+		{"Entity_setUserData", Polycore_Entity_setUserData},
+		{"Entity_getUserData", Polycore_Entity_getUserData},
 		{"Entity_setBlendingMode", Polycore_Entity_setBlendingMode},
 		{"Entity_getChildCenter", Polycore_Entity_getChildCenter},
 		{"Entity_getEntityProp", Polycore_Entity_getEntityProp},
@@ -345,6 +359,8 @@ int luaopen_Polycode(lua_State *L) {
 		{"Image", Polycore_Image},
 		{"Image_loadImage", Polycore_Image_loadImage},
 		{"Image_loadPNG", Polycore_Image_loadPNG},
+		{"Image_saveImage", Polycore_Image_saveImage},
+		{"Image_savePNG", Polycore_Image_savePNG},
 		{"Image_createEmpty", Polycore_Image_createEmpty},
 		{"Image_fill", Polycore_Image_fill},
 		{"Image_setPixel", Polycore_Image_setPixel},
@@ -362,6 +378,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"Image_darken", Polycore_Image_darken},
 		{"Image_lighten", Polycore_Image_lighten},
 		{"Image_multiply", Polycore_Image_multiply},
+		{"Image_getPixelsInRect", Polycore_Image_getPixelsInRect},
 		{"Image_getBrushX", Polycore_Image_getBrushX},
 		{"Image_getBrushY", Polycore_Image_getBrushY},
 		{"Image_isLoaded", Polycore_Image_isLoaded},
@@ -403,8 +420,10 @@ int luaopen_Polycode(lua_State *L) {
 		{"Material_get_specularStrength", Polycore_Material_get_specularStrength},
 		{"Material_get_specularColor", Polycore_Material_get_specularColor},
 		{"Material_get_diffuseColor", Polycore_Material_get_diffuseColor},
+		{"Material_get_fp16RenderTargets", Polycore_Material_get_fp16RenderTargets},
 		{"Material_set_specularValue", Polycore_Material_set_specularValue},
 		{"Material_set_specularStrength", Polycore_Material_set_specularStrength},
+		{"Material_set_fp16RenderTargets", Polycore_Material_set_fp16RenderTargets},
 		{"Material", Polycore_Material},
 		{"Material_addShader", Polycore_Material_addShader},
 		{"Material_getNumShaders", Polycore_Material_getNumShaders},
@@ -484,6 +503,8 @@ int luaopen_Polycode(lua_State *L) {
 		{"delete_Mesh", Polycore_delete_Mesh},
 		{"PolycodeModule", Polycore_PolycodeModule},
 		{"PolycodeModule_getType", Polycore_PolycodeModule_getType},
+		{"PolycodeModule_Update", Polycore_PolycodeModule_Update},
+		{"PolycodeModule_requiresUpdate", Polycore_PolycodeModule_requiresUpdate},
 		{"delete_PolycodeModule", Polycore_delete_PolycodeModule},
 		{"ObjectEntry_get_type", Polycore_ObjectEntry_get_type},
 		{"ObjectEntry_get_name", Polycore_ObjectEntry_get_name},
@@ -501,6 +522,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"ObjectEntry_set_length", Polycore_ObjectEntry_set_length},
 		{"ObjectEntry", Polycore_ObjectEntry},
 		{"ObjectEntry_addChild", Polycore_ObjectEntry_addChild},
+		{"ObjectEntry_Clear", Polycore_ObjectEntry_Clear},
 		{"delete_ObjectEntry", Polycore_delete_ObjectEntry},
 		{"Particle_get_velVector", Polycore_Particle_get_velVector},
 		{"Particle_get_dirVector", Polycore_Particle_get_dirVector},
@@ -524,6 +546,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"delete_Particle", Polycore_delete_Particle},
 		{"ScreenParticleEmitter", Polycore_ScreenParticleEmitter},
 		{"ScreenParticleEmitter_getEmitter", Polycore_ScreenParticleEmitter_getEmitter},
+		{"ScreenParticleEmitter_dispatchTriggerCompleteEvent", Polycore_ScreenParticleEmitter_dispatchTriggerCompleteEvent},
 		{"ScreenParticleEmitter_addParticleBody", Polycore_ScreenParticleEmitter_addParticleBody},
 		{"ScreenParticleEmitter_getBaseMatrix", Polycore_ScreenParticleEmitter_getBaseMatrix},
 		{"ScreenParticleEmitter_Update", Polycore_ScreenParticleEmitter_Update},
@@ -534,6 +557,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"SceneParticleEmitter_addParticleBody", Polycore_SceneParticleEmitter_addParticleBody},
 		{"SceneParticleEmitter_getBaseMatrix", Polycore_SceneParticleEmitter_getBaseMatrix},
 		{"SceneParticleEmitter_Update", Polycore_SceneParticleEmitter_Update},
+		{"SceneParticleEmitter_dispatchTriggerCompleteEvent", Polycore_SceneParticleEmitter_dispatchTriggerCompleteEvent},
 		{"delete_SceneParticleEmitter", Polycore_delete_SceneParticleEmitter},
 		{"ParticleEmitter_get_particleSpeedMod", Polycore_ParticleEmitter_get_particleSpeedMod},
 		{"ParticleEmitter_get_brightnessDeviation", Polycore_ParticleEmitter_get_brightnessDeviation},
@@ -556,6 +580,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"ParticleEmitter_set_useColorCurves", Polycore_ParticleEmitter_set_useColorCurves},
 		{"ParticleEmitter_set_useScaleCurves", Polycore_ParticleEmitter_set_useScaleCurves},
 		{"ParticleEmitter", Polycore_ParticleEmitter},
+		{"ParticleEmitter_dispatchTriggerCompleteEvent", Polycore_ParticleEmitter_dispatchTriggerCompleteEvent},
 		{"ParticleEmitter_createParticles", Polycore_ParticleEmitter_createParticles},
 		{"ParticleEmitter_setRotationSpeed", Polycore_ParticleEmitter_setRotationSpeed},
 		{"ParticleEmitter_setParticleBlendingMode", Polycore_ParticleEmitter_setParticleBlendingMode},
@@ -655,8 +680,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"Renderer_createFramebufferTexture", Polycore_Renderer_createFramebufferTexture},
 		{"Renderer_bindFrameBufferTexture", Polycore_Renderer_bindFrameBufferTexture},
 		{"Renderer_unbindFramebuffers", Polycore_Renderer_unbindFramebuffers},
-		{"Renderer_renderToTexture", Polycore_Renderer_renderToTexture},
-		{"Renderer_renderZBufferToTexture", Polycore_Renderer_renderZBufferToTexture},
+		{"Renderer_renderScreenToImage", Polycore_Renderer_renderScreenToImage},
 		{"Renderer_setFOV", Polycore_Renderer_setFOV},
 		{"Renderer_setViewportSize", Polycore_Renderer_setViewportSize},
 		{"Renderer_setViewportSizeAndFOV", Polycore_Renderer_setViewportSizeAndFOV},
@@ -838,7 +862,13 @@ int luaopen_Polycode(lua_State *L) {
 		{"SceneLight_setLightImportance", Polycore_SceneLight_setLightImportance},
 		{"SceneLight_getLightImportance", Polycore_SceneLight_getLightImportance},
 		{"delete_SceneLight", Polycore_delete_SceneLight},
+		{"SceneLine_get_lineWidth", Polycore_SceneLine_get_lineWidth},
+		{"SceneLine_get_lineSmooth", Polycore_SceneLine_get_lineSmooth},
+		{"SceneLine_set_lineWidth", Polycore_SceneLine_set_lineWidth},
+		{"SceneLine_set_lineSmooth", Polycore_SceneLine_set_lineSmooth},
 		{"SceneLine", Polycore_SceneLine},
+		{"SceneLine_setStart", Polycore_SceneLine_setStart},
+		{"SceneLine_setEnd", Polycore_SceneLine_setEnd},
 		{"SceneLine_Render", Polycore_SceneLine_Render},
 		{"delete_SceneLine", Polycore_delete_SceneLine},
 		{"SceneManager", Polycore_SceneManager},
@@ -851,7 +881,11 @@ int luaopen_Polycode(lua_State *L) {
 		{"delete_SceneManager", Polycore_delete_SceneManager},
 		{"SceneMesh_get_lightmapIndex", Polycore_SceneMesh_get_lightmapIndex},
 		{"SceneMesh_get_showVertexNormals", Polycore_SceneMesh_get_showVertexNormals},
+		{"SceneMesh_get_lineWidth", Polycore_SceneMesh_get_lineWidth},
+		{"SceneMesh_get_lineSmooth", Polycore_SceneMesh_get_lineSmooth},
 		{"SceneMesh_set_showVertexNormals", Polycore_SceneMesh_set_showVertexNormals},
+		{"SceneMesh_set_lineWidth", Polycore_SceneMesh_set_lineWidth},
+		{"SceneMesh_set_lineSmooth", Polycore_SceneMesh_set_lineSmooth},
 		{"SceneMesh", Polycore_SceneMesh},
 		{"SceneMesh_Render", Polycore_SceneMesh_Render},
 		{"SceneMesh_getLocalShaderOptions", Polycore_SceneMesh_getLocalShaderOptions},
@@ -874,6 +908,8 @@ int luaopen_Polycode(lua_State *L) {
 		{"SceneRenderTexture", Polycore_SceneRenderTexture},
 		{"SceneRenderTexture_drawScreen", Polycore_SceneRenderTexture_drawScreen},
 		{"SceneRenderTexture_getTargetTexture", Polycore_SceneRenderTexture_getTargetTexture},
+		{"SceneRenderTexture_getFilterColorBufferTexture", Polycore_SceneRenderTexture_getFilterColorBufferTexture},
+		{"SceneRenderTexture_getFilterZBufferTexture", Polycore_SceneRenderTexture_getFilterZBufferTexture},
 		{"SceneRenderTexture_getTargetScene", Polycore_SceneRenderTexture_getTargetScene},
 		{"SceneRenderTexture_getTargetCamera", Polycore_SceneRenderTexture_getTargetCamera},
 		{"delete_SceneRenderTexture", Polycore_delete_SceneRenderTexture},
@@ -885,7 +921,9 @@ int luaopen_Polycode(lua_State *L) {
 		{"SceneSoundListener_Update", Polycore_SceneSoundListener_Update},
 		{"delete_SceneSoundListener", Polycore_delete_SceneSoundListener},
 		{"Screen_get_enabled", Polycore_Screen_get_enabled},
+		{"Screen_get_processTouchEventsAsMouse", Polycore_Screen_get_processTouchEventsAsMouse},
 		{"Screen_set_enabled", Polycore_Screen_set_enabled},
+		{"Screen_set_processTouchEventsAsMouse", Polycore_Screen_set_processTouchEventsAsMouse},
 		{"Screen", Polycore_Screen},
 		{"Screen_addChild", Polycore_Screen_addChild},
 		{"Screen_removeChild", Polycore_Screen_removeChild},
@@ -916,10 +954,12 @@ int luaopen_Polycode(lua_State *L) {
 		{"ScreenEntity_get_blockMouseInput", Polycore_ScreenEntity_get_blockMouseInput},
 		{"ScreenEntity_get_zindex", Polycore_ScreenEntity_get_zindex},
 		{"ScreenEntity_get_snapToPixels", Polycore_ScreenEntity_get_snapToPixels},
+		{"ScreenEntity_get_processInputEvents", Polycore_ScreenEntity_get_processInputEvents},
 		{"ScreenEntity_set_hasFocus", Polycore_ScreenEntity_set_hasFocus},
 		{"ScreenEntity_set_blockMouseInput", Polycore_ScreenEntity_set_blockMouseInput},
 		{"ScreenEntity_set_zindex", Polycore_ScreenEntity_set_zindex},
 		{"ScreenEntity_set_snapToPixels", Polycore_ScreenEntity_set_snapToPixels},
+		{"ScreenEntity_set_processInputEvents", Polycore_ScreenEntity_set_processInputEvents},
 		{"ScreenEntity", Polycore_ScreenEntity},
 		{"ScreenEntity_setPosition", Polycore_ScreenEntity_setPosition},
 		{"ScreenEntity_setScale", Polycore_ScreenEntity_setScale},
@@ -982,6 +1022,10 @@ int luaopen_Polycode(lua_State *L) {
 		{"ScreenManager_addScreen", Polycore_ScreenManager_addScreen},
 		{"ScreenManager_Update", Polycore_ScreenManager_Update},
 		{"delete_ScreenManager", Polycore_delete_ScreenManager},
+		{"ScreenMesh_get_lineSmooth", Polycore_ScreenMesh_get_lineSmooth},
+		{"ScreenMesh_get_lineWidth", Polycore_ScreenMesh_get_lineWidth},
+		{"ScreenMesh_set_lineSmooth", Polycore_ScreenMesh_set_lineSmooth},
+		{"ScreenMesh_set_lineWidth", Polycore_ScreenMesh_set_lineWidth},
 		{"ScreenMesh", Polycore_ScreenMesh},
 		{"ScreenMesh_Render", Polycore_ScreenMesh_Render},
 		{"ScreenMesh_getMesh", Polycore_ScreenMesh_getMesh},
@@ -991,9 +1035,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"delete_ScreenMesh", Polycore_delete_ScreenMesh},
 		{"ScreenShape_get_strokeEnabled", Polycore_ScreenShape_get_strokeEnabled},
 		{"ScreenShape_get_strokeColor", Polycore_ScreenShape_get_strokeColor},
-		{"ScreenShape_get_lineSmooth", Polycore_ScreenShape_get_lineSmooth},
 		{"ScreenShape_set_strokeEnabled", Polycore_ScreenShape_set_strokeEnabled},
-		{"ScreenShape_set_lineSmooth", Polycore_ScreenShape_set_lineSmooth},
 		{"ScreenShape", Polycore_ScreenShape},
 		{"ScreenShape_Render", Polycore_ScreenShape_Render},
 		{"ScreenShape_setStrokeColor", Polycore_ScreenShape_setStrokeColor},
@@ -1086,11 +1128,19 @@ int luaopen_Polycode(lua_State *L) {
 		{"Sound_Stop", Polycore_Sound_Stop},
 		{"Sound_setVolume", Polycore_Sound_setVolume},
 		{"Sound_setPitch", Polycore_Sound_setPitch},
+		{"Sound_isPlaying", Polycore_Sound_isPlaying},
 		{"Sound_setIsPositional", Polycore_Sound_setIsPositional},
 		{"Sound_setSoundPosition", Polycore_Sound_setSoundPosition},
 		{"Sound_setSoundVelocity", Polycore_Sound_setSoundVelocity},
 		{"Sound_setSoundDirection", Polycore_Sound_setSoundDirection},
+		{"Sound_setOffset", Polycore_Sound_setOffset},
+		{"Sound_getPlaybackDuration", Polycore_Sound_getPlaybackDuration},
+		{"Sound_getPlaybackTime", Polycore_Sound_getPlaybackTime},
+		{"Sound_seekTo", Polycore_Sound_seekTo},
+		{"Sound_getOffset", Polycore_Sound_getOffset},
+		{"Sound_getSampleLength", Polycore_Sound_getSampleLength},
 		{"Sound_setPositionalProperties", Polycore_Sound_setPositionalProperties},
+		{"Sound_loadBytes", Polycore_Sound_loadBytes},
 		{"Sound_loadWAV", Polycore_Sound_loadWAV},
 		{"Sound_loadOGG", Polycore_Sound_loadOGG},
 		{"Sound_GenSource", Polycore_Sound_GenSource},
@@ -1148,6 +1198,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"Timer_Reset", Polycore_Timer_Reset},
 		{"Timer_hasElapsed", Polycore_Timer_hasElapsed},
 		{"Timer_getElapsedf", Polycore_Timer_getElapsedf},
+		{"Timer_setTimerInterval", Polycore_Timer_setTimerInterval},
 		{"delete_Timer", Polycore_delete_Timer},
 		{"TimerManager", Polycore_TimerManager},
 		{"TimerManager_removeTimer", Polycore_TimerManager_removeTimer},
@@ -1158,7 +1209,9 @@ int luaopen_Polycode(lua_State *L) {
 		{"QuaternionTween_updateCustomTween", Polycore_QuaternionTween_updateCustomTween},
 		{"delete_QuaternionTween", Polycore_delete_QuaternionTween},
 		{"Tween_get_repeat", Polycore_Tween_get_repeat},
+		{"Tween_get_deleteOnComplete", Polycore_Tween_get_deleteOnComplete},
 		{"Tween_set_repeat", Polycore_Tween_set_repeat},
+		{"Tween_set_deleteOnComplete", Polycore_Tween_set_deleteOnComplete},
 		{"Tween", Polycore_Tween},
 		{"Tween_interpolateTween", Polycore_Tween_interpolateTween},
 		{"Tween_updateCustomTween", Polycore_Tween_updateCustomTween},
@@ -1176,7 +1229,18 @@ int luaopen_Polycode(lua_State *L) {
 		{"TweenManager_removeTween", Polycore_TweenManager_removeTween},
 		{"TweenManager_Update", Polycore_TweenManager_Update},
 		{"delete_TweenManager", Polycore_delete_TweenManager},
+		{"Vector2_get_x", Polycore_Vector2_get_x},
+		{"Vector2_get_y", Polycore_Vector2_get_y},
+		{"Vector2_set_x", Polycore_Vector2_set_x},
+		{"Vector2_set_y", Polycore_Vector2_set_y},
 		{"Vector2", Polycore_Vector2},
+		{"Vector2_set", Polycore_Vector2_set},
+		{"Vector2_distance", Polycore_Vector2_distance},
+		{"Vector2_length", Polycore_Vector2_length},
+		{"Vector2_dot", Polycore_Vector2_dot},
+		{"Vector2_crossProduct", Polycore_Vector2_crossProduct},
+		{"Vector2_angle", Polycore_Vector2_angle},
+		{"Vector2_Normalize", Polycore_Vector2_Normalize},
 		{"delete_Vector2", Polycore_delete_Vector2},
 		{"Vector3_get_x", Polycore_Vector3_get_x},
 		{"Vector3_get_y", Polycore_Vector3_get_y},
@@ -1187,6 +1251,7 @@ int luaopen_Polycode(lua_State *L) {
 		{"Vector3", Polycore_Vector3},
 		{"Vector3_set", Polycore_Vector3_set},
 		{"Vector3_distance", Polycore_Vector3_distance},
+		{"Vector3_angleBetween", Polycore_Vector3_angleBetween},
 		{"Vector3_length", Polycore_Vector3_length},
 		{"Vector3_dot", Polycore_Vector3_dot},
 		{"Vector3_crossProduct", Polycore_Vector3_crossProduct},

Некоторые файлы не были показаны из-за большого количества измененных файлов