comp.lang.ada
 help / color / mirror / Atom feed
* Best way to put an array-based pixmap on a screen?
@ 2017-03-26  1:01 LaeMing Ai
  2017-03-26  8:25 ` Dmitry A. Kazakov
  2017-03-26  9:35 ` Dirk Craeynest
  0 siblings, 2 replies; 10+ messages in thread
From: LaeMing Ai @ 2017-03-26  1:01 UTC (permalink / raw)


I am hoping to learn some Ada with an explicit interest in simple software 3D rendering (ie: writing the render code in Ada, NOT calling external libraries such as OpenGL). I want to set up a shim between my Ada environment and my Linux Desktop to facilitate monitoring my output, without having to mess about with the daunting (I quickly found) task of interfacing to SDL or GTK+!

All I really want to see from my code's perspective is a 2D array of 32-bit pixel values that I can manipulate from my developing Ada code, and not have to worry about the intricacies of window managers. Is it possible to get help constructing a project template providing the following:

- Function to create a non-resizable X11 window of dimensions N high by 2N wide (N is nominally valued at 512, but could be any value of 2^x above 256).

- Callback for if the above window's close box is activated, to terminate the program.

- Function to copy an array of 2N by N of 32 bit values (8:Red 8:Green 8:Blue 8:ignored) to the above window.

At this stage I am not concerned with input to the window (other than the close box terminating the application, would be nice).

Packing it all into a single source file that I can put to the side and largely ignore would be nice too!

I particularly don't want event loops, or anything else dragged in from outside the Ada environment if at all possible - the point of using Ada is to learn to do all that /in/ Ada! :-)

I have played around with some AdaGTK examples but keep getting bogged down :-( . 

Thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-03-26 21:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-26  1:01 Best way to put an array-based pixmap on a screen? LaeMing Ai
2017-03-26  8:25 ` Dmitry A. Kazakov
2017-03-26  9:55   ` Simon Wright
2017-03-26 13:27     ` reinert
2017-03-26 16:48       ` gautier_niouzes
2017-03-26 19:10   ` Lucretia
2017-03-26 19:13     ` Lucretia
2017-03-26 21:00   ` BartC
2017-03-26 21:48     ` Dmitry A. Kazakov
2017-03-26  9:35 ` Dirk Craeynest

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox