mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Merge pull request #329 from MikePopoloski/master
Allow the max draw call count to go above 65k.
This commit is contained in:
commit
99c645a353
1 changed files with 11 additions and 5 deletions
16
src/bgfx_p.h
16
src/bgfx_p.h
|
@ -215,6 +215,12 @@ namespace stl
|
|||
# define BGFX_RENDERER_OPENGL_NAME "OpenGL"
|
||||
#endif //
|
||||
|
||||
#if BGFX_CONFIG_MAX_DRAW_CALLS < (64<<10)
|
||||
typedef uint16_t DrawCountType;
|
||||
#else
|
||||
typedef uint32_t DrawCountType;
|
||||
#endif
|
||||
|
||||
namespace bgfx
|
||||
{
|
||||
#if BX_PLATFORM_ANDROID
|
||||
|
@ -1617,7 +1623,7 @@ namespace bgfx
|
|||
uint8_t m_viewFlags[BGFX_CONFIG_MAX_VIEWS];
|
||||
|
||||
uint64_t m_sortKeys[BGFX_CONFIG_MAX_DRAW_CALLS+1];
|
||||
uint16_t m_sortValues[BGFX_CONFIG_MAX_DRAW_CALLS+1];
|
||||
DrawCountType m_sortValues[BGFX_CONFIG_MAX_DRAW_CALLS+1];
|
||||
RenderItem m_renderItem[BGFX_CONFIG_MAX_DRAW_CALLS+1];
|
||||
RenderDraw m_draw;
|
||||
RenderCompute m_compute;
|
||||
|
@ -1627,9 +1633,9 @@ namespace bgfx
|
|||
|
||||
ConstantBuffer* m_constantBuffer;
|
||||
|
||||
uint16_t m_num;
|
||||
uint16_t m_numRenderItems;
|
||||
uint16_t m_numDropped;
|
||||
DrawCountType m_num;
|
||||
DrawCountType m_numRenderItems;
|
||||
DrawCountType m_numDropped;
|
||||
|
||||
MatrixCache m_matrixCache;
|
||||
RectCache m_rectCache;
|
||||
|
@ -3424,7 +3430,7 @@ namespace bgfx
|
|||
Frame* m_submit;
|
||||
|
||||
uint64_t m_tempKeys[BGFX_CONFIG_MAX_DRAW_CALLS];
|
||||
uint16_t m_tempValues[BGFX_CONFIG_MAX_DRAW_CALLS];
|
||||
DrawCountType m_tempValues[BGFX_CONFIG_MAX_DRAW_CALLS];
|
||||
|
||||
VertexBuffer m_vertexBuffers[BGFX_CONFIG_MAX_VERTEX_BUFFERS];
|
||||
|
||||
|
|
Loading…
Reference in a new issue