我正在将一个在不同平台(Windows、iOS、Playbook、BB10、Android)上完美运行的游戏引擎移植到 NaCl
2d 渲染正确,但某些 3d 对象不显示或渲染非常奇怪,我得到以下问题
[.PPAPIContext]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : BackTexture::AllocateStorage: <- error from previous GL command (index):1
[.PPAPIContext]GL ERROR :GL_INVALID_OPERATION : glVertexAttribPointer: stride not valid for type (index):1
[.PPAPIContext]GL ERROR :GL_INVALID_OPERATION : glVertexAttribPointer: offset not valid for type (index):1
[.PPAPIContext]GL ERROR :GL_INVALID_OPERATION : glDrawElements: attempt to access out of range vertices in attribute 0 (index):1
[.PPAPIContext]GL ERROR :GL_INVALID_OPERATION : glVertexAttribPointer: stride not valid for type (index):1
[.PPAPIContext]GL ERROR :GL_INVALID_OPERATION : glVertexAttribPointer: offset not valid for type (index):1
[.PPAPIContext]GL ERROR :GL_INVALID_OPERATION : glVertexAttribPointer: stride not valid for type (index):1
[.PPAPIContext]GL ERROR :GL_INVALID_OPERATION : glVertexAttribPointer: offset not valid for type (index):1
[.PPAPIContext]GL ERROR :GL_INVALID_OPERATION : glVertexAttribPointer: stride not valid for type
而且它会无限重复。
同样,相同的渲染代码用于不同的平台,它工作得很好。移植到 NaCl 时是否需要特别考虑?关于我应该关注什么以尝试找到问题的任何想法?据我所知,着色器 0(顶点着色器)存在问题,并且某些对象的顶点确实到处都是。
谢谢!:)