Skip to content

Don't repeatedly look for model texture files

This patch improves OGL model performance by eliminating unnecessary texture and blend texture file lookups when they are not found. After the first load attempt, a flag in the model data is set if the texture or blend texture file is not found so it is not searched for again.

Performance comparison on a cherry-picked scenario: (among other things, the TNT barrels trigger this inefficiency)

Before After
srb20130 Total time in scene rendering function: 2925 microseconds srb20129 Total time in scene rendering function: 1168 microseconds

Merge request reports