Reputation: 224
I'm working on a project with lwjgl and I've gone pretty far in what concerns progress. Now I need to create an editor so my mapper can start making maps and to make my debugging life easier. To do a decent editor I need a user interface and at least one viewport.
If you search for Unreal Editor (tm) in google, you'll know what I'm talking about. The problem is I have no idea of how to achieve something like that.
Edit: It's a top down 3d game. The only thing I need to know is how to make opengl (lwjgl) render to a specific region of the window instead of using the whole window.
So ye, I only need to know how to tell OpenGL to render to a specific region of the window, I know how to do the rest.
Upvotes: 0
Views: 661
Reputation: 3296
Try glScissor you can find it in org.lwjgl.opengl.GL11
it will allow you to render content in a specified area and anything outside it will be cut off, it's great for scrolling areas!
You also need to enable GL_SCISSOR_TEST
before using it and then disable after using glEnable(GL_SCISSOR_TEST)
and glDisable(GL_SCISSOR_TEST)
Upvotes: 1