Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_draw.c
| Show First 20 Lines • Show All 871 Lines • ▼ Show 20 Lines | 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. */ | /* Tag as in active use for garbage collector. */ | ||||
| BKE_image_tag_time(ima); | 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, iuser->multiview_eye); | GPUTexture **tex = gpu_get_image_gputexture(ima, textarget, iuser ? iuser->multiview_eye : 0); | ||||
| 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. */ | ||||
| uint bindcode = 0; | uint bindcode = 0; | ||||
| ImageTile *tile = BKE_image_get_tile(ima, 0); | ImageTile *tile = BKE_image_get_tile(ima, 0); | ||||
| ▲ Show 20 Lines • Show All 658 Lines • Show Last 20 Lines | |||||