I need to create a texture bindable pbuffer. Then bind it and upload the texture data.
Im sort of stuck.
Here’s how we create the pbuffers(all this code courtesy a reply from Xmas in these forums):
EGLSurface pbuffer[NUM_PBUFFERS];
for (int i = 0; i < NUM_PBUFFERS; ++i)
pbuffer[i] = eglCreatePbufferSurface(eglDisplay, eglConfig, attribs);
And this is what I need to do while rendering(it should be equivalent to glTexSubImage2D+glDrawArrays+glSwapBuffers when using textures alone)
void renderScene()
{
eglMakeCurrent(eglDisplay, pbuffer[writeBuffer], pbuffer[readBuffer], eglContext);
<<<<DRAW to the writepbuffer>>>>
}
Is there anything wrong with the contents of renderScene?
How do I do the <<<<DRAW to the writepbuffer>>>> part?
Is it placed correctly in the function?
And should’nt there be an eglSwapBuffers someplace?
Thanks for your help.