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;