Directx And Opengl Drivers
Performance in managed code, with respect to the graphics subsystem, is not bad. SlimDX pays a slightly penalty over completely native code on each call into DirectX, but it is by no means severe.
The actual penalty depends on the call -- a call into DrawPrimitive will be vastly more expensive overall than a call to SetRenderState, so percentage-wise you end up losing a lot more on the SetRenderState calls. Awaz Do Humko Hum Kho Gaye Mp3 Song more. SlimDX incorporates a tuned math library that generally performs very well, although you have to be a bit careful with it. Profiling, even with a junker tool like NProf, highlights this stuff very quickly so it's not difficult to fix. Overall, if we consider generic, completely optimal C++ and C# code doing rendering via D3D, the C# version is probably within 10-15% of the C++ version. That's hard to achieve though; consider how much time you're saving by working in C# which you can apply to higher level graphics optimizations that you probably simply wouldn't have time for if you had to build the entire thing in C++. And even if you managed to get that extra 10% in C++, it'd promptly shrink to 5% within a few months, when a new round of hardware tears through your application code faster than ever. I know what I'd pick -- which is why I wrote SlimDX to begin with.
As I understand GPU vendors defined standard interface to be used by OS Developers to communicate with their specific driver. So DirectX and OpenGL are just wrappers. As I understand GPU vendors defined standard interface to be used by OS Developers to communicate with their specific driver. So DirectX and OpenGL are just wrappers.
OpenTK is subject to similar performance characteristics, with the caveat that their math library is rather slow in places. This is an implementation bug that I've discussed with them, and will hopefully be fixed before too long. I'd recommend OpenGL for the following reasons:- • Cross Platform - OpenGLES being of particular relevance these days for Mobile platforms • The OpenGL shading language implementation is inherently superior to DirectX shaders. • OpenGL is somewhat easier to learn as it's possible to set up basic renders with very few lines of code • Philosophically OpenGL was designed as a general purpose rendering engine, whereas DirectX was always games orientated, so OpenGL would seem a better fit for your question. Capture One License Code Cracks there. • OpenGL is stable technology that has been around for some time and will continue to be so.
DirectX is more dependent on the whim of Microsoft and could be deprecated in an instant if MS felt like it. That said, the requirements of your system and your personal preferences could tip it either way as both approaches are solid implementations. License To Kill Bittorrent here. On the downside OpenGL is very much a state machine and can be tricky to fit into OO, although it's certainly not impossible. EDIT: Added to clarify my comment on the OpenGL shader model being inherently superior to DirectX. This is because DirectX shaders are compiled with the program at development time against a generic GPU model, whereas OpenGL shaders are held as source code and compiled by the OpenGL driver at run time.
Consequently theoretically it's possible for the driver writer to take advantage of specific (or updated when running an old program) features of the GPU and create compiled code that can run faster than DirectX shaders. It's a small point, but potentially quite an important one. OpenGL lagged in the past in relation to performance features, but things got fixed eventually.
To give an example, consider bindable uniforms, where Direct3D had a faster mechanism before OpenGL acquired a similar one. Apart from supporting different feature-sets at times, there's no difference.