|
那位大哥用过osg::Texture2DArray阿,我怎么调用这个
const osg::GraphicsContext *context = m_viewer->getCamera()->getGraphicsContext();
const osg::State* state = context->getState();
osg::ref_ptr<osg::Texture2DArray> m_texture2dArray = new osg::Texture2DArray;
osg::Texture2DArray::Extensions* ext = m_texture2dArray->getExtensions(state->getContextID(),false);
ext->glTexSubImage3D(GL_TEXTURE_2D_ARRAY_EXT, 0, 0, 0, i*cols+j, tileWidth, tileHeight, 1, GL_RGB, GL_UNSIGNED_BYTE, pData);
就会给出下面的错误:
undefined reference to `osg::Texture2DArray::Extensions::__glewTexSubImage3D(unsigned int, int, int, int, int, int, int, int, unsigned int, unsigned int, void const*) const'
单独使用,不用二维纹理数组来调
glTexSubImage3D(GL_TEXTURE_2D_ARRAY_EXT, 0, 0, 0, i*cols+j, tileWidth, tileHeight, 1, GL_RGB, GL_UNSIGNED_BYTE, pData);
没有问题,谁能告诉我这个是怎么回事呢。
|
|