C++ DX API, help me get it?

Started by
13 comments, last by Jason Z 10 years, 9 months ago

So now just looking for a thin wrapper around it, NOT an engine, something like a directX for actual C++ and not com/C.

Anyone could recommand such a thing? Something very thin where i could still refer to DX documentation, but just use it in a more "modern C++" way, C++11 is fine (within visual studio 2013's limitations)

Take a look at "A Modern C++ Library for DirectX Programming" by Kenny Kerr:

http://msdn.microsoft.com/en-us/magazine/dn201741.aspx

http://dx.codeplex.com/

Seems to be exactly what you're describing:

I didn’t want to produce yet another heavy wrapper around DirectX. Instead, I decided to leverage C++11 to produce a simpler API for DirectX without imposing any space and time overheard to the core DirectX API.

If you'd like to have something on a yet higher level, check out SFML (Simple and Fast Multimedia Library):

http://www.sfml-dev.org/

Advertisement


None of this relates to performance at all

Exceptions have a noticeable performance impact, which is one of the reasons many game projects at least do not use them. From that perspective it makes sense from an API point of view to not rely on them (in addition to C legacy)

I don't know of any wrappers like that you are describing, but you could take just the API abstraction layer of any openly available engine and start with that instead of interfacing directly with d3d if you really wanted to. It would be better to use it natively if you want to learn how it works though I think.

Jason Z's (http://hieroglyph3.codeplex.com/) has really good wrappers!


None of this relates to performance at all, unless you consider "setting up directx" a performance critical part of any application where it's important to saveup nanoseconds in object instantiation and saving 4 bytes copies here & there? Performance is no reason here (i could get it if it was in per frame actions, but just not here), nor does it relate to user control at all. Anyway i already had my answers earlier on this thread, it's just com limitations & legacy code.

Setting up DirectX can be a "performance critical" part. Just depends whom you work for.

Some places have STRICT requirements on startup times.

Last company i worked at our game window had to be up and displaying something in under three seconds or all hell broke loose.

Jason Z's (http://hieroglyph3.codeplex.com/) has really good wrappers!

Like he said, Hieroglyph 3 is a layered framework that can be used at a high level or at a lower level. At the very least, you can take a look at it and see if it does what you want. There are lots of sample applications, ranging from very simple (just clearing the window to a different color) all the way up to volume rendering, Kinect integration, and deferred/light pre-pass rendering.

If you want something very light, you can grab pieces of the framework and use them as you see fit - it is licensed under MIT, so it is quite liberal for you to use.

This topic is closed to new replies.

Advertisement