Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/engine/gfx/metal/src/gfx_metal_buffer.hpp

20 lines
381 B
C++
Raw Normal View History

#pragma once
#include <Metal/Metal.hpp>
#include "gfx_buffer.hpp"
class GFXMetalBuffer : public GFXBuffer {
public:
MTL::Buffer* handles[3] = {nullptr, nullptr, nullptr};
bool dynamicData = false;
MTL::Buffer* get(int frameIndex) {
if(dynamicData) {
return handles[frameIndex];
} else {
return handles[0];
}
}
};