public GpuTexture(ReadOnlySpan <byte> Data, ReadOnlyRect2i Size, EPixelFormat Format) { this.Size = new Rect2i(Size); #if ENABLE_HEADLESS == false Push_Frame(Data, Size, Format); #endif }
private GpuTexture(ReadOnlyRect2i Size) { this.Size = new Rect2i(Size); }
public void Push_Frame(ReadOnlySpan <byte> Data, ReadOnlyRect2i Size, EPixelFormat Format, float Time = 0f) { FrameAtlas.Add(new GpuTextureFrame(Data, new Rect2i(Size), Format, Time)); Build_Timeline(); }
/// <summary> /// Fills a rectangular area with the currently set color /// </summary> /// <param name="pos">Origin location of the area</param> /// <param name="size">Size of the area</param> public abstract void Fill_Rect(ReadOnlyPoint2i Pos, ReadOnlyRect2i Size);
/// <summary> /// Outlines a rectangular area with the currently set color /// </summary> /// <param name="LineThickness">Thickness of the line in pixels</param> /// <param name="pos">Origin location of the area</param> /// <param name="size">Size of the area</param> public abstract void Draw_Rect(int LineThickness, ReadOnlyPoint2i Pos, ReadOnlyRect2i Size);
/// <summary> /// Creates a new texture object. /// </summary> /// <param name="Data">Pixel data for the texture</param> /// <param name="Size">Pixel dimensions of the texture</param> /// <param name="Format">Format for the pixels in Data</param> public abstract object Create_Texture(ReadOnlySpan <byte> Data, ReadOnlyRect2i Size, EPixelFormat Format);
/// <summary> /// Sets the size of this window on the desktop /// </summary> protected abstract void Set_Window_Size(ReadOnlyRect2i Size);