1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-26 20:28:50 -05:00
Commit Graph

575 Commits

Author SHA1 Message Date
Joshua Minor fcb51d2c9c
Use snprintf instead of sprintf in implot_demo.cpp (#426)
* Use snprintf instead of sprintf in implot_demo.cpp

* Enlarged text buffer

Co-authored-by: BenBE <BenBE@geshi.org>

Co-authored-by: BenBE <BenBE@geshi.org>
2022-11-25 09:21:45 -06:00
omar 626e391670
Fixes for ImGuiModFlags_XXX -> ImGuiMod_XXX (v1.89) (#347) (#407)
Sorry!
2022-09-29 13:00:23 -05:00
omar 8879c99aef
Fix for allowing core imgui to use typed ImGuiCol / ImGuiStyleVar enums. (#405) 2022-09-23 19:30:19 -05:00
Evan Pezent 6978a3e177
Update README.md 2022-09-17 15:25:29 -05:00
Evan Pezent 15e494b76a Merge branch 'master' of https://github.com/epezent/implot 2022-09-17 15:02:47 -05:00
Evan Pezent f88ad32a47 remove mention of IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES in implot_items.cpp 2022-09-17 15:02:34 -05:00
Evan Pezent 3e13c95986
Add ImPlotLegendFlags_Sort (#404)
* add ImPlotLegendFlags_Sort

* replace qsort_s with qsort
2022-09-17 14:23:26 -05:00
Evan Pezent 4ba42f200a address a few static analysis warnings 2022-09-17 13:17:07 -05:00
Evan Pezent 57149164d5 Fix clamp in SetupAxisTicks 2022-09-17 10:25:30 -05:00
Evan Pezent 9ef3a97966 Merge branch 'master' of https://github.com/epezent/implot 2022-09-17 10:20:33 -05:00
Evan Pezent 921a81f307 Replace assert with clamp in SetupAxisTicks 2022-09-17 10:20:20 -05:00
Mengna Li 8c06ff0252
Add vcpkg installation instructions (#401)
* Add vcpkg installation instructions

* update
2022-09-15 07:00:13 -05:00
Pascal Thomet 98c76edbb4
Remove support for IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES (#402) 2022-09-14 09:41:10 -05:00
Pascal Thomet f719a180ff
Support custom numeric types (#399)
* implot_items.cpp: support types customization

You can customize the supported types in two ways:
  1. Define IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES at compile time to add support for all known types.
  2. Or, define IMPLOT_CUSTOM_NUMERIC_TYPES at compile time to define your own type list. As an example, you could use the compile time define given by the line below in order to support only float and double.
        -DIMPLOT_CUSTOM_NUMERIC_TYPES="(float)(double)"

Details:

- `CALL_INSTANTIATE_FOR_NUMERIC_TYPES` will duplicate the template instantion code `INSTANTIATE_MACRO(T)` on supported types. It uses a trick to be able to loop on the type list `IMPLOT_NUMERIC_TYPES`

- `INSTANTIATE_MACRO` needs to be defined, then undefined before and after each template instantiation

* CI: link example app, with null backend

Github's CI will now compile ImGui, compile ImPlot, link and run an example application (with no backend).
It serves as a proof that an app can be built, linked, and run, with type customization.

- .github/example_implot.cpp is an example app built with Dear ImGui and ImPlot
  This app uses implot and imgui, but does not output to any backend!
  If `IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES` is active, it will test that `long double` is supported.

- Corrected arch matrix options:
     32 bits or 64 bits for win and linux
     x86_64 or arm64 for mac (32 bits is deprecated on macs, and will not link with recent XCode)

- Added `IMPLOT_NUMERIC_SETIMPLOT_NUMERIC_SET` as a switch to CMakeList
  This switch is currently not used in CI, but can be used during development.
  It could be later be used in the matrix options, at the cost of increasing the number of build
   per workflow.

Note: support for MingW 32 bits was commented out. MingW on Github CI does not fully support 32 bits: link fails when it tries to link 64 bits system libraries. As a result, the windows matrix was spearated into Windows_MSVC and Windows_MingW
2022-09-13 20:39:29 -05:00
Pascal Thomet 49db527db1
Support long & long double, add macro INSTANTIATE_FOR_NUMERIC_TYPES (Fix #319) (#397)
* implot_items: INSTANTIATE_FOR_NUMERIC_TYPES / add long & long double (Fix #319)

- INSTANTIATE_FOR_NUMERIC_TYPES is a macro which instantiates templated plotting functions for numeric types.
This macro helps reduce some boilerplate code for template functions instantiations.

- Added optional support for more numeric types (long and long double)
The numeric type list does not include "long", "unsigned long" and "long double".
Most of the time, it is not an issue when linking statically.
However, when linking dynamically, issues related to undefined functions can arise:
although those types might have the same size, they are considered separate.

define IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES) in order to define versions for those types

In this case, the compilation time for this specific file will be 33% longer

- implot_internal.h / ImMean and ImStdDev: added cast  to double
(suppress MSVC warning about downcasting)

- Notes about numeric types "synonyms":
  Even if "long double" and "double" might occupy the same size,
they are not complete synonyms, and it is legal to define overloads for both double and long double.
  On some platforms, "unsigned long" might be the same size as "unsigned long long",
but it is nonetheless a separate type: see https://godbolt.org/z/1KWv5re7q (example with GCC 64 bits)
  On some other platforms, "long double" might be the same size as "double", but it is nonetheless a separate type: see https://godbolt.org/z/ae71P7rqG (example with MSVC 64 bits)

* IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES: disabled by default

* uppercase template instantiatation macros & group them

* implot_items.cpp: reword comments on IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES

* README.md: mention compile-time option IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES

* Github CI: IMPLOT_INSTANTIATE_ALL_NUMERIC_TYPES=1
2022-09-11 09:43:27 -05:00
Rokas Kupstys fd16fe001c
CI setup (#395)
* Fix truncation warnings.

* CI: GitHub Actions CI setup.
2022-09-06 18:28:32 -05:00
Rokas Kupstys 002ffc95bc
Fix truncation warnings. (#392) 2022-09-06 18:17:09 -05:00
ozlb e80e42e8b4
ImPlotTimeFmt_MinSMs (#383) 2022-07-29 07:57:51 -05:00
ozlb 220f5c9ab4
Annotation Label y axis fix (#384) 2022-07-28 22:41:21 -05:00
Evan Pezent 7a470b2e17 add ImPlotAxisFlags_NoSideSwitch and ImPlotAxisFlags_NoHighlight 2022-07-07 20:27:24 -05:00
Evan Pezent f33a5990d7 Merge branch 'master' of https://github.com/epezent/implot 2022-07-07 19:04:24 -05:00
Evan Pezent 1fed5c2c19 temp fix for time formatted mouse position text 2022-07-07 19:04:16 -05:00
K b4aec718a5
fix merge typo in Locator_Time() (#380) 2022-07-07 18:31:05 -05:00
Evan Pezent 8c53333489 fix PlotDigital/Dummy flags 2022-07-04 19:30:36 -05:00
Evan Pezent fc0fd11246 ImPlotLineFlags_Shaded and ImPlotStairsFlags_Shaded 2022-06-22 11:00:42 -05:00
Evan Pezent 6c00109636 make ColormapScale reversable 2022-06-20 07:48:51 -05:00
Evan Pezent 0f4d4dccc3 add ImPlotColormapScaleFlags 2022-06-19 22:51:51 -05:00
Evan Pezent 6f4986b14f add ColormapSlider to demo 2022-06-19 21:14:36 -05:00
Evan Pezent dbb461db24 update README 2022-06-18 23:16:01 -05:00
Evan Pezent 63d5ed94b7
Features/item flags (#319)
* add PlotBarGroups and layout some plans for flags

* exprimentin

* item flags added to each plotter

* rendering templates

* rendering templates

* item flags and axis scales

* item flags

* template markers

* markers

* benching

* buffer

* inline adjust

* inline fix

* dunno

* fix some todos

* tickers

* clean up

* update TODO

* update breaking changes

* demo cleanup

* remove TODO label

* header cleanup
2022-06-18 22:59:32 -05:00
Rokas Kupstys 79b05d5e25
Fix freed memory read error in AddTicksTime(). Invalid read occurred when LabelTickTime() resizes ticks.TextBuffer while last_major held pointer pointing into old now freed buffer. (#365)
Fixed a warning about condition depending on uninitialized ImPlotLegend::PreviousLocation.
2022-06-17 09:09:25 -05:00
rjasiak54 b9c0a39b08
in README.md 'Demos' section, changed 'imgui_demo.h' to imgui_demo.cpp' (#369) 2022-06-17 09:06:38 -05:00
Evan Pezent 3dd7e75c7d gaurd IMPLOT_DISABLE_OBSOLETE_FUNCTIONS in implot_demo.cpp 2022-05-08 10:40:27 -05:00
Evan Pezent 947c2c02e4 gaurd IMPLOT_DISABLE_OBSOLETE_FUNCTIONS in implot_demo.cpp 2022-05-08 10:40:16 -05:00
Evan Pezent 32a4617cd6 fix legend icons and drag tools with ImGui::KeepAliveID 2022-05-08 10:23:42 -05:00
Max Schwarz 196a0243c5
ImPlotAxis::WillRender(): return false if axis is disabled (#350)
This saves a few CPU cycles in SetupFinish(), which otherwise formats
tick labels & spacing for disabled axes.
2022-04-20 20:19:39 -07:00
omar df4256c9e8
Demo: tweak for runtime speed. (#353) 2022-04-20 20:19:01 -07:00
omar 1160243218
Fix for 1.88 WIP (18716) renaming ImGuiKeyModFlags to ImGuiModFlags (#347) 2022-04-05 06:58:12 -07:00
Evan Pezent b47c8bacdb Merge branch 'master' of https://github.com/epezent/implot 2022-01-30 17:07:12 -08:00
Evan Pezent 58240e5311 remove redefinition of GetInputMap 2022-01-30 17:07:05 -08:00
Evan Pezent 9b4ba149ec
Update README.md 2022-01-30 10:47:33 -08:00
Evan Pezent f438a21813 fix comment find/replace accident 2022-01-30 10:26:21 -08:00
Evan Pezent 86f4dd6e5c use ImFormatString instead of sprintf/snprintf 2022-01-30 10:19:29 -08:00
Evan Pezent adfc96810e remove unecessary msvc warning disables 2022-01-30 10:08:55 -08:00
Evan Pezent 8d3bd31395 -Wformat-nonliteral 2022-01-30 10:06:39 -08:00
Evan Pezent 168244e422 replace sprintf with snprintf 2022-01-30 09:54:49 -08:00
Evan Pezent 3a53f0b796 init PixelMin/Max 2022-01-30 09:35:49 -08:00
Evan Pezent 199b4803b6 Merge branch 'sergeyn-pr_branch' 2022-01-30 09:32:07 -08:00
Sergey Nenakhov 6659b164fe intel compiler warning fixes (and fastmath in general) 2022-01-23 00:50:18 +01:00
Evan Pezent 4fcc6e01ac fix sizeof(T) in IndexData 2021-12-02 20:54:54 -08:00