Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_draw.c
| Show First 20 Lines • Show All 469 Lines • ▼ Show 20 Lines | GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, int textarget) | ||||
| } | } | ||||
| /* currently, gpu refresh tagging is used by ima sequences */ | /* currently, gpu refresh tagging is used by ima sequences */ | ||||
| if (ima->gpuflag & IMA_GPU_REFRESH) { | if (ima->gpuflag & IMA_GPU_REFRESH) { | ||||
| gpu_free_image_immediate(ima); | gpu_free_image_immediate(ima); | ||||
| ima->gpuflag &= ~IMA_GPU_REFRESH; | ima->gpuflag &= ~IMA_GPU_REFRESH; | ||||
| } | } | ||||
| /* Tag as in active use for garbage collector. */ | |||||
| BKE_image_tag_time(ima); | |||||
| /* Test if we already have a texture. */ | /* Test if we already have a texture. */ | ||||
| GPUTexture **tex = gpu_get_image_gputexture(ima, textarget); | GPUTexture **tex = gpu_get_image_gputexture(ima, textarget); | ||||
| if (*tex) { | if (*tex) { | ||||
| return *tex; | return *tex; | ||||
| } | } | ||||
| /* Check if we have a valid image. If not, we return a dummy | /* Check if we have a valid image. If not, we return a dummy | ||||
| * texture with zero bindcode so we don't keep trying. */ | * texture with zero bindcode so we don't keep trying. */ | ||||
| ▲ Show 20 Lines • Show All 1,155 Lines • Show Last 20 Lines | |||||