From 0af6d02fcdbc685cd32500ceb0c0d3a5806238fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Wed, 20 Mar 2019 16:47:41 -0700 Subject: [PATCH] Updated docs. --- include/bgfx/bgfx.h | 6 ++++++ include/bgfx/c99/bgfx.h | 3 +++ scripts/bgfx.idl | 9 +++++++++ 3 files changed, 18 insertions(+) diff --git a/include/bgfx/bgfx.h b/include/bgfx/bgfx.h index 815fda8c8..568129edf 100644 --- a/include/bgfx/bgfx.h +++ b/include/bgfx/bgfx.h @@ -2749,6 +2749,8 @@ namespace bgfx /// @param[in] _pitch Pitch of input image (bytes). When _pitch is set to /// UINT16_MAX, it will be calculated internally based on _width. /// + /// @attention It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info. + /// /// @attention C99 equivalent is `bgfx_update_texture_2d`. /// void updateTexture2D( @@ -2775,6 +2777,8 @@ namespace bgfx /// @param[in] _depth Depth of texture block. /// @param[in] _mem Texture update data. /// + /// @attention It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info. + /// /// @attention C99 equivalent is `bgfx_update_texture_3d`. /// void updateTexture3D( @@ -2822,6 +2826,8 @@ namespace bgfx /// @param[in] _pitch Pitch of input image (bytes). When _pitch is set to /// UINT16_MAX, it will be calculated internally based on _width. /// + /// @attention It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info. + /// /// @attention C99 equivalent is `bgfx_update_texture_cube`. /// void updateTextureCube( diff --git a/include/bgfx/c99/bgfx.h b/include/bgfx/c99/bgfx.h index ed4ea1eb1..1004d9094 100644 --- a/include/bgfx/c99/bgfx.h +++ b/include/bgfx/c99/bgfx.h @@ -1781,6 +1781,7 @@ BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_cube(uint16_t _size, bool _ /** * Update 2D texture. + * @attention It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info. * * @param[in] _handle Texture handle. * @param[in] _layer Layer in texture array. @@ -1798,6 +1799,7 @@ BGFX_C_API void bgfx_update_texture_2d(bgfx_texture_handle_t _handle, uint16_t _ /** * Update 3D texture. + * @attention It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info. * * @param[in] _handle Texture handle. * @param[in] _mip Mip level. @@ -1814,6 +1816,7 @@ BGFX_C_API void bgfx_update_texture_3d(bgfx_texture_handle_t _handle, uint8_t _m /** * Update Cube texture. + * @attention It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info. * * @param[in] _handle Texture handle. * @param[in] _layer Layer in texture array. diff --git a/scripts/bgfx.idl b/scripts/bgfx.idl index a640ce65a..1c82e0ddd 100644 --- a/scripts/bgfx.idl +++ b/scripts/bgfx.idl @@ -1254,6 +1254,9 @@ func.createTextureCube --- 1, expected memory layout is texture and all mips together for each array element. --- Update 2D texture. +--- +--- @attention It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info. +--- func.updateTexture2D "void" .handle "TextureHandle" --- Texture handle. @@ -1269,6 +1272,9 @@ func.updateTexture2D { default = UINT16_MAX } --- Update 3D texture. +--- +--- @attention It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info. +--- func.updateTexture3D "void" .handle "TextureHandle" --- Texture handle. @@ -1282,6 +1288,9 @@ func.updateTexture3D .mem "const Memory*" --- Texture update data. --- Update Cube texture. +--- +--- @attention It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info. +--- func.updateTextureCube "void" .handle "TextureHandle" --- Texture handle.