prepare to handle other texture formats
required for DirectX 9...
This commit is contained in:
parent
540cbbd129
commit
394d5d6583
22 changed files with 131 additions and 24 deletions
|
|
@ -84,7 +84,11 @@ bool FurnaceGUIRenderMetal::updateTexture(FurnaceGUITexture* which, void* data,
|
|||
return true;
|
||||
}
|
||||
|
||||
FurnaceGUITexture* FurnaceGUIRenderMetal::createTexture(bool dynamic, int width, int height, bool interpolate) {
|
||||
FurnaceGUITexture* FurnaceGUIRenderMetal::createTexture(bool dynamic, int width, int height, bool interpolate, FurnaceGUITextureFormat format) {
|
||||
if (format!=GUI_TEXFORMAT_ABGR32) {
|
||||
logE("unsupported texture format!");
|
||||
return NULL;
|
||||
}
|
||||
MTLTextureDescriptor* texDesc=[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA8Unorm width:(NSUInteger)width height:(NSUInteger)height mipmapped:NO];
|
||||
texDesc.usage=MTLTextureUsageShaderRead;
|
||||
texDesc.storageMode=MTLStorageModeManaged;
|
||||
|
|
@ -193,6 +197,10 @@ int FurnaceGUIRenderMetal::getMaxTextureHeight() {
|
|||
return bigTextures?16384:8192;
|
||||
}
|
||||
|
||||
unsigned int FurnaceGUIRenderMetal::getTextureFormats() {
|
||||
return GUI_TEXFORMAT_ABGR32;
|
||||
}
|
||||
|
||||
const char* FurnaceGUIRenderMetal::getBackendName() {
|
||||
return "Metal";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue