Just wondering, whats your order of inheritance? Can I have a listing of your classes and their hierarchy that used in your renderer so I can make some suggestions? And I think that there is an old article here on gamedev about this very topic but im not sure, dont have time to search since im leaving for school right now.
[EDIT]
one suggestion that a friend of mine came up with would be to have your render have a default setting (for D3D, or GL) and keep track of which one is enabled. If the user changes this then destroy the renderer and create the other. Just have your D3D and GL classes as the base classes and the Renderer derived from them.
Another idea would be to have the render class use the GL and D3D classes. Have a method for switching between them like before, but use a function pointer and set it to a member of which renderer is being used.
[edited by - xds4lx on November 6, 2002 10:36:53 AM]
Fullscreen Catch-22
ZE,
Considering many users don''t often switch between fullscreen and windowed mode for very many reasons, you might consider the quick and dirty method (memory-leak free, of course ) by killing the window, recreating it, and restoring textures from copies in memory. It''s fairly quick, and will let you proceed with the rest of your engine.
What I did for my Glide/D3D/OpenGL system wrapper was write window creation schemes for each of the APIs, switching modes with a boolean flag (though I was never sure if the OpenGL one worked properly, I think my Glide drivers at the time were dying when I called that code).
Have you also looked into GLUT, which is free from open-source constraints? Though this might constitute more code rewriting than the end result is worth, as it is an extreme abstraction from probably most of the code you''ve already written.
MatrixCubed
http://MatrixCubed.cjb.net
Considering many users don''t often switch between fullscreen and windowed mode for very many reasons, you might consider the quick and dirty method (memory-leak free, of course ) by killing the window, recreating it, and restoring textures from copies in memory. It''s fairly quick, and will let you proceed with the rest of your engine.
What I did for my Glide/D3D/OpenGL system wrapper was write window creation schemes for each of the APIs, switching modes with a boolean flag (though I was never sure if the OpenGL one worked properly, I think my Glide drivers at the time were dying when I called that code).
Have you also looked into GLUT, which is free from open-source constraints? Though this might constitute more code rewriting than the end result is worth, as it is an extreme abstraction from probably most of the code you''ve already written.
MatrixCubed
http://MatrixCubed.cjb.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement