mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Removed *Mask API.
This commit is contained in:
parent
4255618a37
commit
58b37542c8
4 changed files with 0 additions and 311 deletions
|
@ -1062,17 +1062,6 @@ BGFX_C_API void bgfx_set_view_name(uint8_t _id, const char* _name);
|
|||
*/
|
||||
BGFX_C_API void bgfx_set_view_rect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
|
||||
|
||||
/**
|
||||
* Set view rectangle for multiple views.
|
||||
*
|
||||
* @param _viewMask Bit mask representing affected views.
|
||||
* @param _x Position x from the left corner of the window.
|
||||
* @param _y Position y from the top corner of the window.
|
||||
* @param _width Width of view port region.
|
||||
* @param _height Height of view port region.
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_view_rect_mask(uint32_t _viewMask, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
|
||||
|
||||
/**
|
||||
* Set view scissor. Draw primitive outside view will be clipped. When
|
||||
* _x, _y, _width and _height are set to 0, scissor will be disabled.
|
||||
|
@ -1084,19 +1073,6 @@ BGFX_C_API void bgfx_set_view_rect_mask(uint32_t _viewMask, uint16_t _x, uint16_
|
|||
*/
|
||||
BGFX_C_API void bgfx_set_view_scissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
|
||||
|
||||
/**
|
||||
* Set view scissor for multiple views. When _x, _y, _width and _height
|
||||
* are set to 0, scissor will be disabled.
|
||||
*
|
||||
* @param _id View id.
|
||||
* @param _viewMask Bit mask representing affected views.
|
||||
* @param _x Position x from the left corner of the window.
|
||||
* @param _y Position y from the top corner of the window.
|
||||
* @param _width Width of scissor region.
|
||||
* @param _height Height of scissor region.
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_view_scissor_mask(uint32_t _viewMask, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
|
||||
|
||||
/**
|
||||
* Set view clear flags.
|
||||
*
|
||||
|
@ -1122,22 +1098,12 @@ BGFX_C_API void bgfx_set_view_clear(uint8_t _id, uint8_t _flags, uint32_t _rgba,
|
|||
*/
|
||||
BGFX_C_API void bgfx_set_view_clear_mrt(uint8_t _id, uint8_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7);
|
||||
|
||||
/**
|
||||
* Set view clear flags for multiple views.
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_view_clear_mask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil);
|
||||
|
||||
/**
|
||||
* Set view into sequential mode. Draw calls will be sorted in the same
|
||||
* order in which submit calls were called.
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_view_seq(uint8_t _id, bool _enabled);
|
||||
|
||||
/**
|
||||
* Set multiple views into sequential mode.
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_view_seq_mask(uint32_t _viewMask, bool _enabled);
|
||||
|
||||
/**
|
||||
* Set view frame buffer.
|
||||
*
|
||||
|
@ -1148,27 +1114,12 @@ BGFX_C_API void bgfx_set_view_seq_mask(uint32_t _viewMask, bool _enabled);
|
|||
*/
|
||||
BGFX_C_API void bgfx_set_view_frame_buffer(uint8_t _id, bgfx_frame_buffer_handle_t _handle);
|
||||
|
||||
/**
|
||||
* Set view frame buffer for multiple views.
|
||||
*
|
||||
* @param _viewMask View mask.
|
||||
* @param _handle Frame buffer handle. Passing BGFX_INVALID_HANDLE as
|
||||
* frame buffer handle will draw primitives from this view into
|
||||
* default back buffer.
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_view_frame_buffer_mask(uint32_t _viewMask, bgfx_frame_buffer_handle_t _handle);
|
||||
|
||||
/**
|
||||
* Set view view and projection matrices, all draw primitives in this
|
||||
* view will use these matrices.
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_view_transform(uint8_t _id, const void* _view, const void* _proj);
|
||||
|
||||
/**
|
||||
* Set view view and projection matrices for multiple views.
|
||||
*/
|
||||
BGFX_C_API void bgfx_set_view_transform_mask(uint32_t _viewMask, const void* _view, const void* _proj);
|
||||
|
||||
/**
|
||||
* Sets debug marker.
|
||||
*/
|
||||
|
@ -1341,15 +1292,6 @@ BGFX_C_API void bgfx_set_texture_from_frame_buffer(uint8_t _stage, bgfx_uniform_
|
|||
*/
|
||||
BGFX_C_API uint32_t bgfx_submit(uint8_t _id, int32_t _depth);
|
||||
|
||||
/**
|
||||
* Submit primitive for rendering into multiple views.
|
||||
*
|
||||
* @param _viewMask Mask to which views to submit draw primitive calls.
|
||||
* @param _depth Depth for sorting.
|
||||
* @returns Number of draw calls.
|
||||
*/
|
||||
BGFX_C_API uint32_t bgfx_submit_mask(uint32_t _viewMask, int32_t _depth);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -911,16 +911,6 @@ namespace bgfx
|
|||
///
|
||||
void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
|
||||
|
||||
/// Set view rectangle for multiple views.
|
||||
///
|
||||
/// @param _viewMask Bit mask representing affected views.
|
||||
/// @param _x Position x from the left corner of the window.
|
||||
/// @param _y Position y from the top corner of the window.
|
||||
/// @param _width Width of view port region.
|
||||
/// @param _height Height of view port region.
|
||||
///
|
||||
void setViewRectMask(uint32_t _viewMask, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
|
||||
|
||||
/// Set view scissor. Draw primitive outside view will be clipped. When
|
||||
/// _x, _y, _width and _height are set to 0, scissor will be disabled.
|
||||
///
|
||||
|
@ -931,18 +921,6 @@ namespace bgfx
|
|||
///
|
||||
void setViewScissor(uint8_t _id, uint16_t _x = 0, uint16_t _y = 0, uint16_t _width = 0, uint16_t _height = 0);
|
||||
|
||||
/// Set view scissor for multiple views. When _x, _y, _width and _height
|
||||
/// are set to 0, scissor will be disabled.
|
||||
///
|
||||
/// @param _id View id.
|
||||
/// @param _viewMask Bit mask representing affected views.
|
||||
/// @param _x Position x from the left corner of the window.
|
||||
/// @param _y Position y from the top corner of the window.
|
||||
/// @param _width Width of scissor region.
|
||||
/// @param _height Height of scissor region.
|
||||
///
|
||||
void setViewScissorMask(uint32_t _viewMask, uint16_t _x = 0, uint16_t _y = 0, uint16_t _width = 0, uint16_t _height = 0);
|
||||
|
||||
/// Set view clear flags.
|
||||
///
|
||||
/// @param _id View id.
|
||||
|
@ -966,16 +944,10 @@ namespace bgfx
|
|||
///
|
||||
void setViewClear(uint8_t _id, uint8_t _flags, float _depth, uint8_t _stencil, uint8_t _0 = UINT8_MAX, uint8_t _1 = UINT8_MAX, uint8_t _2 = UINT8_MAX, uint8_t _3 = UINT8_MAX, uint8_t _4 = UINT8_MAX, uint8_t _5 = UINT8_MAX, uint8_t _6 = UINT8_MAX, uint8_t _7 = UINT8_MAX);
|
||||
|
||||
/// Set view clear flags for multiple views.
|
||||
void setViewClearMask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba = 0x000000ff, float _depth = 1.0f, uint8_t _stencil = 0);
|
||||
|
||||
/// Set view into sequential mode. Draw calls will be sorted in the same
|
||||
/// order in which submit calls were called.
|
||||
void setViewSeq(uint8_t _id, bool _enabled);
|
||||
|
||||
/// Set multiple views into sequential mode.
|
||||
void setViewSeqMask(uint32_t _viewMask, bool _enabled);
|
||||
|
||||
/// Set view frame buffer.
|
||||
///
|
||||
/// @param _id View id.
|
||||
|
@ -988,25 +960,10 @@ namespace bgfx
|
|||
///
|
||||
void setViewFrameBuffer(uint8_t _id, FrameBufferHandle _handle);
|
||||
|
||||
/// Set view frame buffer for multiple views.
|
||||
///
|
||||
/// @param _viewMask View mask.
|
||||
/// @param _handle Frame buffer handle. Passing BGFX_INVALID_HANDLE as
|
||||
/// frame buffer handle will draw primitives from this view into
|
||||
/// default back buffer.
|
||||
///
|
||||
/// NOTE:
|
||||
/// Not persistent after bgfx::reset call.
|
||||
///
|
||||
void setViewFrameBufferMask(uint32_t _viewMask, FrameBufferHandle _handle);
|
||||
|
||||
/// Set view view and projection matrices, all draw primitives in this
|
||||
/// view will use these matrices.
|
||||
void setViewTransform(uint8_t _id, const void* _view, const void* _proj);
|
||||
|
||||
/// Set view view and projection matrices for multiple views.
|
||||
void setViewTransformMask(uint32_t _viewMask, const void* _view, const void* _proj);
|
||||
|
||||
/// Sets debug marker.
|
||||
void setMarker(const char* _marker);
|
||||
|
||||
|
@ -1159,14 +1116,6 @@ namespace bgfx
|
|||
///
|
||||
uint32_t submit(uint8_t _id, int32_t _depth = 0);
|
||||
|
||||
/// Submit primitive for rendering into multiple views.
|
||||
///
|
||||
/// @param _viewMask Mask to which views to submit draw primitive calls.
|
||||
/// @param _depth Depth for sorting.
|
||||
/// @returns Number of draw calls.
|
||||
///
|
||||
uint32_t submitMask(uint32_t _viewMask, int32_t _depth = 0);
|
||||
|
||||
///
|
||||
void setImage(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint8_t _mip, TextureFormat::Enum _format, Access::Enum _access);
|
||||
|
||||
|
|
129
src/bgfx.cpp
129
src/bgfx.cpp
|
@ -723,57 +723,6 @@ namespace bgfx
|
|||
return m_num;
|
||||
}
|
||||
|
||||
uint32_t Frame::submitMask(uint32_t _viewMask, int32_t _depth)
|
||||
{
|
||||
if (m_discard)
|
||||
{
|
||||
discard();
|
||||
return m_num;
|
||||
}
|
||||
|
||||
if (BGFX_CONFIG_MAX_DRAW_CALLS-1 <= m_num
|
||||
|| (0 == m_draw.m_numVertices && 0 == m_draw.m_numIndices) )
|
||||
{
|
||||
m_numDropped += bx::uint32_cntbits(_viewMask);
|
||||
return m_num;
|
||||
}
|
||||
|
||||
m_constEnd = m_constantBuffer->getPos();
|
||||
|
||||
BX_WARN(invalidHandle != m_key.m_program, "Program with invalid handle");
|
||||
if (invalidHandle != m_key.m_program)
|
||||
{
|
||||
m_key.m_depth = _depth;
|
||||
|
||||
for (uint32_t id = 0, viewMask = _viewMask, ntz = bx::uint32_cnttz(_viewMask); 0 != viewMask; viewMask >>= 1, id += 1, ntz = bx::uint32_cnttz(viewMask) )
|
||||
{
|
||||
viewMask >>= ntz;
|
||||
id += ntz;
|
||||
|
||||
m_key.m_view = id;
|
||||
m_key.m_seq = s_ctx->m_seq[id] & s_ctx->m_seqMask[id];
|
||||
s_ctx->m_seq[id]++;
|
||||
|
||||
uint64_t key = m_key.encodeDraw();
|
||||
m_sortKeys[m_num] = key;
|
||||
m_sortValues[m_num] = m_numRenderItems;
|
||||
++m_num;
|
||||
}
|
||||
|
||||
m_draw.m_constBegin = m_constBegin;
|
||||
m_draw.m_constEnd = m_constEnd;
|
||||
m_draw.m_flags |= m_flags;
|
||||
m_renderItem[m_numRenderItems].draw = m_draw;
|
||||
++m_numRenderItems;
|
||||
}
|
||||
|
||||
m_draw.clear();
|
||||
m_constBegin = m_constEnd;
|
||||
m_flags = BGFX_STATE_NONE;
|
||||
|
||||
return m_num;
|
||||
}
|
||||
|
||||
uint32_t Frame::dispatch(uint8_t _id, ProgramHandle _handle, uint16_t _numX, uint16_t _numY, uint16_t _numZ)
|
||||
{
|
||||
if (m_discard)
|
||||
|
@ -2571,24 +2520,12 @@ again:
|
|||
s_ctx->setViewRect(_id, _x, _y, _width, _height);
|
||||
}
|
||||
|
||||
void setViewRectMask(uint32_t _viewMask, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewRectMask(_viewMask, _x, _y, _width, _height);
|
||||
}
|
||||
|
||||
void setViewScissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewScissor(_id, _x, _y, _width, _height);
|
||||
}
|
||||
|
||||
void setViewScissorMask(uint32_t _viewMask, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewScissorMask(_viewMask, _x, _y, _width, _height);
|
||||
}
|
||||
|
||||
void setViewClear(uint8_t _id, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
|
@ -2601,48 +2538,24 @@ again:
|
|||
s_ctx->setViewClear(_id, _flags, _depth, _stencil, _0, _1, _2, _3, _4, _5, _6, _7);
|
||||
}
|
||||
|
||||
void setViewClearMask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewClearMask(_viewMask, _flags, _rgba, _depth, _stencil);
|
||||
}
|
||||
|
||||
void setViewSeq(uint8_t _id, bool _enabled)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewSeq(_id, _enabled);
|
||||
}
|
||||
|
||||
void setViewSeqMask(uint32_t _viewMask, bool _enabled)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewSeqMask(_viewMask, _enabled);
|
||||
}
|
||||
|
||||
void setViewFrameBuffer(uint8_t _id, FrameBufferHandle _handle)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewFrameBuffer(_id, _handle);
|
||||
}
|
||||
|
||||
void setViewFrameBufferMask(uint32_t _mask, FrameBufferHandle _handle)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewFrameBufferMask(_mask, _handle);
|
||||
}
|
||||
|
||||
void setViewTransform(uint8_t _id, const void* _view, const void* _proj)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewTransform(_id, _view, _proj);
|
||||
}
|
||||
|
||||
void setViewTransformMask(uint32_t _viewMask, const void* _view, const void* _proj)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
s_ctx->setViewTransformMask(_viewMask, _view, _proj);
|
||||
}
|
||||
|
||||
void setMarker(const char* _marker)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
|
@ -2775,12 +2688,6 @@ again:
|
|||
return s_ctx->submit(_id, _depth);
|
||||
}
|
||||
|
||||
uint32_t submitMask(uint32_t _viewMask, int32_t _depth)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
return s_ctx->submitMask(_viewMask, _depth);
|
||||
}
|
||||
|
||||
void setImage(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint8_t _mip, TextureFormat::Enum _format, Access::Enum _access)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
|
@ -3243,21 +3150,11 @@ BGFX_C_API void bgfx_set_view_rect(uint8_t _id, uint16_t _x, uint16_t _y, uint16
|
|||
bgfx::setViewRect(_id, _x, _y, _width, _height);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_rect_mask(uint32_t _viewMask, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
|
||||
{
|
||||
bgfx::setViewRectMask(_viewMask, _x, _y, _width, _height);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_scissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
|
||||
{
|
||||
bgfx::setViewScissor(_id, _x, _y, _width, _height);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_scissor_mask(uint32_t _viewMask, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
|
||||
{
|
||||
bgfx::setViewScissorMask(_viewMask, _x, _y, _width, _height);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_clear(uint8_t _id, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil)
|
||||
{
|
||||
bgfx::setViewClear(_id, _flags, _rgba, _depth, _stencil);
|
||||
|
@ -3268,43 +3165,22 @@ BGFX_C_API void bgfx_set_view_clear_mrt(uint8_t _id, uint8_t _flags, float _dept
|
|||
bgfx::setViewClear(_id, _flags, _depth, _stencil, _0, _1, _2, _3, _4, _5, _6, _7);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_clear_mask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil)
|
||||
{
|
||||
bgfx::setViewClearMask(_viewMask, _flags, _rgba, _depth, _stencil);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_seq(uint8_t _id, bool _enabled)
|
||||
{
|
||||
bgfx::setViewSeq(_id, _enabled);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_seq_mask(uint32_t _viewMask, bool _enabled)
|
||||
{
|
||||
bgfx::setViewSeqMask(_viewMask, _enabled);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_frame_buffer(uint8_t _id, bgfx_frame_buffer_handle_t _handle)
|
||||
{
|
||||
union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle = { _handle };
|
||||
bgfx::setViewFrameBuffer(_id, handle.cpp);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_frame_buffer_mask(uint32_t _viewMask, bgfx_frame_buffer_handle_t _handle)
|
||||
{
|
||||
union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle = { _handle };
|
||||
bgfx::setViewFrameBufferMask(_viewMask, handle.cpp);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_transform(uint8_t _id, const void* _view, const void* _proj)
|
||||
{
|
||||
bgfx::setViewTransform(_id, _view, _proj);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_view_transform_mask(uint32_t _viewMask, const void* _view, const void* _proj)
|
||||
{
|
||||
bgfx::setViewTransformMask(_viewMask, _view, _proj);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_marker(const char* _marker)
|
||||
{
|
||||
bgfx::setMarker(_marker);
|
||||
|
@ -3410,11 +3286,6 @@ BGFX_C_API uint32_t bgfx_submit(uint8_t _id, int32_t _depth)
|
|||
return bgfx::submit(_id, _depth);
|
||||
}
|
||||
|
||||
BGFX_C_API uint32_t bgfx_submit_mask(uint32_t _viewMask, int32_t _depth)
|
||||
{
|
||||
return bgfx::submitMask(_viewMask, _depth);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_set_image(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_texture_format_t _format, bgfx_access_t _access)
|
||||
{
|
||||
union { bgfx_uniform_handle_t c; bgfx::UniformHandle cpp; } sampler = { _sampler };
|
||||
|
|
73
src/bgfx_p.h
73
src/bgfx_p.h
|
@ -1331,7 +1331,6 @@ namespace bgfx
|
|||
}
|
||||
|
||||
uint32_t submit(uint8_t _id, int32_t _depth);
|
||||
uint32_t submitMask(uint32_t _viewMask, int32_t _depth);
|
||||
uint32_t dispatch(uint8_t _id, ProgramHandle _handle, uint16_t _ngx, uint16_t _ngy, uint16_t _ngz);
|
||||
void sort();
|
||||
|
||||
|
@ -2652,17 +2651,6 @@ namespace bgfx
|
|||
rect.m_height = bx::uint16_max(_height, 1);
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewRectMask(uint32_t _viewMask, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) )
|
||||
{
|
||||
for (uint32_t view = 0, viewMask = _viewMask, ntz = bx::uint32_cnttz(_viewMask); 0 != viewMask; viewMask >>= 1, view += 1, ntz = bx::uint32_cnttz(viewMask) )
|
||||
{
|
||||
viewMask >>= ntz;
|
||||
view += ntz;
|
||||
|
||||
setViewRect( (uint8_t)view, _x, _y, _width, _height);
|
||||
}
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewScissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) )
|
||||
{
|
||||
Rect& scissor = m_scissor[_id];
|
||||
|
@ -2672,17 +2660,6 @@ namespace bgfx
|
|||
scissor.m_height = _height;
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewScissorMask(uint32_t _viewMask, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height) )
|
||||
{
|
||||
for (uint32_t view = 0, viewMask = _viewMask, ntz = bx::uint32_cnttz(_viewMask); 0 != viewMask; viewMask >>= 1, view += 1, ntz = bx::uint32_cnttz(viewMask) )
|
||||
{
|
||||
viewMask >>= ntz;
|
||||
view += ntz;
|
||||
|
||||
setViewScissor( (uint8_t)view, _x, _y, _width, _height);
|
||||
}
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewClear(uint8_t _id, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) )
|
||||
{
|
||||
Clear& clear = m_clear[_id];
|
||||
|
@ -2713,50 +2690,16 @@ namespace bgfx
|
|||
clear.m_stencil = _stencil;
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewClearMask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) )
|
||||
{
|
||||
for (uint32_t view = 0, viewMask = _viewMask, ntz = bx::uint32_cnttz(_viewMask); 0 != viewMask; viewMask >>= 1, view += 1, ntz = bx::uint32_cnttz(viewMask) )
|
||||
{
|
||||
viewMask >>= ntz;
|
||||
view += ntz;
|
||||
|
||||
setViewClear( (uint8_t)view, _flags, _rgba, _depth, _stencil);
|
||||
}
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewSeq(uint8_t _id, bool _enabled) )
|
||||
{
|
||||
m_seqMask[_id] = _enabled ? 0xffff : 0x0;
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewSeqMask(uint32_t _viewMask, bool _enabled) )
|
||||
{
|
||||
uint16_t mask = _enabled ? 0xffff : 0x0;
|
||||
for (uint32_t view = 0, viewMask = _viewMask, ntz = bx::uint32_cnttz(_viewMask); 0 != viewMask; viewMask >>= 1, view += 1, ntz = bx::uint32_cnttz(viewMask) )
|
||||
{
|
||||
viewMask >>= ntz;
|
||||
view += ntz;
|
||||
|
||||
m_seqMask[view] = mask;
|
||||
}
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewFrameBuffer(uint8_t _id, FrameBufferHandle _handle) )
|
||||
{
|
||||
m_fb[_id] = _handle;
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewFrameBufferMask(uint32_t _viewMask, FrameBufferHandle _handle) )
|
||||
{
|
||||
for (uint32_t view = 0, viewMask = _viewMask, ntz = bx::uint32_cnttz(_viewMask); 0 != viewMask; viewMask >>= 1, view += 1, ntz = bx::uint32_cnttz(viewMask) )
|
||||
{
|
||||
viewMask >>= ntz;
|
||||
view += ntz;
|
||||
|
||||
m_fb[view] = _handle;
|
||||
}
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewTransform(uint8_t _id, const void* _view, const void* _proj) )
|
||||
{
|
||||
if (NULL != _view)
|
||||
|
@ -2778,17 +2721,6 @@ namespace bgfx
|
|||
}
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setViewTransformMask(uint32_t _viewMask, const void* _view, const void* _proj) )
|
||||
{
|
||||
for (uint32_t view = 0, viewMask = _viewMask, ntz = bx::uint32_cnttz(_viewMask); 0 != viewMask; viewMask >>= 1, view += 1, ntz = bx::uint32_cnttz(viewMask) )
|
||||
{
|
||||
viewMask >>= ntz;
|
||||
view += ntz;
|
||||
|
||||
setViewTransform( (uint8_t)view, _view, _proj);
|
||||
}
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setMarker(const char* _marker) )
|
||||
{
|
||||
m_submit->setMarker(_marker);
|
||||
|
@ -2898,11 +2830,6 @@ namespace bgfx
|
|||
return m_submit->submit(_id, _depth);
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(uint32_t submitMask(uint32_t _viewMask, int32_t _depth) )
|
||||
{
|
||||
return m_submit->submitMask(_viewMask, _depth);
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void setImage(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint8_t _mip, TextureFormat::Enum _format, Access::Enum _access) )
|
||||
{
|
||||
m_submit->setImage(_stage, _sampler, _handle, _mip, _format, _access);
|
||||
|
|
Loading…
Reference in a new issue