Original Post
I'm designing an engine which will (hopefully) be as platform independent as possible. I'm on the renderer at the moment, and I'm ending up with having defined interface classes that the external program uses, then having platform dependent classes derrived from these. What it means is that the user's program will have access to things like IIndexBuffer and IVertexBuffer, which can be passed to the renderer then cast by the renderer to its platform dependent CIndexBuffer (using static_cast). My question is, using this method, am I going to be incurring any major performance penalties, seeing as how there'll probably be a lot of these casts each frame (index, vertex buffers, textures, shaders)?