Definition at line 117 of file OglImageCache.h. References Add(), GetUnusedImIdPairWithTexSize(), and IsPower2(). Referenced by Impala::Visualization::DirImViewer3D::LoadImageIdx(). 00118 { 00119 if (!im) 00120 return; 00121 00122 int texW, texH; 00123 IsPower2(im->w, &texW); 00124 IsPower2(im->h, &texH); 00125 00126 ImIdPair* p; 00127 if (!im->texture && (p = GetUnusedImIdPairWithTexSize(texW, texH))!=0) 00128 { 00129 OGLIMAGE* texIm = p->first; 00130 int tex = texIm->texture; 00131 texIm->texture = 0; 00132 ReleaseOglImage(texIm); 00133 00134 im->texture = tex; 00135 im->refCount++; 00136 00137 p->second = id; 00138 p->first = im; 00139 } 00140 else 00141 Add(im, id); 00142 00143 im->noTexScaling = 1; 00144 im->texW = texW; 00145 im->texH = texH; 00146 im->changed = 1; 00147 }
Here is the call graph for this function:
|