LWJGL 3.3.2 released
May 02, 2005, 03:18:48 »
Ok, say I'm using opengl for 2D stuff only, just making quads with textures on them, and my window is setup like this:
glOrtho(0, width, height, 0, -1, 1);
glViewport(0, 0, width, height);
Let's say my window is 800x600. I'm trying to find the easiest way to limit rendering to say a small box in the middle of the screen. Not nessesarily calculating what not to draw, but acually having it take no effect outside the box, with all my screen coordinates remaining the same. Similar, if not exactly like a java 2d clipRect() call. If part of the quad lands within the box, that part of the texture would show, the rest would do nothing.
I'm not having much luck searching around for this. Thanks in advance if anyone is up for this.
Reply #1 on:
May 02, 2005, 10:16:26 »
Puppygames - Play Revenge of the Titans here!
Reply #2 on:
May 04, 2005, 02:38:51 »
Part of me almost wants to believe that doesn't work so I don't feel stupid.
Reply #3 on:
May 05, 2005, 17:26:04 »
Ah man... there goes all that stencil buffer stuff I was learning.
SMF © 2014