Hello all. I had a situation the other day where I wanted to have a plasma screen with some menu options over it, and when you click one of the menu items, they all dissolve away without affecting the plasma.
Now, I wound up getting it to work just fine, but not the way I expected to. It's a few days later, and I think I now have an idea how to do what I originally thought of, but I'd like you guys to let me know if my understanding is correct. Let me know what I get wrong here...
If I create a Surface using DisplayDevice's CreateSurface method, I can then pass that surface to DisplayDevices's SetRenderTarget method. Then, if I do DisplayDevice* display = GetDisplay(); I should be able to draw to that Surface I created using all the familiar blits and primitives.
Assuming that's true, what I would do is create two Surfaces. On the first I draw my plasma, on the second I draw my menu items. I then set the render target back to it's default (not sure how I'd do that?) and then blit my plasma Surface, then my menu Surface, and I should be all set.
Does this sequence sound accurate, or is there some basic concept I don't quite get here? I guess what this boils down to is that I want to have two Surfaces that I can alter and then later blit them as you would any Surface to the screen. But, I don't see how I can draw to a Surface using all the primitives and blitters UNLESS I set that as the render target of DisplayDevice. And then the question is, how do I set whatever the default render target is, I'm guessing maybe display->SetRenderTarget(display->GetBackBuffer());
Thanks!
Now, I wound up getting it to work just fine, but not the way I expected to. It's a few days later, and I think I now have an idea how to do what I originally thought of, but I'd like you guys to let me know if my understanding is correct. Let me know what I get wrong here...
If I create a Surface using DisplayDevice's CreateSurface method, I can then pass that surface to DisplayDevices's SetRenderTarget method. Then, if I do DisplayDevice* display = GetDisplay(); I should be able to draw to that Surface I created using all the familiar blits and primitives.
Assuming that's true, what I would do is create two Surfaces. On the first I draw my plasma, on the second I draw my menu items. I then set the render target back to it's default (not sure how I'd do that?) and then blit my plasma Surface, then my menu Surface, and I should be all set.
Does this sequence sound accurate, or is there some basic concept I don't quite get here? I guess what this boils down to is that I want to have two Surfaces that I can alter and then later blit them as you would any Surface to the screen. But, I don't see how I can draw to a Surface using all the primitives and blitters UNLESS I set that as the render target of DisplayDevice. And then the question is, how do I set whatever the default render target is, I'm guessing maybe display->SetRenderTarget(display->GetBackBuffer());
Thanks!