[CM] Announcing complete-ish S7 interface to OpenGL

chohag at jtan.com chohag at jtan.com
Sun Oct 13 11:31:27 PDT 2024


Hi,

I have previously posted here some of the work I'm doing to create
S7 wrappers for graphical libraries. It has now reached a stage
where I can collect it together and polish it into a moderately
coherent standalone project, stogl. https://codeberg.org/ChoHag/stogl

It is far from finished, in fact the wrappers themselves are barely
begun. Really it's just a scaffold linking together the various
parts I intend to use.

"Complete" refers to the structure not the content. Sorry.

But it's a scaffold I can use to do programming with rather than
making scaffolding. It's stable and it works. It even has a little
bit of documentation. I don't have to write in C (much).

There are examples that draw a triangle, a rotating reflecting cube
with a texture and a clone of glxgears, written entirely in S7
scheme. Unlike my earlier code the namespaces have been brought
under some control.

The form it takes is a normal unix library that just links to SDL
and OpenGL and co-ordinates the launch of a thread running OpenGL
instructions in an endless loop. This library can be installed and
used from C as is. It is also wrapped up for S7 independently.
Whether from S7 or C the programmer is expected to construct a list
of draw instructions for each frame and assign it to a location
where they will be carried out in the next OpenGL thread loop (or
discarded if another frame is prepared before OpenGL is ready).

The changes I previously made to cload.scm are also included with
a couple of different ways of making use of them; see the Makefile.

It was tested on Linux a while ago but my Linux box is currently
out of commission so I will get to that as soon as I can. Hopefully
there are no problems but they should be trivial. It builds as-is
on OpenBSD with the requisite packages installed.

It's an itch I needed to scratch so I'll be improving it as and
when: there is a lot of missing functionality in the S7 interfaces
which will I'll add when I need it. And of course the documentation
is even less complete than everything else.

And finally if you use it and have questions (or patches!) please
get in touch with me directly. This isn't an S7 project it's just
something I'm making which uses it, so there is no need to pollute
this mailing list with it any further.

Cheers,

Matthew



More information about the Cmdist mailing list