From 298f5b0202a300700a0b0b230df3ad0d8a5bd8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 5 Mar 2026 21:37:34 -0800 Subject: [PATCH] Improved docs on bgfx::begin/end. (#3621) --- bindings/bf/bgfx.bf | 45 +++++++++++++++++++++++++++++++++---- bindings/c3/bgfx.c3 | 45 +++++++++++++++++++++++++++++++++---- bindings/cs/bgfx.cs | 45 +++++++++++++++++++++++++++++++++---- bindings/d/package.d | 46 ++++++++++++++++++++++++++++++++++---- bindings/zig/bgfx.zig | 49 ++++++++++++++++++++++++++++++++++++----- include/bgfx/bgfx.h | 44 ++++++++++++++++++++++++++++++++---- include/bgfx/c99/bgfx.h | 46 +++++++++++++++++++++++++++++++++----- scripts/bgfx.idl | 46 ++++++++++++++++++++++++++++++++++---- src/bgfx.idl.inl | 4 ++-- 9 files changed, 333 insertions(+), 37 deletions(-) diff --git a/bindings/bf/bgfx.bf b/bindings/bf/bgfx.bf index 2753b877a..070e916ad 100644 --- a/bindings/bf/bgfx.bf +++ b/bindings/bf/bgfx.bf @@ -4135,16 +4135,53 @@ public static class bgfx public static extern void reset_view(ViewId _id); /// - /// Begin submitting draw calls from thread. + /// Begin submitting draw calls from thread. Obtains an encoder that can be + /// used to submit draw calls, compute dispatches, and state changes. + /// + /// In multithreaded mode (`BGFX_CONFIG_MULTITHREADED=1`), multiple threads + /// can each obtain their own encoder and submit draw calls in parallel. + /// Each encoder writes into its own uniform buffer, so there is no + /// contention between threads. The maximum number of simultaneous encoders + /// is configured via `Limits.maxEncoders` in `bgfx::Init` (default: 8). + /// + /// When called from the API thread (the thread that called `bgfx::init`) + /// with `_forceNewEncoder` set to `false`, the default internal encoder + /// (encoder 0) is returned. This is the same encoder used by the legacy + /// non-encoder API (`bgfx::setState`, `bgfx::submit`, etc.). When called + /// from a worker thread (or with `_forceNewEncoder` set to `true`), a new + /// encoder is allocated from the encoder pool. + /// + /// @remarks + /// The returned `Encoder` pointer is valid until `bgfx::end` is called + /// with it. All encoders must be ended before `bgfx::frame` is called. + /// If `bgfx::frame` is called while encoders are still active, it will + /// wait for them to finish. Returns `NULL` if no encoder slots are + /// available (all `maxEncoders` slots are in use). + /// See also: `bgfx::end`, `bgfx::frame`. + /// /// /// - /// Explicitly request an encoder for a worker thread. + /// Force allocation of a new encoder from the pool, even when called from the API thread. /// [LinkName("bgfx_encoder_begin")] - public static extern Encoder* encoder_begin(bool _forThread); + public static extern Encoder* encoder_begin(bool _forceNewEncoder); /// - /// End submitting draw calls from thread. + /// End submitting draw calls from thread. Returns the encoder obtained from + /// `bgfx::begin` back to the encoder pool. + /// + /// After this call the `Encoder` pointer is no longer valid and must not + /// be used. The encoder's recorded draw calls and state changes are finalized + /// and will be included in the next frame when `bgfx::frame` is called. + /// + /// @remarks + /// Must be called from the same thread that called `bgfx::begin` for + /// this encoder. All encoders must be ended before `bgfx::frame` is + /// called. The default encoder (encoder 0, used by the legacy API) is + /// managed internally and does not need to be passed to `bgfx::end`; + /// passing it is harmless but has no effect. + /// See also: `bgfx::begin`, `bgfx::frame`. + /// /// /// /// Encoder. diff --git a/bindings/c3/bgfx.c3 b/bindings/c3/bgfx.c3 index 0a08188ad..2c0f30ed8 100644 --- a/bindings/c3/bgfx.c3 +++ b/bindings/c3/bgfx.c3 @@ -2889,11 +2889,48 @@ extern fn void set_view_shading_rate(ushort _id, ShadingRate _shadingRate) @exte // _id : `_id View id.` extern fn void reset_view(ushort _id) @extern("bgfx_reset_view"); -// Begin submitting draw calls from thread. -// _forThread : `Explicitly request an encoder for a worker thread.` -extern fn Encoder* encoder_begin(bool _forThread) @extern("bgfx_encoder_begin"); +// Begin submitting draw calls from thread. Obtains an encoder that can be +// used to submit draw calls, compute dispatches, and state changes. +// +// In multithreaded mode (`BGFX_CONFIG_MULTITHREADED=1`), multiple threads +// can each obtain their own encoder and submit draw calls in parallel. +// Each encoder writes into its own uniform buffer, so there is no +// contention between threads. The maximum number of simultaneous encoders +// is configured via `Limits.maxEncoders` in `bgfx::Init` (default: 8). +// +// When called from the API thread (the thread that called `bgfx::init`) +// with `_forceNewEncoder` set to `false`, the default internal encoder +// (encoder 0) is returned. This is the same encoder used by the legacy +// non-encoder API (`bgfx::setState`, `bgfx::submit`, etc.). When called +// from a worker thread (or with `_forceNewEncoder` set to `true`), a new +// encoder is allocated from the encoder pool. +// +// @remarks +// The returned `Encoder` pointer is valid until `bgfx::end` is called +// with it. All encoders must be ended before `bgfx::frame` is called. +// If `bgfx::frame` is called while encoders are still active, it will +// wait for them to finish. Returns `NULL` if no encoder slots are +// available (all `maxEncoders` slots are in use). +// See also: `bgfx::end`, `bgfx::frame`. +// +// _forceNewEncoder : `Force allocation of a new encoder from the pool, even when called from the API thread.` +extern fn Encoder* encoder_begin(bool _forceNewEncoder) @extern("bgfx_encoder_begin"); -// End submitting draw calls from thread. +// End submitting draw calls from thread. Returns the encoder obtained from +// `bgfx::begin` back to the encoder pool. +// +// After this call the `Encoder` pointer is no longer valid and must not +// be used. The encoder's recorded draw calls and state changes are finalized +// and will be included in the next frame when `bgfx::frame` is called. +// +// @remarks +// Must be called from the same thread that called `bgfx::begin` for +// this encoder. All encoders must be ended before `bgfx::frame` is +// called. The default encoder (encoder 0, used by the legacy API) is +// managed internally and does not need to be passed to `bgfx::end`; +// passing it is harmless but has no effect. +// See also: `bgfx::begin`, `bgfx::frame`. +// // _encoder : `Encoder.` extern fn void encoder_end(Encoder* _encoder) @extern("bgfx_encoder_end"); diff --git a/bindings/cs/bgfx.cs b/bindings/cs/bgfx.cs index 2d3c9ce0b..1386f9015 100644 --- a/bindings/cs/bgfx.cs +++ b/bindings/cs/bgfx.cs @@ -4088,16 +4088,53 @@ public static partial class bgfx public static extern unsafe void reset_view(ushort _id); /// - /// Begin submitting draw calls from thread. + /// Begin submitting draw calls from thread. Obtains an encoder that can be + /// used to submit draw calls, compute dispatches, and state changes. + /// + /// In multithreaded mode (`BGFX_CONFIG_MULTITHREADED=1`), multiple threads + /// can each obtain their own encoder and submit draw calls in parallel. + /// Each encoder writes into its own uniform buffer, so there is no + /// contention between threads. The maximum number of simultaneous encoders + /// is configured via `Limits.maxEncoders` in `bgfx::Init` (default: 8). + /// + /// When called from the API thread (the thread that called `bgfx::init`) + /// with `_forceNewEncoder` set to `false`, the default internal encoder + /// (encoder 0) is returned. This is the same encoder used by the legacy + /// non-encoder API (`bgfx::setState`, `bgfx::submit`, etc.). When called + /// from a worker thread (or with `_forceNewEncoder` set to `true`), a new + /// encoder is allocated from the encoder pool. + /// + /// @remarks + /// The returned `Encoder` pointer is valid until `bgfx::end` is called + /// with it. All encoders must be ended before `bgfx::frame` is called. + /// If `bgfx::frame` is called while encoders are still active, it will + /// wait for them to finish. Returns `NULL` if no encoder slots are + /// available (all `maxEncoders` slots are in use). + /// See also: `bgfx::end`, `bgfx::frame`. + /// /// /// - /// Explicitly request an encoder for a worker thread. + /// Force allocation of a new encoder from the pool, even when called from the API thread. /// [DllImport(DllName, EntryPoint="bgfx_encoder_begin", CallingConvention = CallingConvention.Cdecl)] - public static extern unsafe Encoder* encoder_begin(bool _forThread); + public static extern unsafe Encoder* encoder_begin(bool _forceNewEncoder); /// - /// End submitting draw calls from thread. + /// End submitting draw calls from thread. Returns the encoder obtained from + /// `bgfx::begin` back to the encoder pool. + /// + /// After this call the `Encoder` pointer is no longer valid and must not + /// be used. The encoder's recorded draw calls and state changes are finalized + /// and will be included in the next frame when `bgfx::frame` is called. + /// + /// @remarks + /// Must be called from the same thread that called `bgfx::begin` for + /// this encoder. All encoders must be ended before `bgfx::frame` is + /// called. The default encoder (encoder 0, used by the legacy API) is + /// managed internally and does not need to be passed to `bgfx::end`; + /// passing it is harmless but has no effect. + /// See also: `bgfx::begin`, `bgfx::frame`. + /// /// /// /// Encoder. diff --git a/bindings/d/package.d b/bindings/d/package.d index 0f136c157..38d37eff0 100644 --- a/bindings/d/package.d +++ b/bindings/d/package.d @@ -3231,14 +3231,52 @@ mixin(joinFnBinds((){ {q{void}, q{resetView}, q{ViewID id}, ext: `C++, "bgfx"`}, /** - * Begin submitting draw calls from thread. + * Begin submitting draw calls from thread. Obtains an encoder that can be + * used to submit draw calls, compute dispatches, and state changes. + * + * In multithreaded mode (`BGFX_CONFIG_MULTITHREADED=1`), multiple threads + * can each obtain their own encoder and submit draw calls in parallel. + * Each encoder writes into its own uniform buffer, so there is no + * contention between threads. The maximum number of simultaneous encoders + * is configured via `Limits.maxEncoders` in `bgfx::Init` (default: 8). + * + * When called from the API thread (the thread that called `bgfx::init`) + * with `_forceNewEncoder` set to `false`, the default internal encoder + * (encoder 0) is returned. This is the same encoder used by the legacy + * non-encoder API (`bgfx::setState`, `bgfx::submit`, etc.). When called + * from a worker thread (or with `_forceNewEncoder` set to `true`), a new + * encoder is allocated from the encoder pool. + * + * Remarks: + * The returned `Encoder` pointer is valid until `bgfx::end` is called + * with it. All encoders must be ended before `bgfx::frame` is called. + * If `bgfx::frame` is called while encoders are still active, it will + * wait for them to finish. Returns `NULL` if no encoder slots are + * available (all `maxEncoders` slots are in use). + * See also: `bgfx::end`, `bgfx::frame`. + * Params: - forThread = Explicitly request an encoder for a worker thread. + forceNewEncoder = Force allocation of a new encoder from the pool, + even when called from the API thread. */ - {q{Encoder*}, q{begin}, q{bool forThread=false}, ext: `C++, "bgfx"`}, + {q{Encoder*}, q{begin}, q{bool forceNewEncoder=false}, ext: `C++, "bgfx"`}, /** - * End submitting draw calls from thread. + * End submitting draw calls from thread. Returns the encoder obtained from + * `bgfx::begin` back to the encoder pool. + * + * After this call the `Encoder` pointer is no longer valid and must not + * be used. The encoder's recorded draw calls and state changes are finalized + * and will be included in the next frame when `bgfx::frame` is called. + * + * Remarks: + * Must be called from the same thread that called `bgfx::begin` for + * this encoder. All encoders must be ended before `bgfx::frame` is + * called. The default encoder (encoder 0, used by the legacy API) is + * managed internally and does not need to be passed to `bgfx::end`; + * passing it is harmless but has no effect. + * See also: `bgfx::begin`, `bgfx::frame`. + * Params: encoder = Encoder. */ diff --git a/bindings/zig/bgfx.zig b/bindings/zig/bgfx.zig index d44a732d1..458beb4fc 100644 --- a/bindings/zig/bgfx.zig +++ b/bindings/zig/bgfx.zig @@ -3281,14 +3281,51 @@ pub inline fn resetView(_id: ViewId) void { } extern fn bgfx_reset_view(_id: ViewId) void; -/// Begin submitting draw calls from thread. -/// Explicitly request an encoder for a worker thread. -pub inline fn encoderBegin(_forThread: bool) ?*Encoder { - return bgfx_encoder_begin(_forThread); +/// Begin submitting draw calls from thread. Obtains an encoder that can be +/// used to submit draw calls, compute dispatches, and state changes. +/// +/// In multithreaded mode (`BGFX_CONFIG_MULTITHREADED=1`), multiple threads +/// can each obtain their own encoder and submit draw calls in parallel. +/// Each encoder writes into its own uniform buffer, so there is no +/// contention between threads. The maximum number of simultaneous encoders +/// is configured via `Limits.maxEncoders` in `bgfx::Init` (default: 8). +/// +/// When called from the API thread (the thread that called `bgfx::init`) +/// with `_forceNewEncoder` set to `false`, the default internal encoder +/// (encoder 0) is returned. This is the same encoder used by the legacy +/// non-encoder API (`bgfx::setState`, `bgfx::submit`, etc.). When called +/// from a worker thread (or with `_forceNewEncoder` set to `true`), a new +/// encoder is allocated from the encoder pool. +/// +/// @remarks +/// The returned `Encoder` pointer is valid until `bgfx::end` is called +/// with it. All encoders must be ended before `bgfx::frame` is called. +/// If `bgfx::frame` is called while encoders are still active, it will +/// wait for them to finish. Returns `NULL` if no encoder slots are +/// available (all `maxEncoders` slots are in use). +/// See also: `bgfx::end`, `bgfx::frame`. +/// +/// Force allocation of a new encoder from the pool, even when called from the API thread. +pub inline fn encoderBegin(_forceNewEncoder: bool) ?*Encoder { + return bgfx_encoder_begin(_forceNewEncoder); } -extern fn bgfx_encoder_begin(_forThread: bool) ?*Encoder; +extern fn bgfx_encoder_begin(_forceNewEncoder: bool) ?*Encoder; -/// End submitting draw calls from thread. +/// End submitting draw calls from thread. Returns the encoder obtained from +/// `bgfx::begin` back to the encoder pool. +/// +/// After this call the `Encoder` pointer is no longer valid and must not +/// be used. The encoder's recorded draw calls and state changes are finalized +/// and will be included in the next frame when `bgfx::frame` is called. +/// +/// @remarks +/// Must be called from the same thread that called `bgfx::begin` for +/// this encoder. All encoders must be ended before `bgfx::frame` is +/// called. The default encoder (encoder 0, used by the legacy API) is +/// managed internally and does not need to be passed to `bgfx::end`; +/// passing it is harmless but has no effect. +/// See also: `bgfx::begin`, `bgfx::frame`. +/// /// Encoder. pub inline fn encoderEnd(_encoder: ?*Encoder) void { return bgfx_encoder_end(_encoder); diff --git a/include/bgfx/bgfx.h b/include/bgfx/bgfx.h index 77ef18bce..7d13a729b 100644 --- a/include/bgfx/bgfx.h +++ b/include/bgfx/bgfx.h @@ -3735,20 +3735,56 @@ namespace bgfx /// void resetView(ViewId _id); - /// Begin submitting draw calls from thread. + /// Begin submitting draw calls from thread. Obtains an encoder that can be + /// used to submit draw calls, compute dispatches, and state changes. /// - /// @param[in] _forThread Explicitly request an encoder for a worker thread. + /// In multithreaded mode (`BGFX_CONFIG_MULTITHREADED=1`), multiple threads + /// can each obtain their own encoder and submit draw calls in parallel. + /// Each encoder writes into its own uniform buffer, so there is no + /// contention between threads. The maximum number of simultaneous encoders + /// is configured via `Limits.maxEncoders` in `bgfx::Init` (default: 8). + /// + /// When called from the API thread (the thread that called `bgfx::init`) + /// with `_forceNewEncoder` set to `false`, the default internal encoder + /// (encoder 0) is returned. This is the same encoder used by the legacy + /// non-encoder API (`bgfx::setState`, `bgfx::submit`, etc.). When called + /// from a worker thread (or with `_forceNewEncoder` set to `true`), a new + /// encoder is allocated from the encoder pool. + /// + /// @param[in] _forceNewEncoder Force allocation of a new encoder from the pool, + /// even when called from the API thread. /// /// @returns Encoder. /// + /// @remarks + /// The returned `Encoder` pointer is valid until `bgfx::end` is called + /// with it. All encoders must be ended before `bgfx::frame` is called. + /// If `bgfx::frame` is called while encoders are still active, it will + /// wait for them to finish. Returns `NULL` if no encoder slots are + /// available (all `maxEncoders` slots are in use). + /// See also: `bgfx::end`, `bgfx::frame`. + /// /// @attention C99's equivalent binding is `bgfx_encoder_begin`. /// - Encoder* begin(bool _forThread = false); + Encoder* begin(bool _forceNewEncoder = false); - /// End submitting draw calls from thread. + /// End submitting draw calls from thread. Returns the encoder obtained from + /// `bgfx::begin` back to the encoder pool. + /// + /// After this call the `Encoder` pointer is no longer valid and must not + /// be used. The encoder's recorded draw calls and state changes are finalized + /// and will be included in the next frame when `bgfx::frame` is called. /// /// @param[in] _encoder Encoder. /// + /// @remarks + /// Must be called from the same thread that called `bgfx::begin` for + /// this encoder. All encoders must be ended before `bgfx::frame` is + /// called. The default encoder (encoder 0, used by the legacy API) is + /// managed internally and does not need to be passed to `bgfx::end`; + /// passing it is harmless but has no effect. + /// See also: `bgfx::begin`, `bgfx::frame`. + /// /// @attention C99's equivalent binding is `bgfx_encoder_end`. /// void end(Encoder* _encoder); diff --git a/include/bgfx/c99/bgfx.h b/include/bgfx/c99/bgfx.h index d68eae935..f57ca5a1c 100644 --- a/include/bgfx/c99/bgfx.h +++ b/include/bgfx/c99/bgfx.h @@ -2544,17 +2544,53 @@ BGFX_C_API void bgfx_set_view_shading_rate(bgfx_view_id_t _id, bgfx_shading_rate BGFX_C_API void bgfx_reset_view(bgfx_view_id_t _id); /** - * Begin submitting draw calls from thread. + * Begin submitting draw calls from thread. Obtains an encoder that can be + * used to submit draw calls, compute dispatches, and state changes. * - * @param[in] _forThread Explicitly request an encoder for a worker thread. + * In multithreaded mode (`BGFX_CONFIG_MULTITHREADED=1`), multiple threads + * can each obtain their own encoder and submit draw calls in parallel. + * Each encoder writes into its own uniform buffer, so there is no + * contention between threads. The maximum number of simultaneous encoders + * is configured via `Limits.maxEncoders` in `bgfx::Init` (default: 8). + * + * When called from the API thread (the thread that called `bgfx::init`) + * with `_forceNewEncoder` set to `false`, the default internal encoder + * (encoder 0) is returned. This is the same encoder used by the legacy + * non-encoder API (`bgfx::setState`, `bgfx::submit`, etc.). When called + * from a worker thread (or with `_forceNewEncoder` set to `true`), a new + * encoder is allocated from the encoder pool. + * + * @remarks + * The returned `Encoder` pointer is valid until `bgfx::end` is called + * with it. All encoders must be ended before `bgfx::frame` is called. + * If `bgfx::frame` is called while encoders are still active, it will + * wait for them to finish. Returns `NULL` if no encoder slots are + * available (all `maxEncoders` slots are in use). + * See also: `bgfx::end`, `bgfx::frame`. + * + * @param[in] _forceNewEncoder Force allocation of a new encoder from the pool, + * even when called from the API thread. * * @returns Encoder. * */ -BGFX_C_API bgfx_encoder_t* bgfx_encoder_begin(bool _forThread); +BGFX_C_API bgfx_encoder_t* bgfx_encoder_begin(bool _forceNewEncoder); /** - * End submitting draw calls from thread. + * End submitting draw calls from thread. Returns the encoder obtained from + * `bgfx::begin` back to the encoder pool. + * + * After this call the `Encoder` pointer is no longer valid and must not + * be used. The encoder's recorded draw calls and state changes are finalized + * and will be included in the next frame when `bgfx::frame` is called. + * + * @remarks + * Must be called from the same thread that called `bgfx::begin` for + * this encoder. All encoders must be ended before `bgfx::frame` is + * called. The default encoder (encoder 0, used by the legacy API) is + * managed internally and does not need to be passed to `bgfx::end`; + * passing it is harmless but has no effect. + * See also: `bgfx::begin`, `bgfx::frame`. * * @param[in] _encoder Encoder. * @@ -4049,7 +4085,7 @@ struct bgfx_interface_vtbl void (*set_view_order)(bgfx_view_id_t _id, uint16_t _num, const bgfx_view_id_t* _order); void (*set_view_shading_rate)(bgfx_view_id_t _id, bgfx_shading_rate_t _shadingRate); void (*reset_view)(bgfx_view_id_t _id); - bgfx_encoder_t* (*encoder_begin)(bool _forThread); + bgfx_encoder_t* (*encoder_begin)(bool _forceNewEncoder); void (*encoder_end)(bgfx_encoder_t* _encoder); void (*encoder_set_marker)(bgfx_encoder_t* _this, const char* _name, int32_t _len); void (*encoder_set_state)(bgfx_encoder_t* _this, uint64_t _state, uint32_t _rgba); diff --git a/scripts/bgfx.idl b/scripts/bgfx.idl index 5350e27d5..e7eebec6c 100644 --- a/scripts/bgfx.idl +++ b/scripts/bgfx.idl @@ -2271,13 +2271,51 @@ func.resetView { section = "Views" } "void" .id "ViewId" --- _id View id. ---- Begin submitting draw calls from thread. +--- Begin submitting draw calls from thread. Obtains an encoder that can be +--- used to submit draw calls, compute dispatches, and state changes. +--- +--- In multithreaded mode (`BGFX_CONFIG_MULTITHREADED=1`), multiple threads +--- can each obtain their own encoder and submit draw calls in parallel. +--- Each encoder writes into its own uniform buffer, so there is no +--- contention between threads. The maximum number of simultaneous encoders +--- is configured via `Limits.maxEncoders` in `bgfx::Init` (default: 8). +--- +--- When called from the API thread (the thread that called `bgfx::init`) +--- with `_forceNewEncoder` set to `false`, the default internal encoder +--- (encoder 0) is returned. This is the same encoder used by the legacy +--- non-encoder API (`bgfx::setState`, `bgfx::submit`, etc.). When called +--- from a worker thread (or with `_forceNewEncoder` set to `true`), a new +--- encoder is allocated from the encoder pool. +--- +--- @remarks +--- The returned `Encoder` pointer is valid until `bgfx::end` is called +--- with it. All encoders must be ended before `bgfx::frame` is called. +--- If `bgfx::frame` is called while encoders are still active, it will +--- wait for them to finish. Returns `NULL` if no encoder slots are +--- available (all `maxEncoders` slots are in use). +--- See also: `bgfx::end`, `bgfx::frame`. +--- func.begin { cname = "encoder_begin", section = "Encoder" } - "Encoder*" --- Encoder. - .forThread "bool" --- Explicitly request an encoder for a worker thread. + "Encoder*" --- Encoder. + .forceNewEncoder "bool" --- Force allocation of a new encoder from the pool, + --- even when called from the API thread. { default = false } ---- End submitting draw calls from thread. +--- End submitting draw calls from thread. Returns the encoder obtained from +--- `bgfx::begin` back to the encoder pool. +--- +--- After this call the `Encoder` pointer is no longer valid and must not +--- be used. The encoder's recorded draw calls and state changes are finalized +--- and will be included in the next frame when `bgfx::frame` is called. +--- +--- @remarks +--- Must be called from the same thread that called `bgfx::begin` for +--- this encoder. All encoders must be ended before `bgfx::frame` is +--- called. The default encoder (encoder 0, used by the legacy API) is +--- managed internally and does not need to be passed to `bgfx::end`; +--- passing it is harmless but has no effect. +--- See also: `bgfx::begin`, `bgfx::frame`. +--- func["end"] { cname = "encoder_end", section = "Encoder" } "void" .encoder "Encoder*" --- Encoder. diff --git a/src/bgfx.idl.inl b/src/bgfx.idl.inl index 08aa722b0..4c94821c9 100644 --- a/src/bgfx.idl.inl +++ b/src/bgfx.idl.inl @@ -716,9 +716,9 @@ BGFX_C_API void bgfx_reset_view(bgfx_view_id_t _id) bgfx::resetView((bgfx::ViewId)_id); } -BGFX_C_API bgfx_encoder_t* bgfx_encoder_begin(bool _forThread) +BGFX_C_API bgfx_encoder_t* bgfx_encoder_begin(bool _forceNewEncoder) { - return (bgfx_encoder_t*)bgfx::begin(_forThread); + return (bgfx_encoder_t*)bgfx::begin(_forceNewEncoder); } BGFX_C_API void bgfx_encoder_end(bgfx_encoder_t* _encoder)