adding in sandbox
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# Vulkan playground. Links the engine (and its third-party libraries), and
|
||||
# can also include the engine's internal headers from engine/src.
|
||||
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS *.cpp)
|
||||
|
||||
add_executable(sandbox ${SOURCES})
|
||||
|
||||
target_compile_definitions(sandbox PRIVATE
|
||||
SANDBOX_SHADER_DIR="${CMAKE_CURRENT_SOURCE_DIR}/shaders"
|
||||
)
|
||||
|
||||
# engine/include comes in through the engine's public include path.
|
||||
target_include_directories(sandbox PRIVATE
|
||||
"${CMAKE_SOURCE_DIR}/engine/src"
|
||||
)
|
||||
|
||||
# The engine publicly provides vulkan, vma, shaderc, glfw, glm, imgui, entt
|
||||
# and Tracy, plus the GLM defines. The rest are engine-private.
|
||||
target_link_libraries(sandbox PRIVATE
|
||||
${PROJECT_NAME}
|
||||
imguizmo
|
||||
stb_image
|
||||
)
|
||||
@@ -0,0 +1,28 @@
|
||||
#define GLFW_INCLUDE_VULKAN
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <glm/mat4x4.hpp>
|
||||
#include <glm/vec4.hpp>
|
||||
#include <vector>
|
||||
|
||||
#define VK_CHECK(expr) \
|
||||
do { \
|
||||
vk::Result result_ = (expr); \
|
||||
if (result_ != vk::Result::eSuccess) { \
|
||||
std::fprintf(stderr, "%s:%d: %s -> %d\n", __FILE__, __LINE__, #expr, \
|
||||
result_); \
|
||||
std::abort(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
constexpr uint32_t WIDTH = 1280;
|
||||
constexpr uint32_t HEIGHT = 720;
|
||||
constexpr const char* NAME = "";
|
||||
|
||||
int main() { return EXIT_SUCCESS; }
|
||||
Reference in New Issue
Block a user