Abstraction

Published October 01, 2011
Advertisement
I've spent my coding time the last couple of days refactoring my Renderer class. Up until this point, all the D3D code was in Renderer. It worked, but it was difficult to easily pick out what was going on when looking at the code. So I decided to create wrapper classes for the various D3D11 interfaces I was using. My code is much cleaner now, and I can more easily see and isolate what's being done where.

It's not a complete refactor yet--there are still a couple vertex buffers I need to deal with, and some minor bits of the draw routine. But I'm pleased with it. Also, there's some DirectXMath library stuff still going on in the Renderer class that I'm not sure if I want to try to encapsulate or not. I'd like to be able to completely encapsulate/abstract away DrectX from the Renderer class, but I'd just have to replace it with another math library. I'm not convinced it's worth the effort.

I hope to have something worthy of screenshotting soon....
Previous Entry Design Flaw
Next Entry Progress!
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement