diff options
-rw-r--r-- | Data/DefaultContent/Libraries/GameLab/Engine/Resource/init.lua | 2 | ||||
-rw-r--r-- | Data/Scripts/EditorApplication.lua | 7 | ||||
-rw-r--r-- | Documents/问题记录.xlsx | bin | 0 -> 23318 bytes | |||
-rw-r--r-- | Runtime/Lua/LuaBind/LuaBindClass.hpp | 6 | ||||
-rw-r--r-- | Runtime/Lua/LuaBind/LuaBindState.h | 2 | ||||
-rw-r--r-- | Runtime/Lua/LuaBind/LuaBindUtility.h | 4 | ||||
-rw-r--r-- | Runtime/Scripting/Resource/Resource.bind.cpp | 2 |
7 files changed, 11 insertions, 12 deletions
diff --git a/Data/DefaultContent/Libraries/GameLab/Engine/Resource/init.lua b/Data/DefaultContent/Libraries/GameLab/Engine/Resource/init.lua index dd37dbb..a407869 100644 --- a/Data/DefaultContent/Libraries/GameLab/Engine/Resource/init.lua +++ b/Data/DefaultContent/Libraries/GameLab/Engine/Resource/init.lua @@ -9,7 +9,7 @@ m.ImageDataRequest = import("ImageDataRequest") -- methods m.LoadImageDataAsync = function(path) - local request = GameLab.Engine.ImageDataRequest.New() + local request = GameLab.Engine.Resource.ImageDataRequest.New() m.ReadImageDataAsync(path, function(imgData) request.isDone = true request.imageData = imgData diff --git a/Data/Scripts/EditorApplication.lua b/Data/Scripts/EditorApplication.lua index 852069d..6b42175 100644 --- a/Data/Scripts/EditorApplication.lua +++ b/Data/Scripts/EditorApplication.lua @@ -70,12 +70,11 @@ Debug.Log(tostring(imgData:GetHeight())) local tex = Rendering.Texture.New(imgData, false) -local requets = Rendering.LoadImageDataAsync("./Resources/Images/brickwall.jpg") +local requets = Resource.LoadImageDataAsync("./Resources/Images/brickwall.jpg") while true do - if requets.isDone then - Debug.Log("read image done!!!") - end + app:OnStep() app:PullMessage() + end diff --git a/Documents/问题记录.xlsx b/Documents/问题记录.xlsx Binary files differnew file mode 100644 index 0000000..f7099d6 --- /dev/null +++ b/Documents/问题记录.xlsx diff --git a/Runtime/Lua/LuaBind/LuaBindClass.hpp b/Runtime/Lua/LuaBind/LuaBindClass.hpp index 7fb4529..1da8513 100644 --- a/Runtime/Lua/LuaBind/LuaBindClass.hpp +++ b/Runtime/Lua/LuaBind/LuaBindClass.hpp @@ -154,7 +154,7 @@ namespace LuaBind { LUA_BIND_SETUP(L, "*"); - cc8* type = TYPE::GetClassName(); + cc8* type = TYPE::GetNativeClassName(); state.Push(type); return 1; } @@ -482,7 +482,7 @@ namespace LuaBind assert(self); #if LUA_BIND_PROFILER - std::cout << ": GC<" << TYPE::GetClassName() << ">\n"; + std::cout << ": GC<" << TYPE::GetNativeClassName() << ">\n"; #endif if (self->mWatchDog.mVMRef > 0) @@ -517,7 +517,7 @@ namespace LuaBind } else { - classname = TYPE::GetClassName(); + classname = TYPE::GetNativeClassName(); } lua_pushfstring(L, "%s: %p", classname, self); return 1; diff --git a/Runtime/Lua/LuaBind/LuaBindState.h b/Runtime/Lua/LuaBind/LuaBindState.h index 071287f..a47ed5d 100644 --- a/Runtime/Lua/LuaBind/LuaBindState.h +++ b/Runtime/Lua/LuaBind/LuaBindState.h @@ -387,7 +387,7 @@ namespace LuaBind Pop(1); // ref table } } - luaL_typerror(mState, idx, TYPE::GetClassName()); + luaL_typerror(mState, idx, TYPE::GetNativeClassName()); return nullptr; } diff --git a/Runtime/Lua/LuaBind/LuaBindUtility.h b/Runtime/Lua/LuaBind/LuaBindUtility.h index 9cc4802..c5807c1 100644 --- a/Runtime/Lua/LuaBind/LuaBindUtility.h +++ b/Runtime/Lua/LuaBind/LuaBindUtility.h @@ -10,8 +10,8 @@ friend class LuaBind::NativeClass<type,##__VA_ARGS__>; \ static void RegisterClass(LuaBind::State&); \ static void RegisterPostprocess(LuaBind::State&); \ - static const char* GetNativeClassName() { return #type; };\ - static const char* GetClassName() { return #type; }; + static const char* GetNativeClassName() { return #type; }; + //static const char* GetClassName() { return #type; }; // ×÷Ϊ»ùÀàµÄ³éÏ󹤳§Àà¿ÉÒÔʹÓô˺꣬ע²áÒ»¸öÈë¿Ú£¬ÔÚÅÉÉúÀàµÄ×¢²áº¯ÊýÖе÷Óã¬×¢²á»ùÀàµÄÕâЩ·½·¨¡£ #define LUA_BIND_DECL_ABSTRACT_CLASS() \ diff --git a/Runtime/Scripting/Resource/Resource.bind.cpp b/Runtime/Scripting/Resource/Resource.bind.cpp index b4ba025..785115a 100644 --- a/Runtime/Scripting/Resource/Resource.bind.cpp +++ b/Runtime/Scripting/Resource/Resource.bind.cpp @@ -8,7 +8,7 @@ using namespace LuaBind; int ReadImageDataAsync(lua_State* L) { LUA_BIND_STATE(L); - LUA_BIND_CHECK(L, "TF"); + LUA_BIND_CHECK(L, "SF"); cc8* path = state.GetValue(1, ""); |