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
373 B
C++
Raw Normal View History

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