flat assembler
Message board for the users of flat assembler.

Index > Windows > How translate to interface ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
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
Post 29 Nov 2020, 12:00
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
Now i get
interface ID2D1Factory,\
QueryInterface,AddRef,Release,ReloadSystemMetrics,GetDesktopDpi,\
CreateRectangleGeometry,CreateRoundedRectangleGeometry,CreateEllipseGeometry,\
CreateGeometryGroup,CreateTransformedGeometry,CreatePathGeometry,CreateStrokeStyle,\
CreateDrawingStateBlock,CreateWicBitmapRenderTarget,CreateHwndRenderTarget,\
CreateDxgiSurfaceRenderTarget,CreateDCRenderTarget
Post 29 Nov 2020, 12:01
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3387
Location: vpcmipstrm
bitRAKE
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)/¯ unlicense.org
Post 30 Nov 2020, 05:35
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1088
Roman
Thanks.
Now i get Direct2D to DX12. And draw text
https://www.youtube.com/watch?v=SRbeKBOpM0A&feature=youtu.be
Post 30 Nov 2020, 10:18
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.