mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-19 21:42:59 +01:00
Updated bindings.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -591,11 +591,16 @@ typedef struct bgfx_platform_data_s
|
||||
void* ndt; /** Native display type (*nix specific). */
|
||||
|
||||
/**
|
||||
* Native window handle. If `NULL` bgfx will create headless
|
||||
* context/device if renderer API supports it.
|
||||
* Native window handle. If `NULL`, bgfx will create a headless
|
||||
* context/device, provided the rendering API supports it.
|
||||
*/
|
||||
void* nwh;
|
||||
void* context; /** GL context, or D3D device. If `NULL`, bgfx will create context/device. */
|
||||
|
||||
/**
|
||||
* GL context, D3D device, or Vulkan device. If `NULL`, bgfx
|
||||
* will create context/device.
|
||||
*/
|
||||
void* context;
|
||||
|
||||
/**
|
||||
* GL back-buffer, or D3D render target view. If `NULL` bgfx will
|
||||
@@ -604,7 +609,7 @@ typedef struct bgfx_platform_data_s
|
||||
void* backBuffer;
|
||||
|
||||
/**
|
||||
* Backbuffer depth/stencil. If `NULL` bgfx will create back-buffer
|
||||
* Backbuffer depth/stencil. If `NULL`, bgfx will create a back-buffer
|
||||
* depth/stencil surface.
|
||||
*/
|
||||
void* backBufferDS;
|
||||
@@ -1098,7 +1103,7 @@ BGFX_C_API const char* bgfx_get_renderer_name(bgfx_renderer_type_t _type);
|
||||
BGFX_C_API void bgfx_init_ctor(bgfx_init_t* _init);
|
||||
|
||||
/**
|
||||
* Initialize bgfx library.
|
||||
* Initialize the bgfx library.
|
||||
*
|
||||
* @param[in] _init Initialization parameters. See: `bgfx::Init` for more info.
|
||||
*
|
||||
@@ -1115,8 +1120,8 @@ BGFX_C_API void bgfx_shutdown(void);
|
||||
|
||||
/**
|
||||
* Reset graphic settings and back-buffer size.
|
||||
* @attention This call doesn't actually change window size, it just
|
||||
* resizes back-buffer. Windowing code has to change window size.
|
||||
* @attention This call doesn’t change the window size, it just resizes
|
||||
* the back-buffer. Your windowing code controls the window size.
|
||||
*
|
||||
* @param[in] _width Back-buffer width.
|
||||
* @param[in] _height Back-buffer height.
|
||||
@@ -1131,7 +1136,7 @@ BGFX_C_API void bgfx_shutdown(void);
|
||||
* - `BGFX_RESET_FLIP_AFTER_RENDER` - This flag specifies where flip
|
||||
* occurs. Default behaviour is that flip occurs before rendering new
|
||||
* frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
|
||||
* - `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB backbuffer.
|
||||
* - `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB back-buffer.
|
||||
* @param[in] _format Texture format. See: `TextureFormat::Enum`.
|
||||
*
|
||||
*/
|
||||
@@ -1413,7 +1418,7 @@ BGFX_C_API void bgfx_destroy_vertex_buffer(bgfx_vertex_buffer_handle_t _handle);
|
||||
BGFX_C_API bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer(uint32_t _num, uint16_t _flags);
|
||||
|
||||
/**
|
||||
* Create dynamic index buffer and initialized it.
|
||||
* Create a dynamic index buffer and initialize it.
|
||||
*
|
||||
* @param[in] _mem Index buffer data.
|
||||
* @param[in] _flags Buffer creation flags.
|
||||
@@ -1708,7 +1713,7 @@ BGFX_C_API void bgfx_destroy_program(bgfx_program_handle_t _handle);
|
||||
* @param[in] _format Texture format. See: `TextureFormat::Enum`.
|
||||
* @param[in] _flags Texture flags. See `BGFX_TEXTURE_*`.
|
||||
*
|
||||
* @returns True if texture can be successfully created.
|
||||
* @returns True if a texture with the same parameters can be created.
|
||||
*
|
||||
*/
|
||||
BGFX_C_API bool bgfx_is_texture_valid(uint16_t _depth, bool _cubeMap, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags);
|
||||
@@ -1719,7 +1724,7 @@ BGFX_C_API bool bgfx_is_texture_valid(uint16_t _depth, bool _cubeMap, uint16_t _
|
||||
* @param[in] _num Number of attachments.
|
||||
* @param[in] _attachment Attachment texture info. See: `bgfx::Attachment`.
|
||||
*
|
||||
* @returns True if frame buffer can be successfully created.
|
||||
* @returns True if a frame buffer with the same parameters can be created.
|
||||
*
|
||||
*/
|
||||
BGFX_C_API bool bgfx_is_frame_buffer_valid(uint8_t _num, const bgfx_attachment_t* _attachment);
|
||||
@@ -1782,7 +1787,7 @@ BGFX_C_API bgfx_texture_handle_t bgfx_create_texture(const bgfx_memory_t* _mem,
|
||||
BGFX_C_API bgfx_texture_handle_t bgfx_create_texture_2d(uint16_t _width, uint16_t _height, bool _hasMips, uint16_t _numLayers, bgfx_texture_format_t _format, uint64_t _flags, const bgfx_memory_t* _mem);
|
||||
|
||||
/**
|
||||
* Create texture with size based on backbuffer ratio. Texture will maintain ratio
|
||||
* Create texture with size based on back-buffer ratio. Texture will maintain ratio
|
||||
* if back buffer resolution changes.
|
||||
*
|
||||
* @param[in] _ratio Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
|
||||
@@ -1986,7 +1991,7 @@ BGFX_C_API void bgfx_destroy_texture(bgfx_texture_handle_t _handle);
|
||||
BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint64_t _textureFlags);
|
||||
|
||||
/**
|
||||
* Create frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio
|
||||
* Create frame buffer with size based on back-buffer ratio. Frame buffer will maintain ratio
|
||||
* if back buffer resolution changes.
|
||||
*
|
||||
* @param[in] _ratio Frame buffer size in respect to back-buffer size. See:
|
||||
@@ -2239,8 +2244,8 @@ BGFX_C_API void bgfx_set_view_clear(bgfx_view_id_t _id, uint16_t _flags, uint32_
|
||||
|
||||
/**
|
||||
* Set view clear flags with different clear color for each
|
||||
* frame buffer texture. Must use `bgfx::setPaletteColor` to setup clear color
|
||||
* palette.
|
||||
* frame buffer texture. `bgfx::setPaletteColor` must be used to set up a
|
||||
* clear color palette.
|
||||
*
|
||||
* @param[in] _id View id.
|
||||
* @param[in] _flags Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
|
||||
@@ -2284,8 +2289,8 @@ BGFX_C_API void bgfx_set_view_mode(bgfx_view_id_t _id, bgfx_view_mode_t _mode);
|
||||
BGFX_C_API void bgfx_set_view_frame_buffer(bgfx_view_id_t _id, bgfx_frame_buffer_handle_t _handle);
|
||||
|
||||
/**
|
||||
* Set view view and projection matrices, all draw primitives in this
|
||||
* view will use these matrices.
|
||||
* Set view's view matrix and projection matrix,
|
||||
* all draw primitives in this view will use these two matrices.
|
||||
*
|
||||
* @param[in] _id View id.
|
||||
* @param[in] _view View matrix.
|
||||
@@ -2343,7 +2348,7 @@ BGFX_C_API void bgfx_encoder_set_marker(bgfx_encoder_t* _this, const char* _mark
|
||||
/**
|
||||
* Set render states for draw primitive.
|
||||
* @remarks
|
||||
* 1. To setup more complex states use:
|
||||
* 1. To set up more complex states use:
|
||||
* `BGFX_STATE_ALPHA_REF(_ref)`,
|
||||
* `BGFX_STATE_POINT_SIZE(_size)`,
|
||||
* `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
|
||||
@@ -2894,7 +2899,7 @@ BGFX_C_API void bgfx_set_marker(const char* _marker);
|
||||
/**
|
||||
* Set render states for draw primitive.
|
||||
* @remarks
|
||||
* 1. To setup more complex states use:
|
||||
* 1. To set up more complex states use:
|
||||
* `BGFX_STATE_ALPHA_REF(_ref)`,
|
||||
* `BGFX_STATE_POINT_SIZE(_size)`,
|
||||
* `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace bgfx
|
||||
{
|
||||
/// Render frame enum.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_render_frame_t`.
|
||||
/// @attention C99's equivalent binding is `bgfx_render_frame_t`.
|
||||
///
|
||||
struct RenderFrame
|
||||
{
|
||||
@@ -47,7 +47,7 @@ namespace bgfx
|
||||
/// allow creating separate rendering thread. If it is called before
|
||||
/// to bgfx::init, render thread won't be created by bgfx::init call.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_render_frame`.
|
||||
/// @attention C99's equivalent binding is `bgfx_render_frame`.
|
||||
///
|
||||
RenderFrame::Enum renderFrame(int32_t _msecs = -1);
|
||||
|
||||
@@ -55,13 +55,13 @@ namespace bgfx
|
||||
///
|
||||
/// @warning Must be called before `bgfx::init`.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_platform_data`.
|
||||
/// @attention C99's equivalent binding is `bgfx_set_platform_data`.
|
||||
///
|
||||
void setPlatformData(const PlatformData& _data);
|
||||
|
||||
/// Internal data.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_internal_data_t`.
|
||||
/// @attention C99's equivalent binding is `bgfx_internal_data_t`.
|
||||
///
|
||||
struct InternalData
|
||||
{
|
||||
@@ -76,7 +76,7 @@ namespace bgfx
|
||||
///
|
||||
/// @warning Must be called only on render thread.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_get_internal_data`.
|
||||
/// @attention C99's equivalent binding is `bgfx_get_internal_data`.
|
||||
///
|
||||
const InternalData* getInternalData();
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace bgfx
|
||||
///
|
||||
/// @warning Must be called only on render thread.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_override_internal_texture_ptr`.
|
||||
/// @attention C99's equivalent binding is `bgfx_override_internal_texture_ptr`.
|
||||
///
|
||||
uintptr_t overrideInternal(TextureHandle _handle, uintptr_t _ptr);
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace bgfx
|
||||
///
|
||||
/// @warning Must be called only on render thread.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_override_internal_texture`.
|
||||
/// @attention C99's equivalent binding is `bgfx_override_internal_texture`.
|
||||
///
|
||||
uintptr_t overrideInternal(
|
||||
TextureHandle _handle
|
||||
|
||||
Reference in New Issue
Block a user