Note about git: https://isoptera.lcsc.edu/gitweb for current demos Hud, continued: I made a text HUD offline How to draw text: Use a texture, and draw it on something More complicated that it seems like it should be Two ways: 1. Bitmaps (this is old and traditional, keep a picture of each letter around0 2. Render from truetype. More work. I went with #1 above A picture of all the letters: print_letters.c Now they're in my terminal font The picture will just stay in GPU memory Coordinates: 95 letters, 1/95 to move from one to the next Formula for a given letter (work it out) Vertices, and an object to render it on: I went with a little panel for each letter This makes it easy to change texture coordinates for any letter Simple loop to calculate these Texture coordinates: A function for 1 letter: Based on column, line, and character Set array of texture coordinates here We'll send the array to the GPU every frame It'll be ok...we have PCI express... Avoids multithreaded OpenGL (all OpenGL calls are in init or draw) Shaders: vertex, fragment is actually a copy of loaded_object's shader Let's not draw the black background discard It also might be nice to take into account the shape of the window Why isn't it already? glm::perspective in main is normally applied, but not here We could pass the ratio into our vertex shader as a uniform Let's do it! Helpers: It'd be nice to have something like printf Except we need to know what line to print to lprintf method, va_args, vprintf, etc. Do we actually want the HUD up all the time? Let's add a visible property for objects And a key to turn the HUD on and off Instrumentation! First: What is our framerate? Next: What is an average move looptime? Player loop time? Collision detection loop time? Remaining engine items: geometric objects These are intended for a ball bouncing demo I'll finish them offline...someday... Activate method? We could make a door with this Sound? Performance improvements? Now that we have instrumentation, we can tell what would help Using the other shader types? The engine does support them so far. Locking to a moving platform It shouldn't crash at the end Remaining class topics: Lighting (I'm not sure we want to add this to the class engine, though) Raytracing Could do an active learning on it 3D math Rolling things Collisions that use normal vectors This might be project 4