mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-17 17:05:24 +00:00
OS X enum refactor fixes
This commit is contained in:
@@ -173,18 +173,7 @@ enum class EWindowStyle
|
||||
|
||||
Default = Titlebar | Resize | Close
|
||||
};
|
||||
|
||||
inline EWindowStyle operator|(EWindowStyle a, EWindowStyle b)
|
||||
{
|
||||
using T = std::underlying_type_t<EWindowStyle>;
|
||||
return EWindowStyle(static_cast<T>(a) | static_cast<T>(b));
|
||||
}
|
||||
|
||||
inline EWindowStyle operator&(EWindowStyle a, EWindowStyle b)
|
||||
{
|
||||
using T = std::underlying_type_t<EWindowStyle>;
|
||||
return EWindowStyle(static_cast<T>(a) & static_cast<T>(b));
|
||||
}
|
||||
ENABLE_BITWISE_ENUM(EWindowStyle)
|
||||
|
||||
class IWindow
|
||||
{
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#ifndef GDEV_METAL_HPP
|
||||
#define GDEV_METAL_HPP
|
||||
#ifdef __APPLE__
|
||||
|
||||
#include <Availability.h>
|
||||
|
||||
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
|
||||
#define BOO_HAS_METAL 1
|
||||
|
||||
#include "IGraphicsDataFactory.hpp"
|
||||
#include "IGraphicsCommandQueue.hpp"
|
||||
@@ -22,7 +28,7 @@ public:
|
||||
MetalDataFactory(IGraphicsContext* parent, MetalContext* ctx);
|
||||
~MetalDataFactory() {}
|
||||
|
||||
Platform platform() const {return PlatformMetal;}
|
||||
Platform platform() const {return Platform::Metal;}
|
||||
const char* platformName() const {return "Metal";}
|
||||
|
||||
IGraphicsBufferS* newStaticBuffer(BufferUse use, const void* data, size_t stride, size_t count);
|
||||
@@ -59,4 +65,9 @@ public:
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
#define BOO_HAS_METAL 0
|
||||
#endif
|
||||
|
||||
#endif // __APPLE__
|
||||
#endif // GDEV_METAL_HPP
|
||||
|
||||
Reference in New Issue
Block a user