summaryrefslogtreecommitdiff
path: root/demo/Shader.lua
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-12-03 02:10:32 -0600
committersanine-a <sanine.not@pm.me>2020-12-03 02:10:32 -0600
commite767e1ff9d81f8a76196caab91d9b6b4bbe0b30e (patch)
tree25a058779bcd4de00ce04ccf6cb0157cfba32611 /demo/Shader.lua
parentf417d2b047369cac234c471ef37ab8281181d69f (diff)
rewrite demo
Diffstat (limited to 'demo/Shader.lua')
-rw-r--r--demo/Shader.lua53
1 files changed, 0 insertions, 53 deletions
diff --git a/demo/Shader.lua b/demo/Shader.lua
deleted file mode 100644
index 494bd53..0000000
--- a/demo/Shader.lua
+++ /dev/null
@@ -1,53 +0,0 @@
-local Shader = {}
-
-Shader.prototype = {}
-
-Shader.prototype.setInteger = function(self, uniform, integer)
- honey.shader.set_int(self.program, uniform, integer)
-end
-
-Shader.prototype.setFloat = function(self, uniform, float)
- honey.shader.set_float(self.program, uniform, float)
-end
-
-Shader.prototype.setVec3 = function(self, uniform, vector)
- honey.shader.set_vec3(self.program, uniform, vector.array)
-end
-
-Shader.prototype.setVec4 = function(self, uniform, vector)
- honey.shader.set_vec4(self.program, uniform, vector.array)
-end
-
-Shader.prototype.setMat3 = function(self, uniform, matrix)
- honey.shader.set_mat3(self.program, uniform, matrix.array)
-end
-
-Shader.prototype.setMat4 = function(self, uniform, matrix)
- honey.shader.set_mat4(self.program, uniform, matrix.array)
-end
-
-Shader.prototype.drawMesh = function(self, mesh)
- honey.mesh.draw(mesh.mesh, self.program)
-end
-
-Shader.prototype.delete = function(self)
- honey.shader.delete(self.program)
-end
-
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Shader.mt = {}
-Shader.mt.__index = Shader.prototype
-
--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Shader.new = function(vertexCode, fragmentCode)
- local shader = {}
- shader.program = honey.shader.new(vertexCode, fragmentCode)
-
- setmetatable(shader, Shader.mt)
-
- return shader
-end
-
-return Shader