Exemple #1
0
        public static void CreateWindowAndRenderer(int Width, int Height, SDL.SDL_WindowFlags Window_flags, out SDLWindow Window, out SDLRenderer Renderer)
        {
            IntPtr WindowPtr;

            IntPtr RendererPtr;

            ThrowIfResultIsError(SDL.SDL_CreateWindowAndRenderer(Width, Height, Window_flags, out WindowPtr, out RendererPtr));

            Window = new SDLWindow(WindowPtr);

            Renderer = new SDLRenderer(RendererPtr);
        }
Exemple #2
0
        public static bool TryGetCurrentWindow(IEnumerable <SDLWindow> Windows, out SDLWindow Window)
        {
            IntPtr Result = SDL.SDL_GL_GetCurrentWindow();

            Util.ThrowIfPointerZero(Result);

            foreach (var Item in Windows)
            {
                if (Item.Ptr == Result)
                {
                    Window = Item;

                    return(true);
                }
            }

            Window = null;

            return(false);
        }
Exemple #3
0
        public SDLSurface(SDLWindow TheWindow)
        {
            myPtr = SDL.SDL_GetWindowSurface(TheWindow.Ptr);

            CheckPtr();
        }