0
\$\begingroup\$

I'm writing a simple 2D game with C++ and OpenGL/GLFW, and my current step is to create a menu. I finished with buttons, but I think it looks a little bit boring (with only 4 buttons and a black background).

enter image description here

I want to load an image (.jpg, .tga, .png, etc) to make a more beautiful menu, but I can't find out how. How can I do it?

\$\endgroup\$
1
  • \$\begingroup\$ How are you loading the button icons? \$\endgroup\$ – usm Oct 28 '14 at 5:34
2
\$\begingroup\$

After your glClear call you can render a full-screen quad with your texture (loaded like you would any other). You may want to disable writing to the depth buffer to avoid odd rendering issues.

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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