I am new to openGL so having some issues figure out how to modify grafika texture2dProgram so that I can get a picture in picture effect (or texture in texture). Here is my understanding so far from all the examples:
(after surface is ready)
Setup Viewport
GLES20.glViewport(0, 0, width, height);
Setup Drawable2d which has texture and vertices coordinates
new Drawable2d(RECTANGLE)
On new frame, use the Texture2dProgram to draw into the viewport with the texture
I want to take my understanding and modify so that I get a picture in picture output on the screen. How do I achieve this?
My understanding is that I should do the following: create two Texture2dPrograms and assign different texture id and pass different the projection matrix so that one texture2dprogram draws only on a smaller portion. Is that correct or am I missing something?