2014년 6월 12일 목요일

cocos2d의 texture의 최대 크기.

Max size of textures in cocos2d-x depends on each platform

cocos2d-x 텍스쳐의 최대크기는 각 플랫폼에 따라 달라집니다.
In theory, cocos2d-x could show textures in any size, but actually the maxsize of the textures is restricted by the hardware and the system.
이론적으로는 cocos2d-x는 아무런 사이즈의 텍스쳐를 볼 수 있지만, 실제로는 텍스쳐의 최대크기는 하드웨어와 시스템에 의해 제한됩니다.

Here I provide a texture-size restriction table on different platforms’ emulators.
아래는 여러 플랫폼의 에뮬레이터에서 텍스쳐 크기 제한 테이블이다.
platformmaxsize in pixelsr
win322048 * 2048
android4096 * 4096
iPhone31024 * 1024
iPhone3GS2048 * 2048
iPhone42048 * 2048
On the real machines, they aslo have different restrictions, here are some test results: G3 (Hero) 1024 * 1024, iPhone4 2048 * 2048.
실제 단말기에서는 몇가지 테스트결과가 달랐습니다. : G3 (Hero) 1024 * 1024, iPhone4 2048 * 2048
So, for the developers, if you want to cross platforms and run your games smoothly, you should keep your texture size less than 1024 * 1024, that is the lowest restriction for most machines.
크로스 플랫폼에서 게임을 원할하게 실행시키려면, 텍스쳐 크기를 단말기에서 지원하는 최하 크기인 1024 * 1024 아래로 유지해야 합니다.
Code to get max size of texture that the device support: (might not work in simulator)
단말기에서 지원하는 최대크기를 가져오는 코드 : (시뮬레이터에서 작동하지 않을 수 있습니다.)
GLint m_maxTextureSize = 0;
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &m_maxTextureSize);

댓글 없음:

댓글 쓰기

리스트