~sircmpwn/xrgears

86334c2d18024192ab1921256fa0daa703007b5d — Lubosz Sarnecki 4 years ago 1603712
move all classes to subfolders.
49 files changed, 74 insertions(+), 73 deletions(-)

M examples/triangle/triangle.cpp
M examples/vkcube/main.cpp
M examples/xrgears/xrgears.cpp
R vitamin-k/{vikHMD.hpp => input/vikHMD.hpp}
R vitamin-k/{vikInput.hpp => input/vikInput.hpp}
R vitamin-k/{vikBuffer.hpp => render/vikBuffer.hpp}
R vitamin-k/{vikDebug.hpp => render/vikDebug.hpp}
R vitamin-k/{vikDevice.hpp => render/vikDevice.hpp}
R vitamin-k/{vikDistortion.hpp => render/vikDistortion.hpp}
R vitamin-k/{vikInitializers.hpp => render/vikInitializers.hpp}
R vitamin-k/{vikModel.hpp => render/vikModel.hpp}
R vitamin-k/{vikOffscreenPass.hpp => render/vikOffscreenPass.hpp}
R vitamin-k/{vikRenderer.hpp => render/vikRenderer.hpp}
R vitamin-k/{vikRendererVkc.hpp => render/vikRendererVkc.hpp}
R vitamin-k/{vikRendererVks.hpp => render/vikRendererVks.hpp}
R vitamin-k/{vikShader.hpp => render/vikShader.hpp}
R vitamin-k/{vikSwapChain.hpp => render/vikSwapChain.hpp}
R vitamin-k/{vikSwapChainDRM.hpp => render/vikSwapChainDRM.hpp}
R vitamin-k/{vikSwapChainVK.hpp => render/vikSwapChainVK.hpp}
R vitamin-k/{vikSwapChainVKComplex.hpp => render/vikSwapChainVKComplex.hpp}
R vitamin-k/{vikTextOverlay.hpp => render/vikTextOverlay.hpp}
R vitamin-k/{vikTexture.hpp => render/vikTexture.hpp}
R vitamin-k/{vikTimer.hpp => render/vikTimer.hpp}
R vitamin-k/{vikTools.hpp => render/vikTools.hpp}
R vitamin-k/{vikCamera.hpp => scene/vikCamera.hpp}
R vitamin-k/{vikCameraBase.hpp => scene/vikCameraBase.hpp}
R vitamin-k/{vikCameraHMD.hpp => scene/vikCameraHMD.hpp}
R vitamin-k/{vikCameraStereo.hpp => scene/vikCameraStereo.hpp}
R vitamin-k/{vikGear.hpp => scene/vikGear.hpp}
R vitamin-k/{vikMaterial.hpp => scene/vikMaterial.hpp}
R vitamin-k/{vikNode.hpp => scene/vikNode.hpp}
R vitamin-k/{vikNodeGear.hpp => scene/vikNodeGear.hpp}
R vitamin-k/{vikNodeModel.hpp => scene/vikNodeModel.hpp}
R vitamin-k/{vikSkyBox.hpp => scene/vikSkyBox.hpp}
R vitamin-k/{vikApplication.hpp => system/vikApplication.hpp}
R vitamin-k/{vikApplicationVkc.hpp => system/vikApplicationVkc.hpp}
R vitamin-k/{vikApplicationVks.hpp => system/vikApplicationVks.hpp}
R vitamin-k/{vikAssets.hpp => system/vikAssets.hpp}
R vitamin-k/{vikLog.hpp => system/vikLog.hpp}
R vitamin-k/{vikSettings.hpp => system/vikSettings.hpp}
R vitamin-k/{vikWindow.hpp => window/vikWindow.hpp}
R vitamin-k/{vikWindowKMS.hpp => window/vikWindowKMS.hpp}
R vitamin-k/{vikWindowKhrDisplay.hpp => window/vikWindowKhrDisplay.hpp}
R vitamin-k/{vikWindowWayland.hpp => window/vikWindowWayland.hpp}
R vitamin-k/{vikWindowWaylandShell.hpp => window/vikWindowWaylandShell.hpp}
R vitamin-k/{vikWindowWaylandXDG.hpp => window/vikWindowWaylandXDG.hpp}
R vitamin-k/{vikWindowXCB.hpp => window/vikWindowXCB.hpp}
R vitamin-k/{vikWindowXCBInput.hpp => window/vikWindowXCBInput.hpp}
R vitamin-k/{vikWindowXCBSimple.hpp => window/vikWindowXCBSimple.hpp}
M examples/triangle/triangle.cpp => examples/triangle/triangle.cpp +2 -2
@@ 26,8 26,8 @@

#include <vulkan/vulkan.h>

#include "vikApplicationVks.hpp"
#include "vikShader.hpp"
#include "system/vikApplicationVks.hpp"
#include "render/vikShader.hpp"

// Set to "true" to use staging buffers for uploading vertex and index data to device local memory
// See "prepareVertices" for details on what's staging and on why to use it

M examples/vkcube/main.cpp => examples/vkcube/main.cpp +4 -4
@@ 45,11 45,11 @@
#define VK_PROTOTYPES
#include <vulkan/vulkan.h>

#include "vikApplicationVkc.hpp"
#include "vikLog.hpp"
#include "system/vikApplicationVkc.hpp"
#include "system/vikLog.hpp"

#include "vikRendererVkc.hpp"
#include "vikShader.hpp"
#include "render/vikRendererVkc.hpp"
#include "render/vikShader.hpp"




M examples/xrgears/xrgears.cpp => examples/xrgears/xrgears.cpp +13 -13
@@ 24,19 24,19 @@

#include <vulkan/vulkan.h>

#include "vikApplicationVks.hpp"
#include "vikModel.hpp"

#include "vikNodeGear.hpp"
#include "vikSkyBox.hpp"
#include "vikDistortion.hpp"
#include "vikOffscreenPass.hpp"
#include "vikNodeModel.hpp"
#include "vikCamera.hpp"
#include "vikHMD.hpp"
#include "vikCameraStereo.hpp"
#include "vikCameraHMD.hpp"
#include "vikLog.hpp"
#include "system/vikApplicationVks.hpp"
#include "render/vikModel.hpp"

#include "scene/vikNodeGear.hpp"
#include "scene/vikSkyBox.hpp"
#include "render/vikDistortion.hpp"
#include "render/vikOffscreenPass.hpp"
#include "scene/vikNodeModel.hpp"
#include "scene/vikCamera.hpp"
#include "input/vikHMD.hpp"
#include "scene/vikCameraStereo.hpp"
#include "scene/vikCameraHMD.hpp"
#include "system/vikLog.hpp"

#define VERTEX_BUFFER_BIND_ID 0


R vitamin-k/vikHMD.hpp => vitamin-k/input/vikHMD.hpp +4 -4
@@ 20,12 20,12 @@

#include <openhmd/openhmd.h>

#include "vikCameraBase.hpp"
#include "vikBuffer.hpp"
#include "vikLog.hpp"
#include "scene/vikCameraBase.hpp"
#include "render/vikBuffer.hpp"
#include "system/vikLog.hpp"


#include "vikCamera.hpp"
#include "scene/vikCamera.hpp"

namespace vik {
class HMD {

R vitamin-k/vikInput.hpp => vitamin-k/input/vikInput.hpp +0 -0
R vitamin-k/vikBuffer.hpp => vitamin-k/render/vikBuffer.hpp +0 -0
R vitamin-k/vikDebug.hpp => vitamin-k/render/vikDebug.hpp +0 -0
R vitamin-k/vikDevice.hpp => vitamin-k/render/vikDevice.hpp +0 -0
R vitamin-k/vikDistortion.hpp => vitamin-k/render/vikDistortion.hpp +1 -1
@@ 17,7 17,7 @@
#include <vector>

#include "vikModel.hpp"
#include "vikLog.hpp"
#include "system/vikLog.hpp"

#include "vikOffscreenPass.hpp"
#include "vikShader.hpp"

R vitamin-k/vikInitializers.hpp => vitamin-k/render/vikInitializers.hpp +0 -0
R vitamin-k/vikModel.hpp => vitamin-k/render/vikModel.hpp +0 -0
R vitamin-k/vikOffscreenPass.hpp => vitamin-k/render/vikOffscreenPass.hpp +0 -0
R vitamin-k/vikRenderer.hpp => vitamin-k/render/vikRenderer.hpp +0 -0
R vitamin-k/vikRendererVkc.hpp => vitamin-k/render/vikRendererVkc.hpp +3 -3
@@ 7,9 7,9 @@

#include <array>

#include "../vitamin-k/vikSwapChainVK.hpp"
#include "../vitamin-k/vikSwapChainDRM.hpp"
#include "../vitamin-k/vikRenderer.hpp"
#include "vikSwapChainVK.hpp"
#include "vikSwapChainDRM.hpp"
#include "vikRenderer.hpp"

namespace vik {


R vitamin-k/vikRendererVks.hpp => vitamin-k/render/vikRendererVks.hpp +1 -1
@@ 12,7 12,7 @@
#include "vikSwapChainVKComplex.hpp"
#include "vikTimer.hpp"
#include "vikTextOverlay.hpp"
#include "vikSettings.hpp"
#include "system/vikSettings.hpp"
#include "vikShader.hpp"

namespace vik {

R vitamin-k/vikShader.hpp => vitamin-k/render/vikShader.hpp +1 -1
@@ 17,7 17,7 @@

#include "vikTools.hpp"

#include "vikAssets.hpp"
#include "system/vikAssets.hpp"

namespace vik {
class Shader {

R vitamin-k/vikSwapChain.hpp => vitamin-k/render/vikSwapChain.hpp +1 -1
@@ 5,7 5,7 @@
#include <vector>
#include <functional>

#include "vikLog.hpp"
#include "system/vikLog.hpp"

namespace vik {


R vitamin-k/vikSwapChainDRM.hpp => vitamin-k/render/vikSwapChainDRM.hpp +0 -0
R vitamin-k/vikSwapChainVK.hpp => vitamin-k/render/vikSwapChainVK.hpp +0 -0
R vitamin-k/vikSwapChainVKComplex.hpp => vitamin-k/render/vikSwapChainVKComplex.hpp +1 -1
@@ 23,7 23,7 @@

#include "vikTools.hpp"

#include "vikLog.hpp"
#include "system/vikLog.hpp"
#include "vikSwapChainVK.hpp"

namespace vik {

R vitamin-k/vikTextOverlay.hpp => vitamin-k/render/vikTextOverlay.hpp +0 -0
R vitamin-k/vikTexture.hpp => vitamin-k/render/vikTexture.hpp +1 -1
@@ 20,7 20,7 @@
#include "vikTools.hpp"
#include "vikDevice.hpp"
#include "vikBuffer.hpp"
#include "vikLog.hpp"
#include "system/vikLog.hpp"

namespace vik {
/** @brief Vulkan texture base class */

R vitamin-k/vikTimer.hpp => vitamin-k/render/vikTimer.hpp +0 -0
R vitamin-k/vikTools.hpp => vitamin-k/render/vikTools.hpp +1 -1
@@ 23,7 23,7 @@
#include <stdexcept>

#include "vikInitializers.hpp"
#include "vikLog.hpp"
#include "system/vikLog.hpp"

// Custom define for better code readability
#define VK_FLAGS_NONE 0

R vitamin-k/vikCamera.hpp => vitamin-k/scene/vikCamera.hpp +0 -0
R vitamin-k/vikCameraBase.hpp => vitamin-k/scene/vikCameraBase.hpp +0 -0
R vitamin-k/vikCameraHMD.hpp => vitamin-k/scene/vikCameraHMD.hpp +1 -1
@@ 14,7 14,7 @@
#include "vikCameraBase.hpp"

#include "vikCamera.hpp"
#include "vikHMD.hpp"
#include "input/vikHMD.hpp"

namespace vik {
class CameraHMD : public Camera {

R vitamin-k/vikCameraStereo.hpp => vitamin-k/scene/vikCameraStereo.hpp +1 -1
@@ 11,7 11,7 @@

#pragma once

#include "vikBuffer.hpp"
#include "render/vikBuffer.hpp"
#include "vikCameraBase.hpp"

#include "vikCamera.hpp"

R vitamin-k/vikGear.hpp => vitamin-k/scene/vikGear.hpp +2 -2
@@ 13,8 13,8 @@

#include <vector>

#include "vikBuffer.hpp"
#include "vikDevice.hpp"
#include "render/vikBuffer.hpp"
#include "render/vikDevice.hpp"

namespace vik {
struct Vertex {

R vitamin-k/vikMaterial.hpp => vitamin-k/scene/vikMaterial.hpp +0 -0
R vitamin-k/vikNode.hpp => vitamin-k/scene/vikNode.hpp +2 -2
@@ 13,10 13,10 @@

#include <vector>

#include "vikModel.hpp"
#include "render/vikModel.hpp"

#include "vikMaterial.hpp"
#include "vikAssets.hpp"
#include "system/vikAssets.hpp"
#include "vikSkyBox.hpp"

namespace vik {

R vitamin-k/vikNodeGear.hpp => vitamin-k/scene/vikNodeGear.hpp +2 -2
@@ 22,8 22,8 @@

#include <vector>

#include "vikTools.hpp"
#include "vikBuffer.hpp"
#include "render/vikTools.hpp"
#include "render/vikBuffer.hpp"
#include "vikCameraBase.hpp"

#include "vikMaterial.hpp"

R vitamin-k/vikNodeModel.hpp => vitamin-k/scene/vikNodeModel.hpp +0 -0
R vitamin-k/vikSkyBox.hpp => vitamin-k/scene/vikSkyBox.hpp +4 -4
@@ 13,11 13,11 @@

#include <vector>

#include "vikTexture.hpp"
#include "vikModel.hpp"
#include "render/vikTexture.hpp"
#include "render/vikModel.hpp"

#include "vikAssets.hpp"
#include "vikShader.hpp"
#include "system/vikAssets.hpp"
#include "render/vikShader.hpp"

namespace vik {
class SkyBox {

R vitamin-k/vikApplication.hpp => vitamin-k/system/vikApplication.hpp +0 -0
R vitamin-k/vikApplicationVkc.hpp => vitamin-k/system/vikApplicationVkc.hpp +4 -4
@@ 8,10 8,10 @@

#include "vikApplication.hpp"

#include "vikWindowXCBSimple.hpp"
#include "vikWindowKMS.hpp"
#include "vikWindowWaylandXDG.hpp"
#include "vikRendererVkc.hpp"
#include "window/vikWindowXCBSimple.hpp"
#include "window/vikWindowKMS.hpp"
#include "window/vikWindowWaylandXDG.hpp"
#include "render/vikRendererVkc.hpp"

namespace vik {


R vitamin-k/vikApplicationVks.hpp => vitamin-k/system/vikApplicationVks.hpp +8 -8
@@ 23,16 23,16 @@
#include <array>
#include <vector>

#include "vikTools.hpp"
#include "vikInitializers.hpp"
#include "render/vikTools.hpp"
#include "render/vikInitializers.hpp"

#include "vikCameraBase.hpp"
#include "vikRendererVks.hpp"
#include "vikTimer.hpp"
#include "scene/vikCameraBase.hpp"
#include "render/vikRendererVks.hpp"
#include "render/vikTimer.hpp"

#include "vikWindowWaylandShell.hpp"
#include "vikWindowXCBInput.hpp"
#include "vikWindowKhrDisplay.hpp"
#include "window/vikWindowWaylandShell.hpp"
#include "window/vikWindowXCBInput.hpp"
#include "window/vikWindowKhrDisplay.hpp"

#include "vikApplication.hpp"


R vitamin-k/vikAssets.hpp => vitamin-k/system/vikAssets.hpp +0 -0
R vitamin-k/vikLog.hpp => vitamin-k/system/vikLog.hpp +0 -0
R vitamin-k/vikSettings.hpp => vitamin-k/system/vikSettings.hpp +1 -1
@@ 7,7 7,7 @@

#include "vikLog.hpp"

#include "vikWindow.hpp"
#include "window/vikWindow.hpp"

namespace vik {
class Settings {

R vitamin-k/vikWindow.hpp => vitamin-k/window/vikWindow.hpp +3 -3
@@ 5,9 5,9 @@

#include <functional>

#include "vikSwapChain.hpp"
#include "vikRenderer.hpp"
#include "vikInput.hpp"
#include "render/vikSwapChain.hpp"
#include "render/vikRenderer.hpp"
#include "input/vikInput.hpp"

namespace vik {
class Window {

R vitamin-k/vikWindowKMS.hpp => vitamin-k/window/vikWindowKMS.hpp +4 -3
@@ 21,10 21,11 @@
#include <linux/vt.h>
#include <linux/major.h>

#include "vikRenderer.hpp"
#include "render/vikRenderer.hpp"
#include "vikWindow.hpp"
#include "vikLog.hpp"
#include "vikSwapChainDRM.hpp"
#include "system/vikLog.hpp"
#include "render/vikSwapChainDRM.hpp"

static void
page_flip_handler(int fd, unsigned int frame,
                  unsigned int sec, unsigned int usec, void *data)

R vitamin-k/vikWindowKhrDisplay.hpp => vitamin-k/window/vikWindowKhrDisplay.hpp +1 -1
@@ 14,7 14,7 @@
#include <vulkan/vulkan.h>

#include "vikWindow.hpp"
#include "vikSwapChainVKComplex.hpp"
#include "render/vikSwapChainVKComplex.hpp"

namespace vik {
class WindowKhrDisplay  : public Window {

R vitamin-k/vikWindowWayland.hpp => vitamin-k/window/vikWindowWayland.hpp +0 -0
R vitamin-k/vikWindowWaylandShell.hpp => vitamin-k/window/vikWindowWaylandShell.hpp +1 -1
@@ 14,7 14,7 @@
#include <vulkan/vulkan.h>

#include "vikWindowWayland.hpp"
#include "vikSwapChainVKComplex.hpp"
#include "render/vikSwapChainVKComplex.hpp"

namespace vik {
class WindowWaylandShell : public WindowWayland {

R vitamin-k/vikWindowWaylandXDG.hpp => vitamin-k/window/vikWindowWaylandXDG.hpp +2 -2
@@ 6,9 6,9 @@
#include <poll.h>

#include <vulkan/vulkan.h>
#include "vikRendererVkc.hpp"
#include "render/vikRendererVkc.hpp"
#include "../xdg-shell/xdg-shell-unstable-v6-client-protocol.h"
#include "vikLog.hpp"
#include "system/vikLog.hpp"
#include "vikWindowWayland.hpp"

namespace vik {

R vitamin-k/vikWindowXCB.hpp => vitamin-k/window/vikWindowXCB.hpp +0 -0
R vitamin-k/vikWindowXCBInput.hpp => vitamin-k/window/vikWindowXCBInput.hpp +2 -2
@@ 14,8 14,8 @@
#include <vulkan/vulkan.h>
#include <string>

#include "vikLog.hpp"
#include "vikSwapChainVKComplex.hpp"
#include "system/vikLog.hpp"
#include "render/vikSwapChainVKComplex.hpp"
#include "vikWindowXCB.hpp"

namespace vik {

R vitamin-k/vikWindowXCBSimple.hpp => vitamin-k/window/vikWindowXCBSimple.hpp +3 -3
@@ 3,10 3,10 @@
#include <string.h>
#include <stdio.h>

#include "vikRendererVkc.hpp"
#include "render/vikRendererVkc.hpp"
#include "vikWindowXCB.hpp"
#include "vikLog.hpp"
#include "vikSwapChainVK.hpp"
#include "system/vikLog.hpp"
#include "render/vikSwapChainVK.hpp"

static xcb_atom_t
get_atom(struct xcb_connection_t *conn, const char *name)