Skip to content

Instantly share code, notes, and snippets.

@moebiussurfing
Last active February 11, 2020 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moebiussurfing/73953e47d02c7e2bbdb484c42b80d390 to your computer and use it in GitHub Desktop.
Save moebiussurfing/73953e47d02c7e2bbdb484c42b80d390 to your computer and use it in GitHub Desktop.
openFrameworks - ImGui vec sliders
static float position[] = {0.0f, 0.0f};
ImGui::SliderFloat2("position", position, -1.0f, 1.0f);
static glm::vec3 myVector{0.0f, 0.0f, 0.0f};
ImGui::SliderFloat3("myVector", (float*)&myVector, 0.0f, 1.0f);
static ImVec4 myImVector{1.0f, 1.0f, 1.0f, 1.0f};
ImGui::SliderFloat4("myImVector", (float*)&myImVector, 0.0f, 1.0f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment