Add additional Asset types

- Add Framebuffer Asset
- Add Pipeline Asset
- Add RenderTexture Asset
This commit is contained in:
Thraix
2023-04-22 21:00:34 +02:00
parent 0246e89039
commit 1731bb1dd5
34 changed files with 322 additions and 171 deletions
@@ -10,7 +10,6 @@
namespace Copium
{
Texture2D::Texture2D(const MetaFile& metaFile)
: Sampler{}, Asset{AssetType::Texture2D}
{
const std::string& filepath = metaFile.GetMetaClass("Texture2D").GetValue("filepath");
CP_DEBUG("Loading texture file: %s", filepath.c_str());
@@ -18,7 +17,6 @@ namespace Copium
}
Texture2D::Texture2D(const std::vector<uint8_t>& rgbaData, int width, int height)
: Sampler{}, Asset{AssetType::Texture2D}
{
CP_ASSERT(rgbaData.size() == width * height * 4, "rgbaData has invalid size, should be equal to width * height * 4 (%d) actually is %d", width * height * 4, rgbaData.size());
InitializeTextureImageFromData((void*)rgbaData.data(), width, height);