Exams, ContentProvider, RenderTargets
Roughly 18 days to go. In the end of January / by the beginning of February, I’ll have to write my exams for this semesters courses. As probably most students, I tend to start learning mostly after passing a specific point. It is located somewhere between “Hey look, a lot of topics to deal with” and “Oh my god, where’s all the time gone?!”. Usually after passing this point, my free time just waves me goodbye and vanishes. This happened a week ago and I’m pretty sure this will be the last post until mid or end of February. Wish me luck!
Concerning Duality, the last thing I was able to implement is RenderTargets. A RenderTarget is a Resource class just like a Texture, Pixmap, Prefab, etc. which means, it is something you don’t create or load yourself, but request it from the general ContentProvider class. It takes care of mapping resource identifiers (usually the path to a file) to an actual reference of that resource, keeps track of what is and has been loaded and never loads the same resource twice if its still in memory. Quite handy. However, this is a different topic.
Well, I guess you all know what RenderTargets are. In Duality, they’re subclassed Textures for now. You assign one to a Camera, the Camera renders to it behaving as if rendering to a screen with the RenderTargets resolution. Because they’re deriving from Texture, they may also be used like one i.e. being assigned to Materials etc. And that’s about it. Fun fact: It seems like the maximum MSAA level of a RenderTarget may actually be higher than of the screen itsself.