#include <cstring>
#include <glm/glm.hpp>
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
inline void dump(glm::mat4 m) {
for (int i = 0; i < 4; i++)
fprintf(stderr, "%f,%f,%f,%f\n", m[i][0], m[i][1], m[i][2], m[i][3]);
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;