Sets wireframe rendering mode (1=edges only 0=solid, showBackfaces 1=both sides 0=cull). Takes enabled (0=solid rendering, non-zero=wireframe mode), showBackfaces (0=cull backfaces, non-zero=show both sides). Returns nothing. Sets g_wireframeMode flag (controls polygon fill mode), sets g_wireframeShowBackfaces flag (controls backface culling), affects all subsequent b3dRenderWorld calls. Debug visualization and technical inspection.
This function configures wireframe rendering.
Sets wireframe rendering mode (1=edges only 0=solid, showBackfaces 1=both sides 0=cull). Takes enabled (0=solid rendering, non-zero=wireframe mode), showBackfaces (0=cull backfaces, non-zero=show both sides). Returns nothing. Sets g_wireframeMode flag (controls polygon fill mode), sets g_wireframeShowBackfaces flag (controls backface culling), affects all subsequent b3dRenderWorld calls. Debug visualization and technical inspection.
This function configures wireframe rendering. Wireframe mode: enabled=0 renders solid filled polygons (normal rendering, textured surfaces), enabled=1 renders polygon edges only (lines instead of filled triangles, shows mesh topology). Backface culling: showBackfaces=0 culls backfacing polygons (renders only front-facing triangles, standard for closed meshes), showBackfaces=1 shows both sides (renders front and back triangles, useful for open meshes like planes). Combined modes: enabled=0 showBackfaces=0 is normal solid rendering with backface culling (default), enabled=1 showBackfaces=0 is wireframe with backface culling (standard wireframe), enabled=1 showBackfaces=1 is wireframe with both sides (see inside meshes). Use cases: (1) Debug mesh topology (see triangle layout, vertex distribution, edge flow), (2) Performance profiling (visualize polygon count, identify overdraw), (3) Technical inspection (check mesh integrity, find holes, verify normals), (4) Artistic style (cel-shaded outline, technical blueprint look), (5) Editor visualization (mesh editing, UV layout inspection). Common patterns: enable wireframe b3dSetWireframeMode(1, 0), see inside meshes b3dSetWireframeMode(1, 1), disable wireframe b3dSetWireframeMode(0, 0), toggle wireframe wireframeOn = 1 - wireframeOn then b3dSetWireframeMode(wireframeOn, 0). Typical usage: enable during development to inspect mesh quality, toggle with hotkey for debug visualization, enable to count triangles visually, disable for final rendering. Wireframe rendering: polygon edges rendered as lines (line rasterization instead of triangle rasterization), line width typically 1 pixel (hardware default, may be configurable), line color matches vertex colors or material color. Backface culling: determines triangle visibility based on winding order (front-facing = counter-clockwise from camera, back-facing = clockwise), culling skips backface triangles (reduces rendering cost by ~50% for closed meshes), showing backfaces doubles triangle count (front and back rendered). Performance impact: wireframe rendering faster than solid (no pixel filling, only edge rasterization), backface culling improves performance (fewer triangles rendered), showing backfaces degrades performance (double triangle count). State persistence: wireframe mode persists until changed (affects all subsequent renders), global state shared by all rendering (not per-entity or per-camera). Shader interaction: wireframe mode may affect shader behavior (some shaders optimize for filled vs wireframe), textures not sampled in wireframe mode (edges only, no surface area to texture). Validation: enabled converted to boolean (0 = false, non-zero = true), showBackfaces converted to boolean (0 = false, non-zero = true). Related: b3dGetWireframeMode queries current wireframe enabled state, b3dGetWireframeShowBackfaces queries current backface visibility state, b3dRenderWorld uses wireframe settings (renders with configured mode).