projects
/
clouds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some typo fixes
[clouds.git]
/
debug.hpp
diff --git
a/debug.hpp
b/debug.hpp
index 6774a1a66c6724fc0e9d35c0516e23dd28e2c5e5..daa756a2df82d4bb0549bfac628a3ca0b1cba8a7 100644
(file)
--- a/
debug.hpp
+++ b/
debug.hpp
@@
-4,6
+4,8
@@
#include <cstring>
#include <glm/glm.hpp>
#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]);
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]);
@@
-20,13
+22,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;