Experimental daily build: renderer features

UPDATE: These features are available in recent versions, and I commented on some of it here on the ShadersBank article.


I mention toward the end of that post that “An effect data type is something you will only see on the C++ side.”, followed by “This is obviously an awkward restriction and definitely not friendly to experimentation, and I’ve been considering ways to open this up.”

An update on that, slightly edited from something I posted on Discord earlier:

"Somebody nudged me about the tests in STUFF.zip being broken in 3713 (slight API drift), so I made some fixes and sent him those (just Mac so far). While I had that in front of me I finally took a crack at this Tiny C compiler idea.

I now have the first four tests (the printing one, the two with the rects, and the first curve one) running on Mac, by providing C strings or files directly. :slightly_smiling_face:

I linked a small existing plugin to the OpenGL framework, using the newest mob build of TinyCC, as well as some glad-generated files to get the GL interface, although I probably could have taken the glew stuff Solar uses on desktop.

I didn’t use any real fancy C++ in these tests, so it hasn’t been too terrible porting to C99. Three to go, so we’ll see if those bring any special challenges."

Obviously it’s hooked up to Solar’s C headers too. Will see about making it available in the near future. It’s currently being used for these tests, but any portable C99 library should be fair game. (It’s sort of a dry run for some other ideas, too.)

I don’t expect Windows would be much more work.

This is known to be a very fast compiler, and obviously you can use it to do “C scripting” in a running program, but also there’s no optimization or anything. So it’s mainly for iterating during development, and obviously the JIT’ing is a no-go on some targets anyhow. (The files can still belong to proper projects for Visual Studio and Clang and such, for builds.)


Also, some other “tests”—examples, really, at this point—I’ve considered were:

  • Another depth buffer one, but for 2D z-order rather than 3D
  • Making some pseudo-immediate GUI kind of thing, e.g. a port of microui’s demo
2 Likes