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
1179f3a79b
commit
eb9357e1d6
1 changed files with 98 additions and 3 deletions
|
@ -1394,14 +1394,33 @@ namespace bgfx
|
|||
///
|
||||
void updateTextureCube(TextureHandle _handle, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const Memory* _mem, uint16_t _pitch = UINT16_MAX);
|
||||
|
||||
/// Read back texture content.
|
||||
///
|
||||
/// @param[in] _handle Texture handle.
|
||||
/// @param[in] _data Destination buffer.
|
||||
///
|
||||
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
|
||||
/// @attention C99 equivalent is `bgfx_read_texture`.
|
||||
///
|
||||
void readTexture(TextureHandle _handle, void* _data);
|
||||
|
||||
/// Read back texture content.
|
||||
///
|
||||
/// @param[in] _handle Frame buffer handle.
|
||||
/// @param[in] _attachment Frame buffer attachment index.
|
||||
/// @param[in] _data Destination buffer.
|
||||
///
|
||||
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
|
||||
/// @attention C99 equivalent is `bgfx_read_texture`.
|
||||
///
|
||||
void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data);
|
||||
|
||||
/// Destroy texture.
|
||||
///
|
||||
/// @param[in] _handle Texture handle.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_destroy_texture`.
|
||||
///
|
||||
void destroyTexture(TextureHandle _handle);
|
||||
|
@ -1901,7 +1920,7 @@ namespace bgfx
|
|||
/// @param[in] _stage Texture unit.
|
||||
/// @param[in] _sampler Program sampler.
|
||||
/// @param[in] _handle Frame buffer handle.
|
||||
/// @param[in] _attachment Attachment index.
|
||||
/// @param[in] _attachment Frame buffer attachment index.
|
||||
/// @param[in] _flags Texture sampling mode. Default value UINT32_MAX uses
|
||||
/// texture sampling settings from the texture.
|
||||
/// - `BGFX_TEXTURE_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
|
||||
|
@ -2009,7 +2028,7 @@ namespace bgfx
|
|||
/// @param[in] _stage Texture unit.
|
||||
/// @param[in] _sampler Program sampler.
|
||||
/// @param[in] _handle Frame buffer handle.
|
||||
/// @param[in] _attachment Attachment index.
|
||||
/// @param[in] _attachment Frame buffer attachment index.
|
||||
/// @param[in] _access Texture access. See `Access::Enum`.
|
||||
/// @param[in] _format Texture format. See: `TextureFormat::Enum`.
|
||||
///
|
||||
|
@ -2055,21 +2074,97 @@ namespace bgfx
|
|||
///
|
||||
void discard();
|
||||
|
||||
/// Blit texture region between two textures.
|
||||
/// Blit texture 2D region between two 2D textures.
|
||||
///
|
||||
/// @param[in] _id View id.
|
||||
/// @param[in] _dst Destination texture handle.
|
||||
/// @param[in] _dstX Destination texture X position.
|
||||
/// @param[in] _dstY Destination texture Y position.
|
||||
/// @param[in] _src Source texture handle.
|
||||
/// @param[in] _srcX Source texture X position.
|
||||
/// @param[in] _srcY Source texture Y position.
|
||||
/// @param[in] _width Width of region.
|
||||
/// @param[in] _height Height of region.
|
||||
///
|
||||
/// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag.
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
|
||||
/// @attention C99 equivalent is `bgfx_blit`.
|
||||
///
|
||||
void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX);
|
||||
|
||||
/// Blit texture 2D region between 2D frame buffer and 2D texture.
|
||||
///
|
||||
/// @param[in] _id View id.
|
||||
/// @param[in] _dst Destination texture handle.
|
||||
/// @param[in] _dstX Destination texture X position.
|
||||
/// @param[in] _dstY Destination texture Y position.
|
||||
/// @param[in] _src Source frame buffer handle.
|
||||
/// @param[in] _attachment Source frame buffer attachment index.
|
||||
/// @param[in] _srcX Source texture X position.
|
||||
/// @param[in] _srcY Source texture Y position.
|
||||
/// @param[in] _width Width of region.
|
||||
/// @param[in] _height Height of region.
|
||||
///
|
||||
/// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag.
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
|
||||
/// @attention C99 equivalent is `bgfx_blit`.
|
||||
///
|
||||
void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, FrameBufferHandle _src, uint8_t _attachment = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX);
|
||||
|
||||
/// Blit texture region between two textures.
|
||||
///
|
||||
/// @param[in] _id View id.
|
||||
/// @param[in] _dst Destination texture handle.
|
||||
/// @param[in] _dstMip Destination texture mip level.
|
||||
/// @param[in] _dstX Destination texture X position.
|
||||
/// @param[in] _dstY Destination texture Y position.
|
||||
/// @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube
|
||||
/// this argument represent destination texture cube face. For 3D texture this argument
|
||||
/// represent destination texture Z position.
|
||||
/// @param[in] _src Source texture handle.
|
||||
/// @param[in] _srcMip Source texture mip level.
|
||||
/// @param[in] _srcX Source texture X position.
|
||||
/// @param[in] _srcY Source texture Y position.
|
||||
/// @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube
|
||||
/// this argument represent source texture cube face. For 3D texture this argument
|
||||
/// represent source texture Z position.
|
||||
/// @param[in] _width Width of region.
|
||||
/// @param[in] _height Height of region.
|
||||
/// @param[in] _depth If texture is 3D this argument represent depth of region, otherwise is
|
||||
/// unused.
|
||||
///
|
||||
/// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag.
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
|
||||
/// @attention C99 equivalent is `bgfx_blit`.
|
||||
///
|
||||
void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX);
|
||||
|
||||
/// Blit texture region between frame buffer and texture.
|
||||
///
|
||||
/// @param[in] _id View id.
|
||||
/// @param[in] _dst Destination texture handle.
|
||||
/// @param[in] _dstMip Destination texture mip level.
|
||||
/// @param[in] _dstX Destination texture X position.
|
||||
/// @param[in] _dstY Destination texture Y position.
|
||||
/// @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube
|
||||
/// this argument represent destination texture cube face. For 3D texture this argument
|
||||
/// represent destination texture Z position.
|
||||
/// @param[in] _src Source frame buffer handle.
|
||||
/// @param[in] _attachment Source frame buffer attachment index.
|
||||
/// @param[in] _srcMip Source texture mip level.
|
||||
/// @param[in] _srcX Source texture X position.
|
||||
/// @param[in] _srcY Source texture Y position.
|
||||
/// @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube
|
||||
/// this argument represent source texture cube face. For 3D texture this argument
|
||||
/// represent source texture Z position.
|
||||
/// @param[in] _width Width of region.
|
||||
/// @param[in] _height Height of region.
|
||||
/// @param[in] _depth If texture is 3D this argument represent depth of region, otherwise is
|
||||
/// unused.
|
||||
///
|
||||
/// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag.
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
|
||||
/// @attention C99 equivalent is `bgfx_blit`.
|
||||
///
|
||||
void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, FrameBufferHandle _src, uint8_t _attachment = 0, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX);
|
||||
|
||||
|
|
Loading…
Reference in a new issue