1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-22 18:28:53 -05:00
This commit is contained in:
Evan Pezent 2021-10-22 22:52:18 -07:00
parent a8456786b6
commit d34204b5a7
4 changed files with 6 additions and 5 deletions

View File

@ -176,9 +176,9 @@ ImPlotStyle::ImPlotStyle() {
AntiAliasedLines = false;
#ifdef IMPLOT_BACKEND_ENABLED
UseGpuAacceleration = true;
UseGpuAcceleration = true;
#else
UseGpuAacceleration = false;
UseGpuAcceleration = false;
#endif
}
@ -4665,7 +4665,7 @@ void ShowStyleEditor(ImPlotStyle* ref) {
ImGui::Indent(ImGui::CalcItemWidth() - ImGui::GetFrameHeight());
ImGui::Checkbox("AntiAliasedLines", &style.AntiAliasedLines);
#ifdef IMPLOT_BACKEND_ENABLED
ImGui::Checkbox("UseGpuAacceleration", &style.UseGpuAacceleration);
ImGui::Checkbox("UseGpuAcceleration", &style.UseGpuAcceleration);
#endif
ImGui::Unindent(indent);
ImGui::Text("Plot Styling");

View File

@ -390,7 +390,7 @@ struct ImPlotStyle {
bool UseISO8601; // = false, dates will be formatted according to ISO 8601 where applicable (e.g. YYYY-MM-DD, YYYY-MM, --MM-DD, etc.)
bool Use24HourClock; // = false, times will be formatted using a 24 hour clock
bool AntiAliasedLines; // = false, enable global anti-aliasing on plot lines (overrides ImPlotFlags_AntiAliased)
bool UseGpuAacceleration; // = true*, GPU acceleration will be enabled where your backend supports it (*only true if a backend is enabled, false otherwise)
bool UseGpuAcceleration; // = true*, GPU acceleration will be enabled where your backend supports it (*only true if a backend is enabled, false otherwise)
IMPLOT_API ImPlotStyle();
};

View File

@ -269,6 +269,7 @@ void ShowDemo_Config() {
ImPlot::ShowInputMapSelector("Input Map");
ImGui::Separator();
ImGui::Checkbox("Anti-Aliased Lines", &ImPlot::GetStyle().AntiAliasedLines);
ImGui::Checkbox("Use GPU Acceleration", &ImPlot::GetStyle().UseGpuAcceleration);
ImGui::Checkbox("Use Local Time", &ImPlot::GetStyle().UseLocalTime);
ImGui::Checkbox("Use ISO 8601", &ImPlot::GetStyle().UseISO8601);
ImGui::Checkbox("Use 24 Hour Clock", &ImPlot::GetStyle().Use24HourClock);

View File

@ -1951,7 +1951,7 @@ void RenderHeatmap(Transformer transformer, ImDrawList& DrawList, const T* value
const double yref = reverse_y ? bounds_max.y : bounds_min.y;
const double ydir = reverse_y ? -1 : 1;
#ifdef IMPLOT_BACKEND_HAS_HEATMAP
if (GImPlot->Style.UseGpuAacceleration) {
if (GImPlot->Style.UseGpuAcceleration) {
ImVec2 bmin = transformer(bounds_min);
ImVec2 bmax = transformer(bounds_max);