Sugar coating goes as far as to creating classes, that inherit from Entity, and the functions being just wrappers, that call different properties, set them, initialize them, create them.
What has gotten me worried lately, is the granularity of the properties; at the moment I have the location properties, scenegraph properties, text properties, name properties as separate things, this could cause locality proplems.. One thing would be to combine LocationProperty and SceneGraphProperty, and pack the data tightly, hopefully increasing locality.
But on the other hand, this sounds like premature optimization, if needed, I can merge properties later on, creating SceneLocationProperty.
Well anyways, I removed the depthbuffer problem..

For test purposes, I will first implement this using obj files, later on, when I see some results, I might create either my own filetype for the data, or use some, more sophisticated format, than obj.
The third thing that I wanted to share, was these few C++ patterns, that I've started using, quite a lot..
First, the templated Singleton, with this the classes do not need to specify a singleton inside the class (reinventing globals! :D.. with sugarcoating.).
Second pattern is the Merge class, that can be used to merge, through multiple inheritance, two classes into one. The verdict, whether this is good idea, is still out, but I like a lot about the idea of having the ability to merge std::mutex with whatever the mutex is meant to lock. eg. Merge< std::vector<int> , std::mutex > myVector; and locking the vector by std::mutexlocker lock(myVector); , this way I use it in the Pipeline.
Ei kommentteja:
Lähetä kommentti