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 https://youtu.be/sP_kiODC25Q).
Make sure to watch all the previous tutorials in the "OpenGL For Beginners" playlist at https://youtube.com/playlist?list=PLA0dXqQjCx0S04ntJKUftl6OaOgsiwHjA
Please visit https://ogldev.org to see more of my tutorials on modern OpenGL.
Link to source: https://github.com/emeiri/ogldev/blob/master/tutorial31_youtube
OpenGL 4.6 specification: https://www.khronos.org/registry/OpenGL/specs/gl/glspec46.core.pdf
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: ogldev1@gmail.com
Facebook: https://www.facebook.com/Ogldev-188319114585587
GIthub: https://github.com/emeiri/ogldev.git
Twitter: @ogldev
One time donations (Paypal): https://ogldev.org/donate.html
Patreon: https://www.patreon.com/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