LWJGL Forum

Programming => OpenGL => Topic started by: TechNick6425 on August 22, 2013, 17:06:36

Title: GUI rendering over game?
Post by: TechNick6425 on August 22, 2013, 17:06:36
I was just wondering if I rendered a 3D scene, and then rendered the 2D GUI, would the GUI stay on the screen if the player moved around?
Title: Re: GUI rendering over game?
Post by: Cornix on August 22, 2013, 17:40:25
Take a look at this thread just a few weeks old:
http://lwjgl.org/forum/index.php/topic,5142.0.html
Title: Re: GUI rendering over game?
Post by: TechNick6425 on August 28, 2013, 20:24:18
I don't really understand how that is done, I'm just wondering if what I said is what I would do.
Title: Re: GUI rendering over game?
Post by: Detrox on September 08, 2013, 21:02:56
If you, in your render loop, set the matrix to 3d perspective or whatever you're using, then translate it to the player, then reset the matrix to 2d ortho, the text would not move, since the matrix is reset so not effected by any translation used for the player.

I'm not sure if this awnsers what you ment, but hopefully it helps ;)