diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-04-18 12:21:58 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-04-18 13:50:28 +0300 |
commit | 40e69ad6df585dba8ee4b979919b0898de83b642 (patch) | |
tree | 73ca88cd8bcfdb6c9bcdd16629693aefdd284a82 /source/blender | |
parent | eda0ebc7b3d3d2a4716bbb19881a0f0e35a56235 (diff) |
GPUTexture: Fix Cubemap upload
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 12 |
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; |