OpenGL screen transition effects?

Anyone familiar with the resources or sample source code that demonstrates screen / page transition effects using simple OpenGL? (Preferably C / C ++ and not using QT).

0


source to share


1 answer


If I am interpreting your question correctly, you have two rendering scripts in OpenGL and you want to transition from one to the other.

I was programming a game a few years ago in which I wanted a world and a battle screen - just like Final Fantasy. In this I decided to program a "stunning" effect. To do this, I mapped the current scene to a texture, mapped it to a set of triangles, and then repositioned the triangles, creating a new scene in the background.



To get the current scene as a texture, if you already have a texture object, you can use glCopyTexSubImage2D as shown below:

glBindTexture (GL_TEXTURE_2D, textureID); glCopyTexSubImage2D (GL_TEXTURE_2D, 0, 0, 0, 0, 0, screenWidth, screenHeight);

+2


source







All Articles