mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-08 08:12:57 +12:00
fix: fog
This commit is contained in:
parent
4a9fb9bdc3
commit
37cf0ad0b2
6 changed files with 37 additions and 44 deletions
|
@ -58,12 +58,14 @@ public:
|
|||
|
||||
void reset() {
|
||||
endFrame();
|
||||
buffer->release();
|
||||
create();
|
||||
if (buffer) {
|
||||
buffer->release();
|
||||
create();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
MTL::Buffer* buffer;
|
||||
MTL::Buffer* buffer = nullptr;
|
||||
size_t ptr = 0;
|
||||
std::vector<MTL::Buffer*> additionalAllocations;
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ inline MTL::PixelFormat toMTLPixelFormatColor(ColorFmt format) {
|
|||
switch (format) {
|
||||
case ColorFmt::RGBA8: return MTL::PixelFormatRGBA8Unorm;
|
||||
case ColorFmt::RGB8: return MTL::PixelFormatRGBA8Unorm;
|
||||
case ColorFmt::RGBA5551: return MTL::PixelFormatBGR5A1Unorm;
|
||||
case ColorFmt::RGB565: return MTL::PixelFormatB5G6R5Unorm;
|
||||
case ColorFmt::RGBA5551: return MTL::PixelFormatRGBA8Unorm; // TODO: use MTL::PixelFormatBGR5A1Unorm?
|
||||
case ColorFmt::RGB565: return MTL::PixelFormatRGBA8Unorm; // TODO: use MTL::PixelFormatB5G6R5Unorm?
|
||||
case ColorFmt::RGBA4: return MTL::PixelFormatABGR4Unorm;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue