#pragma once #include "DeerRender/Resource.h" #include "scriptarray.h" #include "scriptdictionary.h" #include #include #include "DeerRender/Resource.h" namespace Deer { class FrameBuffer; class GPUMesh; namespace Scripting { template std::string resource_getPath(Resource resource) { return ResourceManager::getStorageId(resource); } template std::string resource_getName(Resource resource) { return ResourceManager::getStorageId(resource).stem().string(); } enum ResourceType : uint32_t { NONE = 0, MESH = 1, SHADER = 2, TEXTURE = 3, }; CScriptArray* getResourceFolders(std::string& path); CScriptArray* getResourceFiles(std::string& path); // GENERIC RESOURCE template bool resource_isValid(Resource& resource) { return resource.isValid(); } template std::string resource_getPath(Resource& resource) { return resource.getStorageId(); } template std::string resource_getName(Resource& resource) { return Path(resource.getStorageId()).stem().string(); } // Frame Buffer int frameBuffer_getWidth(Resource&); int frameBuffer_getHeight(Resource&); void frameBuffer_clearRGBA(int, int, int, int, Resource&); bool frameBuffer_isValid(Resource&); void frameBuffer_resize(int, int, Resource&); Resource createFrameBuffer(std::string& name, int sixeX, int sizeY); } // namespace Scripting } // namespace Deer