开发者

Looking for OpenGL ES api to test if the object is too small to be seen by the camera?

开发者 https://www.devze.com 2023-02-08 21:20 出处:网络
In my android application I want to check if an object that is to be drawn is too far from the camera which would make it virtually invisible. This is animation application in which an object may have

In my android application I want to check if an object that is to be drawn is too far from the camera which would make it virtually invisible. This is animation application in which an object may have moved very far in the 3d space from the camera that would make the object invisible to开发者_C百科 the camera. Is there an API in OpenGL ES that would tell me if the object has gone too far from the camera to be visible? If so what is the API or possibly a set of indirect APIs that would achieve the objective?


Construct a bounding cube for your object and pass the corners through something like gluProject(). If the rectangle covered by the resulting winX and winY outputs is sufficiently small, don't render.

0

精彩评论

暂无评论...
验证码 换一张
取 消