Open jorbsd opened 13 years ago
In the drawTransitionFrameWithTextureFrom:(GLuint)textureFromView textureTo:(GLuint)textureToView
method of DemoTransition2.m, change the vertices and texcoords to the following for vertical transition:]
GLfloat vertices[] = {
-1, 1.5,
-1, 0,
1, 1.5,
1, 0,
-1, 0,
-1, -1.5,
1, 0,
1, -1.5,
};
GLfloat texcoords[] = {
0, 0,
0, 0.5,
1, 0,
1, 0.5,
0, 0.5,
0, 1,
1, 0.5,
1, 1,
};
also find the lines: glRotatef(v*180.0, 0, 1, 0); glRotatef(180.0, 0, 1, 0);
and replace them with glRotatef(v*180.0, 1, 0, 0); glRotatef(180.0, 1, 0, 0);
How do I change the reference line for rotation to the top of the screen (instead of the center) to achieve a Rolodex like animation?
Actually I think EPGLTransition might be overkill for "flat panel" animations. Best for that would be using CALayers efficiently. i.e. see http://www.voyce.com/index.php/2010/04/10/creating-an-ipad-flip-clock-with-core-animation/ EPGLTransition is better if one would like to do "non-flat panel" animations, like a page curl, curtain cloth etc
Thanks for your help Edward! I'll give it a try.
In addition to the left and right transitions it would be great to have up and down transitions in the samples that come with the code.