我正在开发一个使用Cocos2d和Box2d的游戏,我无法添加大小不是POT(2的幂)的图像。你知道我怎么能停用这种行为吗?感谢。
编辑:cocos2d-iphone 2.1,ObjC,iOS app
答案 0 :(得分:0)
该版本支持NPOT图像:启动时你应该看到:
cocos2d: cocos2d-iphone v2.1
cocos2d: compiled with Profiling Support: NO
cocos2d: OS version: 7.1 (0x07010000)
cocos2d: GL_VENDOR: Apple Computer, Inc.
cocos2d: GL_RENDERER: Apple Software Renderer
cocos2d: GL_VERSION: OpenGL ES 2.0 APPLE-9.4.3
cocos2d: GL_MAX_TEXTURE_SIZE: 4096
cocos2d: GL_MAX_TEXTURE_UNITS: 8
cocos2d: GL_MAX_SAMPLES: 4
cocos2d: GL supports PVRTC: YES
cocos2d: GL supports BGRA8888 textures: YES
cocos2d: GL supports NPOT textures: YES
cocos2d: GL supports discard_framebuffer: YES
cocos2d: GL supports shareable VAO: NO
确保您在info.plist的Required device capabilities
子句中要求使用opengles-2。
答案 1 :(得分:-1)
你可以使用texturepacker工具打包你的图像,如果你想添加一个图像而不是一个底池,你需要显示你的代码,可能是我们可以找出一些错误的