ForthHub / discussion

Discussion repository for Forth enthusiasts.
116 stars 4 forks source link

What graphic libraries you use? #4

Open VoidVolker opened 9 years ago

VoidVolker commented 9 years ago

What graphic libraries you use in your forth programs?

For simple windows programs I use winlib in SP-Forth. For few complicated programs I used NodeWebkit as GUI (chromium + nodejs) via web-sockets. For linux never used graphic libraries.

ghost commented 9 years ago

None. It would be nice to have a portable GUI library for Forth. One problem that each implementation does its own way of dealing with common problems :-/

VoidVolker commented 9 years ago

What problems? For example?

lowfatcomputing commented 9 years ago

@Phantasus

Using Glade to create GTK+ Applications with FORTH.

http://www.complang.tuwien.ac.at/anton/euroforth/ef10/papers/mahlow.pdf

afaik, GTK+ also runs on MS Windows and Mac OSX.

VoidVolker commented 9 years ago

@lowfatcomputing Looks very cool :) Where to download and test it?

DRuffer commented 9 years ago

Start with creating a std for calling foreign functions and you will have accomplished much more than just graphics.

bshepherdson commented 9 years ago

I hacked together a few basics of binding to SDL2 using GForth's C foreign function interface. It was pretty straightforward. I only ported 8 or 9 calls, just enough to create a window, renderer and texture, and flip an array into the texture and that texture to the screen. I'm writing a Gameboy emulator, so it's doing all-software rendering and just needs a canvas to display the results.

See here for the code.

cwpjr commented 9 years ago

Good Stuff!

Lecrapouille commented 7 years ago

@shepheb There are also legacy OpenGL tutorials for gforth inspired from the excellent Nehe website https://groups.google.com/forum/m/#!topic/comp.lang.forth/yoC6Q6o7E0I

RogerLevy commented 7 years ago

I use Allegro

lowfatcomputing commented 5 years ago

For microcontrollers with only a uart, sixel graphics and mouse reporting can be useful for making a gui. Here's my scribble pad demo https://hub.darcs.net/pointfree/forth-sixel

mlterm -e gforth paint.4th

Sixels have been discussed in irc freenode #forth quite a lot lately and @cstrotm has also explored sixels although I can't find his sixel repo.