Skip to content
Discussion options

You must be logged in to vote

Tex.FromColors creates a whole new texture object, and sets it up as an immutable graphics resource. Which is a little slower to create, and definitely isn't friendly towards frequent creation, but theoretically sits in a faster chunk of GPU memory. The best way to do what you're trying to do is to re-use a texture+sprite that you already have! If you're using SpriteType.Single, then it does maintain a direct reference to the Tex asset that's provided, so you won't need to create a new Sprite asset either.

You'll want to create a new Tex(TexType.ImageNoMips | TexType.Dynamic), and then update its contents each time with Tex.SetColors. If you update an image with Tex.SetColors more than on…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@llfab
Comment options

@maluoi
Comment options

Answer selected by llfab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants