forked from Dynamitos/Seele
Formatted EVERYTHING
This commit is contained in:
1 parent
f18bf8acbe
commit
d95dab850c
265 files changed
+8002
-12310
No files matched your search
@@ -10,58 +10,51 @@
|
||||
namespace Seele {
|
||||
namespace Metal {
|
||||
DECLARE_REF(Graphics);
|
||||
class CommandBoundResource
|
||||
{
|
||||
public:
|
||||
CommandBoundResource(PGraphics graphics)
|
||||
: graphics(graphics)
|
||||
{
|
||||
}
|
||||
virtual ~CommandBoundResource()
|
||||
{
|
||||
class CommandBoundResource {
|
||||
public:
|
||||
CommandBoundResource(PGraphics graphics) : graphics(graphics) {}
|
||||
virtual ~CommandBoundResource() {
|
||||
if (isCurrentlyBound())
|
||||
abort();
|
||||
}
|
||||
constexpr bool isCurrentlyBound() const { return bindCount > 0; }
|
||||
constexpr void bind() { bindCount++; }
|
||||
constexpr void unbind() { bindCount--; }
|
||||
protected:
|
||||
|
||||
protected:
|
||||
PGraphics graphics;
|
||||
uint64 bindCount = 0;
|
||||
};
|
||||
DEFINE_REF(CommandBoundResource)
|
||||
|
||||
class Fence {
|
||||
public:
|
||||
Fence(PGraphics graphics);
|
||||
~Fence();
|
||||
MTL::Fence *getHandle() const { return handle; }
|
||||
public:
|
||||
Fence(PGraphics graphics);
|
||||
~Fence();
|
||||
MTL::Fence* getHandle() const { return handle; }
|
||||
|
||||
private:
|
||||
MTL::Fence *handle;
|
||||
private:
|
||||
MTL::Fence* handle;
|
||||
};
|
||||
DEFINE_REF(Fence);
|
||||
class Event {
|
||||
public:
|
||||
Event(PGraphics graphics);
|
||||
~Event();
|
||||
MTL::Event *getHandle() const { return handle; }
|
||||
public:
|
||||
Event(PGraphics graphics);
|
||||
~Event();
|
||||
MTL::Event* getHandle() const { return handle; }
|
||||
|
||||
private:
|
||||
MTL::Event *handle;
|
||||
private:
|
||||
MTL::Event* handle;
|
||||
};
|
||||
DEFINE_REF(Event)
|
||||
class Sampler : public Gfx::Sampler
|
||||
{
|
||||
public:
|
||||
Sampler(PGraphics graphics, const SamplerCreateInfo& createInfo);
|
||||
virtual ~Sampler();
|
||||
MTL::SamplerState* getHandle() const
|
||||
{
|
||||
return sampler;
|
||||
}
|
||||
private:
|
||||
MTL::SamplerState* sampler;
|
||||
class Sampler : public Gfx::Sampler {
|
||||
public:
|
||||
Sampler(PGraphics graphics, const SamplerCreateInfo& createInfo);
|
||||
virtual ~Sampler();
|
||||
MTL::SamplerState* getHandle() const { return sampler; }
|
||||
|
||||
private:
|
||||
MTL::SamplerState* sampler;
|
||||
};
|
||||
DEFINE_REF(Sampler)
|
||||
} // namespace Metal
|
||||
|
||||
Reference in new issue
Block a user