From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?B?QmrDtnJuIEx1bmRpbg==?= Newsgroups: comp.lang.ada Subject: Text in sdlada Date: Tue, 01 Dec 2015 23:27:25 +0100 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 1 Dec 2015 22:25:00 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="2d66d234c4dd6d861979b5b8cb39f6c7"; logging-data="24655"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19bXNn6vH3TYfB+f2qg91S9" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 Cancel-Lock: sha1:PskythquDS23CjP7sOlgwGK9cT4= Xref: news.eternal-september.org comp.lang.ada:28616 Date: 2015-12-01T23:27:25+01:00 List-Id: Hi! I'm playing with sdlada 2.1.1 and I am looking for a way to write text on my window. Looking at c(++)- tutorials they all seem to use SDL2_TTF which I think is not part of 'core' SDL, and I cannot find anything like it in the sdlada binding. So, how would I write "Hello" in a window created like (No I do not use everything in the code just yet) with SDL; with SDL.Error; with SDL.Log; with SDL.Video.Palettes; with SDL.Video.Pixel_Formats; with SDL.Video.Pixels; with SDL.Video.Renderers.Makers; with SDL.Video.Textures.Makers; with SDL.Video.Windows.Makers; with SDL.Versions; with SDL.Video.Rectangles; procedure Rectangles is W : SDL.Video.Windows.Window; Renderer : SDL.Video.Renderers.Renderer; Texture : SDL.Video.Textures.Texture; Pixels : SDL.Video.Pixels.ARGB_8888_Access.Pointer; Pitches : SDL.Video.Pixels.Pitch_Access.Pointer; W_Size : SDL.Video.Windows.Sizes := (640, 480); Rectangle1 : SDL.Video.Rectangles.Rectangle := (50,50,50,50); begin SDL.Log.Set (Category => SDL.Log.Application, Priority => SDL.Log.Debug); SDL.Log.Put_Debug ("initilise"); if SDL.Initialise then SDL.Video.Windows.Makers.Create (Win => W, Title => "Rektanglar test)", X => 100, Y => 100, Width => 640, Height => 480, Flags => SDL.Video.Windows.Resizable); SDL.Log.Put_Debug ("window created"); SDL.Video.Renderers.Makers.Create (Renderer, W); SDL.Log.Put_Debug ("Renderer created"); SDL.Video.Textures.Makers.Create (Tex => Texture, Renderer => Renderer, Format => SDL.Video.Pixel_Formats.Pixel_Format_ARGB_8888, Kind => SDL.Video.Textures.Streaming, Size => W_Size); SDL.Log.Put_Debug ("Texture created"); Renderer.Draw ( Rectangle => Rectangle1); SDL.Log.Put_Debug ("Rectangle drawn by rendered"); Renderer.Present; SDL.Log.Put_Debug ("Rectangle presented by renderer"); else SDL.Log.Put_Debug ("initialise failed"); end if; delay 5.0; W.Finalize; SDL.Log.Put_Debug ("finalised"); SDL.Finalise; end Rectangles; -- -- Björn