Declare the renderer interface's data types

Transforms, matrices, colors, lights, blend modes, fog, texture transforms, vertex arrays and the engine's buffer and texture objects, worked out from IMVU's Direct3D engine. The pass-through logs the first calls' arguments read through them, to check them in the client.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-10-28 04:36:37 -07:00
1 parent 3c28a8794b
commit 83e0665681
6 files changed
+298 -77

No files matched your search

+11 -3
View File
@@ -59,9 +59,17 @@ virtual methods, IMVU's code only uses an engine through helpers that call its v
`destroy`, `get_deleter`, `get_untyped_deleter`), the use count and the weak count, changed atomically.
`include/t5de/imvu/shared_ptr.hpp` matches it. With non-trivial copy and destruction, it's returned through a
hidden pointer and passed on the stack, as IMVU's code expects.
- Still to work out, for a renderer of our own: `Mat4f`, `Transform`, `LightProperties`, `TextureTransform`,
`Pixmap` (`pixmap.dll`), the buffers' contents, `VertexAttributeArray<T>`, `std::vector<PointSprite>` as
Visual C++ 2010 lays it out, and `RenderBlendMode`'s values.
- The data types are in `include/t5de/imvu/types.hpp`, worked out from the Direct3D engine: matrices and
transforms in Direct3D's row-vector convention, colors as `0xAARRGGBB`, lights (point or directional), blend
modes, linear fog, texture coordinate transforms, vertex attribute arrays (data, count, stride). `Pixmap` is used
through `pixmap.dll`'s exported methods (`width`, `height`, `pitch`, `pixels`, ...), not its layout.
- `drawTriangles`' vertex buffers are positions (`Vec3f`), normals (`Vec3f`), texture coordinates (`Vec2f`) and
colors; vertex buffers are made with a stride, element size and count, dynamic ones filled later through the
buffer's own `update`. The objects an engine creates (buffers, textures, render targets) are declared in
`include/t5de/imvu/resources.hpp`; IMVU's code deletes them through their virtual destructors.
- Still unknown: point sprites (`drawPointSprites`, particles), render targets, `CompoundRegion` (texture update
regions), `newRenderTexture`'s flags, and what `beginRendering` does with a null target. MSVC orders overloaded
virtual methods unlike their declaration, so our declarations never overload virtual methods.
- Memory crosses the boundary only through virtual methods (destructors, control blocks), so each side can use its
own C runtime. Exceptions must not cross it.