Reputation: 171
Is it possible to get the index of 'invisible' vertices in python-opengl like gloo, glumpy? For example, when I draw a 3D sphere in scenegraph and rotate the object using turn-table camera, the half of vertices are invisible, but the index will be changed whenever I rotate.
If I turn-on 'cull_face' option, the OpenGL will not draw them, but is there any possibility to get the indices of those vertices, 'undrawn' or invisible due to blocked by other vertices?
Upvotes: 1
Views: 286
Reputation: 45332
but is there any possibility to get the indices of those vertices, 'undrawn' or invisible due to blocked by other vertices?
OpenGL will not offer such functionality in a direct way. It still can be achieved, of course. But you need to implement that by yourself. Here are some ideas:
(0,0,1)
in window space, the dot product will yield only the z coordinate of the dot product, which is just the signed area of the 2D projection of the vertex coordinates in window space.Upvotes: 2