Ejemplo n.º 1
0
        public static void Point(float x, float y)
        {
            if (!Engine.WindowOpen)
            {
                return;
            }

            SDL_GPU.GPU_Pixel(Engine.Screen, x, y, Context.Colour);
        }
Ejemplo n.º 2
0
        public static void Line(float x, float y, float ex, float ey)
        {
            // This is to prevent weird things happening because it WILL crash if it tries to draw to a null pointer
            if (!Engine.WindowOpen)
            {
                return;
            }

            SDL_GPU.GPU_Line(Engine.Screen, x, y, ex, ey, Context.Colour);
        }
Ejemplo n.º 3
0
        public static void Rectangle(float x, float y, float w, float h, RenderMode mode = RenderMode.STROKE)
        {
            if (!Engine.WindowOpen)
            {
                return;                     // Let's just not, ok
            }
            switch (mode)
            {
            case RenderMode.FILL:
                SDL_GPU.GPU_RectangleFilled(Engine.Screen, x, y, x + w, y + h, Context.Colour);
                break;

            case RenderMode.STROKE:
                SDL_GPU.GPU_Rectangle(Engine.Screen, x, y, x + w, y + h, Context.Colour);
                break;
            }
        }