Selecting 3D Objects With The Mouse Using OpenGL // OpenGL Tutorial #31

Опубликовано: 30 Сентябрь 2024
на канале: OGLDEV
19,610
445

In this video we're going to learn how to use render to texture in order to implement selection of a 3D objects using the mouse in OpenGL. This tutorial assumes knowledge about how I load 3D models using Assimp (check out my Assimp tutorial    • Loading Models Using Assimp // OpenGL...  ).

Make sure to watch all the previous tutorials in the "OpenGL For Beginners" playlist at    • OpenGL for Beginners  

Please visit https://ogldev.org to see more of my tutorials on modern OpenGL.

Link to source: https://github.com/emeiri/ogldev/blob...
OpenGL 4.6 specification: https://www.khronos.org/registry/Open...

Timecodes
0:00 Intro
0:27 Render To Texture
2:02 Solution Architecture
3:23 Start of code review
3:28 Picking Texture declaration
4:42 Picking Texture implementation
6:50 Switching to GLFW
7:13 Main application code
7:38 Picking Phase
10:00 Render Phase
12:10 Demo and conclusion

Feel free to comment below.

Email: [email protected]
Facebook:   / ogldev-188319114585587  
GIthub: https://github.com/emeiri/ogldev.git
Twitter: @ogldev
One time donations (Paypal): https://ogldev.org/donate.html
Patreon:   / ogldev  

Credits:
Sound effects - "Creator Assets" (youtube)
Image by Clker-Free-Vector-Images from Pixabay
Music - "Indian Walk" by Nico Staf (youtube audio library)

Enjoy,

Etay Meiri

#opengl #ogldev #opengtutorials