# How to implement HUD

I'm wondering how one could implement an HUD in LWJGL. I've seen tutorials on this, but they don't seem to work. I know the basic structure goes like this:

init3d();
// 3d code
init2d();
// HUD


To which, of course, init3d and init2d are the GL Initialization codes. And also, how would you draw the images for the HUD (or should I ask that in a separate question)?

If this is too vague, let me know and I'll update the question.

• possible duplicate of Making a HUD/GUI with OpenGL (LWJGL) – MichaelHouse May 18 '12 at 16:11
• I know it is, but that one seemed to use a different engine. Sorry, I'm a newbie at OpenGL, so I don't know how to convert it – MiJyn May 18 '12 at 16:24
• Is your game 3D or 2D? You have tags for 2D and Slick, but then you talk about init3D(). There's no engines involved and you asked about LWJGL, same as the other question. There's no converting to do. – MichaelHouse May 18 '12 at 16:37
• It's 3D, but the question is about how to put a 2D image to 3D. And what about SDL_GL_SwapBuffers? How would I do that? – MiJyn May 18 '12 at 16:42