2019-03-14 15:58:55 +08:00
|
|
|
#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
|
2019-03-14 15:58:55 +08:00
|
|
|
void DeviceInfoMTL::getTextureSizeInfo()
|
|
|
|
{
|
|
|
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
2019-03-15 11:13:40 +08:00
|
|
|
_maxTextureSize = 4096;
|
|
|
|
|
2019-03-14 15:58:55 +08:00
|
|
|
#else
|
2019-03-15 11:13:40 +08:00
|
|
|
_maxTextureSize = 16384;
|
2019-03-14 15:58:55 +08:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
CC_BACKEND_END
|