windows cocos2d-x OpenGL error 0x0506 quick-cocos2d-x\lib\cocos2d-x\cocos2dx\sprite_nodes\ccsprite.c
2016-06-17 12:46
609 查看
cocos2d-x版本是2.2.1
在windows下启动模拟器跑游戏的时候报了这样的错误:
OpenGL error 0x0506 in d:\client\trunk\quick-cocos2d-x\lib\cocos2d-x\cocos2dx\sprite_nodes\ccsprite.cpp cocos2d::CCSprite::draw 605
后台debug的log日志发现:
在调用CCRenderTexture:create()时:
LUA ERROR: ASSERT FAILED ON LUA EXECUTE: Could not attach texture to framebuffer
即c++ cocos的CCRenderTexture::initWithWidthAndHeight()方法的时候
CCAssert(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE, "Could not attach texture to framebuffer");
断言失败报错
查看opengl 官网这个方法在opengl 3.0以上才支持,查看了自己机器openl版本也是3.0。
后来没办法,想升级下显卡驱动试试,升级完后,再查看opengl版本变成了3.3
在启动游戏的时候,就没有报这个错误了。
在windows下启动模拟器跑游戏的时候报了这样的错误:
OpenGL error 0x0506 in d:\client\trunk\quick-cocos2d-x\lib\cocos2d-x\cocos2dx\sprite_nodes\ccsprite.cpp cocos2d::CCSprite::draw 605
后台debug的log日志发现:
在调用CCRenderTexture:create()时:
LUA ERROR: ASSERT FAILED ON LUA EXECUTE: Could not attach texture to framebuffer
即c++ cocos的CCRenderTexture::initWithWidthAndHeight()方法的时候
CCAssert(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE, "Could not attach texture to framebuffer");
断言失败报错
查看opengl 官网这个方法在opengl 3.0以上才支持,查看了自己机器openl版本也是3.0。
后来没办法,想升级下显卡驱动试试,升级完后,再查看opengl版本变成了3.3
在启动游戏的时候,就没有报这个错误了。
相关文章推荐
- Cocos2d-x中背景音乐和音效使用实例
- Cocos2d-x学习笔记之CCScene、CCLayer、CCSprite的默认坐标和默认锚点实验
- Cocos2d-x UI开发之CCControlPotentiometer控件类使用实例
- Cocos2d-x UI开发之文本类使用实例
- Cocos2d-x保存用户游戏数据之XML文件是否存在问题判断方法
- Cocos2d-x UI开发之菜单类使用实例
- Cocos2d-x UI开发之CCControlButton控件类实例
- Cocos2d-x学习笔记之世界坐标系、本地坐标系、opengl坐标系、屏幕坐标系
- Cocos2d-x UI开发之CCControlColourPicker控件类使用实例
- Cocos2d-x学习笔记之CCLayerColor层的使用实例
- Cocos2d-x Schedule定时器的使用实例
- Cocos2d-x中使用CCScrollView来实现关卡选择实例
- Cocos2d-x中CCEditBox文本输入框的使用实例
- cocos2d-x学习笔记之CCLayer、CCLayerColor、CCLayerGradient、CCLayerMultiplex场景层介绍
- Cocos2d-x UI开发之CCControlSlider控件类使用实例
- Cocos2d-x学习笔记之开发环境搭建
- Cocos2d-x学习笔记之Hello World!
- 使用C++进行Cocos2d-x游戏开发入门过程中的要点解析
- Cocos2d-x的内存管理总结
- Cocos2d-x 3.0中集成社交分享ShareSDK的详细步骤和常见问题解决