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
class Swapchain final {
private:
friend class Core;
friend class Window;
friend class SwapchainManager;
struct Surface
{
......
......@@ -5,6 +5,7 @@
#include <string>
#include "Event.hpp"
#include "Handles.hpp"
struct GLFWwindow;
......@@ -12,10 +13,12 @@ namespace vkcv {
class Window {
friend class WindowManager;
friend class SwapchainManager;
private:
std::string m_title;
bool m_resizable;
GLFWwindow *m_window;
SwapchainHandle m_swapchainHandle;
public:
/**
......@@ -130,6 +133,12 @@ namespace vkcv {
* @param height
*/
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 {
Window& window = *static_cast<Window *>(glfwGetWindowUserPointer(*activeWindowIterator));
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