Rendering 3D Shapes

As of now, the Sandbox project can do the following:

  • Use SDL to open a window with an OpenGL context.
  • Define shapes via hardcoded arrays of vertices, texture coords, and indices.
  • Alternatively, load a more complex shape from a glTF file exported from Blender.
  • Draw multiple shapes, and multiple instances of each shape, on the screen.
  • Load a texture atlas from a .png file and apply a different texture to each object.
  • Move the camera and/or objects independently in 3D space.
  • Respond to keyboard and mouse input.
  • Render a skeletal animation defined by the glTF model.

What’s Next

I’ve decided to turn this project into a 3rd person shooter. To complete it, I first need to learn more about animation, lighting, and sound. After that, it will be a matter of designing things like menus, levels, weapons, and enemies.

Demonstration

Here is a screenshot of the application with some basic shapes being drawn inside the window.

And here is an example of an animated character model.