ok i have made a gui object containing a viewport, and i have some problems with the camera.
i just have the single viewport, and i set the render function like this:
Code:
void Render(GuiViewport &viewport){
D.clear(BLACK);
SetMatrix(MatrixIdentity);
Box(1, Vec(0,0,0)).draw(WHITE);
cam1.set();
}
now, the viewport works fine, but the scene also uses the "cam1" camera instead of just the standart "Cam".
so how do i set the scene to go back to "Cam" when the viewport is done rendering?
i tried putting Cam.set() different places but nothing worked :/
And another question: Are there any way to "clear" the Gui?
if i load a gui object in my game state, and return to my menu, it still has the gui object from my game state loaded (odd enough not the other way around whith the menu gui).
anyway, i want to know if i can clear the Gui in the Shut() function, so i have a fresh gui when entering a new state.
thanks in advance
-Craksy