Game slowdown model - opengl

I have a problem starting the game. The model I import in the game is quite large, which makes fps drop down. This is normal, but when I take the camera off the model, it still remains slow. As in other games, when viewing a high-resolution model, the game slows down, but when it does not look at it, it becomes faster. However, my game is slow all the time. Can anybody help me?

+6
source share
1 answer

You need to implement clipping so that you do not display the object (that is, pass it through the graphics pipeline) when it is not visible.

There are many methods and algorithms / data structures for this, ranging from manually viewing frustum- testing, to more complex spatial queries of data structures ( BSP , quadtrees , octrees , etc.).

+14
source

Source: https://habr.com/ru/post/899953/


All Articles