Skip to content

Commit

Permalink
fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
WinteryFox committed Nov 4, 2023
1 parent 6369467 commit 501f261
Show file tree
Hide file tree
Showing 30 changed files with 145 additions and 384 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CMake on multiple platforms

on:
push:
branches: [ "main" ]
branches: [ "main", "staging" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "staging" ]

jobs:
build:
Expand Down
8 changes: 8 additions & 0 deletions .idea/QtSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20)
cmake_minimum_required(VERSION 3.25)
project("Vixen")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand All @@ -16,6 +16,7 @@ endif ()

set(SKIP_INSTALL_ALL ON)

include(FetchContent)
find_package(PkgConfig REQUIRED)

option(ENABLE_VULKAN "Enable or disable Vulkan support" ON)
Expand Down
2 changes: 1 addition & 1 deletion editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ find_package(Qt6 REQUIRED COMPONENTS Core Qml Widgets Quick)
qt_standard_project_setup()
qt_policy(SET QTP0001 NEW)

add_executable(editor main.cpp widgets/GlViewport.cpp widgets/GlViewport.h widgets/GlViewportRenderer.cpp widgets/GlViewportRenderer.h)
add_executable(editor main.cpp)
target_include_directories(editor PUBLIC ../engine)
target_link_libraries(editor PRIVATE Vixen Qt6::Core Qt6::Qml Qt6::Quick Qt6::Widgets)

Expand Down
5 changes: 1 addition & 4 deletions editor/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickView>
#include "widgets/GlViewport.h"

using namespace Vixen::Editor;

int main(int argc, char **argv) {
spdlog::set_level(spdlog::level::trace);
Expand All @@ -14,7 +11,7 @@ int main(int argc, char **argv) {
QCoreApplication::setApplicationName("Vixen Editor");
QCoreApplication::setOrganizationName("Vixen");

qmlRegisterType<GlViewport>("Vixen", 1, 0, "GlViewport");
//qmlRegisterType<GlViewport>("Vixen", 1, 0, "GlViewport");

QQmlApplicationEngine engine;
engine.load(u"qrc:/editor/ui/main.qml"_qs);
Expand Down
38 changes: 0 additions & 38 deletions editor/widgets/GlViewport.cpp

This file was deleted.

28 changes: 0 additions & 28 deletions editor/widgets/GlViewport.h

This file was deleted.

93 changes: 0 additions & 93 deletions editor/widgets/GlViewportRenderer.cpp

This file was deleted.

54 changes: 0 additions & 54 deletions editor/widgets/GlViewportRenderer.h

This file was deleted.

2 changes: 1 addition & 1 deletion engine/Buffer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "Buffer.h"

namespace Vixen::Vk {
namespace Vixen {
Buffer::Buffer(Usage bufferUsage, const size_t &size)
: bufferUsage(bufferUsage),
size(size) {}
Expand Down
10 changes: 4 additions & 6 deletions engine/Buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <cstdint>
#include <cstring>

namespace Vixen::Vk {
namespace Vixen {
/**
* A persistently mapped, coherent, synchronized, host or server data buffer.
*/
Expand All @@ -18,7 +18,9 @@ namespace Vixen::Vk {
TRANSFER_SRC = 1 << 4,
};

Buffer &operator=(const Buffer &) = delete;
virtual char *map() = 0;

virtual void unmap() = 0;

/**
* Map the buffer, write to it and unmap the buffer from host memory.
Expand All @@ -44,10 +46,6 @@ namespace Vixen::Vk {
* @param allocationUsage Specifies how this buffer's allocated memory will be used.
*/
Buffer(Usage bufferUsage, const std::size_t &size);

virtual char *map() = 0;

virtual void unmap() = 0;
};

inline Buffer::Usage operator|(Buffer::Usage a, Buffer::Usage b) {
Expand Down
1 change: 1 addition & 0 deletions engine/ShaderModule.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <vector>
#include <string>
#include <utility>
#include <optional>
Expand Down
2 changes: 1 addition & 1 deletion engine/Window.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define GLFW_INCLUDE_NONE

#include <GLFW/glfw3.h>
#include "Window.h"

namespace Vixen {
Expand Down
5 changes: 3 additions & 2 deletions engine/Window.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#pragma once

#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <string>
#include <spdlog/spdlog.h>
#include <GLFW/glfw3.h>
#include <iostream>
#include <glm/glm.hpp>
#include "Monitor.h"
Expand All @@ -23,6 +24,7 @@ namespace Vixen {

std::unordered_map<GLFWmonitor *, Monitor> monitors;

public:
Window(
const std::string &title,
const uint32_t &width,
Expand All @@ -32,7 +34,6 @@ namespace Vixen {

~Window();

public:
/**
* Has the current window been requested to close?
* @return True if the window should close, false if not.
Expand Down
Loading

0 comments on commit 501f261

Please sign in to comment.