I need to draw simple alpha maps in xna which depends on current game state. I cannot save many kinds of alpha maps in reseources, so i want to draw them dynamically.
For example sprite can be partially hidden behind wall.
I think about using System.Drawing, but when i’m including this dll, there are conflicts with Xna namespaces. Is there another way to draw simple bitmaps in xna?
Thank you for your time.
You should not use the System.Drawing classes. These work on images that lie in the system RAM. Instead use XNA to manipulate a texture that lies in GPU memory.
You can use SetRenderTarget() to set the texture as the render target. This will cause further draw calls to be executed on the texture. This way, you can draw everything on the texture. However, you will not have methods for drawing circles, squares etc. To achieve this, you should either create vertex buffers with the according geometry or use a sprite template.