Compare commits

..

No commits in common. "96944fcaa977d1484c987ca9cec61e8d46cb8e4b" and "65c6de85ba4c334e5ead848d3496ce05045ce31a" have entirely different histories.

3 changed files with 9 additions and 47 deletions

View File

@ -1,38 +0,0 @@
name: Make PNG
run-name: ${{ gitea.actor }} is recording the PNG output.
on: push
jobs:
build-app:
runs-on: linux_amd64
steps:
- name: Checkout current
uses: actions/checkout@v4
with:
path: curr
submodules: recursive
- name: Checkout previous
uses: actions/checkout@v4
with:
path: prev
fetch-depth: 2
submodules: recursive
- run: cd prev && git checkout HEAD^
- name: Build current
run: cmake -S curr -B curr/build -DGLERMINAL_TEST=ON && cmake --build curr/build
- name: Build previous
run: cmake -S prev -B prev/build -DGLERMINAL_TEST=ON && cmake --build prev/build
- name: Generate PNG file for current
run: cd curr/build/tests && XDG_RUNTIME_DIR=$PWD xvfb-run -a -s="-screen 0 1280x800x24" ./test-basic
- name: Generate PNG file for previous
run: cd prev/build/tests && XDG_RUNTIME_DIR=$PWD xvfb-run -a -s="-screen 0 1280x800x24" ./test-basic
- name: Upload current PNG
uses: actions/upload-artifact@v3
with:
name: basic
path: |
curr/build/tests/image.png
prev/build/tests/image.png
- name: Compare PNG files
run: diff curr/build/tests/image.png prev/build/tests/image.png

View File

@ -529,7 +529,7 @@ namespace glerminal
log(GL_DEBUG_TYPE_ERROR, 0, 0, "Could not compile vertex shader.");
log(GL_DEBUG_TYPE_ERROR, 0, 0, info_log);
throw std::runtime_error("Could not compile vertex shader.");
throw std::runtime_error("");
}
glGetShaderiv(geometry_shader, GL_COMPILE_STATUS, &success);
@ -543,7 +543,7 @@ namespace glerminal
log(GL_DEBUG_TYPE_ERROR, 1, 0, "Could not compile geometry shader.");
log(GL_DEBUG_TYPE_ERROR, 1, 0, info_log);
throw std::runtime_error("Could not compile geometry shader.");
throw std::runtime_error("");
}
glGetShaderiv(fragment_shader, GL_COMPILE_STATUS, &success);
@ -557,7 +557,7 @@ namespace glerminal
log(GL_DEBUG_TYPE_ERROR, 2, 0, "Could not compile fragment shader.");
log(GL_DEBUG_TYPE_ERROR, 2, 0, info_log);
throw std::runtime_error("Could not compile fragment shader.");
throw std::runtime_error("");
}
// link
@ -584,7 +584,7 @@ namespace glerminal
log(GL_DEBUG_TYPE_ERROR, 3, 0, "Could not link shader program.");
log(GL_DEBUG_TYPE_ERROR, 3, 0, info_log);
throw std::runtime_error("Could not link shader program.");
throw std::runtime_error("");
}
// setup uniforms
@ -613,7 +613,7 @@ namespace glerminal
log(GL_DEBUG_TYPE_ERROR, 4, 0, "Could not compile screen vertex shader.");
log(GL_DEBUG_TYPE_ERROR, 4, 0, info_log);
throw std::runtime_error("Could not compile screen vertex shader.");
throw std::runtime_error("");
}
glGetShaderiv(screen_fragment_shader, GL_COMPILE_STATUS, &success);
@ -626,7 +626,7 @@ namespace glerminal
log(GL_DEBUG_TYPE_ERROR, 5, 0, "Could not compile screen fragment shader.");
log(GL_DEBUG_TYPE_ERROR, 5, 0, info_log);
throw std::runtime_error("Could not compile screen fragment shader.");
throw std::runtime_error("");
}
// link
@ -645,7 +645,7 @@ namespace glerminal
log(GL_DEBUG_TYPE_ERROR, 6, 0, "Could not link screen shader program.");
log(GL_DEBUG_TYPE_ERROR, 6, 0, info_log);
throw std::runtime_error("Could not link screen shader program.");
throw std::runtime_error("");
}
// setup uniforms for screen shader

View File

@ -8,7 +8,7 @@
namespace
{
unsigned char pixels[(GRID_WIDTH * CELL_SCALE * 8) * (GRID_HEIGHT * CELL_SCALE * 8) * 3];
unsigned char pixels[1280 * 800 * 3];
}
void glerminal_test_save_image()
@ -21,5 +21,5 @@ void glerminal_test_save_image()
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, pixels);
stbi_flip_vertically_on_write(true);
stbi_write_png("image.png", GRID_WIDTH * CELL_SCALE * 8, GRID_HEIGHT * CELL_SCALE * 8, 3, pixels, GRID_WIDTH * CELL_SCALE * 8 * 3);
stbi_write_png("image.png", GRID_WIDTH * CELL_SCALE * 8, GRID_HEIGHT * CELL_SCALE * 8, 3, pixels, 1280 * 3);
}