Thanks for your replies!

I'm trying to accomplish this:
http://msdn.microsoft.com/en-us/library/windows/apps/dd535473.aspx

Using win32 and directx.d2d1, I got this far:

---

...
int WinMain( ... ) { ... }
int myWinMain( ... ) { ... }
LRESULT WndProc ( ... )
{
    ...
    case WM_CREATE:
        D2D1_FACTORY_OPTIONS factoryOptions;
factoryOptions.debugLevel = D2D1_DEBUG_LEVEL.INFORMATION; const D2D1_FACTORY_OPTIONS* pfactoryOptions = &factoryOptions;
        const IID factory = IID_ID2D1Factory;
        void* ppIFactory;

        HRESULT hr = D2D1CreateFactory(
                D2D1_FACTORY_TYPE.SINGLE_THREADED,
                &factory,
                pfactoryOptions,
                ppIFactory
                );
    ...
}

---

I get the following error messages:
- 1 -
function win32.directx.d2d1.D2D1CreateFactory (
    D2D1_FACTORY_TYPE factoryType,
    const(GUID)* riid,
    const(D2D1_FACTORY_OPTIONS*) pFactoryOptions,
    out void* ppIFactory)
is not callable using argument types (
    D2D1_FACTORY_TYPE,
    const(GUID)*,
    const(D2D1_FACTORY_OPTIONS*),
    void*)

- 2 -
cannot implicitly convert expression (& factory)
of type const(GUID)* to const(GUID)*


How should this be done correctly?
How is a rectangle finally drawn?

Reply via email to