drag-and-drop #14
|
@ -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:
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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).
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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()); }
|
||||||
|
|
Loading…
Reference in New Issue