Untitled
unknown
c_cpp
2 years ago
584 B
41
Indexable
gTextureHeapMin = grTexMinAddress(GR_TMU0);
gTextureHeapMax = grTexMaxAddress(GR_TMU0);
Gu3dfInfo info;
gu3dfGetInfo(fileName, &info);
FxU32 required = grTexCalcMemRequired(info.header.small_lod, info.header.large_lod, info.header.aspect_ratio, info.header.format);
if (gTextureHeapMin + gTextureHeapUsage + required > gTextureHeapMax)
{
printf("Failed to allocate texture %s: VRAM exhausted\n", fileName);
exit(-1);
}
FxU32 linearAddr = gTextureHeapMin + gTextureHeapUsage;
info.data = malloc(info.mem_required);
gu3dfLoad(fileName, &info);Editor is loading...
Leave a Comment