Timeline for Optimize polygons renderization
Current License: CC BY-SA 3.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 10, 2018 at 21:43 | comment | added | blurry |
The main guideline would be that you should make it modular. In psuedo-code it may look like pixelWidth = quadwidth / parameters.length; for index, param in parameters: Color(Rect(index*pixelWidth, 0, (index+1)*pixelWidth,quadHeight), param.GetColor()); This would allow you to do 2, 5, or 17 params; without updating the code later. I'd also say that there's a reasonable chance that addTriangle is talking to a data structure that can grow, and is allocating new vertices as it goes. You can speed this up by using an Object Pool or pre-allocating them in other ways
|
|
| Apr 10, 2018 at 19:57 | comment | added | EzeEst | I'm not using an "external" container to allocate the vertex data, in fact I'm using: mMyMesh->getSubMesh[0]->addTriangle(<newTri>) to add a new triangle to mMyMesh. The shader approach sounds quite good (having N-less polygons is very tempting). I'm (almost) sure that Ogre is culling the quads that are outside my camera: if I zoom in into the vehicle (few quads visible) fps > 60 but zooming out enough so I can see many of the other old quads fps < 10. Any snippet or guideline to code these shaders? | |
| Apr 10, 2018 at 19:47 | history | answered | blurry | CC BY-SA 3.0 |