-
-
Notifications
You must be signed in to change notification settings - Fork 60
Rendering backend
All of RigelEngine's rendering is based on OpenGL. An easier to use 2D-rendering API is built on top, to abstract the backend for the rest of the code.
Aside from a few exceptions which draw individual pixels, all of Duke Nukem's graphics are based on drawing bitmap graphics onto the screen, without any scaling, rotation or other transformations. The core focus of RigelEngine's rendering API is therefore on drawing textures. We also need scaling in order to implement up-scaling to modern resolutions and aspect ratio correction. In addition to that, the API provides translation (offsetting) and a clipping rectangle to limit drawing to a certain area of the screen. These features aren't strictly necessary, but do make life a whole lot easier. Finally, in order to implement various effects, render targets (rendering to a texture) are offered.
Notably, there is no font rendering functionality in the API. The original game uses bitmap-based fonts, which can be implemented easily using textures. If modern font rendering is needed, the Dear ImGui library can be used.