Skip to content

Commit

Permalink
Add the screenshot code everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Sep 27, 2024
1 parent f12e1f6 commit 85c8047
Show file tree
Hide file tree
Showing 17 changed files with 68 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 00_empty/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 01_triangle/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 02_matrix/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 03_colored_cube/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 04_textured_cube/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 05_camera_controls/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 06_render_targets/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 07_multiple_render_targets/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 08_float_render_targets/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 09_depth_render_targets/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 10_cubemap/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 11_instanced_rendering/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 12_set_render_target_depth/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 13_generate_mipmaps/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 14_set_mipmap/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions 15_deinterleaved_buffers/Sources/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ static void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down
4 changes: 4 additions & 0 deletions Raytracing/Sources/raytracing.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ void update(void *data) {
kope_g5_command_list_present(&list);

kope_g5_device_execute_command_list(&device, &list);

#ifdef SCREENSHOT
screenshot_take(&device, &list, framebuffer, width, height);
#endif
}

int kickstart(int argc, char **argv) {
Expand Down

0 comments on commit 85c8047

Please sign in to comment.