1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-13 14:38:51 -05:00

fix compiler warning in demo

This commit is contained in:
Evan Pezent 2021-06-08 19:36:28 -07:00
parent 3109940b46
commit 0cafcd0011

View File

@ -222,7 +222,8 @@ void ShowDemoWindow(bool* p_open) {
//-------------------------------------------------------------------------
ImGui::Text("ImPlot says hello. (%s)", IMPLOT_VERSION);
// display warning about 16-bit indices
if (sizeof(ImDrawIdx)*8 == 16 && (ImGui::GetIO().BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset) == false) {
static bool showWarning = sizeof(ImDrawIdx)*8 == 16 && (ImGui::GetIO().BackendFlags & ImGuiBackendFlags_RendererHasVtxOffset) == false;
if (showWarning) {
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1,1,0,1));
ImGui::TextWrapped("WARNING: ImDrawIdx is 16-bit and ImGuiBackendFlags_RendererHasVtxOffset is false. Expect visual glitches and artifacts! See README for more information.");
ImGui::PopStyleColor();