public static void DestroyRenderTarget(int id) { RendererInterop.DestroyRenderTarget(id); }
public static int CreateRenderTarget(int width, int height, int flags = 0) { return(RendererInterop.CreateRenderTarget(width, height, flags)); }
public static void SetRenderTarget(int id) { RendererInterop.SetRenderTarget(id); }
/// <summary> /// Draws a texture to the screen for one frame. /// </summary> /// <param name="x">The x position on the screen, relative to the top-left corner.</param> /// <param name="y">The y position on the screen, relative to the top-left corner.</param> /// <param name="width">The width to render the texture at.</param> /// <param name="height">The height to render the texture at.</param> /// <param name="textureId"> /// The ID of the texture (obtained using Renderer.LoadTexture(path)). /// </param> public static void DrawTexture(int x, int y, int width, int height, int textureId) { RendererInterop.DrawTextureToScreen(x, y, width, height, textureId); }
/// <summary> /// Loads a texture into memory and generates its ID. /// </summary> /// <param name="texturePath">The path to the texture.</param> /// <returns>Texture id if successful, otherwise -1.</returns> public static int LoadTexture(string texturePath) { return(RendererInterop.LoadTexture(texturePath)); }
public static void DrawTextToScreen(float x, float y, float fontSize, ColorSingle color, bool centered, string text, params object[] args) { RendererInterop.DrawTextToScreen(x, y, fontSize, color, centered, string.Format(text, args)); }
public static int UnProjectFromScreen(float sx, float sy, float sz, out float px, out float py, out float pz) { return(RendererInterop.UnProjectFromScreen(sx, sy, sz, out px, out py, out pz)); }
public static Vector3 ScreenToWorld(int x, int y) { return(RendererInterop.ScreenToWorld(x, y)); }