Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/alexispaez/sdlada
Browse files Browse the repository at this point in the history
  • Loading branch information
alexispaez committed Aug 19, 2024
2 parents effcfc3 + 50de767 commit 0572a31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/video/sdl-video-gl.adb
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,18 @@ package body SDL.Video.GL is
end return;
end Get_Current;


-- extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w, int *h);
procedure Get_Drawable_Size (Window : in SDL.Video.Windows.Window; Width, Height : out SDL.Natural_Dimension) is
procedure SDL_GL_Get_Drawable_Size (Win : in SDL.C_Pointers.Windows_Pointer; W, H : out C.int) with
Import => True,
Convention => C,
External_Name => "SDL_GL_GetDrawableSize";
begin
SDL_GL_Get_Drawable_Size (Get_Internal_Window (Window), Width, Height);
end Get_Drawable_Size;


procedure Set_Current (Self : in Contexts; To : in SDL.Video.Windows.Window) is
function SDL_GL_Make_Current (W : in SDL.C_Pointers.Windows_Pointer;
Context : in SDL.C_Pointers.GL_Context_Pointer) return C.int with
Expand Down
1 change: 1 addition & 0 deletions src/video/sdl-video-gl.ads
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ package SDL.Video.GL is
procedure Finalize (Self : in out Contexts);

function Get_Current return Contexts;
procedure Get_Drawable_Size (Window : in SDL.Video.Windows.Window; Width, Height : out SDL.Natural_Dimension);
procedure Set_Current (Self : in Contexts; To : in SDL.Video.Windows.Window);

procedure Bind_Texture (Texture : in SDL.Video.Textures.Texture);
Expand Down

0 comments on commit 0572a31

Please sign in to comment.