Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SampleColormapU32 always uses the current Style Colormap, instead of the cmap argument #213

Closed
JamAndCheese opened this issue Apr 8, 2021 · 1 comment

Comments

@JamAndCheese
Copy link

JamAndCheese commented Apr 8, 2021

I apologize I do not know how to refer to individual files or lines with markdown.
However the file is implot.cpp, near line 3403. The line with the fix is shown below, with the buggy line commented out and the fix right below.

ImU32  SampleColormapU32(float t, ImPlotColormap cmap) {
      ImPlotContext& gp = *GImPlot;
      cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap;
      IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!");
      //    return gp.ColormapData.LerpTable(gp.Style.Colormap,t);
      return gp.ColormapData.LerpTable( cmap, t );
 }
@epezent
Copy link
Owner

epezent commented Apr 8, 2021

Sorry about that. Just pushed a fix.

@epezent epezent closed this as completed Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants