{"id":26494719,"url":"https://github.com/nickscha/w32_gl","last_synced_at":"2026-05-19T00:06:16.370Z","repository":{"id":281041967,"uuid":"944013739","full_name":"nickscha/w32_gl","owner":"nickscha","description":"C89, single header, nostdlib win32/opengl without windows.h","archived":false,"fork":false,"pushed_at":"2025-03-17T10:01:40.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T10:44:45.449Z","etag":null,"topics":["c89","nostdlib","single-header"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nickscha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-06T16:33:59.000Z","updated_at":"2025-03-17T10:01:43.000Z","dependencies_parsed_at":"2025-03-06T17:43:26.636Z","dependency_job_id":"fb6c760c-0abb-4469-8cad-64e89b5ca194","html_url":"https://github.com/nickscha/w32_gl","commit_stats":null,"previous_names":["nickscha/w32_gl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fw32_gl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fw32_gl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fw32_gl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickscha%2Fw32_gl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickscha","download_url":"https://codeload.github.com/nickscha/w32_gl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244592957,"owners_count":20477990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c89","nostdlib","single-header"],"created_at":"2025-03-20T10:24:27.002Z","updated_at":"2026-05-19T00:06:16.347Z","avatar_url":"https://github.com/nickscha.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# w32_gl (in development)\nA C89 standard compliant, single header, nostdlib (no C Standard Library) win32 and opengl api function prototypes without using windows.h\n\nFor more information please look at the \"w32_gl.h\" file or take a look at the \"examples\" or \"tests\" folder.\n\n## Quick Start\n\nDownload or clone w32_gl.h and include it in your project.\n\n```C\n#include \"w32_gl.h\"\n\nint main() {\n\n    return 0;\n}\n```\n\n## Run Example: win32, opengl, nostdlib, freestsanding\n\nIn this repo you will find the \"examples/w32_gl_10_full3d_hot_reload/w32_gl_nostdlib.c\" with the corresponding \"build.bat\" file which\ncreates an executable only linked to \"kernel32\",\"user32\",\"gdi32\",\"opengl32\" and is not using the C standard library and executes the program afterwards.\n\nFeatures:\n- **1 memory allocation**: 1 for everything. Just VirtualAlloc once. Arena/Bump Memory is passed to application code.\n- **hot OpenGL shader reloading**: Just edit the GLSL files and the running program will update.\n- **hot application code reloading**: Let the window stay open and edit/save/compile **speg.c** and see changes immediatly without restarting the program.\n- **OpenGL Instanced Rendering**: In the example scene we render ~20800 objects in 4 draw calls. On a NVIDIA RTX 4070 TI with around 9000 FPS (no vsync).\n- **Bitmap Font Rendering**\n- **Rigid Body Simulation**\n- **Frustum Culling**: From my other linear algebra library **vm.h**\n\nFiles:\n- **w32_gl_nostdlib.c**: The platform specific code (here win32) is defined here. build.bat produces **w32_gl_nostdlib.exe**\n- **speg.h**: Shared header between the .exe and .dll (speg.c)\n- **speg.c**: The application code/logic which is pure C89 without any linkings. build.bat produces **speg.dll**\n- **test.vs,test.fs,test_instanced.vs**: The OpenGL GLSL shaders\n \n![Example of a C89 nostdlib win32/opengl program](/examples/w32_gl_10_full3d_hot_reload/example.png)\n\n## \"nostdlib\" Motivation \u0026 Purpose\n\nnostdlib is a lightweight, minimalistic approach to C development that removes dependencies on the standard library. The motivation behind this project is to provide developers with greater control over their code by eliminating unnecessary overhead, reducing binary size, and enabling deployment in resource-constrained environments.\n\nMany modern development environments rely heavily on the standard library, which, while convenient, introduces unnecessary bloat, security risks, and unpredictable dependencies. nostdlib aims to give developers fine-grained control over memory management, execution flow, and system calls by working directly with the underlying platform.\n\n### Benefits\n\n#### Minimal overhead\nBy removing the standard library, nostdlib significantly reduces runtime overhead, allowing for faster execution and smaller binary sizes.\n\n#### Increased security\nStandard libraries often include unnecessary functions that increase the attack surface of an application. nostdlib mitigates security risks by removing unused and potentially vulnerable components.\n\n#### Reduced binary size\nWithout linking to the standard library, binaries are smaller, making them ideal for embedded systems, bootloaders, and operating systems where storage is limited.\n\n#### Enhanced performance\nDirect control over system calls and memory management leads to performance gains by eliminating abstraction layers imposed by standard libraries.\n\n#### Better portability\nBy relying only on fundamental system interfaces, nostdlib allows for easier porting across different platforms without worrying about standard library availability.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickscha%2Fw32_gl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickscha%2Fw32_gl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickscha%2Fw32_gl/lists"}