Original Post
Hello,
I would like to see your opinions.
Let's say, I am doing an engine and i would like to support DirectX and OpenGL.
Every renderer is using different class, which are "incompatible". for example GL_MATRIX and D3DXMATRIX. there ale lots of similar classes like these.
I tried to make a framework, which encapsulate all renderers into "one" class but after few tests, i can see .. it's much slower. because I have custom MATRIX class . so i need to save data to my MATRIX class from GL_MATRIX or D3DXMATRIX and opposite way too.
I don't know, how professionals are doing it ?
1/ they are using this slow method
2/ they are using one framework, but lots of code for selecting right matrix for GL and DX, but what if i want to sell the engine, user has to use different matrix class for differet renderer. (or vector, color, whatever)
3/ they are using two frameworks and when they want to port it to another platform, they just use some preprocessor directives to use different renderer.
4/ any other idea
I would like to start and work on the right way of multi engine and make it fast as possible.
i will be happy to read your opinions, ideas, advices :) Thank you very much.
I would like to see your opinions.
Let's say, I am doing an engine and i would like to support DirectX and OpenGL.
Every renderer is using different class, which are "incompatible". for example GL_MATRIX and D3DXMATRIX. there ale lots of similar classes like these.
I tried to make a framework, which encapsulate all renderers into "one" class but after few tests, i can see .. it's much slower. because I have custom MATRIX class . so i need to save data to my MATRIX class from GL_MATRIX or D3DXMATRIX and opposite way too.
I don't know, how professionals are doing it ?
1/ they are using this slow method
2/ they are using one framework, but lots of code for selecting right matrix for GL and DX, but what if i want to sell the engine, user has to use different matrix class for differet renderer. (or vector, color, whatever)
3/ they are using two frameworks and when they want to port it to another platform, they just use some preprocessor directives to use different renderer.
4/ any other idea
I would like to start and work on the right way of multi engine and make it fast as possible.
i will be happy to read your opinions, ideas, advices :) Thank you very much.