Delta Engine
»
Support
»
Rendering
»
graphics.GraphicsDevice.Clear
Joined: 8/21/2011(UTC) Posts: 37
Was thanked: 1 time(s) in 1 post(s)
|
I can clear the screen in XNA with "graphics.GraphicsDevice.Clear", and in the DE ? Edited by user Friday, October 21, 2011 8:20:04 PM(UTC)
| Reason: Not specified
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
Its done automatically, you can just set the background color via ScreenSpace.BackgroundColor.
If you like you can also just call Graphics.Clear, but I am not sure why you would need to do that (e.g. when needing this for render to texture, it is also done there automatically).
|
|
|
|
Joined: 8/21/2011(UTC) Posts: 37
Was thanked: 1 time(s) in 1 post(s)
|
ScreenSpace don't contains BackgroundColor.
"Its done automatically" It's not automatically, because when i don't use a BackgroundImage, i saw all Draws since i start the game.
|
|
|
|
Medals:  Joined: 8/20/2011(UTC) Posts: 1,421 Location: Hannover
Thanks: 18 times Was thanked: 97 time(s) in 92 post(s)
|
I forgot we already moved BackgroundColor to Application in v0.9.0, so just use Code:
Application.BackgroundColor = Color.Black;
You are seeing all your draws since the default BackgroundColor is transparent (thus unused and much faster, especially on mobile devices) because the engine assumes you will draw something in the background layer. For unit tests the background color is always set, in your application you need to set it yourself if you want to use it. Hope that helps :)
|
|
|
|
Joined: 8/21/2011(UTC) Posts: 37
Was thanked: 1 time(s) in 1 post(s)
|
Yes, Application.BackgroundColor works. Thanks
|
|
|
|
Delta Engine
»
Support
»
Rendering
»
graphics.GraphicsDevice.Clear
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.