Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some comments on the Picking with an OpenGL Hack article #134

Open
Haiderahandali opened this issue Jan 20, 2024 · 0 comments
Open

Some comments on the Picking with an OpenGL Hack article #134

Haiderahandali opened this issue Jan 20, 2024 · 0 comments

Comments

@Haiderahandali
Copy link

I am not experienced enough myself, but a person who is very experienced with OpenGL commented the following on your tutorial for mouse picking with OpenGL hack
https://www.opengl-tutorial.org/miscellaneous/clicking-on-objects/picking-with-an-opengl-hack/

that article has some misinformation - you do not need glFlush or glFinish before glReadPixels
also it's missing one simple optimization - glScissor to limit rasterization to 1x1 pixel
or even better - setting up just 1x1 render target with adjusted camera matrix pointing to 1 pixel, so you don't need to allocate
same sized RT memory as your full backbuffer

as I am only learning OpenGL, I just wanted to point those comments out, I hope they are useful.
Best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant