horde3d / Horde3D

Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.
http://horde3d.org/
1.55k stars 308 forks source link

Make render device interface a bit easier to work with #133

Closed algts closed 5 years ago

algts commented 5 years ago

I've noticed that the original purpose of the pointer-to-function interface was not achieved - not everything was inlined and sometimes a lot of time was spent in the "middle" functions that should be inlined. In order to solve that a new delegate-based render interface is introduced. It should be easier to work with, less bloated, faster (5-10% performance increase on x64 machine when fps is very high (2k+ fps on knight sample)). It should also be faster on architectures other than x86 (arm, mips) as it always inlines now and creates a direct call to the underlying render backend. Judging by the internal tests it is also faster than pure virtual render interface design.