Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#if defined(_WIN32)
extern "C" __declspec(dllexport) unsigned long NvOptimusEnablement = 0;
extern "C" __declspec(dllexport) unsigned long AmdPowerXpressRequestHighPerformance = 0;
#else
unsigned long NvOptimusEnablement = 0;
unsigned long AmdPowerXpressRequestHighPerformance = 0;
#endif

void StyeColorsApp()
Expand Down
2 changes: 1 addition & 1 deletion demos/filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct ImFilter : public App {
ImGui::SetNextWindowPos(ImVec2(0,0), ImGuiCond_Always);
ImGui::SetNextWindowSize(GetWindowSize(), ImGuiCond_Always);
ImGui::Begin("Filter",nullptr, ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoTitleBar);
ImGui::BeginChild("ChildL", ImVec2(ImGui::GetWindowContentRegionWidth() * 0.5f, -1));
ImGui::BeginChild("ChildL", ImVec2(ImGui::GetWindowWidth() * 0.5f, -1));
ImGui::Text("Input: x(t) = A1*sin(2*pi*F1*t) + A2*sin(2*pi*F1*t) + noise");
ImGui::Separator();

Expand Down
6 changes: 3 additions & 3 deletions demos/maps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class TileManager {
long rc = 0;
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &rc);
if (!((rc == 200 || rc == 201) && rc != CURLE_ABORTED_BY_CALLBACK))
printf("TileManager[%02d]: Response code: %d\n",thrd,rc);
printf("TileManager[%02d]: Response code: %ld\n",thrd,rc);
fs::remove(coord.path());
success = false;
}
Expand Down Expand Up @@ -319,7 +319,7 @@ struct ImMaps : public App {
void Update() override {
static int renders = 0;
static bool debug = false;
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_A)))
if (ImGui::IsKeyPressed(ImGuiKey_A))
debug = !debug;

ImGui::SetNextWindowPos({0,0});
Expand Down Expand Up @@ -355,7 +355,7 @@ struct ImMaps : public App {
auto [bmin,bmax] = coord.bounds();
if (tile != nullptr) {
auto col = debug ? ((coord.x % 2 == 0 && coord.y % 2 != 0) || (coord.x % 2 != 0 && coord.y % 2 == 0))? ImVec4(1,0,1,1) : ImVec4(1,1,0,1) : ImVec4(1,1,1,1);
ImPlot::PlotImage("##Tiles",(void*)(intptr_t)tile->image.ID,bmin,bmax,{0,0},{1,1},col);
ImPlot::PlotImage("##Tiles",tile->image.ID,bmin,bmax,{0,0},{1,1},col);
}
if (debug)
ImPlot::PlotText(coord.label().c_str(),(bmin.x+bmax.x)/2,(bmin.y+bmax.y)/2);
Expand Down
8 changes: 5 additions & 3 deletions tests/benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ struct ImPlotBench : App
running = false;
run_t2 = Clock::now();
size_t run_span = (size_t)std::chrono::duration_cast<std::chrono::microseconds>(run_t2 - run_t1).count();
printf("Run completed in %u us (%.3f s)\n", run_span, run_span / 1000000.0f);
printf("Run completed in %zu us (%.3f s)\n", run_span, run_span / 1000000.0f);
}
}
}
Expand Down Expand Up @@ -645,7 +645,7 @@ struct ImPlotBench : App
}
ImGui::SameLine();
static char start_str[32];
sprintf(start_str, running ? "Stop (%u)" : "Start (%u)", m_queue.size());
sprintf(start_str, running ? "Stop (%zu)" : "Start (%zu)", m_queue.size());
if (ImGui::Button(start_str, ImVec2(-1, 0)))
{
running = !running;
Expand Down Expand Up @@ -747,10 +747,12 @@ struct ImPlotBench : App
ImPlot::SetupAxis(ImAxis_Y1, "Time [ms]");
ImPlot::SetupAxesLimits(0, kMaxElems, 0, 50);
ImPlot::SetupAxisFormat(ImAxis_X1, fmtr);
ImPlot::SetupAxisLimits(ImAxis_Y2, 0, 500, ImPlotCond_Once);
ImPlot::SetupLegend(ImPlotLocation_East, ImPlotLegendFlags_Outside);
if (show_fps)
{
ImPlot::SetupAxis(ImAxis_Y2, "FPS [Hz]", ImPlotAxisFlags_Opposite);
ImPlot::SetupAxisLimits(ImAxis_Y2, 0, 500, ImPlotCond_Once);
}

for (auto &collection : m_records[selected_branch])
{
Expand Down