Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[submodule "engine/native/thirdparty/bx"]
path = engine/native/thirdparty/bx
[submodule "Engine/cpp/thirdparty/bx"]
path = Engine/cpp/thirdparty/bx
url = https://github.com/bkaradzic/bx
[submodule "engine/native/thirdparty/bimg"]
path = engine/native/thirdparty/bimg
[submodule "Engine/cpp/thirdparty/bimg"]
path = Engine/cpp/thirdparty/bimg
url = https://github.com/bkaradzic/bimg
[submodule "engine/native/thirdparty/bgfx"]
path = engine/native/thirdparty/bgfx
[submodule "Engine/cpp/thirdparty/bgfx"]
path = Engine/cpp/thirdparty/bgfx
url = https://github.com/bkaradzic/bgfx
[submodule "engine/native/thirdparty/sdl"]
path = engine/native/thirdparty/sdl
[submodule "Engine/cpp/thirdparty/sdl"]
path = Engine/cpp/thirdparty/sdl
url = https://github.com/libsdl-org/SDL
42 changes: 4 additions & 38 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,42 +25,8 @@ include(Compiler)
include(Modules)
include(Shaders)

# Subdirectories for engine libs
add_subdirectory(engine)
# Engine runtime (C++)
add_subdirectory(Engine/cpp)

# Main Executable
add_executable(draconic engine/native/main/main.cpp)

target_link_libraries(draconic
PRIVATE
native
bgfx
bx
bimg
)

if(UNIX AND NOT APPLE)
target_link_libraries(draconic PRIVATE SDL3::SDL3-static Threads::Threads dl)
target_link_options(draconic PRIVATE -Wl,--whole-archive $<TARGET_FILE:SDL3::SDL3-static> -Wl,--no-whole-archive)
elseif(APPLE)
target_link_libraries(draconic PRIVATE SDL3::SDL3-static)
target_link_options(draconic PRIVATE -Wl,-force_load,$<TARGET_FILE:SDL3::SDL3-static>)
else()
target_link_libraries(draconic PRIVATE SDL3::SDL3-static)
endif()

compile_shaders(draconic)

set(TEST_IMAGE
"${CMAKE_SOURCE_DIR}/assets/draconic_logo_no_text.png"
)

add_custom_command(
TARGET draconic POST_BUILD

COMMAND ${CMAKE_COMMAND} -E copy_if_different
${TEST_IMAGE}
$<TARGET_FILE_DIR:draconic>/test.png

COMMENT "Copying test texture..."
)
# Samples (C++)
add_subdirectory(Samples/cpp)
File renamed without changes
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions Editor/Editor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Placeholder for Editor UI code
6 changes: 6 additions & 0 deletions Engine/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
add_subdirectory(thirdparty SYSTEM)

add_modules_library(runtime)
target_link_libraries(runtime PUBLIC platform core input scene rendering)

# TODO: binding library
15 changes: 15 additions & 0 deletions Engine/cpp/DraconicAPI.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef DRACONICENGINE_API_H
#define DRACONICENGINE_API_H

/*
* Placeholder for C binding header.
* It will be a C facade to the Draconic C++ runtime.
*/

extern "C" {



}

#endif //DRACONICENGINE_API_H
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
add_subdirectory(thirdparty SYSTEM)

add_modules_library(platform)
add_modules_library(core SHARED)
add_modules_library(input)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module;

#include <vector>
#include <cstdint>
#include <filesystem>

export module core.io.image_loader;
Expand All @@ -19,6 +18,6 @@ export namespace draco::core::io::image_loader
bool is_valid = false;
};

// Load an image file (PNG, JPG, etc) & decode it to raw RGBA8
// Load an image file (PNG, JPG, etc.) & decode it to raw RGBA8
ImageData load_image(const std::filesystem::path& path);
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export module core.math;

export import core.defs;
export import core.math.constants;
export import core.math.functions;
export import core.math.types;
export import core.defs;
export import core.stdtypes;
export import core.math.transform;
Loading
Loading