RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Debug DrawingGPU Mesh StructsImGui FFIMath Structs (FFI)FFI C DefinitionsPID ControllersCSV LibraryDelay LineDequeDevelopment UtilitiesEvent ReferenceExtension SystemSignal FiltersGraph PathfindingUI BridgeInput Filter Constants2D Bilinear InterpolationIntrospectionJBeam Pretty PrinterJSON AST ParserSJSON ParserJSON Debug ParserJSON Pretty PrinterK-D Tree (2D Boxes)K-D Tree (3D)K-D Tree (3D)Lua SerializerC++/Lua BindingLua CoreLua ProfilerMath LibraryParticlesQuadtreeSettingsTCP ServerTimer SchedulerUtility Library

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API Referencecommon

GPU Mesh Structs

Module defined in `lua/common/cdefGpuMesh.lua`. Defines FFI C struct for GPU mesh primitive data. Most structs are commented out as reference only.

Module defined in lua/common/cdefGpuMesh.lua. Defines FFI C struct for GPU mesh primitive data. Most structs are commented out as reference only.


Exports

No Lua exports. Registers FFI C definitions when ffi is available.

FFI Types

gpuPrimitive_t

  • Type: FFI struct
  • Description: Represents a GPU mesh primitive
  • Fields:
    • startIndex - uint32_t - Starting index in the index buffer
    • indexCount - uint32_t - Number of indices
    • materialId - uint32_t - Material ID for this primitive

Internal Notes

  • Additional structs (gpuFlexMesh_t, gpuPropMesh_t, gpuMesh_t) are commented out but preserved as reference
  • These commented structs describe full GPU mesh data with vertices, normals, tangents, UVs, vertex colors, and sub-meshes

See Also

  • cdefDebugDraw Reference - Related reference
  • cdefImgui Reference - Related reference
  • cdefMath Reference - Related reference
  • Common Libraries Overview - Guide

Debug Drawing

Module defined in `lua/common/cdefDebugDraw.lua`. Defines FFI C definitions for debug drawing primitives (spheres, cylinders, lines, text, triangles) used by the engine's debug visualization system.

ImGui FFI

Module defined in `lua/common/cdefImgui.lua`. Defines a single FFI C function for ImGui input text callback integration.

On this page

ExportsFFI TypesgpuPrimitive_tInternal NotesSee Also