Exemple #1
0
        static void Main()
        {
            var dllDir = Path.Combine(Environment.CurrentDirectory, IntPtr.Size == 4 ? "x86" : "x64");

            Environment.SetEnvironmentVariable("PATH", Environment.GetEnvironmentVariable("PATH") + ";" + dllDir);
            SDLGame game = new SDLGame();

            game.Run();
        }
Exemple #2
0
 public void EndFrame(SDLGame game)
 {
     SDL.SDL_SetRenderTarget(game.ren, IntPtr.Zero);
     SDL.SDL_Rect srcRect = new SDL.SDL_Rect();
     srcRect.x = 0;
     srcRect.y = 0;
     srcRect.w = view.Width;
     srcRect.h = view.Height;
     SDL.SDL_Rect dstRect = new SDL.SDL_Rect();
     dstRect.x = 0;
     dstRect.y = 0;
     dstRect.w = width;
     dstRect.h = height;
     SDL.SDL_SetRenderDrawBlendMode(game.ren, SDL.SDL_BlendMode.SDL_BLENDMODE_NONE);
     SDL.SDL_RenderCopy(game.ren, view.GetTexture(), ref srcRect, ref dstRect);
     EndFrame();
 }
Exemple #3
0
 public void BeginFrame(SDLGame game)
 {
     BeginFrame();
     SDL.SDL_SetRenderTarget(game.ren, view.GetTexture());
     SDL.SDL_RenderClear(game.ren);
 }
Exemple #4
0
        //private IntPtr icon;

        public SDLGraphics(SDLGame game, int width, int height, IFontEngine fontEngine, DebugOptions debugOptions = null)
            : base(width, height, fontEngine, debugOptions)
        {
            this.game = game;
        }