summaryrefslogtreecommitdiff
path: root/Source/Asura.Framework/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Asura.Framework/graphics')
-rw-r--r--Source/Asura.Framework/graphics/animation.lua7
-rw-r--r--Source/Asura.Framework/graphics/canvas.lua2
-rw-r--r--Source/Asura.Framework/graphics/material.lua22
-rw-r--r--Source/Asura.Framework/graphics/mesh2d.lua6
-rw-r--r--Source/Asura.Framework/graphics/particle_system.lua7
-rw-r--r--Source/Asura.Framework/graphics/renderer.lua8
-rw-r--r--Source/Asura.Framework/graphics/sprite_renderer.lua11
7 files changed, 47 insertions, 16 deletions
diff --git a/Source/Asura.Framework/graphics/animation.lua b/Source/Asura.Framework/graphics/animation.lua
index 8b52683..c4ff33b 100644
--- a/Source/Asura.Framework/graphics/animation.lua
+++ b/Source/Asura.Framework/graphics/animation.lua
@@ -1,6 +1,3 @@
---animation assetĬԴ
-local Animation = AsuraEngine.Asset.New("animation")
+local Animation = AsuraEngine.Asset.Sub("Animation")
+AsuraEngine.Animation = Animation
-
-
-AsuraEngine.Animation = Animation \ No newline at end of file
diff --git a/Source/Asura.Framework/graphics/canvas.lua b/Source/Asura.Framework/graphics/canvas.lua
index b0a2cfb..0b880c5 100644
--- a/Source/Asura.Framework/graphics/canvas.lua
+++ b/Source/Asura.Framework/graphics/canvas.lua
@@ -14,5 +14,3 @@ end
function Canvas.OnDisable(self)
end
-
-
diff --git a/Source/Asura.Framework/graphics/material.lua b/Source/Asura.Framework/graphics/material.lua
index e50b273..01f8688 100644
--- a/Source/Asura.Framework/graphics/material.lua
+++ b/Source/Asura.Framework/graphics/material.lua
@@ -6,6 +6,10 @@ function Material:Ctor()
self.isShared = false
end
+function Material.Clone(self)
+
+end
+
function Material:ToAsset()
end
@@ -14,10 +18,26 @@ function Material:GetUniform(name)
end
-function Material:SetFloat()
+function Material:SetFloat(uniform, value)
end
+function Material:SetTexture(uniform, tex)
+
+end
+
+function Material:SetInteger(unifrom, value)
+
+end
+
+function Material:SetVec2(uniform, value)
+
+end
+
+function Material:SetMat44(uniform, value)
+
+end
+
function Material:GetUniformID()
end
diff --git a/Source/Asura.Framework/graphics/mesh2d.lua b/Source/Asura.Framework/graphics/mesh2d.lua
index e69de29..1c53608 100644
--- a/Source/Asura.Framework/graphics/mesh2d.lua
+++ b/Source/Asura.Framework/graphics/mesh2d.lua
@@ -0,0 +1,6 @@
+local Mesh2D = AsuraEngine.Asset.Sub("Mesh2D")
+AsuraEngine.Mesh2D = Mesh2D
+
+function Mesh2D.Ctor(self)
+
+end \ No newline at end of file
diff --git a/Source/Asura.Framework/graphics/particle_system.lua b/Source/Asura.Framework/graphics/particle_system.lua
index 21c35b8..a5f8015 100644
--- a/Source/Asura.Framework/graphics/particle_system.lua
+++ b/Source/Asura.Framework/graphics/particle_system.lua
@@ -1,3 +1,6 @@
---ϵͳһ
+local ParticleSystem = AsuraEngine.Component.Sub("ParticleSystem")
+AsuraEngine.ParticleSystem = ParticleSystem
-local ParticleSystem
+function ParticleSystem.Ctor(self)
+
+end
diff --git a/Source/Asura.Framework/graphics/renderer.lua b/Source/Asura.Framework/graphics/renderer.lua
index 1e44c73..9e75026 100644
--- a/Source/Asura.Framework/graphics/renderer.lua
+++ b/Source/Asura.Framework/graphics/renderer.lua
@@ -1,3 +1,9 @@
-local Renderer = Class()
+local Renderer = AsuraEngine.Component.Sub("Renderer")
+AsuraEngine.Renderer = Renderer
+
+--取材质,如果是shared,那么从此材质clone一个
+function Renderer.GetMaterial(self)
+
+end
return Renderer \ No newline at end of file
diff --git a/Source/Asura.Framework/graphics/sprite_renderer.lua b/Source/Asura.Framework/graphics/sprite_renderer.lua
index 79177ba..1cbebd7 100644
--- a/Source/Asura.Framework/graphics/sprite_renderer.lua
+++ b/Source/Asura.Framework/graphics/sprite_renderer.lua
@@ -1,7 +1,8 @@
-local SpriteRenderer = Class()
+require "graphics.renderer"
-function SpriteRenderer:OnRender()
-
-end
+local SpriteRenderer = AsuraEngine.Renderer.Sub("Spriterenderer")
+AsuraEngine.SpriteRenderer = SpriteRenderer
-return SpriteRenderer \ No newline at end of file
+function SpriteRenderer:OnRender()
+
+end