From 1f228a172b191c2fb3c74d3358e380fa09acce81 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sun, 12 Jan 2014 21:43:47 -0800 Subject: [PATCH] Increased BGFX_CONFIG_MAX_DRAW_CALLS to 64K. --- examples/common/imgui/imgui.cpp | 8 ++++++++ examples/common/imgui/imgui.h | 3 ++- src/bgfx_p.h | 2 ++ src/config.h | 6 +++--- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/examples/common/imgui/imgui.cpp b/examples/common/imgui/imgui.cpp index 1d7a4d21..5035de2a 100644 --- a/examples/common/imgui/imgui.cpp +++ b/examples/common/imgui/imgui.cpp @@ -1505,6 +1505,14 @@ bool imguiSlider(const char* _text, float* _val, float _vmin, float _vmax, float return s_imgui.slider(_text, _val, _vmin, _vmax, _vinc, _enabled); } +bool imguiSlider(const char* _text, int32_t* _val, int32_t _vmin, int32_t _vmax, bool _enabled) +{ + float val = (float)*_val; + bool result = s_imgui.slider(_text, &val, (float)_vmin, (float)_vmax, 1.0f, _enabled); + *_val = (int32_t)val; + return result; +} + void imguiDrawText(int32_t _x, int32_t _y, ImguiTextAlign::Enum _align, const char* _text, uint32_t _argb) { s_imgui.drawText(_x, _y, _align, _text, _argb); diff --git a/examples/common/imgui/imgui.h b/examples/common/imgui/imgui.h index 2451cca9..24a652b0 100644 --- a/examples/common/imgui/imgui.h +++ b/examples/common/imgui/imgui.h @@ -69,7 +69,8 @@ bool imguiCheck(const char* _text, bool _checked, bool _enabled = true); bool imguiCollapse(const char* _text, const char* _subtext, bool _checked, bool _enabled = true); void imguiLabel(const char* _format, ...); void imguiValue(const char* _text); -bool imguiSlider(const char* _text, float* val, float vmin, float vmax, float vinc, bool _enabled = true); +bool imguiSlider(const char* _text, float* _val, float _vmin, float _vmax, float _vinc, bool _enabled = true); +bool imguiSlider(const char* _text, int32_t* _val, int32_t _vmin, int32_t _vmax, bool _enabled = true); void imguiDrawText(int _x, int _y, ImguiTextAlign::Enum _align, const char* _text, uint32_t _argb); void imguiDrawLine(float _x0, float _y0, float _x1, float _y1, float _r, uint32_t _argb); diff --git a/src/bgfx_p.h b/src/bgfx_p.h index f87bab06..c418fb9b 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -991,6 +991,8 @@ namespace bgfx BX_CACHE_LINE_ALIGN_MARKER(); Frame() + : m_waitSubmit(0) + , m_waitRender(0) { } diff --git a/src/config.h b/src/config.h index dd96811e..4541cf48 100644 --- a/src/config.h +++ b/src/config.h @@ -116,7 +116,7 @@ #endif // BGFX_CONFIG_DEBUG_OBJECT_NAME #ifndef BGFX_CONFIG_MULTITHREADED -# define BGFX_CONFIG_MULTITHREADED ( (!BGFX_CONFIG_RENDERER_NULL)&(0 \ +# define BGFX_CONFIG_MULTITHREADED ( (!BGFX_CONFIG_RENDERER_NULL)&&(0 \ | BX_PLATFORM_ANDROID \ | BX_PLATFORM_IOS \ | BX_PLATFORM_LINUX \ @@ -129,11 +129,11 @@ #endif // BGFX_CONFIG_MULTITHREADED #ifndef BGFX_CONFIG_MAX_DRAW_CALLS -# define BGFX_CONFIG_MAX_DRAW_CALLS (8<<10) +# define BGFX_CONFIG_MAX_DRAW_CALLS ( (64<<10)-1) #endif // BGFX_CONFIG_MAX_DRAW_CALLS #ifndef BGFX_CONFIG_MAX_MATRIX_CACHE -# define BGFX_CONFIG_MAX_MATRIX_CACHE (16<<10) +# define BGFX_CONFIG_MAX_MATRIX_CACHE (64<<10) #endif // BGFX_CONFIG_MAX_MATRIX_CACHE #ifndef BGFX_CONFIG_MAX_RECT_CACHE