Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 43ceefd

Browse files
committed
[glfw] Added queryRenderedFeatures shortcut
1 parent 3f1eaeb commit 43ceefd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

platform/default/glfw_view.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ GLFWView::GLFWView(bool fullscreen_, bool benchmark_)
105105
printf("- Press `1` through `6` to add increasing numbers of point annotations for testing\n");
106106
printf("- Press `7` through `0` to add increasing numbers of shape annotations for testing\n");
107107
printf("\n");
108-
printf("- Press `Q` to remove annotations\n");
108+
printf("- Press `C` to remove annotations\n");
109+
printf("- Press `Q` to query visible point annotations\n");
110+
printf("- Press `F` to query visible features\n");
109111
printf("- Press `P` to add a random custom runtime imagery annotation\n");
110112
printf("- Press `L` to add a random line annotation\n");
111113
printf("- Press `W` to pop the last-added annotation off\n");
@@ -195,6 +197,10 @@ void GLFWView::onKey(GLFWwindow *window, int key, int /*scancode*/, int action,
195197
auto result = view->map->queryPointAnnotations({ {}, { double(view->getSize().width), double(view->getSize().height) } });
196198
printf("visible point annotations: %lu\n", result.size());
197199
} break;
200+
case GLFW_KEY_F: {
201+
auto result = view->map->queryRenderedFeatures({ {}, { double(view->getSize().width), double(view->getSize().height) } });
202+
printf("visible features:: %lu\n", result.size());
203+
} break;
198204
case GLFW_KEY_C:
199205
view->clearAnnotations();
200206
break;

0 commit comments

Comments
 (0)