mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-04 03:04:48 +12:00
make lut texture 2D
This commit is contained in:
parent
8a1d9d5a22
commit
4a9fb9bdc3
6 changed files with 46 additions and 38 deletions
|
@ -19,13 +19,13 @@ public:
|
|||
VertexBufferCache() = default;
|
||||
|
||||
~VertexBufferCache() {
|
||||
reset();
|
||||
endFrame();
|
||||
buffer->release();
|
||||
}
|
||||
|
||||
void set(MTL::Device* dev) {
|
||||
device = dev;
|
||||
buffer = device->newBuffer(CACHE_BUFFER_SIZE, MTL::ResourceStorageModeShared);
|
||||
buffer->setLabel(toNSString("Shared vertex buffer"));
|
||||
create();
|
||||
}
|
||||
|
||||
void endFrame() {
|
||||
|
@ -59,6 +59,7 @@ public:
|
|||
void reset() {
|
||||
endFrame();
|
||||
buffer->release();
|
||||
create();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -67,6 +68,11 @@ private:
|
|||
std::vector<MTL::Buffer*> additionalAllocations;
|
||||
|
||||
MTL::Device* device;
|
||||
|
||||
void create() {
|
||||
buffer = device->newBuffer(CACHE_BUFFER_SIZE, MTL::ResourceStorageModeShared);
|
||||
buffer->setLabel(toNSString("Shared vertex buffer"));
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Metal
|
||||
|
|
|
@ -57,7 +57,7 @@ class RendererMTL final : public Renderer {
|
|||
// Objects
|
||||
MTL::SamplerState* nearestSampler;
|
||||
MTL::SamplerState* linearSampler;
|
||||
MTL::Texture* lightLUTTextureArray;
|
||||
MTL::Texture* lutTexture;
|
||||
MTL::DepthStencilState* defaultDepthStencilState;
|
||||
|
||||
// Pipelines
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue