Chapter 14: Overlays and Menus Using JOGL

image from book Download CD Content

Introduction

There are many reasons to render 3D geometry that appears 2D. For example, rendering text on the screen can be done by rendering polygons with textures of the corresponding letters. Similarly, textured polygons can be used to display the menus and the heads-up display (HUD) of your game. In fact, most games use this technique instead of pasting an image on top of the 3D context. In this chapter, you will learn how to set up the coordinate system so that you can use typical 2D coordinates to draw the geometry on screen. The section on text rendering shows different ways of drawing text on the screen, which is a good way to see the different approaches to getting 2D-looking content on the screen. Also, note that text rendering is necessary for just about every game. After learning the basics, you will learn how to create GUI APIs that can be used to create the menu and HUD for your game. This chapter comes with a working demo that shows animated and interactive in-game menus that run in a 3D context. The examples section explains the demo and shows how the in-game menu, console, and HUD work.



Practical Java Game Programming
Practical Java Game Programming (Charles River Media Game Development)
ISBN: 1584503262
EAN: 2147483647
Year: 2003
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net