Hi
I'm not an expert in Graphics, but if what you are trying to do is to create a texture from an IPU memory buffer, you can use the glTexDirectVIVMap API to map a virtual memory address buffer (texture_data) to the current bind texture (GL_TEXTURE_2D).
To indicate that physical address is unknown ~0U should be passed as the last argument.
Also you should call this API for each new frame rendered.
==================== Pseudo code =======================
GLuint physical = ~0U;
GLuint texture_id = 0;
void* texture_data = GetBuffer(); // virtual buffer addr
_texture = glGenTextures (1, &texture_id);
glTexParameterf (GL_TEXTURE_2D, <pname>, <pvalue>);
glBindTexture(GL_TEXTURE_2D, _texture);
glTexDirectVIVMap (GL_TEXTURE_2D, width, height, GL_VIV_NV12, (GLvoid**)(&texture_data), &physical);
glTexDirectInvalidateVIV (GL_TEXTURE_2D);