54 static void Initialize()
56 LK_CORE_DEBUG_TAG(
"EditorResources",
"Loading icons");
58 Spec.SamplerWrap = ETextureWrap::Clamp;
59 Spec.Format = EImageFormat::RGBA32F;
63 FolderIcon = LoadTexture(
"Icon/Folder.png",
"FolderIcon", Spec);
64 FileIcon = LoadTexture(
"Icon/File.png",
"FileIcon", Spec);
65 ForwardIcon = LoadTexture(
"Icon/Forward.png",
"ForwardIcon", Spec);
66 BackwardIcon = LoadTexture(
"Icon/Backward.png",
"BackwardIcon", Spec);
67 PointerIcon = LoadTexture(
"Icon/Pointer.png",
"PointerIcon", Spec);
68 PencilIcon = LoadTexture(
"Icon/Pencil.png",
"PencilIcon", Spec);
69 SearchIcon = LoadTexture(
"Icon/Search.png",
"SearchIcon", Spec);
70 ClearIcon = LoadTexture(
"Icon/Clear.png",
"ClearIcon", Spec);
71 SaveIcon = LoadTexture(
"Icon/Save.png",
"SaveIcon", Spec);
72 RefreshIcon = LoadTexture(
"Icon/Refresh.png",
"RefreshIcon", Spec);
73 GearIcon = LoadTexture(
"Icon/Gear.png",
"GearIcon", Spec);
74 PlusIcon = LoadTexture(
"Icon/Plus.png",
"PlusIcon", Spec);
75 LK_CORE_ASSERT(FolderIcon && FileIcon);
76 LK_CORE_ASSERT(ForwardIcon && BackwardIcon && PointerIcon);
77 LK_CORE_ASSERT(GearIcon && PlusIcon);
82 LK_CORE_DEBUG_TAG(
"EditorResources",
"Releasing resources");
101 return LoadTexture(RelativePath,
"", Specification);
105 const std::string& Name,
108 Specification.DebugName = Name;
109 const std::filesystem::path Path = LFileSystem::GetResourcesDir() /
"Editor" / RelativePath;
110 Specification.Path = Path.string();
112 if (!LFileSystem::Exists(Path))
114 LK_CORE_VERIFY(
false,
"Failed to load texture '{}', the file does not exist", Path.string());
118 return LTexture2D::Create(Specification);