Skip to content

Pixel-perfect mouse picking with OpenGL stencil buffer.

License

Notifications You must be signed in to change notification settings

stripe2933/mouse-picking

Repository files navigation

mouse-picking

License: MIT

Pixel-perfect mouse picking with OpenGL stencil buffer. If you want another mouse picking example with custom FBO + instancing, see instancing branch. It unlimits the available object count in this branch (255 at max).

  • If you want another mouse picking example with custom FBO + instancing, see instancing branch. It unlimits the available object count in this branch (255 at max).
  • If you want to see the same work implemented in Vulkan, see here.
running-video.mp4

Build

git clone https://github.com/stripe2933/mouse-picking.git
cd mouse-picking
mkdir build
# You may don't need to specify CMAKE_TOOLCHAIN_FILE if you already have all dependencies.
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
cmake --build build --config Release
./build/mouse_picking

Dependencies

  • fmt
  • range-v3
  • imgui
  • imguizmo
  • OGLWrapper - gl3w, glfw, glm, stb_image, eventpp

About

Pixel-perfect mouse picking with OpenGL stencil buffer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published