Answered by:
Direct2D - Using Effects on Windows 7

Question
-
Sorry if I chose the wrong forum, but I couldn't find something similar to Development with Direct2D/DirectX.
I want to create a color channel split/shift effect. I already read the msdn article on how to create and apply effects. I don't have any code yet, but it seems that I can create instances of effects (e.g. gaussian blur) only with an instance of ID2D1DeviceContext. To create an instance of ID2D1DeviceContext I have to call D2D1CreateDeviceContext and this function is declared in d2d1_1.h so I can't use it on Windows 7.
How can I create and apply effects (Direct2D) on Windows 7 without being able to use a device context?
Maybe I misunderstood something and there is another way to obtain a device context, but I cannot imagine that there is no way to use effects on Windows 7.
D2D1CreateDeviceContext: http://msdn.microsoft.com/de-de/library/windows/desktop/hh404273(v=vs.85).aspx
ID2D1DeviceContext: http://msdn.microsoft.com/en-us/library/windows/desktop/hh404479(v=vs.85).aspx
ID2D1Effect: http://msdn.microsoft.com/en-us/library/windows/desktop/hh404566(v=vs.85).aspx
Applying an effect (Example: Gaussian Blur): http://msdn.microsoft.com/en-us/library/windows/desktop/hh706338(v=vs.85).aspx
Creating own effects: http://msdn.microsoft.com/en-us/library/windows/desktop/jj710194(v=vs.85).aspx
Saturday, November 1, 2014 5:51 PM
Answers
-
The update to Direct2D was made available in Windows 7. IIRC it is KB2670838, named "Platform Update for Windows 7".
Since that should have automatically been pushed via Windows update, to use this all you need is the Windows 8SDK to get the headers.
For confirmation of this, look at the documentation for the ID2D1DeviceContext interface. The minimum supported client is "Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]".
This is a signature Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
- Marked as answer by Cubinator73 Sunday, November 2, 2014 10:36 AM
Sunday, November 2, 2014 9:24 AM
All replies
-
The update to Direct2D was made available in Windows 7. IIRC it is KB2670838, named "Platform Update for Windows 7".
Since that should have automatically been pushed via Windows update, to use this all you need is the Windows 8SDK to get the headers.
For confirmation of this, look at the documentation for the ID2D1DeviceContext interface. The minimum supported client is "Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]".
This is a signature Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
- Marked as answer by Cubinator73 Sunday, November 2, 2014 10:36 AM
Sunday, November 2, 2014 9:24 AM -
Yeah, it works. Thank you very very much :)
Sunday, November 2, 2014 10:36 AM