Compare commits
7 Commits
dc7d4a2e93
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80f9a857d3 | ||
|
|
0fc34b42d4 | ||
|
|
de6826f7d3 | ||
|
|
ed7517080b | ||
|
|
3320e6c1e3 | ||
|
|
fee884ff32 | ||
|
|
d8d74c9a5e |
29
.github/workflows/cd.yml
vendored
29
.github/workflows/cd.yml
vendored
@@ -7,14 +7,14 @@ on:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
BUILD_TYPE: RelWidthDebInfo
|
||||
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
||||
|
||||
jobs:
|
||||
linux-ubuntu:
|
||||
timeout-minutes: 10
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -25,6 +25,10 @@ jobs:
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest -C ${{env.BUILD_TYPE}}
|
||||
|
||||
- name: Determine tag name
|
||||
id: tag
|
||||
shell: bash
|
||||
@@ -32,24 +36,24 @@ jobs:
|
||||
run: |
|
||||
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
||||
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
||||
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
||||
echo "name=${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Compress artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
tar -czvf ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu20.04-x86_64.tar.gz -C ${{github.workspace}}/build/bin/ .
|
||||
tar -czvf ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu22.04-x86_64.tar.gz -C ${{github.workspace}}/build/bin/ .
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
# TODO: simpler name?
|
||||
name: ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu20.04-x86_64
|
||||
name: ${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu22.04-x86_64
|
||||
# TODO: do propper packing
|
||||
path: |
|
||||
${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu20.04-x86_64.tar.gz
|
||||
${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-ubuntu22.04-x86_64.tar.gz
|
||||
|
||||
|
||||
windows:
|
||||
@@ -78,10 +82,10 @@ jobs:
|
||||
run: |
|
||||
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
||||
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
||||
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
||||
echo "name=${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Compress artifacts
|
||||
@@ -98,8 +102,7 @@ jobs:
|
||||
${{github.workspace}}/${{ github.event.repository.name }}-${{ steps.tag.outputs.name }}-${{ runner.os }}-msvc-x86_64.zip
|
||||
|
||||
release:
|
||||
if: false
|
||||
#if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) }}
|
||||
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -120,10 +123,10 @@ jobs:
|
||||
run: |
|
||||
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
|
||||
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
|
||||
echo "name=${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
echo "name=dev-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
|
||||
echo "name=${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
echo "name=dev-${SAFE_NAME}-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Download artifacts
|
||||
|
||||
5
external/CMakeLists.txt
vendored
5
external/CMakeLists.txt
vendored
@@ -18,14 +18,14 @@ endif()
|
||||
if (NOT TARGET imgui)
|
||||
FetchContent_Declare(imgui
|
||||
GIT_REPOSITORY https://github.com/ocornut/imgui.git
|
||||
GIT_TAG 00ad3c6 # v1.90.7
|
||||
GIT_TAG bf75bfec48fc00f532af8926130b70c0e26eb099 # v1.92.3
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
|
||||
# imgui does not provide a cmake
|
||||
FetchContent_GetProperties(imgui)
|
||||
if(NOT imgui_POPULATED)
|
||||
FetchContent_Populate(imgui)
|
||||
FetchContent_MakeAvailable(imgui)
|
||||
|
||||
add_library(imgui STATIC
|
||||
${imgui_SOURCE_DIR}/imgui.h
|
||||
@@ -45,6 +45,7 @@ if (NOT TARGET imgui)
|
||||
)
|
||||
target_include_directories(imgui PUBLIC ${imgui_SOURCE_DIR})
|
||||
target_compile_features(imgui PUBLIC cxx_std_11)
|
||||
target_compile_definitions(imgui PUBLIC IMGUI_USE_WCHAR32)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ float DoomIMGUI::render(float time_delta) {
|
||||
}
|
||||
|
||||
doom_interval = _doom.render(time_delta);
|
||||
ImGui::Image(reinterpret_cast<void*>(_doom.getTexID()), {_size_scaler * 320, _size_scaler * 200 * 1.2f});
|
||||
ImGui::Image(_doom.getTexID(), {_size_scaler * 320, _size_scaler * 200 * 1.2f});
|
||||
}
|
||||
ImGui::End();
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <cstddef>
|
||||
|
||||
struct TextureUploaderI {
|
||||
static constexpr const char* version {"2"};
|
||||
static constexpr const char* version {"3"};
|
||||
|
||||
enum Filter {
|
||||
NEAREST,
|
||||
@@ -17,13 +17,30 @@ struct TextureUploaderI {
|
||||
// target?
|
||||
};
|
||||
|
||||
enum Format {
|
||||
RGBA,
|
||||
//RGB,
|
||||
|
||||
IYUV,
|
||||
YV12,
|
||||
|
||||
NV12,
|
||||
NV21,
|
||||
|
||||
MAX
|
||||
};
|
||||
|
||||
virtual ~TextureUploaderI(void) {}
|
||||
|
||||
virtual uint64_t uploadRGBA(const uint8_t* data, uint32_t width, uint32_t height, Filter filter = LINEAR, Access access = STATIC) = 0;
|
||||
[[deprecated]] virtual uint64_t uploadRGBA(const uint8_t* data, uint32_t width, uint32_t height, Filter filter = LINEAR, Access access = STATIC) = 0;
|
||||
|
||||
// keeps width height filter
|
||||
// TODO: wh instead of size?
|
||||
virtual bool updateRGBA(uint64_t tex_id, const uint8_t* data, size_t size) = 0;
|
||||
[[deprecated]] virtual bool updateRGBA(uint64_t tex_id, const uint8_t* data, size_t size) = 0;
|
||||
|
||||
// use upload to create a texture, and update to update existing
|
||||
virtual uint64_t upload(const uint8_t* data, uint32_t width, uint32_t height, Format format = RGBA, Filter filter = LINEAR, Access access = STATIC) = 0;
|
||||
virtual bool update(uint64_t tex_id, const uint8_t* data, size_t size) = 0;
|
||||
|
||||
virtual void destroy(uint64_t tex_id) = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user