GDI+ split rendering GUI and clear surface
For example, I draw something via GDI+. Now I can call `nk_gdip_render_gui(AA)` and it will not erase my drawings, just will draw on top. Previos API was not changed.
This commit is contained in:
parent
4442697ee0
commit
35e8558be4
@ -1040,7 +1040,7 @@ nk_gdip_shutdown(void)
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_gdip_render(enum nk_anti_aliasing AA, struct nk_color clear)
|
||||
nk_gdip_render_gui(enum nk_anti_aliasing AA)
|
||||
{
|
||||
const struct nk_command *cmd;
|
||||
|
||||
@ -1048,7 +1048,6 @@ nk_gdip_render(enum nk_anti_aliasing AA, struct nk_color clear)
|
||||
TextRenderingHintClearTypeGridFit : TextRenderingHintSingleBitPerPixelGridFit);
|
||||
GdipSetSmoothingMode(gdip.memory, AA != NK_ANTI_ALIASING_OFF ?
|
||||
SmoothingModeHighQuality : SmoothingModeNone);
|
||||
nk_gdip_clear(clear);
|
||||
|
||||
nk_foreach(cmd, &gdip.ctx)
|
||||
{
|
||||
@ -1129,4 +1128,11 @@ nk_gdip_render(enum nk_anti_aliasing AA, struct nk_color clear)
|
||||
nk_clear(&gdip.ctx);
|
||||
}
|
||||
|
||||
NK_API void
|
||||
nk_gdip_render(enum nk_anti_aliasing AA, struct nk_color clear)
|
||||
{
|
||||
nk_gdip_clear(clear);
|
||||
nk_gdip_render_gui(AA);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user