{"repo":"LostMyCode/d3d9-webgl","free":true,"listed":false,"github":"https://github.com/LostMyCode/d3d9-webgl","clone":"git clone https://github.com/LostMyCode/d3d9-webgl.git","description":"Direct3D 9 Fixed-Function Pipeline → WebGL 2.0 wrapper for Emscripten/WASM","language":"C++","stars":70,"topics":["cpp","d3d9","direct3d","game-development","opengl-es","rendering","wasm","webassembly","webgl"],"license":"MIT","category":"game-templates","readme_excerpt":"d3d9-webgl A Direct3D 9 Fixed-Function Pipeline implementation targeting WebGL 2.0 via Emscripten/WebAssembly. Drop-in D3D9 headers and a single .cpp file that translates D3D9 API calls to WebGL — enabling legacy D3D9 applications to run in the browser without rewriting their rendering code. 01 — Rotating Cube Textures, VB/IB, DrawIndexedPrimitive 02 — FFP Lighting 3 Point Lights, Materials, DrawPrimitiveUP ✨ Features - Full FFP Emulation — Per-vertex lighting (3 point lights), materials, texture stage states, transform matrices - All Draw Paths — DrawIndexedPrimitive , DrawIndexedPrimitiveUP , DrawPrimitiveUP , DrawPrimitive - FVF Parsing — Automatic vertex layout from D3DFVF XYZ , D3DFVF XYZRHW , D3DFVF NORMAL , D3DFVF DIFFUSE , D3DFVF TEX1 – TEX8 - Texture Formats — DXT1/3/5 (via S3TC extension), A8R8G8B8, X8R8G8B8, R5G6B5, A4R4G4B4, A1R5G5B5, R8G8B8 - Linear Fog — Per-pixel D3D9 table fog ( D3DRS FOGENABLE , D3DRS FOGCOLOR , D3DRS FOGSTART , D3DRS FOGEND ); automatically skipped for D3DFVF XYZRHW vertices - Render States — Alpha blending, alpha test, depth test, stencil operations, culling, scissor test, color write mask, linear fog - Texture Stage States — Stage 0 color/alpha ops (MODULATE, MODULATE2X, SELECTARG), Stage 1 lightmap blending (MODULATE, MODULATE2X, MODULATE4X, ADDSIGNED, ADDSMOOTH) - Render-to-Texture — FBO-based with automatic Y-flip handling (D3D top-down vs GL bottom-up) - Clip Plane Emulation — Fragment shader discard (WebGL has no hardware clip planes)","default_branch":null,"files":null,"tree":[],"storefront":"/r/LostMyCode","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/LostMyCode/d3d9-webgl/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}