drag-and-drop #14

Merged
shaunrd0 merged 45 commits from drag-and-drop into master 2023-12-27 19:36:48 +00:00
5 changed files with 164 additions and 163 deletions
Showing only changes of commit b0e123e6dd - Show all commits

View File

@ -8,7 +8,7 @@ on:
jobs: jobs:
Qtk: Qtk:
env: env:
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=ON -DQTK_LIBRARY=ON -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=ON CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=ON -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=ON
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -138,7 +138,7 @@ jobs:
Qtk-Library: Qtk-Library:
env: env:
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_LIBRARY=ON -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=OFF CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=OFF
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -176,7 +176,7 @@ jobs:
- name: Build Qtk Library (Windows) - name: Build Qtk Library (Windows)
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
shell: bash shell: bash
run: cmake --build build/ --config Release run: cmake --build build/ --config Release --target qtk_library
# OSX / Linux # OSX / Linux
@ -254,7 +254,7 @@ jobs:
Qtk-Plugins: Qtk-Plugins:
env: env:
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_LIBRARY=OFF -DQTK_PLUGINS=ON -DQTK_EXAMPLE=OFF CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_PLUGINS=ON -DQTK_EXAMPLE=OFF
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View File

@ -21,8 +21,8 @@ jobs:
- name: Build Qtk - name: Build Qtk
run: | run: |
cmake -B build -DQTK_UPDATE_SUBMODULES=OFF -DQTK_ENABLE_CCACHE=OFF cmake -B build -DQTK_SUBMODULES=OFF -DQTK_CCACHE=OFF -DQTK_PLUGINS=OFF -DQTK_GUI=ON
cmake --build build cmake --build build --target qtk_gui -- -j $(nproc)
- uses: cpp-linter/cpp-linter-action@v2 - uses: cpp-linter/cpp-linter-action@v2
id: linter id: linter

View File

@ -241,7 +241,7 @@ Last we need to run `clang-format`, this can be done with the command directly.
This will reformat all the code in the repository. This will reformat all the code in the repository.
```bash ```bash
clang-format -i --style=file:.clang-format src/*.cpp src/*.h app/*.cpp app/*.h clang-format -i --style=file:.clang-format src/app/*.cpp src/app/*.h src/qtk/*.cpp src/qtk/*.h example-app/*.cpp example-app/*.h
``` ```
`clang-format` can be run with git integration (or CLion if you prefer). `clang-format` can be run with git integration (or CLion if you prefer).

View File

@ -24,8 +24,8 @@ void ExampleScene::init() {
setSkybox(skybox); setSkybox(skybox);
auto spartan = new Model( auto spartan = new Model(
"spartan", std::string(QTK_EXAMPLE_SOURCE_DIR) + "spartan", std::string(QTK_EXAMPLE_SOURCE_DIR)
"/../resources/models/spartan/spartan.obj"); + "/../resources/models/spartan/spartan.obj");
addObject(spartan); addObject(spartan);
spartan->getTransform().setTranslation(-4.0f, 0.0f, 0.0f); spartan->getTransform().setTranslation(-4.0f, 0.0f, 0.0f);

View File

@ -62,7 +62,8 @@ namespace Qtk {
std::string name, std::string path, std::string name, std::string path,
std::string vertexShader = ":/shaders/model-basic.vert", std::string vertexShader = ":/shaders/model-basic.vert",
std::string fragmentShader = ":/shaders/model-basic.frag") : std::string fragmentShader = ":/shaders/model-basic.frag") :
Model(name.c_str(), path.c_str(), vertexShader.c_str(), Model(
name.c_str(), path.c_str(), vertexShader.c_str(),
fragmentShader.c_str()) {} fragmentShader.c_str()) {}
inline ~Model() override { mManager.remove(getName().c_str()); } inline ~Model() override { mManager.remove(getName().c_str()); }