imx6 更新纹理-私有接口 glTexDirectVIVMap glTexDirectInvalidateVIV
imx6 viv GPU 更新纹理私有接口
1 void mapFrame2Texture(GLvoid *pvAddr, const GLuint * pAddr) 2 { 3 DEBUG_LOG(" mapFrame2Texture - vaddr %p ", pvAddr); 4 QOpenGLContext *glcontext = QOpenGLContext::currentContext(); 5 if (glcontext == 0) { 6 qWarning() << Q_FUNC_INFO << "no QOpenGLContext::currentContext() => return 0"; 7 return ; 8 } 9 10 static PFNGLTEXDIRECTVIVMAPPROC glTexDirectVIVMap_LOCAL = 0; 11 12 if (glTexDirectVIVMap_LOCAL == 0 ) { 13 glTexDirectVIVMap_LOCAL = reinterpret_cast<PFNGLTEXDIRECTVIVMAPPROC>(glcontext->getProcAddress("glTexDirectVIVMap")); 14 } 15 if (glTexDirectVIVMap_LOCAL == 0 ) { 16 qWarning() << Q_FUNC_INFO << "couldn't find \"glTexDirectVIVMap\" and/or \"glTexDirectInvalidateVIV\" => do nothing and return"; 17 return ; 18 } 19 20 static PFNGLTEXDIRECTINVALIDATEVIVPROC glTexDirectInvalidateVIV_LOCAL = 0; 21 22 if ( glTexDirectInvalidateVIV_LOCAL == 0) { 23 glTexDirectInvalidateVIV_LOCAL = reinterpret_cast<PFNGLTEXDIRECTINVALIDATEVIVPROC>(glcontext->getProcAddress("glTexDirectInvalidateVIV")); 24 } 25 if ( glTexDirectInvalidateVIV_LOCAL == 0) { 26 qWarning() << Q_FUNC_INFO << "couldn't find \"glTexDirectVIVMap\" and/or \"glTexDirectInvalidateVIV\" => do nothing and return"; 27 return ; 28 } 29 30 ///////////////////////////////////////////////////////////////////////// 31 glTexDirectVIVMap_LOCAL(GL_TEXTURE_2D, SRC_V4L2_FRAME_WIDTH, 32 SRC_V4L2_FRAME_HEIGHT, GPUPAINT_FMT, 33 &pvAddr, 34 pAddr 35 ); 36 37 glTexDirectInvalidateVIV_LOCAL(GL_TEXTURE_2D); 38 39 }
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了