odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.13k stars 551 forks source link

rlgl: Pull in raylib and expose missing types #3745

Closed karl-zylinski closed 3 weeks ago

karl-zylinski commented 3 weeks ago

rlgl.h has lots of types that are copies of those in raylib.h, so it can be used stand-alone.

Here we instead pull in the raylib package and alias those types, so rlgl can be used in the expected way.

This makes our rlgl less stand-alone, but it will never be truly stand-alone unless we compile and maintain rlgl.lib files etc. So with that in mind I think this is fine.

I put in some notes on how one can easily make the rlgl package stand-alone.

I also updated the foreign import blocks so they match raylib.odin, since we've improved those on some platforms and also added the RAYLIB_SHARED config.