X-Git-Url: https://git.lukelau.me/?p=clouds.git;a=blobdiff_plain;f=debug.hpp;fp=debug.hpp;h=87281f994995011a81baa14dd1a9c621e3431b18;hp=6774a1a66c6724fc0e9d35c0516e23dd28e2c5e5;hb=152db1a5db951f77a55815b0ca7d9c5172fd8dea;hpb=e4bfe561fba2c32bf5ecdbf6a96067676ab313a2 diff --git a/debug.hpp b/debug.hpp index 6774a1a..87281f9 100644 --- a/debug.hpp +++ b/debug.hpp @@ -20,13 +20,15 @@ inline void dump(glm::vec2 v) { fprintf(stderr, "{%f,%f}\n", v.x, v.y); } typedef struct { char head[12]; short dx /* Width */, dy /* Height */, head2; - char pic[600 * 400 * 3]; + char pic[1000 * 1000 * 3]; } TGA; char tgahead[12] = {0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; void saveFBO() { - float width = 600, height = 400; + GLint ps[4]; + glGetIntegerv(GL_VIEWPORT, ps); + GLint width = ps[2], height = ps[3]; TGA *tga = (TGA *)malloc(sizeof(TGA)); memcpy(tga->head, tgahead, 12); tga->dx = width;