axmol/cocos/renderer/backend/metal/DeviceInfoMTL.mm

30 lines
445 B
Plaintext
Raw Normal View History

#include "DeviceInfoMTL.h"
#include "base/ccMacros.h"
CC_BACKEND_BEGIN
DeviceInfoMTL::DeviceInfoMTL(id<MTLDevice> device)
{
}
bool DeviceInfoMTL::init()
{
_maxAttributes = 31;
getTextureSizeInfo();
return true;
}
2019-03-15 11:13:40 +08:00
//todo coulsonwang
void DeviceInfoMTL::getTextureSizeInfo()
{
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
2019-03-15 11:13:40 +08:00
_maxTextureSize = 4096;
#else
2019-03-15 11:13:40 +08:00
_maxTextureSize = 16384;
#endif
}
CC_BACKEND_END