Hi!
I want to make a portable engine too.
I''m going to use Vertex Buffer for D3D and compiled Vertex Arrays for OGL.
I think that the IRenderBuffer class is a good idea, but I have a question.
If I want to linear interpolate between the vertices on two RenderBuffer, how I would design the engine to do that?
Would be a function named SetLinearInterpolateMode(bool) a clean method of doing this?
My problem is with OGL, I have to interpolate (using the CPU) the vertices, but with D3D is better to write a Vertex Shader to do the work. But if I write a Vertex Shader I have to calculate the lights in the Vertex Shader too. I though that it could be done compiling a new Vertex Shader when any light is created/destroyed, or writing a Vertex Shader with a fixed number of lights, and setting to 0 the lights that are off.
And I want only to use Vertex Shader when it is necessary, because, for example, the Vertex Shader is not hardware implemented in a GeForce 2 (my graphics card).
The function SetLinearInterpolateMode I said before would set the default Vertex Shader (hardware accelerated in my card) or the custom Vertex Shader.
I don''t know if I explained very well the problem, and my english is very bad. Please, if you don''t undestand something, tell me.
Thanks in advance