Esempio n. 1
0
        public void Draw(float x = 0, float y = 0)
        {
            if (!Engine.WindowOpen)
            {
                return;
            }

            var sourceRect = new GPU_Rect()
            {
                x = 0,
                y = 0,
                w = Width,
                h = Height
            };

            //SDL_QueryTexture(Texture, out _, out _, out int tw, out int th);

            SDL_GPU.GPU_Blit(Texture, ref sourceRect, Engine.Screen, x, y);
        }
Esempio n. 2
0
        public void Draw(float x = 0, float y = 0)
        {
            if (!Engine.WindowOpen)
            {
                return;
            }

            var sourceRect = new GPU_Rect()
            {
                x = 0,
                y = 0
            };

            SDL.SDL_QueryTexture(Texture, out _, out _, out int tw, out int th);

            sourceRect.w = tw;
            sourceRect.h = th;

            SDL_GPU.GPU_Blit(Texture, ref sourceRect, Engine.Screen, x, y);
        }