removing device builder
This commit is contained in:
+1
-19
@@ -32,13 +32,12 @@ struct SwapchainSupportDetails {
|
||||
|
||||
class Device {
|
||||
public:
|
||||
class Builder;
|
||||
|
||||
Device(const Device&) = delete;
|
||||
Device& operator=(const Device&) = delete;
|
||||
Device(Device&&) = delete;
|
||||
Device& operator=(Device&&) = delete;
|
||||
|
||||
Device(Window* window);
|
||||
~Device();
|
||||
|
||||
const vk::Device* get() const {
|
||||
@@ -87,8 +86,6 @@ class Device {
|
||||
vk::PhysicalDeviceProperties properties;
|
||||
|
||||
private:
|
||||
Device(Window* window);
|
||||
|
||||
void setupDebugMessenger();
|
||||
|
||||
bool checkValidationLayerSupport();
|
||||
@@ -130,19 +127,4 @@ class Device {
|
||||
const std::vector<const char*> enabledExtensions;
|
||||
};
|
||||
|
||||
class Device::Builder {
|
||||
public:
|
||||
Builder() = default;
|
||||
|
||||
Builder& withWindow(Window& window);
|
||||
Builder& headless();
|
||||
|
||||
std::unique_ptr<Device> build() const;
|
||||
|
||||
private:
|
||||
Window* window = nullptr;
|
||||
bool headlessRequested = false;
|
||||
bool modeSet = false;
|
||||
};
|
||||
|
||||
} // namespace sophia
|
||||
|
||||
Reference in New Issue
Block a user