mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Updated docs.
This commit is contained in:
parent
23114a821c
commit
b9d2a05a28
1 changed files with 59 additions and 21 deletions
|
@ -645,8 +645,19 @@ namespace bgfx
|
|||
|
||||
/// Create static index buffer.
|
||||
///
|
||||
/// @remarks
|
||||
/// Only 16-bit index buffer is supported.
|
||||
/// @param _mem Index buffer data.
|
||||
/// @param _flags Buffer creation flags.
|
||||
/// - `BGFX_BUFFER_NONE` - No flags.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
|
||||
/// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
|
||||
/// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
|
||||
/// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of
|
||||
/// data is passed. If this flag is not specified if more data is passed on update buffer
|
||||
/// will be trimmed to fit existing buffer size. This flag has effect only on dynamic
|
||||
/// buffers.
|
||||
/// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
|
||||
/// index buffers.
|
||||
///
|
||||
IndexBufferHandle createIndexBuffer(const Memory* _mem, uint8_t _flags = BGFX_BUFFER_NONE);
|
||||
|
||||
|
@ -671,24 +682,35 @@ namespace bgfx
|
|||
///
|
||||
/// @param _num Number of indices.
|
||||
/// @param _flags Buffer creation flags.
|
||||
/// `BGFX_BUFFER_COMPUTE_READ` - compute shader will read buffer.
|
||||
/// `BGFX_BUFFER_COMPUTE_WRITE` - compute shader will write into buffer.
|
||||
/// `BGFX_BUFFER_ALLOW_RESIZE` buffer can be resized if updated with different size buffer.
|
||||
///
|
||||
/// @remarks
|
||||
/// 1. Only 16-bit index buffer is supported.
|
||||
///
|
||||
/// 2. When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated
|
||||
/// from CPU.
|
||||
/// - `BGFX_BUFFER_NONE` - No flags.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
|
||||
/// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
|
||||
/// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
|
||||
/// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of
|
||||
/// data is passed. If this flag is not specified if more data is passed on update buffer
|
||||
/// will be trimmed to fit existing buffer size. This flag has effect only on dynamic
|
||||
/// buffers.
|
||||
/// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
|
||||
/// index buffers.
|
||||
///
|
||||
DynamicIndexBufferHandle createDynamicIndexBuffer(uint32_t _num, uint8_t _flags = BGFX_BUFFER_NONE);
|
||||
|
||||
/// Create dynamic index buffer and initialized it.
|
||||
///
|
||||
/// @param _mem Index buffer data.
|
||||
///
|
||||
/// @remarks
|
||||
/// Only 16-bit index buffer is supported.
|
||||
/// @param _flags Buffer creation flags.
|
||||
/// - `BGFX_BUFFER_NONE` - No flags.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
|
||||
/// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
|
||||
/// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
|
||||
/// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of
|
||||
/// data is passed. If this flag is not specified if more data is passed on update buffer
|
||||
/// will be trimmed to fit existing buffer size. This flag has effect only on dynamic
|
||||
/// buffers.
|
||||
/// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
|
||||
/// index buffers.
|
||||
///
|
||||
DynamicIndexBufferHandle createDynamicIndexBuffer(const Memory* _mem, uint8_t _flags = BGFX_BUFFER_NONE);
|
||||
|
||||
|
@ -710,13 +732,17 @@ namespace bgfx
|
|||
/// @param _num Number of vertices.
|
||||
/// @param _decl Vertex declaration.
|
||||
/// @param _flags Buffer creation flags.
|
||||
/// `BGFX_BUFFER_COMPUTE_READ` - compute shader will read buffer.
|
||||
/// `BGFX_BUFFER_COMPUTE_WRITE` - compute shader will write into buffer.
|
||||
/// `BGFX_BUFFER_ALLOW_RESIZE` buffer can be resized if updated with different size buffer.
|
||||
///
|
||||
/// @remarks
|
||||
/// When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated
|
||||
/// from CPU.
|
||||
/// - `BGFX_BUFFER_NONE` - No flags.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
|
||||
/// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
|
||||
/// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
|
||||
/// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of
|
||||
/// data is passed. If this flag is not specified if more data is passed on update buffer
|
||||
/// will be trimmed to fit existing buffer size. This flag has effect only on dynamic
|
||||
/// buffers.
|
||||
/// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
|
||||
/// index buffers.
|
||||
///
|
||||
DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint8_t _flags = BGFX_BUFFER_NONE);
|
||||
|
||||
|
@ -724,6 +750,18 @@ namespace bgfx
|
|||
///
|
||||
/// @param _mem Vertex buffer data.
|
||||
/// @param _decl Vertex declaration.
|
||||
/// @param _flags Buffer creation flags.
|
||||
/// - `BGFX_BUFFER_NONE` - No flags.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
|
||||
/// - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
|
||||
/// is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
|
||||
/// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
|
||||
/// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of
|
||||
/// data is passed. If this flag is not specified if more data is passed on update buffer
|
||||
/// will be trimmed to fit existing buffer size. This flag has effect only on dynamic
|
||||
/// buffers.
|
||||
/// - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
|
||||
/// index buffers.
|
||||
///
|
||||
DynamicVertexBufferHandle createDynamicVertexBuffer(const Memory* _mem, const VertexDecl& _decl, uint8_t _flags = BGFX_BUFFER_NONE);
|
||||
|
||||
|
|
Loading…
Reference in a new issue