flat assembler
Message board for the users of flat assembler.
Index
> Windows > How translate to interface ? |
Author |
|
Roman 29 Nov 2020, 12:00
https://github.com/apitrace/dxsdk/blob/master/Include/d2d1_2.h
interface ID2D1Factory2 : public ID2D1Factory1 { STDMETHOD(CreateDevice)( _In_ IDXGIDevice *dxgiDevice, _COM_Outptr_ ID2D1Device1 **d2dDevice1 ) PURE; using ID2D1Factory1::CreateDevice; }; // interface ID2D1Factory2 How i understood ID2D1Factory2 using all STDMETHOD from ID2D1Factory1 But how ? I must apply STDMETHOD(CreateDevice in end of list or after QueryInterface,AddRef,Release,CreateDevice ? But in second CreateDevice https://github.com/apitrace/dxsdk/blob/master/Include/d2d1_1.h interface DX_DECLARE_INTERFACE("bb12d362-daee-4b9a-aa1d-14ba401cfa1f") ID2D1Factory1 : public ID2D1Factory { STDMETHOD(CreateDevice)( _In_ IDXGIDevice *dxgiDevice, _COM_Outptr_ ID2D1Device **d2dDevice ) Last edited by Roman on 29 Nov 2020, 12:02; edited 1 time in total |
|||
29 Nov 2020, 12:00 |
|
bitRAKE 30 Nov 2020, 05:35
Extended COM interfaces add functions to the end of the vector table. They are in effect also an object of the same type of parent interface. So, a function requiring an object of type ID2D1Factory can also operate on ID2D1Factory1 or ID2D1Factory2 object in general.
interface ID2D1Factory2,{IUnknown functions ...},{ID2D1Factory functions ...},{ID2D1Factory1 functions ...},{ID2D1Factory2 functions ...} _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
30 Nov 2020, 05:35 |
|
Roman 30 Nov 2020, 10:18
Thanks.
Now i get Direct2D to DX12. And draw text https://www.youtube.com/watch?v=SRbeKBOpM0A&feature=youtu.be |
|||
30 Nov 2020, 10:18 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.