~sircmpwn/xrgears

f53b7eaffce0ac98c6541802803df215df383f11 — Lubosz Sarnecki 4 years ago c4afd33
make vkc and vks classes inherit from abstact vik classes.
M vitamin-k/vikApplication.hpp => vitamin-k/vikApplication.hpp +2 -2
@@ 3,7 3,7 @@
namespace vik {
class Application {
public:
    Application();
    ~Application();
    Application() {}
    ~Application()  {}
};
}

M vitamin-k/vikRenderer.hpp => vitamin-k/vikRenderer.hpp +2 -2
@@ 3,7 3,7 @@
namespace vik {
class Renderer {
public:
    Renderer();
    ~Renderer();
    Renderer() {}
    ~Renderer() {}
};
}

M vitamin-k/vikSwapchain.hpp => vitamin-k/vikSwapchain.hpp +2 -2
@@ 3,7 3,7 @@
namespace vik {
class SwapChain {
public:
    SwapChain();
    ~SwapChain();
    SwapChain() {}
    ~SwapChain() {}
};
}

M vitamin-k/vikWindow.hpp => vitamin-k/vikWindow.hpp +2 -2
@@ 3,7 3,7 @@
namespace vik {
class Window {
public:
    Window();
    ~Window();
    Window() {}
    ~Window() {}
};
}

M vkc/vkcApplication.hpp => vkc/vkcApplication.hpp +3 -1
@@ 4,13 4,15 @@
#include <stdio.h>
#include <string.h>

#include "../vitamin-k/vikApplication.hpp"

#include "../vkc/vkcWindow.hpp"

namespace vkc {

class Renderer;

class Application {
class Application : public vik::Application {
public:
   Renderer *renderer;
   Window *display;

M vkc/vkcRenderer.hpp => vkc/vkcRenderer.hpp +2 -1
@@ 5,10 5,11 @@

#include "vkcSwapChainVK.hpp"
#include "vkcSwapChainDRM.hpp"
#include "vikRenderer.hpp"

namespace vkc {

class Renderer {
class Renderer : public vik::Renderer {
public:
  SwapChain *swap_chain;


M vkc/vkcSwapChain.hpp => vkc/vkcSwapChain.hpp +3 -1
@@ 2,6 2,8 @@

#include <vulkan/vulkan.h>

#include "vikSwapchain.hpp"

#define MAX_NUM_IMAGES 4

namespace vkc {


@@ 12,7 14,7 @@ struct RenderBuffer {
  VkFramebuffer framebuffer;
};

class SwapChain {
class SwapChain : public vik::SwapChain {
public:
  RenderBuffer buffers[MAX_NUM_IMAGES];


M vkc/vkcWindow.hpp => vkc/vkcWindow.hpp +3 -1
@@ 3,6 3,8 @@
#include <string>
#include <functional>

#include "vikWindow.hpp"

namespace vkc {
class Renderer;



@@ 13,7 15,7 @@ enum window_type {
  WAYLAND,
};

class Window {
class Window : public vik::Window {
public:
  std::string name;


M vks/vksApplication.hpp => vks/vksApplication.hpp +2 -2
@@ 34,12 34,12 @@
#include "vksFrameCounter.hpp"
#include "vksSettings.hpp"


#include "../vitamin-k/vikApplication.hpp"

namespace vks {
class Window;

class Application {
class Application : public vik::Application {

 public:
  vks::Renderer *renderer;

M vks/vksRenderer.hpp => vks/vksRenderer.hpp +2 -2
@@ 3,14 3,14 @@
#include <string>

#include <vulkan/vulkan.h>
//#include "../vks/vksWindow.hpp"
#include "../vks/vksSettings.hpp"
#include "../vitamin-k/vikRenderer.hpp"

namespace vks {

class Window;

class Renderer {
class Renderer : public vik::Renderer {
public:
  // Vulkan instance, stores all per-application states
  VkInstance instance;

M vks/vksSwapChain.hpp => vks/vksSwapChain.hpp +2 -1
@@ 24,6 24,7 @@
#include "vksTools.hpp"

#include "vksLog.hpp"
#include "vikSwapchain.hpp"

namespace vks {



@@ 32,7 33,7 @@ typedef struct _SwapChainBuffers {
  VkImageView view;
} SwapChainBuffer;

class SwapChain {
class SwapChain : public vik::SwapChain {
 public:
  VkSurfaceKHR surface;


M vks/vksWindow.hpp => vks/vksWindow.hpp +1 -1
@@ 19,7 19,7 @@

namespace vks {

class Window {
class Window : public vik::Window {
 public:
  Window() {}
  ~Window() {}