I'm using OpenGL (with LWJGL) in Java, but the question is language independent.
I have some region (a rectangle for simplicity), and, let's say, a big tiled map which I want to show in this area. The area is not the whole screen, I want to render something around it.
I can think of two approaches, but they are not very good and hard to do.
- Render the whole tiled map and everything else, including background and the frame, on top - leaving the window. Yes, works, but it'd be pain.
- Render only visible tiles and only the visible portions of the border tiles. This is not possible if I for example render a font using external library - there I don't have such fine control.
- Some OpenGL trick?
Please, guide me.