Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_texture.c
| Context not available. | |||||
| if (!tex->bindcode) { | if (!tex->bindcode) { | ||||
| fprintf(stderr, "GPUTexture: texture create failed\n"); | fprintf(stderr, "GPUTexture: texture create failed\n"); | ||||
| GPU_texture_free(tex); | GPU_texture_free(tex); | ||||
| BLI_assert(0 && "glGenTextures failled: Are you sure a valid OGL context is active on this thread?\n"); | BLI_assert(0 && "glGenTextures failed: Are you sure a valid OGL context is active on this thread?\n"); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| Context not available. | |||||
| void GPU_texture_get_mipmap_size(GPUTexture *tex, int lvl, int *size) | void GPU_texture_get_mipmap_size(GPUTexture *tex, int lvl, int *size) | ||||
| { | { | ||||
| /* TODO assert if lvl is bellow the limit of 1px in each dimension. */ | /* TODO assert if lvl is below the limit of 1px in each dimension. */ | ||||
| int div = 1 << lvl; | int div = 1 << lvl; | ||||
| size[0] = max_ii(1, tex->w / div); | size[0] = max_ii(1, tex->w / div); | ||||
| Context not available. | |||||