Closed ian-h-chamberlain closed 1 year ago
That makes sense. They have different framebuffers and work in a parallel way. The only issue would be when rendering in wide mode, since both sides are used as one (i believe). For everything else it should be pretty straightforward.
Sounds good, my only concern is about how code using both sides like Console will look. Do you have an example of what creating a top screen console would look like with this change?
As I've been trying to work on https://github.com/ian-h-chamberlain/citro3d-rs/pull/4, it occurred to me that it might make sense for us to break out the top-left and top-right screen into their own structs. Currently, it's a bit challenging to write code that's generic for both screens, since you can't get the raw frame buffer, so you have to write something like:
I was thinking, maybe we could separate the top screen into two types, and add frame buffer helpers to
Screen
instead, like:This way, it would be a bit easier to have separate ownership of the top-left and top-right screens, in case e.g. you wanted to have separate render targets:
For simplicity, maybe we could also have a helper struct/method in case you want to render to both sides, although I don't think it could implement
Screen
so it may have limited uses. Perhaps a helper like that would be more useful in render code than ingfx
itself.I think this implementation would be more consistent with e.g. the CAM implementation in #65 and would make it a bit easier to write generic code against screens. @Meziu @AzureMarker what are your thoughts?