forked from bartvdbraak/blender
GL_TEXTURE_2D_ARRAY wasn't handled in GPU_texture_update
Although the problem was exposed in 9457715d9a6f, the problem was in the original code that was copied over. To have: ``` } else { /* EXPECTED_VALUE */ ``` Without an BLI_assert(value == EXPECTED_VALUE); is asking for troubles. Yet another reason to favour switch statements with: ``` default: BLI_assert(!"value not implemented or supported"); ``` Instead of chained if/else if/else /* expected_value */.
This commit is contained in:
parent
5f4066c87d
commit
d7b3e33af4
@ -732,6 +732,7 @@ void GPU_texture_update(GPUTexture *tex, const float *pixels)
|
||||
glTexSubImage1D(tex->target, 0, 0, tex->w, format, data_format, pixels);
|
||||
break;
|
||||
case GL_TEXTURE_3D:
|
||||
case GL_TEXTURE_2D_ARRAY:
|
||||
glTexSubImage3D(tex->target, 0, 0, 0, 0, tex->w, tex->h, tex->d, format, data_format, pixels);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user