【发布时间】:2010-10-11 03:05:04
【问题描述】:
有谁知道如何在 os x 上获得免费(!)vram?
我知道您可以查询注册表项:
typeCode = IORegistryEntrySearchCFProperty(dspPort,kIOServicePlane,CFSTR(kIOFBMemorySizeKey),
kCFAllocatorDefault,
kIORegistryIterateRecursively | kIORegistryIterateParents);
但这将返回所有 vram,而不是免费 vram。在 windows 下可以使用 directshow 查询免费 VRAM
mDDrawResult = DirectDrawCreate(NULL, &mDDraw, NULL);
mDDrawResult = mDDraw->QueryInterface(IID_IDirectDraw2, (LPVOID *)&mDDraw2);
DDSCAPS ddscaps;
DWORD totalmem, freemem;
ddscaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
mDDrawResult = mDDraw2->GetAvailableVidMem(&ddscaps, &totalmem, &freemem);
丑陋,但它有效。有人知道osx的方式吗?
最好的 温迪
【问题讨论】: