Tuesday, March 11, 2014

OpenTK Tutorial 6 Part 1: Loading Shaders with a Class

This tutorial will cover basic texturing. To add a texture, we will first need to have a shader that handles it. Right now, we're using one shader, with no way to easily switch to another without requiring everything to use that shader. In a real game or program, we would probably want to be able to use multiple shaders (for example, UI elements probably don't need lighting applied to them, but game objects probably do), so we're going to handle this with a class that allows us to easily add more shaders if we need them, and switch between them at will.

This tutorial is split in parts, based on how long it is. Each step is rather substantial (and this groundwork will make things easier down the line), so I hope everyone understands why it needed to be split up like this.