Skip to content
Snippets Groups Projects
Commit c0305598 authored by Sebastian Gaida's avatar Sebastian Gaida
Browse files

[#89] added swapchain handle to window

parent f79ebc8f
No related branches found
No related tags found
1 merge request!90Resolve "Mehrere Fenster, Abhängigkeiten von Core zu Fenster+Swapchain etc"
...@@ -13,6 +13,8 @@ namespace vkcv ...@@ -13,6 +13,8 @@ namespace vkcv
class Swapchain final { class Swapchain final {
private: private:
friend class Core; friend class Core;
friend class Window;
friend class SwapchainManager;
struct Surface struct Surface
{ {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include <string> #include <string>
#include "Event.hpp" #include "Event.hpp"
#include "Handles.hpp"
struct GLFWwindow; struct GLFWwindow;
...@@ -12,10 +13,12 @@ namespace vkcv { ...@@ -12,10 +13,12 @@ namespace vkcv {
class Window { class Window {
friend class WindowManager; friend class WindowManager;
friend class SwapchainManager;
private: private:
std::string m_title; std::string m_title;
bool m_resizable; bool m_resizable;
GLFWwindow *m_window; GLFWwindow *m_window;
SwapchainHandle m_swapchainHandle;
public: public:
/** /**
...@@ -130,6 +133,12 @@ namespace vkcv { ...@@ -130,6 +133,12 @@ namespace vkcv {
* @param height * @param height
*/ */
void getFramebufferSize(int& width, int& height) const; void getFramebufferSize(int& width, int& height) const;
/**
* gets the SwapchainHandle corresponding to the swapchain of the window
* @return
*/
SwapchainHandle getSwapchainHandle() const;
}; };
} }
...@@ -305,4 +305,8 @@ namespace vkcv { ...@@ -305,4 +305,8 @@ namespace vkcv {
Window& window = *static_cast<Window *>(glfwGetWindowUserPointer(*activeWindowIterator)); Window& window = *static_cast<Window *>(glfwGetWindowUserPointer(*activeWindowIterator));
return window; return window;
} }
SwapchainHandle Window::getSwapchainHandle() const {
return m_swapchainHandle;
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment