You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Regenerated bindings: GenMeshCylinder simplified, GenMeshCylinderEx added,
shader alias functions, ShaderCustom opaque type, EnvDoF.NearScale field
- Generator: support typedef aliases for opaque struct types, skip unused
System.Text import for opaque types
- TypeMapper: recursive opaque type detection through typedef chains
- Examples: spawn child process per example to avoid rlgl state leakage
between sequential runs (see #1)
Copy file name to clipboardExpand all lines: R3D-cs/interop/R3D.mesh_data.g.cs
+44-13Lines changed: 44 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -18,14 +18,26 @@ public static unsafe partial class R3D
18
18
{
19
19
20
20
/// <summary>
21
-
/// Creates an empty mesh data container.
21
+
/// Allocates a mesh data container with the given capacity.
22
22
/// <para>
23
-
/// Allocates memory for vertex and index buffers. All allocated buffers are zero-initialized.
23
+
/// This function allocates CPU-side buffers for vertices and indices, but does NOT initialize the mesh with any actual data. The returned R3D_MeshData has:
24
+
/// </para>
25
+
/// <para>
26
+
/// <list type="bullet">
27
+
/// <item><description>vertexCapacity and indexCapacity set to the requested sizes</description></item>
28
+
/// <item><description>vertexCount and indexCount set to 0</description></item>
29
+
/// </list>
30
+
/// </para>
31
+
/// <para>
32
+
/// You must manually set vertexCount/indexCount after filling the buffers, or use helper functions like R3D_AppendMeshData() to populate the mesh.
33
+
/// </para>
34
+
/// <para>
35
+
/// All allocated memory is zero-initialized.
24
36
/// </para>
25
37
/// </summary>
26
-
/// <param name="vertexCount">Number of vertices to allocate. Must be non-zero.</param>
27
-
/// <param name="indexCount">Number of indices to allocate. May be zero. If zero, no index buffer is allocated.</param>
28
-
/// <returns>A new R3D_MeshData instance with allocated memory.</returns>
38
+
/// <param name="vertexCount">Number of vertices to allocate (capacity). Must be > 0.</param>
39
+
/// <param name="indexCount">Number of indices to allocate (capacity). May be 0. If 0, no index buffer is allocated.</param>
40
+
/// <returns>A new R3D_MeshData with allocated buffers and zero element counts.</returns>
29
41
/// <remarks>
30
42
/// Native: <c>R3D_LoadMeshData</c>
31
43
/// </remarks>
@@ -195,21 +207,40 @@ public static unsafe partial class R3D
/// Generate a cylinder mesh with specified parameters.
210
+
/// Generates a cylinder mesh centered at the origin along the Y axis.
199
211
/// <para>
200
-
/// Creates a mesh centered at the origin, extending along the Y axis. The mesh includes top and bottom caps and smooth side surfaces. A cone is produced when bottomRadius and topRadius differ.
212
+
/// Both caps are included. For a cone or truncated cone, use R3D_GenMeshDataCylinderEx.
201
213
/// </para>
202
214
/// </summary>
203
-
/// <param name="bottomRadius">Radius of the bottom cap.</param>
204
-
/// <param name="topRadius">Radius of the top cap.</param>
205
-
/// <param name="height">Height of the shape along the Y axis.</param>
206
-
/// <param name="slices">Number of radial subdivisions around the shape.</param>
207
-
/// <returns>Generated mesh structure.</returns>
215
+
/// <param name="radius">Radius of the cylinder. Must be > 0.</param>
216
+
/// <param name="height">Total height along the Y axis. Must be > 0.</param>
217
+
/// <param name="slices">Radial subdivisions around the circumference. Must be >= 3.</param>
218
+
/// <returns>The generated mesh data, or an empty mesh on invalid input.</returns>
/// Creates an alias of an existing screen shader.
50
+
/// <para>
51
+
/// The alias shares the same compiled program as the original but holds its own independent uniform and sampler state. Typical use cases include pre-configuring aliases for distinct effects (e.g. different convolution kernels), or running the same shader multiple times in a post-process chain with different parameters at each pass.
52
+
/// </para>
53
+
/// <para>
54
+
/// Uniform and sampler state is copied from the original at the moment this function is called, not from the shader source defaults. Any values set on the original after compilation but before this call will be reflected in the alias; values set afterward will not.
55
+
/// </para>
56
+
/// </summary>
57
+
/// <param name="shader">The original screen shader to alias.</param>
58
+
/// <returns>Pointer to the alias, or NULL on failure.</returns>
59
+
/// <remarks>
60
+
/// The alias does not own the program. Always unload all aliases before unloading the original, or the alias program references become dangling.
/// If the shader owns its program shaders (i.e. it was created withR3D_LoadScreenShader orR3D_LoadScreenShaderFromMemory), they are deleted. Aliases created from this shader viaR3D_LoadScreenShaderAlias must be unloaded beforehand, as they share the same programs and will be left with dangling references.
70
+
/// </para>
50
71
/// </summary>
51
72
/// <param name="shader">Screen shader to unload.</param>
/// The alias shares the same compiled program as the original but holds its own independent uniform and sampler state. A typical use case is to pre-configure several aliases with different uniforms or textures, avoiding the need to reconfigure the shader on every skybox switch.
52
+
/// </para>
53
+
/// <para>
54
+
/// Uniform and sampler state is copied from the original at the moment this function is called, not from the shader source defaults. Any values set on the original after compilation but before this call will be reflected in the alias; values set afterward will not.
55
+
/// </para>
56
+
/// </summary>
57
+
/// <param name="shader">The original sky shader to alias.</param>
58
+
/// <returns>Pointer to the alias, or NULL on failure.</returns>
59
+
/// <remarks>
60
+
/// The alias does not own the program. Always unload all aliases before unloading the original, or the alias program references become dangling.
/// If the shader owns its program shaders (i.e. it was created withR3D_LoadSkyShader orR3D_LoadSkyShaderFromMemory), they are deleted. Aliases created from this shader viaR3D_LoadSkyShaderAlias must be unloaded beforehand, as they share the same programs and will be left with dangling references.
70
+
/// </para>
50
71
/// </summary>
51
72
/// <param name="shader">Sky shader to unload.</param>
0 commit comments