I am very new to OpenGL and this is what my goal is...
- Load a texture from an image.
- Load another texture which is much smaller than the first one.
- Now keep drawing the smaller texture on the larger one on some chain of events, like painting on the larger texture.
Can somebody point me to some material which might help do this?
I looked into some book, but they are mostly into 3D animation kind of stuff and I do not want to go to that dept, I just need the texture manipulation stuff in 2D.
I am following the example...
http://developer.apple.com/library/ios/#samplecode/GLImageProcessing/index.html
For my experiments, I am modifying the drawGL() function in the example to do this...
First time when drawGL() is called, nothing changes, so that the full texture is drawn on the view.
In the next draw onwards, I change the flipquad array to...
V2fT2f flipquad[4] = {
{ 0, .5, 0, .5 },
{ .5, .5, .5, .5 },
{ 0, 1, 0, 0 },
{ .5, 1, .5, 0 },
};
So that only the top left quadrant is modified. This works fine on the simulator, but when I run it on device, except for the top left quadrant the rest of the view flickers, that is every alternate draw makes it black!