Download Latest Version win_glfw_php8.5_nts_x64.zip (829.2 kB) Google Add to Preferred Sources
Home / v2.4.0
Name Modified Size InfoDownloads / Week
Parent folder
win_glfw_php8.3_ts_x64.zip 2026-07-08 826.2 kB
win_glfw_php8.4_nts_x64.zip 2026-07-08 828.5 kB
win_glfw_php8.4_ts_x64.zip 2026-07-08 829.2 kB
win_glfw_php8.5_nts_x64.zip 2026-07-08 829.2 kB
win_glfw_php8.5_ts_x64.zip 2026-07-08 829.4 kB
win_glfw_php8.1_nts_x64.zip 2026-07-08 825.6 kB
win_glfw_php8.1_ts_x64.zip 2026-07-08 825.6 kB
win_glfw_php8.2_nts_x64.zip 2026-07-08 825.4 kB
win_glfw_php8.2_ts_x64.zip 2026-07-08 825.3 kB
win_glfw_php8.3_nts_x64.zip 2026-07-08 825.7 kB
README.md 2026-07-08 3.8 kB
v2.4.0 source code.tar.gz 2026-07-08 2.9 MB
v2.4.0 source code.zip 2026-07-08 3.4 MB
Totals: 13 Items   14.5 MB 0

Features

Draw Call Assembler

A new native rendering component (GL\Rendering\DrawCallAssembler) between your scene and OpenGL. Submit per-object draw requests (mesh + transform + material); it handles frustum culling, LOD selection, sorting, and instanced batching in C, then draws for you or hands back GPU-ready buffers - built to push millions of instances per frame.

s

The 09_drawcall_assembler.php example renders a 10,000,000-instance asteroid field with live camera culling. On my MacBook M1:

octree | submitted 10000000, visible 35 (100.0% culled), draw calls: 28, avg execute: 2.129ms, avg frame: 8.558ms (116.9 FPS)
  • Mesh registry & instancing - register a VAO once, then submit() transforms against its handle. Adjacent draws sharing mesh/material/pass/program auto-collapse into a single instanced call (indexed or array draws).
  • Culling - CULL_NONE, CULL_LINEAR (per-instance frustum test), or CULL_OCTREE (persistent tree reused across frames, ideal for large static scenes). Frustum derived from setCameraData() or set manually.
  • LOD - per-mesh distance tables via setLodTable(), with per-instance caching.
  • Sorting - front-to-back / back-to-front / per-pass, using packed 64-bit keys and an adaptive radix/quicksort/insertion sort to minimize state changes.
  • Two render paths - execute(callback) draws for you (owns the transform VBO internally), or build() fills GPU-ready buffers for your own loop.
  • Per-instance payload - attach arbitrary per-instance float data that travels through culling and sorting (bindPayloadData() / bindPayloadBuffer()).
  • Stats - instanceCount(), builtInstanceCount(), commandCount() for cull rate and draw-call counts.

SVG parsing & rendering

Parse SVG documents and draw them straight into the NanoVG vector-graphics context as real vector paths - no rasterization step.

s

  • Parse from anywhere - SVGImage::fromDisk() loads a .svg file; SVGImage::fromString() parses in-memory markup. Parsed images are reusable and expose their native width / height.
  • Vector rendering - VGContext::drawSVG($svg, $x, $y, $w, $h) renders the paths into the current frame; omit $w/$h to draw at native size, or pass them to scale to fit.
  • Fills, strokes & masks - solid fills and strokes are rendered, and alpha masks (mask="url(#id)") are honoured as a 1-bit hard-edged clip. Gradient paints are skipped for now.

HDR texture support

GL\Texture\Texture2D now handles High Dynamic Range images end to end. LDR images continue to load into a UByteBuffer; HDR images load into a FloatBuffer so pixel values are preserved beyond the 0–1 range.

  • Automatic detection - Texture2D::fromDisk() detects .hdr files and loads them into a FloatBuffer automatically; use isHDR() to tell which buffer type you got.
  • Load from memory - Texture2D::fromBufferHDR() builds an HDR texture directly from a float FloatBuffer.
  • Write to disk - writeHDR() exports HDR textures to .hdr.

What's Changed

New Contributors

Full Changelog: https://github.com/mario-deluna/php-glfw/compare/v2.3.0...v2.4.0

Source: README.md, updated 2026-07-08