mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-17 20:31:57 -05:00
Fixed Linux build.
This commit is contained in:
parent
f08ce4fdaa
commit
b5f1a4fcf9
3 changed files with 12 additions and 5 deletions
|
@ -338,6 +338,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
|
|||
}
|
||||
|
||||
// Cleanup.
|
||||
imguiDestroy();
|
||||
bgfx::destroyIndexBuffer(ibh);
|
||||
bgfx::destroyVertexBuffer(vbh);
|
||||
bgfx::destroyProgram(program);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <bx/uint32_t.h>
|
||||
#include <bgfx.h>
|
||||
|
||||
#include "../entry/dbg.h"
|
||||
#include "imgui.h"
|
||||
#include "../fpumath.h"
|
||||
|
||||
|
@ -1513,17 +1514,22 @@ bool imguiSlider(const char* _text, int32_t* _val, int32_t _vmin, int32_t _vmax,
|
|||
return result;
|
||||
}
|
||||
|
||||
uint32_t imguiChooseUseMacroInstead(uint32_t _selected, const char* _first, ...)
|
||||
uint32_t imguiChooseUseMacroInstead(uint32_t _selected, ...)
|
||||
{
|
||||
uint32_t ii = 0;
|
||||
for (const char** str = &_first; *str != NULL; ++str, ++ii)
|
||||
va_list argList;
|
||||
va_start(argList, _selected);
|
||||
|
||||
const char* str = va_arg(argList, const char*);
|
||||
for (uint32_t ii = 0; str != NULL; ++ii, str = va_arg(argList, const char*))
|
||||
{
|
||||
if (imguiCheck(*str, ii == _selected) )
|
||||
if (imguiCheck(str, ii == _selected) )
|
||||
{
|
||||
_selected = ii;
|
||||
}
|
||||
}
|
||||
|
||||
va_end(argList);
|
||||
|
||||
return _selected;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ 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, int32_t* _val, int32_t _vmin, int32_t _vmax, bool _enabled = true);
|
||||
|
||||
uint32_t imguiChooseUseMacroInstead(uint32_t _selected, const char* _first, ...);
|
||||
uint32_t imguiChooseUseMacroInstead(uint32_t _selected, ...);
|
||||
#define imguiChoose(...) imguiChooseUseMacroInstead(__VA_ARGS__, NULL)
|
||||
|
||||
void imguiDrawText(int _x, int _y, ImguiTextAlign::Enum _align, const char* _text, uint32_t _argb);
|
||||
|
|
Loading…
Reference in a new issue