Pregunta

Me acaba de comenzar el aprendizaje de OpenGL y escribir un shooter en primera persona, pero estoy consiguiendo una tasa de fotogramas horribles cuando dibujo 5000 cubos. Así que ahora estoy tratando de realizar la oclusión y el sacrificio utilizando un octree. Lo que estoy confundido acerca es dónde echar los rayos de. Qué sólo les echo de la fustrum cerca de avión? Parece que me perdería parte de la fustrum que se expande. Cualquier ayuda es apreciada.

¿Fue útil?

Solución

If 5000 cubes already gives bad framerates, you should consider changing the way you render your cubes.

It's very unclear to us what you are drawing the cubes for. If they are static (ie. don't move), then its best to pack them all into a single vertex buffer. If the cubes are supposed to move, then you should go for instancing. If you're going for a landscape made of cubes like minecraft, then you should create vertex buffers but only put in the faces of cubes that are actually visible.

I'd like to help more, but I'm unsure what you're doing.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top