Trying to fix other passes

This commit is contained in:
2023-11-11 13:56:12 +01:00
parent 91555fcec3
commit 4c05886d38
24 changed files with 5792 additions and 93 deletions
+11
View File
@@ -73,6 +73,7 @@ void TextureAsset::save(ArchiveBuffer&) const
void TextureAsset::load(ArchiveBuffer& buffer)
{
Gfx::PGraphics graphics = buffer.getGraphics();
Serialization::load(buffer, rawPixels);
Array<uint8> rawData;
Serialization::load(buffer, rawData);
ktxTexture2* kTexture;
@@ -119,3 +120,13 @@ void TextureAsset::setTexture(Gfx::OTexture _texture)
{
texture = std::move(_texture);
}
uint32 TextureAsset::getWidth()
{
return texture->getSizeX();
}
uint32 TextureAsset::getHeight()
{
return texture->getSizeY();
}
+7
View File
@@ -18,7 +18,14 @@ public:
{
return texture;
}
const Array<uint8>& getRawPixels()
{
return rawPixels;
}
uint32 getWidth();
uint32 getHeight();
private:
Array<uint8> rawPixels;
Gfx::OTexture texture;
friend class TextureLoader;
};