HTTP/2 302
date: Sat, 19 Jul 2025 09:46:49 GMT
content-type: text/html; charset=utf-8
content-length: 0
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
location: https://github.com/npiegdon/immediate2d/releases/tag/v2.0
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
set-cookie: _gh_sess=cCBwlhS%2B6i2isMJxyg%2B%2ByLS78RcKDPFECQr51c8CXhB5exm%2FZ7QFU88d4niIsmeGoyUGZm8iHqCuKepevVhxq%2FAdcHv0Zo8W2esVH%2BuImXZKuthVenQNasgK3nSp9pSbiES%2Bikm%2BemE6UqzK5UKigm%2BGzMlN9CaOR65rB7cD3uIte9XgDHCDCXZZXAM9iHPMlDvpobpAUWAa3Xjzy88jBHT2zfONrYVT9O27lPpS2WHgYzV813jAZ7IC9wwGudG10lhS2gjcNYdnMjxOy6jY0A%3D%3D--J%2Br2uYWOdP7wsx2g--XoGCzbWp9WgohRzQzd35Vw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1524883544.1752918409; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 09:46:49 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 19 Jul 2026 09:46:49 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: D8BC:16AA4:28F49E:328C55:687B6989
HTTP/2 200
date: Sat, 19 Jul 2025 09:46:50 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"de33097efb44fd6d6d3fe56406221eaa"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
x-github-request-id: D8BC:16AA4:28F4C0:328C76:687B6989
Release v2: API cleanup, single file, image loading/drawing, new examples · npiegdon/immediate2d · GitHub
Releases
v2.0
v2: API cleanup, single file, image loading/drawing, new examples
Latest
Breaking Changes
Renamed drawing.h to immediate2d.h.
The header and implementation have been merged into a single .h file (in the stb -style). Instead of compiling immediate2d.cpp separately, now, in exactly one of your own cpp files, add this line before the immediate2d.h include: #define IMM2D_IMPLEMENTATION
.
Instead of changing the Width/Height/Scale in the header itself, you can now use #define IMM2D_WIDTH 640
, #define IMM2D_WIDTH 480
, and #define IMM2D_SCALE 2
just above your IMM2D_IMPLEMENTATION
define in your own code. Now you shouldn't ever need to modify the immediate2d.h header itself.
Renamed the top-level user function called by the library to run()
instead of main()
(which could cause some name collisions depending on your environment).
Renamed SetPixel
to DrawPixel
to be more consistent with the rest of the drawing APIs.
All the bool filled
parameters on shape drawing got split out into separate fill/stroke colors, which can save a call in the best case and is more readable in the worst case.
Split UseAntiAliasing(bool)
into the separate, parameterless UseAntiAliasing()
and StopAntiAliasing()
, which should be a little more legible to beginners.
New Stuff
Added LoadImage
, DrawImage
, ImageWidth
, and ImageHeight
calls to work with images! Many file types are supported along with reading from disk, resources embedded in the .exe, or directly from a Base64-encoded string. Check the new examples to see how to use them.
There were many "secret" functions (if you read the implementation) that have now been exposed and documented in the header: MakeColorHSB
, DrawArc
, DrawString
, LastBufferedKey
, ClearInputBuffer
, PlayMusic
, and ResetMusic
.
Added buildAll.bat (and cleanAll.bat) which can build (and delete) the examples from a Visual Studio "Native Tools Command Prompt". If you're interested in building your own project from the command line, these scripts might be a good place to start.
The quick reference PDF has been updated to include HSB colors and image loading/drawing.
Fixes / Neutral Changes
The internal GDI+ based line drawing now uses round end caps, which should join end-to-end better with larger thicknesses.
Double-buffered Present
could sometimes cause the screen to flicker.
You can’t perform that action at this time.