diff --git a/.gitignore b/.gitignore index 387849e..c619477 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build/ cmake-build-*/ -.idea/ \ No newline at end of file +.idea/ +.cache/ diff --git a/tests/test-common/test-common.cpp b/tests/test-common/test-common.cpp index 97394ba..f4c0be7 100644 --- a/tests/test-common/test-common.cpp +++ b/tests/test-common/test-common.cpp @@ -8,18 +8,18 @@ namespace { - unsigned char pixels[(GRID_WIDTH * 8) * (GRID_HEIGHT * 8) * 3]; + unsigned char pixels[(GRID_WIDTH * CELL_SIZE * CELL_SCALE) * (GRID_HEIGHT * CELL_SIZE * CELL_SCALE) * 3]; } void glerminal_test_save_image() { // -- DIRTY HACK -- - // + // // GL_TEXTURE_2D is not rebound after setting up screen framebuffer // This code will break if this behavior changes glGetTexImage(GL_TEXTURE_2D, 0, GL_RGB, GL_UNSIGNED_BYTE, pixels); stbi_flip_vertically_on_write(true); - stbi_write_png("image.png", GRID_WIDTH * 8, GRID_HEIGHT * 8, 3, pixels, GRID_WIDTH * 8 * 3); -} \ No newline at end of file + stbi_write_png("image.png", GRID_WIDTH * CELL_SIZE * CELL_SCALE, GRID_HEIGHT * CELL_SIZE * CELL_SCALE, 3, pixels, GRID_WIDTH * CELL_SIZE * CELL_SCALE * 3); +}