using System.Runtime.InteropServices; namespace Raylib_cs; /// /// RenderTexture2D type, for texture rendering /// [StructLayout(LayoutKind.Sequential)] public struct RenderTexture2D { /// /// OpenGL Framebuffer Object (FBO) id /// public uint Id; /// /// Color buffer attachment texture /// public Texture2D Texture; /// /// Depth buffer attachment texture /// public Texture2D Depth; public readonly CBool IsValid => Raylib.IsRenderTextureValid(this); public static RenderTexture2D Load(int width, int height) { return Raylib.LoadRenderTexture(width, height); } public void Unload() { Raylib.UnloadRenderTexture(this); } }