public static int SetDrawInfo(PixelShaderEffect * @this, ID2D1DrawInfo *drawInfo)
        {
            @this = (PixelShaderEffect *)&((void **)@this)[-1];

            @this->d2D1DrawInfo = drawInfo;

            return(drawInfo->SetPixelShader(&@this->shaderId));
        }
        public static int SetDrawInfo(PixelShaderEffect * @this, ID2D1DrawInfo *drawInfo)
        {
            @this = (PixelShaderEffect *)&((void **)@this)[-1];

            // Free the previous ID2D1DrawInfo object, if present
            if (@this->d2D1DrawInfo is not null)
            {
                _ = @this->d2D1DrawInfo->Release();
            }

            // Store the new ID2D1DrawInfo object
            _ = drawInfo->AddRef();

            @this->d2D1DrawInfo = drawInfo;

            // Set the pixel shader for the effect
            HRESULT hresult = drawInfo->SetPixelShader(&@this->shaderId, (D2D1_PIXEL_OPTIONS)@this->pixelOptions);

            if (hresult != S.S_OK)
            {
                return(hresult);
            }

            // If any input descriptions are present, set them
            if (@this->inputDescriptionCount > 0)
            {
                for (int i = 0; i < @this->inputDescriptionCount; i++)
                {
                    ref D2D1InputDescription inputDescription = ref @this->inputDescriptions[i];

                    D2D1_INPUT_DESCRIPTION d2D1InputDescription;
                    d2D1InputDescription.filter             = (D2D1_FILTER)inputDescription.Filter;
                    d2D1InputDescription.levelOfDetailCount = (uint)inputDescription.LevelOfDetailCount;

                    hresult = drawInfo->SetInputDescription((uint)inputDescription.Index, d2D1InputDescription);

                    if (hresult != S.S_OK)
                    {
                        return(hresult);
                    }
                }
            }
Beispiel #3
0
 public int SetDrawInfo([NativeTypeName("ID2D1DrawInfo *")] ID2D1DrawInfo *drawInfo)
 {
     return(((delegate * stdcall <ID2D1DrawTransform *, ID2D1DrawInfo *, int>)(lpVtbl[7]))((ID2D1DrawTransform *)Unsafe.AsPointer(ref this), drawInfo));
 }
 public HRESULT SetDrawInfo(ID2D1DrawInfo *drawInfo)
 {
     return(((delegate * unmanaged <ID2D1DrawTransform *, ID2D1DrawInfo *, int>)(lpVtbl[7]))((ID2D1DrawTransform *)Unsafe.AsPointer(ref this), drawInfo));
 }
Beispiel #5
0
 internal D2D1DrawInfoDispatchDataLoader(ID2D1DrawInfo *d2D1DrawInfo)
 {
     this.d2D1DrawInfo = d2D1DrawInfo;
 }