projects
/
clouds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Hack around brightness and shader viewport size
[clouds.git]
/
debug.hpp
diff --git
a/debug.hpp
b/debug.hpp
index 6774a1a66c6724fc0e9d35c0516e23dd28e2c5e5..87281f994995011a81baa14dd1a9c621e3431b18 100644
(file)
--- 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;
typedef struct {
char head[12];
short dx /* Width */, dy /* Height */, head2;
- char pic[
600 * 4
00 * 3];
+ char pic[
1000 * 10
00 * 3];
} TGA;
char tgahead[12] = {0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
void saveFBO() {
} 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;
TGA *tga = (TGA *)malloc(sizeof(TGA));
memcpy(tga->head, tgahead, 12);
tga->dx = width;