Browse Source

Fixed docs.

Бранимир Караџић 4 years ago
parent
commit
08e3d51a9e

+ 8 - 4
bindings/bf/bgfx.bf

@@ -2309,6 +2309,8 @@ public static class bgfx
 	/// Start VertexLayout.
 	/// Start VertexLayout.
 	/// </summary>
 	/// </summary>
 	///
 	///
+	/// <param name="_rendererType">Renderer backend type. See: `bgfx::RendererType`</param>
+	///
 	[LinkName("bgfx_vertex_layout_begin")]
 	[LinkName("bgfx_vertex_layout_begin")]
 	public static extern VertexLayout* vertex_layout_begin(VertexLayout* _this, RendererType _rendererType);
 	public static extern VertexLayout* vertex_layout_begin(VertexLayout* _this, RendererType _rendererType);
 	
 	
@@ -2340,7 +2342,7 @@ public static class bgfx
 	public static extern void vertex_layout_decode(VertexLayout* _this, Attrib _attrib, uint8 * _num, AttribType* _type, bool* _normalized, bool* _asInt);
 	public static extern void vertex_layout_decode(VertexLayout* _this, Attrib _attrib, uint8 * _num, AttribType* _type, bool* _normalized, bool* _asInt);
 	
 	
 	/// <summary>
 	/// <summary>
-	/// Returns true if VertexLayout contains attribute.
+	/// Returns `true` if VertexLayout contains attribute.
 	/// </summary>
 	/// </summary>
 	///
 	///
 	/// <param name="_attrib">Attribute semantics. See: `bgfx::Attrib`</param>
 	/// <param name="_attrib">Attribute semantics. See: `bgfx::Attrib`</param>
@@ -2352,6 +2354,8 @@ public static class bgfx
 	/// Skip `_num` bytes in vertex stream.
 	/// Skip `_num` bytes in vertex stream.
 	/// </summary>
 	/// </summary>
 	///
 	///
+	/// <param name="_num">Number of bytes to skip.</param>
+	///
 	[LinkName("bgfx_vertex_layout_skip")]
 	[LinkName("bgfx_vertex_layout_skip")]
 	public static extern VertexLayout* vertex_layout_skip(VertexLayout* _this, uint8 _num);
 	public static extern VertexLayout* vertex_layout_skip(VertexLayout* _this, uint8 _num);
 	
 	
@@ -4399,7 +4403,7 @@ public static class bgfx
 	/// <param name="_id">View id.</param>
 	/// <param name="_id">View id.</param>
 	/// <param name="_program">Program.</param>
 	/// <param name="_program">Program.</param>
 	/// <param name="_depth">Depth for sorting.</param>
 	/// <param name="_depth">Depth for sorting.</param>
-	/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
+	/// <param name="_flags">Which states to discard for next draw. See `BGFX_DISCARD_*`.</param>
 	///
 	///
 	[LinkName("bgfx_submit")]
 	[LinkName("bgfx_submit")]
 	public static extern void submit(ViewId _id, ProgramHandle _program, uint32 _depth, uint8 _flags);
 	public static extern void submit(ViewId _id, ProgramHandle _program, uint32 _depth, uint8 _flags);
@@ -4412,7 +4416,7 @@ public static class bgfx
 	/// <param name="_program">Program.</param>
 	/// <param name="_program">Program.</param>
 	/// <param name="_occlusionQuery">Occlusion query.</param>
 	/// <param name="_occlusionQuery">Occlusion query.</param>
 	/// <param name="_depth">Depth for sorting.</param>
 	/// <param name="_depth">Depth for sorting.</param>
-	/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
+	/// <param name="_flags">Which states to discard for next draw. See `BGFX_DISCARD_*`.</param>
 	///
 	///
 	[LinkName("bgfx_submit_occlusion_query")]
 	[LinkName("bgfx_submit_occlusion_query")]
 	public static extern void submit_occlusion_query(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint32 _depth, uint8 _flags);
 	public static extern void submit_occlusion_query(ViewId _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint32 _depth, uint8 _flags);
@@ -4428,7 +4432,7 @@ public static class bgfx
 	/// <param name="_start">First element in indirect buffer.</param>
 	/// <param name="_start">First element in indirect buffer.</param>
 	/// <param name="_num">Number of dispatches.</param>
 	/// <param name="_num">Number of dispatches.</param>
 	/// <param name="_depth">Depth for sorting.</param>
 	/// <param name="_depth">Depth for sorting.</param>
-	/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
+	/// <param name="_flags">Which states to discard for next draw. See `BGFX_DISCARD_*`.</param>
 	///
 	///
 	[LinkName("bgfx_submit_indirect")]
 	[LinkName("bgfx_submit_indirect")]
 	public static extern void submit_indirect(ViewId _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16 _start, uint16 _num, uint32 _depth, uint8 _flags);
 	public static extern void submit_indirect(ViewId _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16 _start, uint16 _num, uint32 _depth, uint8 _flags);

+ 8 - 4
bindings/cs/bgfx.cs

@@ -2261,6 +2261,8 @@ public static partial class bgfx
 	/// Start VertexLayout.
 	/// Start VertexLayout.
 	/// </summary>
 	/// </summary>
 	///
 	///
+	/// <param name="_rendererType">Renderer backend type. See: `bgfx::RendererType`</param>
+	///
 	[DllImport(DllName, EntryPoint="bgfx_vertex_layout_begin", CallingConvention = CallingConvention.Cdecl)]
 	[DllImport(DllName, EntryPoint="bgfx_vertex_layout_begin", CallingConvention = CallingConvention.Cdecl)]
 	public static extern unsafe VertexLayout* vertex_layout_begin(VertexLayout* _this, RendererType _rendererType);
 	public static extern unsafe VertexLayout* vertex_layout_begin(VertexLayout* _this, RendererType _rendererType);
 	
 	
@@ -2292,7 +2294,7 @@ public static partial class bgfx
 	public static extern unsafe void vertex_layout_decode(VertexLayout* _this, Attrib _attrib, byte * _num, AttribType* _type, bool* _normalized, bool* _asInt);
 	public static extern unsafe void vertex_layout_decode(VertexLayout* _this, Attrib _attrib, byte * _num, AttribType* _type, bool* _normalized, bool* _asInt);
 	
 	
 	/// <summary>
 	/// <summary>
-	/// Returns true if VertexLayout contains attribute.
+	/// Returns `true` if VertexLayout contains attribute.
 	/// </summary>
 	/// </summary>
 	///
 	///
 	/// <param name="_attrib">Attribute semantics. See: `bgfx::Attrib`</param>
 	/// <param name="_attrib">Attribute semantics. See: `bgfx::Attrib`</param>
@@ -2305,6 +2307,8 @@ public static partial class bgfx
 	/// Skip `_num` bytes in vertex stream.
 	/// Skip `_num` bytes in vertex stream.
 	/// </summary>
 	/// </summary>
 	///
 	///
+	/// <param name="_num">Number of bytes to skip.</param>
+	///
 	[DllImport(DllName, EntryPoint="bgfx_vertex_layout_skip", CallingConvention = CallingConvention.Cdecl)]
 	[DllImport(DllName, EntryPoint="bgfx_vertex_layout_skip", CallingConvention = CallingConvention.Cdecl)]
 	public static extern unsafe VertexLayout* vertex_layout_skip(VertexLayout* _this, byte _num);
 	public static extern unsafe VertexLayout* vertex_layout_skip(VertexLayout* _this, byte _num);
 	
 	
@@ -4356,7 +4360,7 @@ public static partial class bgfx
 	/// <param name="_id">View id.</param>
 	/// <param name="_id">View id.</param>
 	/// <param name="_program">Program.</param>
 	/// <param name="_program">Program.</param>
 	/// <param name="_depth">Depth for sorting.</param>
 	/// <param name="_depth">Depth for sorting.</param>
-	/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
+	/// <param name="_flags">Which states to discard for next draw. See `BGFX_DISCARD_*`.</param>
 	///
 	///
 	[DllImport(DllName, EntryPoint="bgfx_submit", CallingConvention = CallingConvention.Cdecl)]
 	[DllImport(DllName, EntryPoint="bgfx_submit", CallingConvention = CallingConvention.Cdecl)]
 	public static extern unsafe void submit(ushort _id, ProgramHandle _program, uint _depth, byte _flags);
 	public static extern unsafe void submit(ushort _id, ProgramHandle _program, uint _depth, byte _flags);
@@ -4369,7 +4373,7 @@ public static partial class bgfx
 	/// <param name="_program">Program.</param>
 	/// <param name="_program">Program.</param>
 	/// <param name="_occlusionQuery">Occlusion query.</param>
 	/// <param name="_occlusionQuery">Occlusion query.</param>
 	/// <param name="_depth">Depth for sorting.</param>
 	/// <param name="_depth">Depth for sorting.</param>
-	/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
+	/// <param name="_flags">Which states to discard for next draw. See `BGFX_DISCARD_*`.</param>
 	///
 	///
 	[DllImport(DllName, EntryPoint="bgfx_submit_occlusion_query", CallingConvention = CallingConvention.Cdecl)]
 	[DllImport(DllName, EntryPoint="bgfx_submit_occlusion_query", CallingConvention = CallingConvention.Cdecl)]
 	public static extern unsafe void submit_occlusion_query(ushort _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint _depth, byte _flags);
 	public static extern unsafe void submit_occlusion_query(ushort _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, uint _depth, byte _flags);
@@ -4385,7 +4389,7 @@ public static partial class bgfx
 	/// <param name="_start">First element in indirect buffer.</param>
 	/// <param name="_start">First element in indirect buffer.</param>
 	/// <param name="_num">Number of dispatches.</param>
 	/// <param name="_num">Number of dispatches.</param>
 	/// <param name="_depth">Depth for sorting.</param>
 	/// <param name="_depth">Depth for sorting.</param>
-	/// <param name="_flags">Which states to discard for next draw. See BGFX_DISCARD_</param>
+	/// <param name="_flags">Which states to discard for next draw. See `BGFX_DISCARD_*`.</param>
 	///
 	///
 	[DllImport(DllName, EntryPoint="bgfx_submit_indirect", CallingConvention = CallingConvention.Cdecl)]
 	[DllImport(DllName, EntryPoint="bgfx_submit_indirect", CallingConvention = CallingConvention.Cdecl)]
 	public static extern unsafe void submit_indirect(ushort _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
 	public static extern unsafe void submit_indirect(ushort _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);

+ 16 - 8
bindings/d/funcs.d

@@ -26,6 +26,8 @@ version(BindBgfx_Static)
 	
 	
 	/**
 	/**
 	 * Start VertexLayout.
 	 * Start VertexLayout.
+	 * Params:
+	 * _rendererType = Renderer backend type. See: `bgfx::RendererType`
 	 */
 	 */
 	bgfx_vertex_layout_t* bgfx_vertex_layout_begin(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
 	bgfx_vertex_layout_t* bgfx_vertex_layout_begin(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
 	
 	
@@ -58,7 +60,7 @@ version(BindBgfx_Static)
 	void bgfx_vertex_layout_decode(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib, byte* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
 	void bgfx_vertex_layout_decode(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib, byte* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
 	
 	
 	/**
 	/**
-	 * Returns true if VertexLayout contains attribute.
+	 * Returns `true` if VertexLayout contains attribute.
 	 * Params:
 	 * Params:
 	 * _attrib = Attribute semantics. See: `bgfx::Attrib`
 	 * _attrib = Attribute semantics. See: `bgfx::Attrib`
 	 */
 	 */
@@ -66,6 +68,8 @@ version(BindBgfx_Static)
 	
 	
 	/**
 	/**
 	 * Skip `_num` bytes in vertex stream.
 	 * Skip `_num` bytes in vertex stream.
+	 * Params:
+	 * _num = Number of bytes to skip.
 	 */
 	 */
 	bgfx_vertex_layout_t* bgfx_vertex_layout_skip(bgfx_vertex_layout_t* _this, byte _num);
 	bgfx_vertex_layout_t* bgfx_vertex_layout_skip(bgfx_vertex_layout_t* _this, byte _num);
 	
 	
@@ -2004,7 +2008,7 @@ version(BindBgfx_Static)
 	 * _id = View id.
 	 * _id = View id.
 	 * _program = Program.
 	 * _program = Program.
 	 * _depth = Depth for sorting.
 	 * _depth = Depth for sorting.
-	 * _flags = Which states to discard for next draw. See BGFX_DISCARD_
+	 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
 	 */
 	 */
 	void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
 	void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
 	
 	
@@ -2015,7 +2019,7 @@ version(BindBgfx_Static)
 	 * _program = Program.
 	 * _program = Program.
 	 * _occlusionQuery = Occlusion query.
 	 * _occlusionQuery = Occlusion query.
 	 * _depth = Depth for sorting.
 	 * _depth = Depth for sorting.
-	 * _flags = Which states to discard for next draw. See BGFX_DISCARD_
+	 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
 	 */
 	 */
 	void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
 	void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
 	
 	
@@ -2029,7 +2033,7 @@ version(BindBgfx_Static)
 	 * _start = First element in indirect buffer.
 	 * _start = First element in indirect buffer.
 	 * _num = Number of dispatches.
 	 * _num = Number of dispatches.
 	 * _depth = Depth for sorting.
 	 * _depth = Depth for sorting.
-	 * _flags = Which states to discard for next draw. See BGFX_DISCARD_
+	 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
 	 */
 	 */
 	void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
 	void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
 	
 	
@@ -2167,6 +2171,8 @@ else
 		
 		
 		/**
 		/**
 		 * Start VertexLayout.
 		 * Start VertexLayout.
+		 * Params:
+		 * _rendererType = Renderer backend type. See: `bgfx::RendererType`
 		 */
 		 */
 		alias da_bgfx_vertex_layout_begin = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
 		alias da_bgfx_vertex_layout_begin = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
 		da_bgfx_vertex_layout_begin bgfx_vertex_layout_begin;
 		da_bgfx_vertex_layout_begin bgfx_vertex_layout_begin;
@@ -2202,7 +2208,7 @@ else
 		da_bgfx_vertex_layout_decode bgfx_vertex_layout_decode;
 		da_bgfx_vertex_layout_decode bgfx_vertex_layout_decode;
 		
 		
 		/**
 		/**
-		 * Returns true if VertexLayout contains attribute.
+		 * Returns `true` if VertexLayout contains attribute.
 		 * Params:
 		 * Params:
 		 * _attrib = Attribute semantics. See: `bgfx::Attrib`
 		 * _attrib = Attribute semantics. See: `bgfx::Attrib`
 		 */
 		 */
@@ -2211,6 +2217,8 @@ else
 		
 		
 		/**
 		/**
 		 * Skip `_num` bytes in vertex stream.
 		 * Skip `_num` bytes in vertex stream.
+		 * Params:
+		 * _num = Number of bytes to skip.
 		 */
 		 */
 		alias da_bgfx_vertex_layout_skip = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, byte _num);
 		alias da_bgfx_vertex_layout_skip = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, byte _num);
 		da_bgfx_vertex_layout_skip bgfx_vertex_layout_skip;
 		da_bgfx_vertex_layout_skip bgfx_vertex_layout_skip;
@@ -4323,7 +4331,7 @@ else
 		 * _id = View id.
 		 * _id = View id.
 		 * _program = Program.
 		 * _program = Program.
 		 * _depth = Depth for sorting.
 		 * _depth = Depth for sorting.
-		 * _flags = Which states to discard for next draw. See BGFX_DISCARD_
+		 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
 		 */
 		 */
 		alias da_bgfx_submit = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
 		alias da_bgfx_submit = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
 		da_bgfx_submit bgfx_submit;
 		da_bgfx_submit bgfx_submit;
@@ -4335,7 +4343,7 @@ else
 		 * _program = Program.
 		 * _program = Program.
 		 * _occlusionQuery = Occlusion query.
 		 * _occlusionQuery = Occlusion query.
 		 * _depth = Depth for sorting.
 		 * _depth = Depth for sorting.
-		 * _flags = Which states to discard for next draw. See BGFX_DISCARD_
+		 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
 		 */
 		 */
 		alias da_bgfx_submit_occlusion_query = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
 		alias da_bgfx_submit_occlusion_query = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
 		da_bgfx_submit_occlusion_query bgfx_submit_occlusion_query;
 		da_bgfx_submit_occlusion_query bgfx_submit_occlusion_query;
@@ -4350,7 +4358,7 @@ else
 		 * _start = First element in indirect buffer.
 		 * _start = First element in indirect buffer.
 		 * _num = Number of dispatches.
 		 * _num = Number of dispatches.
 		 * _depth = Depth for sorting.
 		 * _depth = Depth for sorting.
-		 * _flags = Which states to discard for next draw. See BGFX_DISCARD_
+		 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
 		 */
 		 */
 		alias da_bgfx_submit_indirect = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
 		alias da_bgfx_submit_indirect = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
 		da_bgfx_submit_indirect bgfx_submit_indirect;
 		da_bgfx_submit_indirect bgfx_submit_indirect;

+ 1 - 1
bindings/d/types.d

@@ -736,7 +736,7 @@ struct bgfx_caps_t
 
 
 	/**
 	/**
 	 * Supported functionality.
 	 * Supported functionality.
-	 *   @attention See BGFX_CAPS_* flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps
+	 *   @attention See `BGFX_CAPS_*` flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps
 	 */
 	 */
 	ulong supported;
 	ulong supported;
 	ushort vendorId; /// Selected GPU vendor PCI id.
 	ushort vendorId; /// Selected GPU vendor PCI id.

+ 32 - 10
include/bgfx/bgfx.h

@@ -687,7 +687,7 @@ namespace bgfx
 			uint32_t transientIbSize;   //!< Maximum transient index buffer size.
 			uint32_t transientIbSize;   //!< Maximum transient index buffer size.
 		};
 		};
 
 
-		Limits limits; // Configurable runtime limits.
+		Limits limits; //!< Configurable runtime limits.
 
 
 		/// Provide application specific callback interface.
 		/// Provide application specific callback interface.
 		/// See: `bgfx::CallbackI`
 		/// See: `bgfx::CallbackI`
@@ -733,7 +733,7 @@ namespace bgfx
 
 
 		/// Supported functionality.
 		/// Supported functionality.
 		///
 		///
-		/// @attention See BGFX_CAPS_* flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps
+		/// @attention See `BGFX_CAPS_*` flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps
 		///
 		///
 		uint64_t supported;
 		uint64_t supported;
 
 
@@ -926,7 +926,7 @@ namespace bgfx
 		uint16_t num; //!< Number of matrices.
 		uint16_t num; //!< Number of matrices.
 	};
 	};
 
 
-	///
+	/// View id.
 	typedef uint16_t ViewId;
 	typedef uint16_t ViewId;
 
 
 	/// View stats.
 	/// View stats.
@@ -1707,6 +1707,9 @@ namespace bgfx
 
 
 		/// Start VertexLayout.
 		/// Start VertexLayout.
 		///
 		///
+		/// @param[in] _renderer Renderer backend type. See: `bgfx::RendererType`
+		/// @returns Returns itself.
+		///
 		/// @attention C99 equivalent is `bgfx_vertex_layout_begin`.
 		/// @attention C99 equivalent is `bgfx_vertex_layout_begin`.
 		///
 		///
 		VertexLayout& begin(RendererType::Enum _renderer = RendererType::Noop);
 		VertexLayout& begin(RendererType::Enum _renderer = RendererType::Noop);
@@ -1729,6 +1732,7 @@ namespace bgfx
 		/// @param[in] _asInt Packaging rule for vertexPack, vertexUnpack, and
 		/// @param[in] _asInt Packaging rule for vertexPack, vertexUnpack, and
 		///   vertexConvert for AttribType::Uint8 and AttribType::Int16.
 		///   vertexConvert for AttribType::Uint8 and AttribType::Int16.
 		///   Unpacking code must be implemented inside vertex shader.
 		///   Unpacking code must be implemented inside vertex shader.
+		/// @returns Returns itself.
 		///
 		///
 		/// @remarks
 		/// @remarks
 		///   Must be called between begin/end.
 		///   Must be called between begin/end.
@@ -1745,6 +1749,8 @@ namespace bgfx
 
 
 		/// Skip _num bytes in vertex stream.
 		/// Skip _num bytes in vertex stream.
 		///
 		///
+		/// @returns Returns itself.
+		///
 		/// @attention C99 equivalent is `bgfx_vertex_layout_skip`.
 		/// @attention C99 equivalent is `bgfx_vertex_layout_skip`.
 		///
 		///
 		VertexLayout& skip(uint8_t _num);
 		VertexLayout& skip(uint8_t _num);
@@ -1761,25 +1767,39 @@ namespace bgfx
 			, bool& _asInt
 			, bool& _asInt
 			) const;
 			) const;
 
 
-		/// Returns true if VertexLayout contains attribute.
+		/// Returns `true` if VertexLayout contains attribute.
+		///
+		/// @param[in] _attrib Attribute semantics. See: `bgfx::Attrib`
+		/// @returns True if VertexLayout contains attribute.
 		///
 		///
 		/// @attention C99 equivalent is `bgfx_vertex_layout_has`.
 		/// @attention C99 equivalent is `bgfx_vertex_layout_has`.
 		///
 		///
 		bool has(Attrib::Enum _attrib) const { return UINT16_MAX != m_attributes[_attrib]; }
 		bool has(Attrib::Enum _attrib) const { return UINT16_MAX != m_attributes[_attrib]; }
 
 
 		/// Returns relative attribute offset from the vertex.
 		/// Returns relative attribute offset from the vertex.
+		///
+		/// @param[in] _attrib Attribute semantics. See: `bgfx::Attrib`
+		/// @returns Relative attribute offset from the vertex.
+		///
 		uint16_t getOffset(Attrib::Enum _attrib) const { return m_offset[_attrib]; }
 		uint16_t getOffset(Attrib::Enum _attrib) const { return m_offset[_attrib]; }
 
 
 		/// Returns vertex stride.
 		/// Returns vertex stride.
+		///
+		/// @returns Vertex stride.
+		///
 		uint16_t getStride() const { return m_stride; }
 		uint16_t getStride() const { return m_stride; }
 
 
 		/// Returns size of vertex buffer for number of vertices.
 		/// Returns size of vertex buffer for number of vertices.
+		///
+		/// @param[in] _num Number of vertices.
+		/// @returns Size of vertex buffer for number of vertices.
+		///
 		uint32_t getSize(uint32_t _num) const { return _num*m_stride; }
 		uint32_t getSize(uint32_t _num) const { return _num*m_stride; }
 
 
-		uint32_t m_hash;
-		uint16_t m_stride;
-		uint16_t m_offset[Attrib::Count];
-		uint16_t m_attributes[Attrib::Count];
+		uint32_t m_hash;                      //!< Hash.
+		uint16_t m_stride;                    //!< Stride.
+		uint16_t m_offset[Attrib::Count];     //!< Attribute offsets.
+		uint16_t m_attributes[Attrib::Count]; //!< Used attributes.
 	};
 	};
 
 
 	/// Pack vertex attribute into vertex stream format.
 	/// Pack vertex attribute into vertex stream format.
@@ -2484,11 +2504,11 @@ namespace bgfx
 	///   for the duration of frame, and it can be reused for multiple draw
 	///   for the duration of frame, and it can be reused for multiple draw
 	///   calls.
 	///   calls.
 	/// @param[in] _layout Vertex layout.
 	/// @param[in] _layout Vertex layout.
-	/// @param[in] _num Number of vertices to allocate.
+	/// @param[in] _numVertices Number of vertices to allocate.
 	/// @param[out] _tib TransientIndexBuffer structure is filled and is valid
 	/// @param[out] _tib TransientIndexBuffer structure is filled and is valid
 	///   for the duration of frame, and it can be reused for multiple draw
 	///   for the duration of frame, and it can be reused for multiple draw
 	///   calls.
 	///   calls.
-	/// @param[in] _num Number of indices to allocate.
+	/// @param[in] _numIndices Number of indices to allocate.
 	/// @param[in] _index32 Set to `true` if input indices will be 32-bit.
 	/// @param[in] _index32 Set to `true` if input indices will be 32-bit.
 	///
 	///
 	/// @attention C99 equivalent is `bgfx_alloc_transient_buffers`.
 	/// @attention C99 equivalent is `bgfx_alloc_transient_buffers`.
@@ -2537,6 +2557,8 @@ namespace bgfx
 
 
 	/// Create shader from memory buffer.
 	/// Create shader from memory buffer.
 	///
 	///
+	/// @returns Shader handle.
+	///
 	/// @attention C99 equivalent is `bgfx_create_shader`.
 	/// @attention C99 equivalent is `bgfx_create_shader`.
 	///
 	///
 	ShaderHandle createShader(const Memory* _mem);
 	ShaderHandle createShader(const Memory* _mem);

+ 15 - 7
include/bgfx/c99/bgfx.h

@@ -530,7 +530,7 @@ typedef struct bgfx_caps_s
     
     
     /**
     /**
      * Supported functionality.
      * Supported functionality.
-     *   @attention See BGFX_CAPS_* flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps
+     *   @attention See `BGFX_CAPS_*` flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps
      */
      */
     uint64_t             supported;
     uint64_t             supported;
     uint16_t             vendorId;           /** Selected GPU vendor PCI id.              */
     uint16_t             vendorId;           /** Selected GPU vendor PCI id.              */
@@ -917,7 +917,9 @@ BGFX_C_API void bgfx_attachment_init(bgfx_attachment_t* _this, bgfx_texture_hand
 /**
 /**
  * Start VertexLayout.
  * Start VertexLayout.
  *
  *
- * @param[in] _rendererType
+ * @param[in] _rendererType Renderer backend type. See: `bgfx::RendererType`
+ *
+ * @returns Returns itself.
  *
  *
  */
  */
 BGFX_C_API bgfx_vertex_layout_t* bgfx_vertex_layout_begin(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
 BGFX_C_API bgfx_vertex_layout_t* bgfx_vertex_layout_begin(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
@@ -937,6 +939,8 @@ BGFX_C_API bgfx_vertex_layout_t* bgfx_vertex_layout_begin(bgfx_vertex_layout_t*
  *  vertexConvert for AttribType::Uint8 and AttribType::Int16.
  *  vertexConvert for AttribType::Uint8 and AttribType::Int16.
  *  Unpacking code must be implemented inside vertex shader.
  *  Unpacking code must be implemented inside vertex shader.
  *
  *
+ * @returns Returns itself.
+ *
  */
  */
 BGFX_C_API bgfx_vertex_layout_t* bgfx_vertex_layout_add(bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib, uint8_t _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
 BGFX_C_API bgfx_vertex_layout_t* bgfx_vertex_layout_add(bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib, uint8_t _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
 
 
@@ -953,17 +957,21 @@ BGFX_C_API bgfx_vertex_layout_t* bgfx_vertex_layout_add(bgfx_vertex_layout_t* _t
 BGFX_C_API void bgfx_vertex_layout_decode(const bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib, uint8_t * _num, bgfx_attrib_type_t * _type, bool * _normalized, bool * _asInt);
 BGFX_C_API void bgfx_vertex_layout_decode(const bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib, uint8_t * _num, bgfx_attrib_type_t * _type, bool * _normalized, bool * _asInt);
 
 
 /**
 /**
- * Returns true if VertexLayout contains attribute.
+ * Returns `true` if VertexLayout contains attribute.
  *
  *
  * @param[in] _attrib Attribute semantics. See: `bgfx::Attrib`
  * @param[in] _attrib Attribute semantics. See: `bgfx::Attrib`
  *
  *
+ * @returns True if VertexLayout contains attribute.
+ *
  */
  */
 BGFX_C_API bool bgfx_vertex_layout_has(const bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib);
 BGFX_C_API bool bgfx_vertex_layout_has(const bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib);
 
 
 /**
 /**
  * Skip `_num` bytes in vertex stream.
  * Skip `_num` bytes in vertex stream.
  *
  *
- * @param[in] _num
+ * @param[in] _num Number of bytes to skip.
+ *
+ * @returns Returns itself.
  *
  *
  */
  */
 BGFX_C_API bgfx_vertex_layout_t* bgfx_vertex_layout_skip(bgfx_vertex_layout_t* _this, uint8_t _num);
 BGFX_C_API bgfx_vertex_layout_t* bgfx_vertex_layout_skip(bgfx_vertex_layout_t* _this, uint8_t _num);
@@ -3188,7 +3196,7 @@ BGFX_C_API void bgfx_touch(bgfx_view_id_t _id);
  * @param[in] _id View id.
  * @param[in] _id View id.
  * @param[in] _program Program.
  * @param[in] _program Program.
  * @param[in] _depth Depth for sorting.
  * @param[in] _depth Depth for sorting.
- * @param[in] _flags Which states to discard for next draw. See BGFX_DISCARD_
+ * @param[in] _flags Which states to discard for next draw. See `BGFX_DISCARD_*`.
  *
  *
  */
  */
 BGFX_C_API void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint32_t _depth, uint8_t _flags);
 BGFX_C_API void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint32_t _depth, uint8_t _flags);
@@ -3200,7 +3208,7 @@ BGFX_C_API void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _program,
  * @param[in] _program Program.
  * @param[in] _program Program.
  * @param[in] _occlusionQuery Occlusion query.
  * @param[in] _occlusionQuery Occlusion query.
  * @param[in] _depth Depth for sorting.
  * @param[in] _depth Depth for sorting.
- * @param[in] _flags Which states to discard for next draw. See BGFX_DISCARD_
+ * @param[in] _flags Which states to discard for next draw. See `BGFX_DISCARD_*`.
  *
  *
  */
  */
 BGFX_C_API void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint32_t _depth, uint8_t _flags);
 BGFX_C_API void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint32_t _depth, uint8_t _flags);
@@ -3215,7 +3223,7 @@ BGFX_C_API void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_han
  * @param[in] _start First element in indirect buffer.
  * @param[in] _start First element in indirect buffer.
  * @param[in] _num Number of dispatches.
  * @param[in] _num Number of dispatches.
  * @param[in] _depth Depth for sorting.
  * @param[in] _depth Depth for sorting.
- * @param[in] _flags Which states to discard for next draw. See BGFX_DISCARD_
+ * @param[in] _flags Which states to discard for next draw. See `BGFX_DISCARD_*`.
  *
  *
  */
  */
 BGFX_C_API void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint32_t _depth, uint8_t _flags);
 BGFX_C_API void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint32_t _depth, uint8_t _flags);

+ 12 - 1
include/bgfx/embedded_shader.h

@@ -143,7 +143,18 @@ namespace bgfx
 		Data data[RendererType::Count];
 		Data data[RendererType::Count];
 	};
 	};
 
 
-	ShaderHandle createEmbeddedShader(const bgfx::EmbeddedShader* _es, RendererType::Enum _type, const char* _name);
+	/// Create shader from embedded shader data.
+	///
+	/// @param[in] _es Pointer to `BGFX_EMBEDDED_SHADER` data.
+	/// @param[in] _type Renderer backend type. See: `bgfx::RendererType`
+	/// @param[in] _name Shader name.
+	/// @returns Shader handle.
+	///
+	ShaderHandle createEmbeddedShader(
+		  const bgfx::EmbeddedShader* _es
+		, RendererType::Enum _type
+		, const char* _name
+		);
 
 
 } // namespace bgfx
 } // namespace bgfx
 
 

+ 15 - 15
scripts/bgfx.idl

@@ -709,7 +709,7 @@ struct.Limits  { namespace = "Caps" }
 struct.Caps
 struct.Caps
 	.rendererType "RendererType::Enum" --- Renderer backend type. See: `bgfx::RendererType`
 	.rendererType "RendererType::Enum" --- Renderer backend type. See: `bgfx::RendererType`
 	.supported    "uint64_t"           --- Supported functionality.
 	.supported    "uint64_t"           --- Supported functionality.
-	                                   ---   @attention See BGFX_CAPS_* flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps
+	                                   ---   @attention See `BGFX_CAPS_*` flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps
 	.vendorId     "uint16_t"           --- Selected GPU vendor PCI id.
 	.vendorId     "uint16_t"           --- Selected GPU vendor PCI id.
 	.deviceId     "uint16_t"           --- Selected GPU device id.
 	.deviceId     "uint16_t"           --- Selected GPU device id.
 	.homogeneousDepth "bool"           --- True when NDC depth is in [-1, 1] range, otherwise its [0, 1].
 	.homogeneousDepth "bool"           --- True when NDC depth is in [-1, 1] range, otherwise its [0, 1].
@@ -978,8 +978,8 @@ handle "VertexLayoutHandle"
 
 
 --- Start VertexLayout.
 --- Start VertexLayout.
 func.VertexLayout.begin
 func.VertexLayout.begin
-	"VertexLayout&"
-	.rendererType    "RendererType::Enum"
+	"VertexLayout&"                       --- Returns itself.
+	.rendererType    "RendererType::Enum" --- Renderer backend type. See: `bgfx::RendererType`
 	{ default = "RendererType::Noop" }
 	{ default = "RendererType::Noop" }
 
 
 --- Add attribute to VertexLayout.
 --- Add attribute to VertexLayout.
@@ -987,7 +987,7 @@ func.VertexLayout.begin
 --- @remarks Must be called between begin/end.
 --- @remarks Must be called between begin/end.
 ---
 ---
 func.VertexLayout.add
 func.VertexLayout.add
-	"VertexLayout&"
+	"VertexLayout&"                     --- Returns itself.
 	.attrib          "Attrib::Enum"     --- Attribute semantics. See: `bgfx::Attrib`
 	.attrib          "Attrib::Enum"     --- Attribute semantics. See: `bgfx::Attrib`
 	.num             "uint8_t"          --- Number of elements 1, 2, 3 or 4.
 	.num             "uint8_t"          --- Number of elements 1, 2, 3 or 4.
 	.type            "AttribType::Enum" --- Element type.
 	.type            "AttribType::Enum" --- Element type.
@@ -1008,15 +1008,15 @@ func.VertexLayout.decode { const }
 	.normalized "bool &"             { out } --- Attribute is normalized.
 	.normalized "bool &"             { out } --- Attribute is normalized.
 	.asInt      "bool &"             { out } --- Attribute is packed as int.
 	.asInt      "bool &"             { out } --- Attribute is packed as int.
 
 
---- Returns true if VertexLayout contains attribute.
+--- Returns `true` if VertexLayout contains attribute.
 func.VertexLayout.has { const }
 func.VertexLayout.has { const }
-	"bool"
+	"bool"                 --- True if VertexLayout contains attribute.
 	.attrib "Attrib::Enum" --- Attribute semantics. See: `bgfx::Attrib`
 	.attrib "Attrib::Enum" --- Attribute semantics. See: `bgfx::Attrib`
 
 
 --- Skip `_num` bytes in vertex stream.
 --- Skip `_num` bytes in vertex stream.
 func.VertexLayout.skip
 func.VertexLayout.skip
-	"VertexLayout&"
-	.num "uint8_t"
+	"VertexLayout&" --- Returns itself.
+	.num "uint8_t"  --- Number of bytes to skip.
 
 
 -- Notice: `end` is a keyword in lua.
 -- Notice: `end` is a keyword in lua.
 --- End VertexLayout.
 --- End VertexLayout.
@@ -1025,17 +1025,17 @@ func.VertexLayout["end"]
 
 
 --- Returns relative attribute offset from the vertex.
 --- Returns relative attribute offset from the vertex.
 func.VertexLayout.getOffset { const , cpponly }
 func.VertexLayout.getOffset { const , cpponly }
-	"uint16_t"
+	"uint16_t"                --- Relative attribute offset from the vertex.
 	.attrib    "Attrib::Enum" --- Attribute semantics. See: `bgfx::Attrib`
 	.attrib    "Attrib::Enum" --- Attribute semantics. See: `bgfx::Attrib`
 
 
 --- Returns vertex stride.
 --- Returns vertex stride.
 func.VertexLayout.getStride { const , cpponly }
 func.VertexLayout.getStride { const , cpponly }
-	"uint16_t"
+	"uint16_t" --- Vertex stride.
 
 
 --- Returns size of vertex buffer for number of vertices.
 --- Returns size of vertex buffer for number of vertices.
 func.VertexLayout.getSize { const, cpponly }
 func.VertexLayout.getSize { const, cpponly }
-	"uint32_t"
-	.num       "uint32_t"
+	"uint32_t"      --- Size of vertex buffer for number of vertices.
+	.num "uint32_t" --- Number of vertices.
 
 
 --- Pack vertex attribute into vertex stream format.
 --- Pack vertex attribute into vertex stream format.
 func.vertexPack
 func.vertexPack
@@ -2963,7 +2963,7 @@ func.submit
 	.program       "ProgramHandle" --- Program.
 	.program       "ProgramHandle" --- Program.
 	.depth         "uint32_t"      --- Depth for sorting.
 	.depth         "uint32_t"      --- Depth for sorting.
 	{ default = 0 }
 	{ default = 0 }
-	.flags         "uint8_t"       --- Which states to discard for next draw. See BGFX_DISCARD_
+	.flags         "uint8_t"       --- Which states to discard for next draw. See `BGFX_DISCARD_*`.
 	{ default = "BGFX_DISCARD_ALL" }
 	{ default = "BGFX_DISCARD_ALL" }
 
 
 --- Submit primitive with occlusion query for rendering.
 --- Submit primitive with occlusion query for rendering.
@@ -2974,7 +2974,7 @@ func.submit { cname = "submit_occlusion_query" }
 	.occlusionQuery "OcclusionQueryHandle" --- Occlusion query.
 	.occlusionQuery "OcclusionQueryHandle" --- Occlusion query.
 	.depth          "uint32_t"             --- Depth for sorting.
 	.depth          "uint32_t"             --- Depth for sorting.
 	{ default = 0 }
 	{ default = 0 }
-	.flags          "uint8_t"              --- Which states to discard for next draw. See BGFX_DISCARD_
+	.flags          "uint8_t"              --- Which states to discard for next draw. See `BGFX_DISCARD_*`.
 	{ default = "BGFX_DISCARD_ALL" }
 	{ default = "BGFX_DISCARD_ALL" }
 
 
 --- Submit primitive for rendering with index and instance data info from
 --- Submit primitive for rendering with index and instance data info from
@@ -2990,7 +2990,7 @@ func.submit { cname = "submit_indirect" }
 	{ default = 1 }
 	{ default = 1 }
 	.depth          "uint32_t"             --- Depth for sorting.
 	.depth          "uint32_t"             --- Depth for sorting.
 	{ default = 0 }
 	{ default = 0 }
-	.flags "uint8_t"                       --- Which states to discard for next draw. See BGFX_DISCARD_
+	.flags "uint8_t"                       --- Which states to discard for next draw. See `BGFX_DISCARD_*`.
 	{ default = "BGFX_DISCARD_ALL" }
 	{ default = "BGFX_DISCARD_ALL" }
 
 
 --- Set compute index buffer.
 --- Set compute index buffer.

+ 1 - 1
scripts/codegen.lua

@@ -449,7 +449,7 @@ local function codetemp(func)
 
 
 	if func.class then
 	if func.class then
 		-- It's a member function
 		-- It's a member function
-		cargs[1] = func.this  .. " _this"
+		cargs[1] = func.this .. " _this"
 		conversion[1] = func.this_conversion
 		conversion[1] = func.this_conversion
 		cppfunc = "This->" .. func.name
 		cppfunc = "This->" .. func.name
 		callargs[1] = "_this"
 		callargs[1] = "_this"