Parcourir la source

Updated docs.

Бранимир Караџић il y a 6 ans
Parent
commit
0af6d02fcd
3 fichiers modifiés avec 18 ajouts et 0 suppressions
  1. 6 0
      include/bgfx/bgfx.h
  2. 3 0
      include/bgfx/c99/bgfx.h
  3. 9 0
      scripts/bgfx.idl

+ 6 - 0
include/bgfx/bgfx.h

@@ -2749,6 +2749,8 @@ namespace bgfx
 	/// @param[in] _pitch Pitch of input image (bytes). When _pitch is set to
 	/// @param[in] _pitch Pitch of input image (bytes). When _pitch is set to
 	///   UINT16_MAX, it will be calculated internally based on _width.
 	///   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`.
 	/// @attention C99 equivalent is `bgfx_update_texture_2d`.
 	///
 	///
 	void updateTexture2D(
 	void updateTexture2D(
@@ -2775,6 +2777,8 @@ namespace bgfx
 	/// @param[in] _depth Depth of texture block.
 	/// @param[in] _depth Depth of texture block.
 	/// @param[in] _mem Texture update data.
 	/// @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`.
 	/// @attention C99 equivalent is `bgfx_update_texture_3d`.
 	///
 	///
 	void updateTexture3D(
 	void updateTexture3D(
@@ -2822,6 +2826,8 @@ namespace bgfx
 	/// @param[in] _pitch Pitch of input image (bytes). When _pitch is set to
 	/// @param[in] _pitch Pitch of input image (bytes). When _pitch is set to
 	///   UINT16_MAX, it will be calculated internally based on _width.
 	///   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`.
 	/// @attention C99 equivalent is `bgfx_update_texture_cube`.
 	///
 	///
 	void updateTextureCube(
 	void updateTextureCube(

+ 3 - 0
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.
  * 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] _handle Texture handle.
  * @param[in] _layer Layer in texture array.
  * @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.
  * 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] _handle Texture handle.
  * @param[in] _mip Mip level.
  * @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.
  * 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] _handle Texture handle.
  * @param[in] _layer Layer in texture array.
  * @param[in] _layer Layer in texture array.

+ 9 - 0
scripts/bgfx.idl

@@ -1254,6 +1254,9 @@ func.createTextureCube
 	                                           --- 1, expected memory layout is texture and all mips together for each array element.
 	                                           --- 1, expected memory layout is texture and all mips together for each array element.
 
 
 --- Update 2D texture.
 --- Update 2D texture.
+---
+--- @attention It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info.
+---
 func.updateTexture2D
 func.updateTexture2D
 	"void"
 	"void"
 	.handle "TextureHandle" --- Texture handle.
 	.handle "TextureHandle" --- Texture handle.
@@ -1269,6 +1272,9 @@ func.updateTexture2D
 	 { default = UINT16_MAX }
 	 { default = UINT16_MAX }
 
 
 --- Update 3D texture.
 --- Update 3D texture.
+---
+--- @attention It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info.
+---
 func.updateTexture3D
 func.updateTexture3D
 	"void"
 	"void"
 	.handle "TextureHandle" --- Texture handle.
 	.handle "TextureHandle" --- Texture handle.
@@ -1282,6 +1288,9 @@ func.updateTexture3D
 	.mem    "const Memory*" --- Texture update data.
 	.mem    "const Memory*" --- Texture update data.
 
 
 --- Update Cube texture.
 --- Update Cube texture.
+---
+--- @attention It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info.
+---
 func.updateTextureCube
 func.updateTextureCube
 	"void"
 	"void"
 	.handle "TextureHandle" --- Texture handle.
 	.handle "TextureHandle" --- Texture handle.