Component-based Rendering
- by Kikaimaru
I have component Renderer, that Draws Texture2D (or sprite)
According to component-based architecture i should have only method OnUpdate, and there should be my rendering code, something like
spriteBatch.Draw(Texture, Vector2.Zero, Color.White)
But first I need to do spriteBatch.Begin();. Where should i call it? And how can I make sure it's called before any Renderer components OnUpdate method?
(i need to do more stuff then just Begin() i also need to set right rendertarget for camera etc.)