I'm trying to do object selection in Processing.js on 3d renderings through webgl, but don't find any method that allows me to do it.
I know that in OpenGL you could change render mode to GL_SELECT, name and render each object, and when you're done find the name of the object that lies under the cursor.
This method would be fine for me if I could get the WebGL context out of the target canvas, but the getContext method returns null, for some weird reason.
Is there a way to get the rendering context from Processing.js and apply the method I mentioned, or is there a better approach in Processing.js itself?