Search code examples
user-interfaceopenglhuman-computer-interface

What is a good way of implementing HCI in OpenGL?


I'd like to try and implement some HCI for my existing OpenGL application. If possible, the menus should appear infront of my 3D graphics which would be in the background.

I was thinking of drawing a square directly in front of the "camera", and then drawing either textures or more primatives on top of the "base" square.

While the menus are active the camera can't move, so that the camera doesn't look away from the menus.

Does this sound far feteched to anyone or am I on the right tracks? How would everyone else do it?


Solution

  • I would just glPushMatrix, glLoadIdentity, do your drawing, then glPopMatrix and not worry about where your camera is.

    You'll also need to disable and re-enable depth test, lighting and such