KSP-Conformal-Decals/Source/ConformalDecals/Text/TextRenderOutput.cs

20 lines
738 B
C#
Raw Normal View History

2020-07-24 21:39:35 +00:00
using UnityEngine;
namespace ConformalDecals.Text {
2020-09-28 01:26:55 +00:00
/// Texture render output, used for cacheing and is the datastructure returned to the ModuleConformalText class
2020-07-27 02:32:58 +00:00
public class TextRenderOutput {
2020-09-28 01:26:55 +00:00
/// Texture with the rendered text
2020-07-24 21:39:35 +00:00
public Texture2D Texture { get; private set; }
2020-09-28 01:26:55 +00:00
/// The rectangle that the rendered text takes up within the texture
2020-07-24 21:39:35 +00:00
public Rect Window { get; private set; }
2020-09-28 01:26:55 +00:00
/// The number of users for this render output. If 0, it can be discarded from the cache and the texture reused
2020-07-26 03:01:41 +00:00
public int UserCount { get; set; }
public TextRenderOutput(Texture2D texture, Rect window) {
2020-07-26 03:01:41 +00:00
Texture = texture;
Window = window;
}
2020-07-24 21:39:35 +00:00
}
}