Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/render_texture.c
| Show First 20 Lines • Show All 3,647 Lines • ▼ Show 20 Lines | void render_realtime_texture(ShadeInput *shi, Image *ima) | ||||
| ShadeInputUV *suv= &shi->uv[shi->actuv]; | ShadeInputUV *suv= &shi->uv[shi->actuv]; | ||||
| int a; | int a; | ||||
| if (R.r.scemode & R_NO_TEX) return; | if (R.r.scemode & R_NO_TEX) return; | ||||
| if (firsttime) { | if (firsttime) { | ||||
| BLI_lock_thread(LOCK_IMAGE); | BLI_lock_thread(LOCK_IMAGE); | ||||
| if (firsttime) { | if (firsttime) { | ||||
| for (a=0; a<BLENDER_MAX_THREADS; a++) { | const int num_threads = BLI_system_thread_count(); | ||||
| for (a = 0; a < num_threads; a++) { | |||||
| memset(&imatex[a], 0, sizeof(Tex)); | memset(&imatex[a], 0, sizeof(Tex)); | ||||
| BKE_texture_default(&imatex[a]); | BKE_texture_default(&imatex[a]); | ||||
| imatex[a].type= TEX_IMAGE; | imatex[a].type= TEX_IMAGE; | ||||
| } | } | ||||
| firsttime= 0; | firsttime= 0; | ||||
| } | } | ||||
| BLI_unlock_thread(LOCK_IMAGE); | BLI_unlock_thread(LOCK_IMAGE); | ||||
| ▲ Show 20 Lines • Show All 295 Lines • Show Last 20 Lines | |||||