I want to procedurally generate a texture2D
by pasting smaller textures as tiles, I've done similar things in Python and MatLab, but do not know how to do that in MonoGame.
This question is similar to what I need to do, but it generates the texture in the Draw()
method, which in my case could be a performance hit.
Like this question, I want to have something that generates the texture and returns it, so I can initialize it as a field instead of re-generating the texture again every time in Draw()
.
But I do not know how to edit a texture2D
, the SetData()
method for Texture2D
is rather confusing, the new data is of type T[]
, how do I pass in another Texture2D
as T[]
? And what are the Int32
parameters doing?