Skip to content

Using QOpenGLWidget frame buffer for object picking #644

Closed Answered by mosra
asmaloney asked this question in Q&A
Discussion options

You must be logged in to vote

Just in case you aren't aware, Debug{} << GL::Renderer::error() will print the human-readable enum name so you don't have to do manual string conversions or look up numeric values. Works with most Magnum enums.

If you get an invalid operation error then it's probably not a way forward. No idea what exactly could be the cause, but I personally wouldn't bother trying further with this experiment :) The way to go would be to create your own framebuffer, with the Object ID attachment, and then ultimately blit() the color from it to the (wrapped) Qt's framebuffer. That is still one extra operation, but better than having to draw twice.

Regarding ApiTrace, I think it's just not maintained there…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by asmaloney
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants