summaryrefslogtreecommitdiff
path: root/Source/Asura.Framework/Graphics
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-01-28 11:34:56 +0800
committerchai <chaifix@163.com>2019-01-28 11:34:56 +0800
commit5e2c00b40695415e3beefa77868afd7315391665 (patch)
treefaa5e4021bd2b55a9b51da842958f61bc094927f /Source/Asura.Framework/Graphics
parentce5343ec4e5766f6a7485649f7395d4e072bd706 (diff)
*misc
Diffstat (limited to 'Source/Asura.Framework/Graphics')
-rw-r--r--Source/Asura.Framework/Graphics/Animation.lua7
-rw-r--r--Source/Asura.Framework/Graphics/Material.lua22
-rw-r--r--Source/Asura.Framework/Graphics/Renderer.lua8
-rw-r--r--Source/Asura.Framework/Graphics/particle_system.lua7
-rw-r--r--Source/Asura.Framework/Graphics/sprite_renderer.lua11
5 files changed, 41 insertions, 14 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/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/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/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/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