diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2009-09-15 14:26:36 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2009-09-15 14:26:36 +0400 |
commit | c8618348e0feab2f28d348b539b8a6420301be1f (patch) | |
tree | d9d6481ddc0a6c811790f0bcd0e1e0ac85904721 /source/blender/gpu/intern/gpu_extensions.c | |
parent | 9a2cd02ae4baf4f759f076e1db4db4c8c2e69a39 (diff) |
Smoke:
* Less verbose
* More OpenGL error messages (on blender -d)
Diffstat (limited to 'source/blender/gpu/intern/gpu_extensions.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_extensions.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 4a31df04627..55e4b337a77 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -346,6 +346,8 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels) tex->number = 0; glBindTexture(tex->target, tex->bindcode); + GPU_print_error("3D glBindTexture"); + type = GL_FLOAT; // GL_UNSIGNED_BYTE format = GL_RED; internalformat = GL_INTENSITY; @@ -355,16 +357,23 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels) glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, 0); + GPU_print_error("3D glTexImage3D"); + if (fpixels) { glTexSubImage3D(tex->target, 0, 0, 0, 0, w, h, depth, format, type, fpixels); + GPU_print_error("3D glTexSubImage3D"); } + glTexParameterfv(GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, vfBorderColor); + GPU_print_error("3D GL_TEXTURE_BORDER_COLOR"); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + GPU_print_error("3D GL_LINEAR"); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_BORDER); + GPU_print_error("3D GL_CLAMP_TO_BORDER"); if (pixels) MEM_freeN(pixels); |