Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Writing api agnostic rendering layer. How to design and where to start?

$
0
0
Hello guys, title says it, I want create an api agnostic rendering layer (like bgfx, but not trying to compete). My idea was to specify an interface IRenderLayer that defines the specific functions. Implementations will then override these functions and implement api specific behavior. However I always read that virtual function calls should be avoided in hot code paths and I also understand why. But then again, how should I implement runtime api selection without using runtime polymorphism? Thanks

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>