I think I’m seeing the same behavior…
I’m trying to copy a video frame to a texture during each RenderView() call. Basically, I create a texture initially…
//:::INIT:::
glGenTextures(1, &m_textureID);
glBindTexture(GL_TEXTURE_2D, m_textureID);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
Then for each frame, I do something like the following to update the texture…
//Render
glBindTexture(GL_TEXTURE_2D, m_textureID);
glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,m_nWidth,m_nHeight,0,
GL_RGB,GL_UNSIGNED_BYTE,(GLvoid*)m_pBuffer);
Where my buffer is the new video frame. I’m totally new to OpenGL, but it seems pretty obvious that the repeating call to glTexImage2D is the problem b/c if I comment it out, my app won’t just hang after ~2 seconds but instead I’ll get a white square on the screen. I have checked and double checked the height/width and I’m pretty sure the format and everything of the buffer is correct b/c I get a video to play on the quad for a little while.
I too am using the i.mx31. I have tried doing
//Render
glDeleteTextures(1, &m_textureID);
glGenTextures(1, &m_textureID);
glBindTexture(GL_TEXTURE_2D, m_textureID);
glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,m_nWidth,m_nHeight,0,
GL_RGB,GL_UNSIGNED_BYTE,(GLvoid*)m_pBuffer);
with no luck. Am I doing something terribly wrong? I have also tried glSubTexImage2D, but the same thing happens. Is there a way to track how much memory is being used by OGLES? My entire Init and Render functions are probably no more than 2 pages worth of text.