From b3b6d64ae9ebf07268b5b931ce9cca5ed5860cfd Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 14 Jan 2019 08:34:29 +0800 Subject: =?UTF-8?q?*=E6=9D=90=E8=B4=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build/3rdParty/glad/glad.vcxproj | 122 +++++++++++++++++++ Build/3rdParty/glad/glad.vcxproj.filters | 2 + Build/3rdParty/glad/glad.vcxproj.user | 4 + Build/3rdParty/lua51/lua51.vcxproj | 182 +++++++++++++++++++++++++++++ Build/3rdParty/lua51/lua51.vcxproj.filters | 65 +++++++++++ Build/3rdParty/lua51/lua51.vcxproj.user | 4 + Build/Asura.sln | 31 +++-- Build/Lua51/Lua51.vcxproj | 182 ----------------------------- Build/Lua51/Lua51.vcxproj.filters | 65 ----------- Build/Lua51/Lua51.vcxproj.user | 4 - Source/Asura/Graphics/Material.cpp | 18 +++ Source/Asura/Graphics/Material.h | 29 +++-- Source/Asura/Graphics/Renderer.cpp | 0 Source/Asura/Graphics/Renderer.h | 27 +++++ 14 files changed, 465 insertions(+), 270 deletions(-) create mode 100644 Build/3rdParty/glad/glad.vcxproj create mode 100644 Build/3rdParty/glad/glad.vcxproj.filters create mode 100644 Build/3rdParty/glad/glad.vcxproj.user create mode 100644 Build/3rdParty/lua51/lua51.vcxproj create mode 100644 Build/3rdParty/lua51/lua51.vcxproj.filters create mode 100644 Build/3rdParty/lua51/lua51.vcxproj.user delete mode 100644 Build/Lua51/Lua51.vcxproj delete mode 100644 Build/Lua51/Lua51.vcxproj.filters delete mode 100644 Build/Lua51/Lua51.vcxproj.user create mode 100644 Source/Asura/Graphics/Renderer.cpp create mode 100644 Source/Asura/Graphics/Renderer.h diff --git a/Build/3rdParty/glad/glad.vcxproj b/Build/3rdParty/glad/glad.vcxproj new file mode 100644 index 0000000..70e2869 --- /dev/null +++ b/Build/3rdParty/glad/glad.vcxproj @@ -0,0 +1,122 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {C0ED7D78-570B-454A-B3B6-576FDCB43D69} + glad + 10.0.17134.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + true + + + + + Level3 + Disabled + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + + + + \ No newline at end of file diff --git a/Build/3rdParty/glad/glad.vcxproj.filters b/Build/3rdParty/glad/glad.vcxproj.filters new file mode 100644 index 0000000..9cd8510 --- /dev/null +++ b/Build/3rdParty/glad/glad.vcxproj.filters @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Build/3rdParty/glad/glad.vcxproj.user b/Build/3rdParty/glad/glad.vcxproj.user new file mode 100644 index 0000000..be25078 --- /dev/null +++ b/Build/3rdParty/glad/glad.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Build/3rdParty/lua51/lua51.vcxproj b/Build/3rdParty/lua51/lua51.vcxproj new file mode 100644 index 0000000..0b1df9c --- /dev/null +++ b/Build/3rdParty/lua51/lua51.vcxproj @@ -0,0 +1,182 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076} + lua51 + 10.0.17134.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + true + + + + + Level3 + Disabled + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Build/3rdParty/lua51/lua51.vcxproj.filters b/Build/3rdParty/lua51/lua51.vcxproj.filters new file mode 100644 index 0000000..416c92e --- /dev/null +++ b/Build/3rdParty/lua51/lua51.vcxproj.filters @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Build/3rdParty/lua51/lua51.vcxproj.user b/Build/3rdParty/lua51/lua51.vcxproj.user new file mode 100644 index 0000000..be25078 --- /dev/null +++ b/Build/3rdParty/lua51/lua51.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Build/Asura.sln b/Build/Asura.sln index 0731185..b1cff60 100644 --- a/Build/Asura.sln +++ b/Build/Asura.sln @@ -13,7 +13,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Editor", "Editor\Editor.vcx EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Luax", "3rdParty\Luax\Luax.vcxproj", "{1350CEE9-B2C2-426A-AF4E-F651D51DD592}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lua51", "Lua51\Lua51.vcxproj", "{DFE6C528-0F03-4512-85D3-B4A632518F12}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glad", "3rdParty\glad\glad.vcxproj", "{C0ED7D78-570B-454A-B3B6-576FDCB43D69}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua51", "3rdParty\lua51\lua51.vcxproj", "{8B8FCA14-FC8A-45B4-BF3C-9340CB586076}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -55,21 +57,30 @@ Global {1350CEE9-B2C2-426A-AF4E-F651D51DD592}.Release|x64.Build.0 = Release|x64 {1350CEE9-B2C2-426A-AF4E-F651D51DD592}.Release|x86.ActiveCfg = Release|Win32 {1350CEE9-B2C2-426A-AF4E-F651D51DD592}.Release|x86.Build.0 = Release|Win32 - {DFE6C528-0F03-4512-85D3-B4A632518F12}.Debug|x64.ActiveCfg = Debug|x64 - {DFE6C528-0F03-4512-85D3-B4A632518F12}.Debug|x64.Build.0 = Debug|x64 - {DFE6C528-0F03-4512-85D3-B4A632518F12}.Debug|x86.ActiveCfg = Debug|Win32 - {DFE6C528-0F03-4512-85D3-B4A632518F12}.Debug|x86.Build.0 = Debug|Win32 - {DFE6C528-0F03-4512-85D3-B4A632518F12}.Release|x64.ActiveCfg = Release|x64 - {DFE6C528-0F03-4512-85D3-B4A632518F12}.Release|x64.Build.0 = Release|x64 - {DFE6C528-0F03-4512-85D3-B4A632518F12}.Release|x86.ActiveCfg = Release|Win32 - {DFE6C528-0F03-4512-85D3-B4A632518F12}.Release|x86.Build.0 = Release|Win32 + {C0ED7D78-570B-454A-B3B6-576FDCB43D69}.Debug|x64.ActiveCfg = Debug|x64 + {C0ED7D78-570B-454A-B3B6-576FDCB43D69}.Debug|x64.Build.0 = Debug|x64 + {C0ED7D78-570B-454A-B3B6-576FDCB43D69}.Debug|x86.ActiveCfg = Debug|Win32 + {C0ED7D78-570B-454A-B3B6-576FDCB43D69}.Debug|x86.Build.0 = Debug|Win32 + {C0ED7D78-570B-454A-B3B6-576FDCB43D69}.Release|x64.ActiveCfg = Release|x64 + {C0ED7D78-570B-454A-B3B6-576FDCB43D69}.Release|x64.Build.0 = Release|x64 + {C0ED7D78-570B-454A-B3B6-576FDCB43D69}.Release|x86.ActiveCfg = Release|Win32 + {C0ED7D78-570B-454A-B3B6-576FDCB43D69}.Release|x86.Build.0 = Release|Win32 + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076}.Debug|x64.ActiveCfg = Debug|x64 + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076}.Debug|x64.Build.0 = Debug|x64 + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076}.Debug|x86.ActiveCfg = Debug|Win32 + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076}.Debug|x86.Build.0 = Debug|Win32 + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076}.Release|x64.ActiveCfg = Release|x64 + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076}.Release|x64.Build.0 = Release|x64 + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076}.Release|x86.ActiveCfg = Release|Win32 + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {1350CEE9-B2C2-426A-AF4E-F651D51DD592} = {64D4E4B2-4A60-46F4-A500-370EFED4524F} - {DFE6C528-0F03-4512-85D3-B4A632518F12} = {64D4E4B2-4A60-46F4-A500-370EFED4524F} + {C0ED7D78-570B-454A-B3B6-576FDCB43D69} = {64D4E4B2-4A60-46F4-A500-370EFED4524F} + {8B8FCA14-FC8A-45B4-BF3C-9340CB586076} = {64D4E4B2-4A60-46F4-A500-370EFED4524F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {331032D8-F7CC-43E3-A03B-67108767F96B} diff --git a/Build/Lua51/Lua51.vcxproj b/Build/Lua51/Lua51.vcxproj deleted file mode 100644 index 28d30f3..0000000 --- a/Build/Lua51/Lua51.vcxproj +++ /dev/null @@ -1,182 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {DFE6C528-0F03-4512-85D3-B4A632518F12} - Lua51 - 10.0.17134.0 - - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - Application - true - v141 - MultiByte - - - Application - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - Level3 - Disabled - true - true - - - - - Level3 - Disabled - true - true - - - - - Level3 - MaxSpeed - true - true - true - true - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - true - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/Lua51/Lua51.vcxproj.filters b/Build/Lua51/Lua51.vcxproj.filters deleted file mode 100644 index f8d1d7b..0000000 --- a/Build/Lua51/Lua51.vcxproj.filters +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Build/Lua51/Lua51.vcxproj.user b/Build/Lua51/Lua51.vcxproj.user deleted file mode 100644 index be25078..0000000 --- a/Build/Lua51/Lua51.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Source/Asura/Graphics/Material.cpp b/Source/Asura/Graphics/Material.cpp index e69de29..eaf9742 100644 --- a/Source/Asura/Graphics/Material.cpp +++ b/Source/Asura/Graphics/Material.cpp @@ -0,0 +1,18 @@ +#include "Material.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + + + //-------------------------------------------------------------------------------------------------------- + + int Material::l_SetColor(lua_State* L) + { + + } + + } +} diff --git a/Source/Asura/Graphics/Material.h b/Source/Asura/Graphics/Material.h index 538e651..6093d18 100644 --- a/Source/Asura/Graphics/Material.h +++ b/Source/Asura/Graphics/Material.h @@ -2,6 +2,7 @@ #define __AE_MATERIAL_H__ #include "Containers/Vector.hpp" +#include "Containers/String.h" #include "Math/Vector2.h" #include "Math/Vector3.h" #include "Math/Vector4.h" @@ -24,8 +25,16 @@ namespace AsuraEngine class Material : public Object { public: + Material(); + Material(const Material& srcMat); + ~Material(); + + Material* Clone(); + // ÉèÖÃUniform±äÁ¿ + static int GetUniformID(const Containers::String& name); + void SetTexture(int ID, Texture* texture); void SetVector2(int ID, Math::Vector2* vector2); void SetVector3(int ID, Math::Vector3* vector3); @@ -41,15 +50,17 @@ namespace AsuraEngine //---------------------------------------------------------------------------------------------------- - LUAX_DECL_METHOD( _SetTexture ); - LUAX_DECL_METHOD( _SetVector2 ); - LUAX_DECL_METHOD( _SetVector3 ); - LUAX_DECL_METHOD( _SetVector4 ); - LUAX_DECL_METHOD( _SetMatrix44 ); - LUAX_DECL_METHOD( _SetFloat ); - LUAX_DECL_METHOD( _SetInteger ); - LUAX_DECL_METHOD( _SetColor ); - LUAX_DECL_METHOD( _SetVertexAttributes ); + LUAX_DECL_FACTORY( Material ); + + LUAX_DECL_METHOD( l_SetTexture ); + LUAX_DECL_METHOD( l_SetVector2 ); + LUAX_DECL_METHOD( l_SetVector3 ); + LUAX_DECL_METHOD( l_SetVector4 ); + LUAX_DECL_METHOD( l_SetMatrix44 ); + LUAX_DECL_METHOD( l_SetFloat ); + LUAX_DECL_METHOD( l_SetInteger ); + LUAX_DECL_METHOD( l_SetColor ); + LUAX_DECL_METHOD( l_SetVertexAttributes ); private: //Color mColor; diff --git a/Source/Asura/Graphics/Renderer.cpp b/Source/Asura/Graphics/Renderer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Source/Asura/Graphics/Renderer.h b/Source/Asura/Graphics/Renderer.h new file mode 100644 index 0000000..004bbe4 --- /dev/null +++ b/Source/Asura/Graphics/Renderer.h @@ -0,0 +1,27 @@ +#ifndef __AE_RENDERER_H__ +#define __AE_RENDERER_H__ + +#include "Material.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + class Renderer + { + public: + /// + /// + /// + Material* GetMaterial(); + + private: + Material* mMaterial; + + }; + + } +} + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0