Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
    
possible duplicate of Making a HUD/GUI with OpenGL (LWJGL) –  Byte56 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
2  
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. –  Byte56 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
add comment

1 Answer 1

The easiest way to handle this is to use a library that's specifically designed for GUIs. Check out Nifty GUI. It works with OpenGL + LWJGL + Slick. Follow the getting started guide and read the tutorials. Finally, check out the source code for the examples. This will get you on your way the quickest, without needing to worry so much about the lower level graphics involved.

share|improve this answer
    
ok thanks! I knew there must have been a simpler way lol –  MiJyn May 18 '12 at 17:34
    
Sure thing, if this answers your question you can accept the answer to show that. –  Byte56 May 18 '12 at 17:39
    
once I figure out how to work it :D –  MiJyn May 18 '12 at 17:46
    
That's fair enough. –  Byte56 May 18 '12 at 17:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.