mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-26 16:44:00 -05:00
NVG now uses same viewId as imgui.
This commit is contained in:
parent
6eafd8b137
commit
5cca4686e2
3 changed files with 9 additions and 0 deletions
|
@ -813,6 +813,7 @@ struct Imgui
|
||||||
void beginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar, uint8_t _view)
|
void beginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar, uint8_t _view)
|
||||||
{
|
{
|
||||||
IMGUI_beginFrame(_mx, _my, _button, _width, _height, _inputChar, _view);
|
IMGUI_beginFrame(_mx, _my, _button, _width, _height, _inputChar, _view);
|
||||||
|
nvgViewId(m_nvg, _view);
|
||||||
|
|
||||||
m_view = _view;
|
m_view = _view;
|
||||||
m_viewWidth = _width;
|
m_viewWidth = _width;
|
||||||
|
|
|
@ -599,6 +599,7 @@ struct NVGparams {
|
||||||
typedef struct NVGparams NVGparams;
|
typedef struct NVGparams NVGparams;
|
||||||
|
|
||||||
NVGcontext* nvgCreate(int edgeaa, unsigned char viewid);
|
NVGcontext* nvgCreate(int edgeaa, unsigned char viewid);
|
||||||
|
void nvgViewId(struct NVGcontext* ctx, unsigned char viewid);
|
||||||
void nvgDelete(struct NVGcontext* ctx);
|
void nvgDelete(struct NVGcontext* ctx);
|
||||||
|
|
||||||
// Contructor and destructor, called by the render back-end.
|
// Contructor and destructor, called by the render back-end.
|
||||||
|
|
|
@ -1051,6 +1051,13 @@ error:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nvgViewId(struct NVGcontext* ctx, unsigned char viewid)
|
||||||
|
{
|
||||||
|
struct NVGparams* params = nvgInternalParams(ctx);
|
||||||
|
struct GLNVGcontext* gl = (struct GLNVGcontext*)params->userPtr;
|
||||||
|
gl->viewid = uint8_t(viewid);
|
||||||
|
}
|
||||||
|
|
||||||
void nvgDelete(struct NVGcontext* ctx)
|
void nvgDelete(struct NVGcontext* ctx)
|
||||||
{
|
{
|
||||||
nvgDeleteInternal(ctx);
|
nvgDeleteInternal(ctx);
|
||||||
|
|
Loading…
Reference in a new issue