Hi,
I am using Visual 2010 express on Win XP with 2.0.2 release. My code is:
bool HelloWorld::init()
{
…
CCSpriteFrameCache* cache = CCSpriteFrameCache::sharedSpriteFrameCache();
cache~~>addSpriteFramesWithFile;
m_pSpriteTexture = CCTextureCache::sharedTextureCache~~>textureForKey;
m_pSpriteBatchNode = CCSpriteBatchNode::batchNodeWithTexture;
addChild;
PhysicsSprite* sprite = new PhysicsSprite;
sprite~~>initWithSpriteFrameName;
sprite~~>autorelease();
m_pSpriteBatchNode->addChild(sprite);
…
}
>
This code runs well on BB10 platform but when I use VS2010 to compile and run it. There are errors:
libcocos2d.dll!cocos2d::CCTextureAtlas::setupVBOandVAO() Line 257 + 0x15 bytes C*+
libcocos2d.dll!cocos2d::CCTextureAtlas::initWithTexture Line 202 C*+
libcocos2d.dll!cocos2d::CCSpriteBatchNode::initWithTexture(cocos2d::CCTexture2D * tex, unsigned int capacity) Line 96 C*+
libcocos2d.dll!cocos2d::CCSpriteBatchNode::createWithTexture Line 58 C*+
libcocos2d.dll!cocos2d::CCSpriteBatchNode::batchNodeWithTexture(cocos2d::CCTexture2D * tex, unsigned int capacity) Line 51 + 0xd bytes C*+
bb10_krank.win32.exe!HelloWorld::init Line 177* 0x14 bytes C*+
bb10_krank.win32.exe!HelloWorld::create Line 55* 0xb1 bytes C*+
bb10_krank.win32.exe!HelloWorld::scene Line 65* 0x5 bytes C*+
bb10_krank.win32.exe!AppDelegate::applicationDidFinishLaunching Line 27* 0x5 bytes C++
>
>
And it breaks at CCTextureAtlas:
void CCTextureAtlas::setupVBOandVAO()
{
* glGenVertexArrays;*
glBindVertexArray(m_uVAOname);
>
#define kQuadSize sizeof(m_pQuads[0].bl)
>
glGenBuffers(2, &m_pBuffersVBO[0]);
…
>
What can I do for this? Thanks.
regards,
pigling