Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Model slowing down the game - opengl [closed]

Tags:

c++

opengl

I have a problem while running my game. The model that I import in the game is quite big, making the fps drop down. That's okay but when I get the camera off from the model, it still stays slow. As other games do, when looking at a high resolution model, the game slows down but when not looking at it, it gets faster. However my game stays slow all the time. Can anyone help me?

like image 528
CppOgl Avatar asked Dec 10 '22 05:12

CppOgl


1 Answers

You need to implement clipping, so that you don't render the object (i.e. pass it through the graphics pipeline) when it's not visible.

There are many techniques and algorithms/data structures for this, ranging from manual view frustum-testing, to more advanced spatial-querying data structures (BSPs, quadtrees, octrees and so on).

like image 103
unwind Avatar answered Dec 11 '22 18:12

unwind