cocos2d-x 获取纹理数据

s = Sprite::create("res/GIRE.png");
s->setPosition(visibleSize / 2);
this->addChild(s);

auto id = s->getTexture()->getName();

//int format,width,height;
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, &format);
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width);
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height);
//glGetTexImage(GL_TEXTURE_2D, 0, format, GL_UNSIGNED_BYTE, void*);

 

//这是不现实的

上一篇:【雷达通信】雷达数字信号处理matlab源码


下一篇:2D前景触发与3D触发结合样例