Efficiency is an inevitable topic for commercial online games. In order to leave more space for the client logic, the rendering module should be as efficient as possible.
Let's just talk about the rendering Optimization of ogre. Take the familiar tianlong Babu as an example.
Tianlong, a popular online versionCodeThe rendering of ogre and cegui has serious performance problems,
Ogre:
The implementation of terrain, a tile, is optimized in batches only by material, and the camera is not cropped by material, resulting in a lot of increase in the number of game views
Static object merging is totally incorrect. Like terrain, only batch cropping is optimized without camera cropping.
Cegui:
Because cegui has a defect in the font re-painting process, the cached font is useless. Each frame will calculate the position and layout, which is less efficient. Of course, there are some ways to improve it,
For example, a normal font can be cached as an image. The best way is to port the image to 0.75, which improves the efficiency by N times.
Cegui I am too lazy to talk about, just talk about the optimization of the Ogre part.
This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/qq18052887/archive/2011/03/25/6278608.aspx