We have already touched on shaders in Chapter 3, Introduction to WebGL. SDL, unfortunately, doesn't allow the user to customize its shaders without digging into the source code of the library and modifying them there. Those kinds of modifications are beyond the
scope of this book. It is not uncommon to use SDL in combination with OpenGL. SDL can be used to render the user interface for the game while OpenGL renders the game objects. This chapter will deviate from many of the earlier chapters in that we will not be mixing SDL and OpenGL directly in the game we have been writing. Updating the game to support an OpenGL 2D rendering engine would require a complete redesign of the game up to this point. However, I would like to provide a chapter for those interested in creating a more advanced 2D rendering engine to get their feet wet with combining OpenGL...