goat3dgfx
diff src/texture.cc @ 9:25b911c7c35c
fixed some line endings
fixed the cubemap2.jpg file in examples/cubemap/data which was resized improperly causing seams...
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 18 Nov 2013 04:10:19 +0200 |
parents | 3d96734fd477 |
children | 7d6b667821cf |
line diff
1.1 --- a/src/texture.cc Mon Nov 18 03:35:20 2013 +0200 1.2 +++ b/src/texture.cc Mon Nov 18 04:10:19 2013 +0200 1.3 @@ -1,3 +1,4 @@ 1.4 +#include <math.h> 1.5 #include "texture.h" 1.6 #include "image.h" 1.7 #include "opengl.h" 1.8 @@ -249,6 +250,7 @@ 1.9 glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 1.10 glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 1.11 glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 1.12 + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); 1.13 1.14 for(int i=0; i<6; i++) { 1.15 glTexImage2D(cube_faces[i], 0, ifmt, xsz, ysz, 0, GL_RGB, GL_UNSIGNED_BYTE, 0); 1.16 @@ -269,6 +271,7 @@ 1.17 glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 1.18 glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 1.19 glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 1.20 + glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); 1.21 1.22 glTexImage2D(cube_faces[idx], 0, texfmt, sz[0], sz[1], 0, fmt, type, img.get_pixels()); 1.23 }