o
odinpkg.dev
packages / library / minwingl

minwingl

4311821library

8KB .exe!!! Odin + Win32 + OpenGL minimal example

No license ยท updated 1 year ago

minwingl

Odin + Win32 + OpenGL minimal example. I actually tried to make this as lean as possible (I'm watching too many 4k demos), and by using:

odin build . -no-crt -o:size -no-bounds-check -default-to-nil-allocator -disable-assert

Yields a 8 kilobyte executable (it's 132k without the flags btw):

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----          5/2/2025  11:11 PM             11 .gitignore
-a----          5/2/2025  11:07 PM           1201 gl.odin
-a----          5/2/2025  11:09 PM           2674 main.odin
-a----          5/2/2025  11:14 PM           8192 minwingl.exe

Not good enough for a 4k demo, but it can be used for a 64k one, which is a win for now ๐ŸŽ‰.

I'll add shaders soon, let's see how much this number goes up ๐Ÿ“ˆ.