Jump to content
Posted 22 June 2012 - 06:06 AM
Posted 22 June 2012 - 03:49 PM
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.
Posted 26 June 2012 - 12:40 PM
Thanks - I was previously given the impression that accessing directly would be significantly faster, although I may not have interpreted what was said correctly.
Looks OK by me.
Anyway, the "HLSL Without Effects" sample in the SDK provides all you need to know for C++; I don't know about SlimDX versions of these calls though, but would assume that they do exist since Effects is just a wrapper around the raw vertex/pixel shader API. I see from it's documentation that it does have a PixelShader class, for example, so it should be just a matter of translating the calls.
Faster than Effects? Maybe, maybe not. Obviously you don't have the overhead of the wrapper to contend with, but that overhead is really quite minimal. Also, with the raw API you have to do certain things yourself that Effects will automatically manage for you - such as buffering up constants and sending them in bulk to the driver just before draw calls, for example.
So I'd personally stick with Effects if it's working well enough for you and if you don't have a specifc use case that goes beyond what it does.