Interface IRenderTarget
Represents a backend-provided renderable texture surface.
public interface IRenderTarget : ITexture, IDisposable
- Inherited Members
Properties
FrameBufferHandle
Backend-specific framebuffer handle. Currently used by the OpenGL render device.
int FrameBufferHandle { get; }
Property Value
Methods
BindFramebuffer()
Makes this target the one drawn into.
void BindFramebuffer()
EncodeToPng()
Encodes the current contents to PNG bytes in memory, without touching disk.
byte[] EncodeToPng()
Returns
- byte[]
SaveToFile(string, bool)
Saves the contents of the target to path as a PNG. The OpenGL target saves once, and later calls do nothing unless force is true.
void SaveToFile(string path, bool force = false)
Parameters
ToTexture()
Returns the target as a texture, which can be drawn as an image.
ITexture ToTexture()
Returns
UnbindFramebuffer()
Stops drawing into this target.
void UnbindFramebuffer()