Example #1
0
    void VRender() override
    {
        // Set up the input assembler
        mRenderer->VSetPrimitiveType(GPU_PRIMITIVE_TYPE_TRIANGLE);

        DX3D11Renderer* dxRenderer = static_cast<DX3D11Renderer*>(mRenderer);
        ID3D11DeviceContext* deviceContext = dxRenderer->GetDeviceContext();
        deviceContext->RSSetViewports(1, &dxRenderer->GetViewport());

        switch (mBlurType)
        {
        case Rig3DSampleScene::BLUR_TYPE_NONE:
            RenderNoBlur();
            break;
        case Rig3DSampleScene::BLUR_TYPE_GAUSSIAN:
            RenderGuassianBlur();
            break;
        case Rig3DSampleScene::BLUR_TYPE_MOTION:
            RenderMotionBlur();
            break;
        default:
            break;
        }

        mRenderer->VSwapBuffers();
    }
Example #2
0
	void VInitialize() override
	{
		mRenderer = &DX3D11Renderer::SharedInstance();
		mRenderer->SetDelegate(this);

		mDevice = mRenderer->GetDevice();
		mDeviceContext = mRenderer->GetDeviceContext();

		mBezier.p0 = vec4f(-4, -4, 0, 0);
		mBezier.p1 = vec4f(-4, 4, 0, 0);
		mBezier.p2 = vec4f(4, -4, 0, 0);
		mBezier.p3 = vec4f(4, 4, 0, 0);

		VOnResize();

		InitializeGeometry();
		InitializeShaders();
		InitializeCamera();
	}