Updated docs.

This commit is contained in:
Branimir Karadžić 2015-04-08 21:15:37 -07:00
parent 23114a821c
commit b9d2a05a28

View file

@ -645,8 +645,19 @@ namespace bgfx
/// Create static index buffer. /// Create static index buffer.
/// ///
/// @remarks /// @param _mem Index buffer data.
/// 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.
/// ///
IndexBufferHandle createIndexBuffer(const Memory* _mem, uint8_t _flags = BGFX_BUFFER_NONE); IndexBufferHandle createIndexBuffer(const Memory* _mem, uint8_t _flags = BGFX_BUFFER_NONE);
@ -671,24 +682,35 @@ namespace bgfx
/// ///
/// @param _num Number of indices. /// @param _num Number of indices.
/// @param _flags Buffer creation flags. /// @param _flags Buffer creation flags.
/// `BGFX_BUFFER_COMPUTE_READ` - compute shader will read buffer. /// - `BGFX_BUFFER_NONE` - No flags.
/// `BGFX_BUFFER_COMPUTE_WRITE` - compute shader will write into buffer. /// - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
/// `BGFX_BUFFER_ALLOW_RESIZE` buffer can be resized if updated with different size buffer. /// - `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.
/// @remarks /// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
/// 1. Only 16-bit index buffer is supported. /// - `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
/// 2. When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated /// will be trimmed to fit existing buffer size. This flag has effect only on dynamic
/// from CPU. /// 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); DynamicIndexBufferHandle createDynamicIndexBuffer(uint32_t _num, uint8_t _flags = BGFX_BUFFER_NONE);
/// Create dynamic index buffer and initialized it. /// Create dynamic index buffer and initialized it.
/// ///
/// @param _mem Index buffer data. /// @param _mem Index buffer data.
/// /// @param _flags Buffer creation flags.
/// @remarks /// - `BGFX_BUFFER_NONE` - No flags.
/// Only 16-bit index buffer is supported. /// - `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); DynamicIndexBufferHandle createDynamicIndexBuffer(const Memory* _mem, uint8_t _flags = BGFX_BUFFER_NONE);
@ -710,13 +732,17 @@ namespace bgfx
/// @param _num Number of vertices. /// @param _num Number of vertices.
/// @param _decl Vertex declaration. /// @param _decl Vertex declaration.
/// @param _flags Buffer creation flags. /// @param _flags Buffer creation flags.
/// `BGFX_BUFFER_COMPUTE_READ` - compute shader will read buffer. /// - `BGFX_BUFFER_NONE` - No flags.
/// `BGFX_BUFFER_COMPUTE_WRITE` - compute shader will write into buffer. /// - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
/// `BGFX_BUFFER_ALLOW_RESIZE` buffer can be resized if updated with different size buffer. /// - `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.
/// @remarks /// - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
/// When buffer is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated /// - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if different amount of
/// from CPU. /// 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); 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 _mem Vertex buffer data.
/// @param _decl Vertex declaration. /// @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); DynamicVertexBufferHandle createDynamicVertexBuffer(const Memory* _mem, const VertexDecl& _decl, uint8_t _flags = BGFX_BUFFER_NONE);