i'm wondering in which way the Portal Game works. You can stand between one portal and the other, it's so fascinating.
Every time you shoot one portal, maybe, the level is copied throught it? or is only a camera/frustum/viewport effect?
I want to develope it in OpenGL, any suggestion?
This has been a nightmare for them to implement. Play the game through with "director's commentary" and you'll get some interesting interviews mentioning it.
Here's the basic idea. When you look into the blue portal, you're not looking at a copy of the level, but simply at the same thing rendered from a different point of view. The engine renders the part seen through the portal from the point of view "behind" the orange portal, corresponding to your location in front of the blue one. It needs to take special care not to show anything that's in between this virtual viewpoint and the back of the orange portal. The view frustum is adjusted to include only the bits you can see through the blue portal.
But that's not the whole story, because what if you can see one portal through the other? You'll get an "infinite" feedback effect. In practice, the effect is not actually infinite; it just does enough iterations (say 40) until the images get small enough that you can't tell the difference. Each next iteration can be rendered at a smaller size, so we don't have to render the whole level 40 times at full resolution. But there's still work involved with clipping, culling, and so on.
In OpenGL, this could either be accomplished by rendering to a texture using framebuffer objects (FBOs), or rendering directly to the end result but clipped using the stencil buffer (thanks datenwolf!). But, as the paragraphs above show, that's only the beginning of the story. If you're just getting started with OpenGL, I'm afraid you're completely at the wrong end of the difficulty scale.
(Aside: There are also interesting things going on with the physics engine, where an object that's halfway through a portal needs to be in two places at once. Another big headache.)