Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-04-18 12:21:58 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-04-18 13:50:28 +0300
commit40e69ad6df585dba8ee4b979919b0898de83b642 (patch)
tree73ca88cd8bcfdb6c9bcdd16629693aefdd284a82 /source/blender
parenteda0ebc7b3d3d2a4716bbb19881a0f0e35a56235 (diff)
GPUTexture: Fix Cubemap upload
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 525a2b3d5dc..dae3c406259 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -587,12 +587,12 @@ GPUTexture *GPU_texture_create_cube_custom(int w, int channels, GPUTextureFormat
const float *fpixels_px, *fpixels_py, *fpixels_pz, *fpixels_nx, *fpixels_ny, *fpixels_nz;
if (fpixels) {
- fpixels_px = fpixels + 0 * w * w;
- fpixels_py = fpixels + 1 * w * w;
- fpixels_pz = fpixels + 2 * w * w;
- fpixels_nx = fpixels + 3 * w * w;
- fpixels_ny = fpixels + 4 * w * w;
- fpixels_nz = fpixels + 5 * w * w;
+ fpixels_px = fpixels + 0 * w * w * channels;
+ fpixels_nx = fpixels + 1 * w * w * channels;
+ fpixels_py = fpixels + 2 * w * w * channels;
+ fpixels_ny = fpixels + 3 * w * w * channels;
+ fpixels_pz = fpixels + 4 * w * w * channels;
+ fpixels_nz = fpixels + 5 * w * w * channels;
}
else {
fpixels_px = fpixels_py = fpixels_pz = fpixels_nx = fpixels_ny = fpixels_nz = NULL;