1
0
mirror of synced 2025-01-25 15:53:43 +01:00

build: Small ImPlot3D fixes to make it build on all platforms

This commit is contained in:
WerWolv 2024-12-18 20:18:27 +01:00
parent 9ca40d3651
commit 0f53656952
3 changed files with 6 additions and 1 deletions

View File

@ -51,6 +51,8 @@
#include "implot3d.h"
#include "implot3d_internal.h"
#include <cmath>
#ifndef IMGUI_DISABLE
//-----------------------------------------------------------------------------

View File

@ -291,7 +291,7 @@ void DemoSurfacePlots() {
int idx = i * N + j;
xs[idx] = range_min + j * step; // X values are constant along rows
ys[idx] = range_min + i * step; // Y values are constant along columns
zs[idx] = sinf(std::sqrt(xs[idx] * xs[idx] + ys[idx] * ys[idx])); // Z = sin(sqrt(X^2 + Y^2))
zs[idx] = sinf(sqrt(xs[idx] * xs[idx] + ys[idx] * ys[idx])); // Z = sin(sqrt(X^2 + Y^2))
}
}

View File

@ -702,6 +702,9 @@ template <class _Getter>
struct RendererSurfaceFill : RendererBase {
RendererSurfaceFill(const _Getter& getter, int x_count, int y_count, ImU32 col) : RendererBase((x_count - 1) * (y_count - 1), 6, 4),
Getter(getter),
UV({}),
Min(0.0f),
Max(0.0f),
XCount(x_count),
YCount(y_count),
Col(col) {}