Example #1
0
 public static void DestroyRenderTarget(int id)
 {
     NativeRendererMethods.DestroyRenderTarget(id);
 }
Example #2
0
 public static int CreateRenderTarget(int width, int height, int flags = 0)
 {
     return(NativeRendererMethods.CreateRenderTarget(width, height, flags));
 }
Example #3
0
 public static void SetRenderTarget(int id)
 {
     NativeRendererMethods.SetRenderTarget(id);
 }
Example #4
0
 /// <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)
 {
     NativeRendererMethods.DrawTextureToScreen(x, y, width, height, textureId);
 }
Example #5
0
 /// <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(NativeRendererMethods.LoadTexture(texturePath));
 }
Example #6
0
 public static void DrawTextToScreen(float x, float y, float fontSize, Color color, bool centered, string text, params object[] args)
 {
     NativeRendererMethods.DrawTextToScreen(x, y, fontSize, color, centered, string.Format(text, args));
 }
Example #7
0
 public static int UnProjectFromScreen(float sx, float sy, float sz, out float px, out float py, out float pz)
 {
     return(NativeRendererMethods.UnProjectFromScreen(sx, sy, sz, out px, out py, out pz));
 }
Example #8
0
 public static Vec3 ScreenToWorld(int x, int y)
 {
     return(NativeRendererMethods.ScreenToWorld(x, y));
 }