Skip to content

Commit

Permalink
Updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chukobyte committed Mar 25, 2024
1 parent c5e5875 commit 21b4073
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ else()
endif()

if (SK_IS_MAIN)
add_executable(${PROJECT_NAME}_app seika/main.c)

Check failure on line 57 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / build

Cannot find source file:

Check failure on line 57 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / build

No SOURCES given to target: seika_app

Check failure on line 57 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / build

Cannot find source file:

Check failure on line 57 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / build

No SOURCES given to target: seika_app

Check failure on line 57 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / build

Cannot find source file:

Check failure on line 57 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / build

No SOURCES given to target: seika_app

Check failure on line 57 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / build

Cannot find source file:

Check failure on line 57 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / build

No SOURCES given to target: seika_app
target_link_libraries(${PROJECT_NAME}_app ${PROJECT_NAME})

# Create seika test exe
add_executable(${PROJECT_NAME}_test test/test.c)
target_link_libraries(${PROJECT_NAME}_test ${PROJECT_NAME} unity)
Expand Down
2 changes: 1 addition & 1 deletion seika/rendering/renderer.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static void ska_renderer_flush_batches() {
SKA_STATIC_ARRAY_EMPTY(active_render_layer_items_indices);
}

void ska_renderer_process_and_flush_batches(const SkaColor *backgroundColor) {
void ska_renderer_process_and_flush_batches(const SkaColor* backgroundColor) {
#ifdef SKA_RENDER_TO_FRAMEBUFFER
ska_frame_buffer_bind();
#endif
Expand Down
8 changes: 6 additions & 2 deletions seika/seika.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "logger.h"
#include "input/sdl_input.h"
#include "seika/assert.h"
#include "seika/rendering/renderer.h"

#define SKA_AUDIO_SOURCE_DEFAULT_WAV_SAMPLE_RATE 44100
#define SKA_WINDOW_DEFAULT_MAINTAIN_ASPECT_RATIO false
Expand Down Expand Up @@ -181,6 +182,9 @@ bool ska_window_init2(const char* title, int32 windowWidth, int32 windowHeight,
return false;
}

// Initialize rendering
ska_renderer_initialize(windowWidth, windowHeight, resolutionWidth, resolutionHeight, maintainAspectRatio);

SKA_ADD_FLAGS(skaState.runningSystems, SkaSystemFlag_WINDOW);
return true;
}
Expand All @@ -197,8 +201,8 @@ void ska_window_shutdown() {
void ska_window_render() {
SKA_ASSERT(SKA_HAS_FLAG(SkaSystemFlag_WINDOW, skaState.runningSystems));

glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
static const SkaColor backgroundColor = {33.0f / 255.0f, 33.0f / 255.0f, 33.0f / 255.0f, 1.0f };
ska_renderer_process_and_flush_batches(&backgroundColor);

SDL_GL_SwapWindow(window);
}
Expand Down

0 comments on commit 21b4073

Please sign in to comment.