5.01.2012

Merge merge merge

Found some more time to clearly thinkg about management of image, texture and IGE's model for loading stuff in general and came up with a nifty idea. Usually one only needs to keep one copy of texture and then just apply different stuff to change it. I, however, prefer to utilize multiple copies for different operations, maybe even doing some things in software before uploading as hardware buffer. That's sorta exoctic but I know that there WILL be ciscumstances, where it's of use to have the ability to upload and download different versions this way. However, ever thought about doing something more seperated? In essence, there are SDL surfaces and OpenGL textures. Vertex data is of custom format, so this doesn't count until I found some format support for it (custom loader for custom or existing format, I don't care at all). So we got the general data type and we also got the location: RAM, VRAM (PBO, VBO, HW surface), external (file, net) and nil (not loaded). Binding a name/path to images/models makes it possible to give an external location to each of them and handles and/or pointers to their ram or vram presentations is also no problem at all. This setup makes it possible to do loading, releasing, converting and also copying/overwriting with just one or two functions and passing different types and/or locations for each object we work with. I really like this concept as I can do everything in one place and avoid any non-existing copy operation because SDL and OpenGL seem to be quite compatible in pixel formats. It makes me happy that I found a perfect solution for this sort of untidy thing. One solution for a lot of problems - exactly my taste. It also makes it possible to handle images and models using the same interface, having the same properties for bounding boxes, aspect ratios etc... Quite nice indeed. And render commands can have their hardware representation as display lists - so these can be put into a file format, too. Having buffers and commands simply makes it possible to describe models, skeletons whatsowever in one file where changing a few values at fixed positions will simply rotate or move parts of the model. It's like having 3D scenes and model data with joints in one file! Very nice, indeed. Once again I'm happy about my decision to take the time I want for it. I also noticed that working something like this in an randomly timed step-by-step fashion helps the perfectionist in me to accept trade-offs for everything that's not a personal projects. Very important if you ask me: would you like to explain your boss that you need more time to make something perfect though it's not necessary?

No comments: