Quote:Original post by Cybrosys
Such resource classes should use a programming design called "Singleton".
Could, not should.There is more than one way to do pretty much
everything when it comes to programming. Be wary of anyone touting 'the way to do it' - what they are showing you is
a way to do it, and that way will have pros and cons just like everything else. The choices that will suit you depend almost completely on what you want to achieve - I mean, "graphics engine" is a very vague term. 2D or 3D? Indoor or outdoor environments? Software or hardware rendering? Realtime or offline? What kind of rendering capabilities - photorealism, highly stylised, artist-controllable? What hardware do you want to use, what data formats do you want to work with, which techniques do you want to try implementing? I can come up with more questions if you want [smile] The point is that the majority of successful projects start with a specification - a list of things to be achieved. At what point does your code stop being a DX/OGL init/shutdown with some triangles, and start being a graphics engine?
Oh, and on the subject of reinventing the wheel - it's extremely funny that such a comment is made in a thread about creating a 3D engine [grin] If you're looking to do this because you want to use it to create a game, then there are many freeware engines out there already that you can use (not to mention ones like Source, which you could mod). You're not going to be writing your own hardware drivers so you'll be handing off to code that somebody else wrote at
some point. The only question is when.