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

Minimal changes needed to make the example build and run on macOS #7

Merged
merged 3 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
make the example build on macOS
  • Loading branch information
floooh committed Dec 18, 2024
commit 3c986495ca55d715fbdb5f1cf5d1101ea39beb18
3 changes: 2 additions & 1 deletion example/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ int main() {
return -1;
}
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GLFW_TRUE);

// Create window
GLFWwindow* window = glfwCreateWindow(800, 600, "Example", nullptr, nullptr);
Expand Down
1 change: 1 addition & 0 deletions implot3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#define IMGUI_DEFINE_MATH_OPERATORS
#endif

#include <cmath>
brenocq marked this conversation as resolved.
Show resolved Hide resolved
#include "implot3d.h"
#include "implot3d_internal.h"

Expand Down
2 changes: 1 addition & 1 deletion implot3d_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand Down