But seeing as there's nothing stopping it from being done, and it also appears to be such a useful system for 2D rendering, it sounds like a prime candidate for MyGL integration! As I've said before MyGL currently represents an object-oriented abstraction to the state machine that OpenGL runs on top of the video drivers. It exposes a good (and growing!) portion of the API's non-deprecated functions while preserving the native control-freak feel as much as I can manage. Even with this extra level of indirection rendering continues to be lightning fast thanks to the heavy influence I'm putting on shaders and appropriate caching. The new 2D API I am planning will utilize the classes and functions provided by MyGL to provide a more user-friendly approach to orthogonal rendering. Some of the features I have planned are:
- Hardware Memory-Backed vertex data. All 2D primitives, even simple triangles and quads, will utilize hardware Vertex/Index buffers, and share the same whenever possible (a unit quad can live in video memory, while a per-object scaling matrix can be uploaded for each draw).
- Dynamic Polygon Baking. Complex primitives can be created by pushing vertex data onto a stack prior to a one-time "bake" command being sent which constructs the Vertex/Index buffer(s) for the data. Allowing complex shapes as well as optimization to take place.
- Scene Graph / Management. 2D primitives are inserted into a node graph and/or quadtree representing the orthogonal scene. This graph should be quickly queried for things like clipping/occlusion operations, depth sorting and "picking".
These are just some of the bigger ideas I have. I might add to the list above as I go. I'm a big fan of iterative design and development. So I expect these things to change as I go.
Update (January 24, 2012): School has consumed much of my attention recently and I've all but stopped working on this entirely for the time being. For my own records however I need to state that this system was finished, and I was somewhat satisfied with how it turned out. I discovered in the process that I knew nothing about scene management and that there were many more factors to consider than what, at face value, appeared to be a simple concept. I'll revisit that in the future when time allows, but for now I've got to focus on finishing my degree.
Update (January 24, 2012): School has consumed much of my attention recently and I've all but stopped working on this entirely for the time being. For my own records however I need to state that this system was finished, and I was somewhat satisfied with how it turned out. I discovered in the process that I knew nothing about scene management and that there were many more factors to consider than what, at face value, appeared to be a simple concept. I'll revisit that in the future when time allows, but for now I've got to focus on finishing my degree.
No comments:
Post a Comment