locked
Simple paint app for wp8 with DirectXTK

    Question

  • Hi,

    I'm trying to write simple paint app with DirectXTK , with Draw() method I can get point on view, but how to save this point when I'm going to get next point to get any figure. Here is my rendering part.

    void BasicRenderer::Render()
    {
    	const float white[] = { 1.0f, 1.0f, 1.0f, 1.0f };
    	m_d3dContext->ClearRenderTargetView(
    		m_renderTargetView.Get(),
    		white
    		);
    
    
    	m_d3dContext->ClearDepthStencilView(
    		m_depthStencilView.Get(),
    		D3D11_CLEAR_DEPTH,
    		1.0f,
    		0
    		);
    
    	// Only draw once loading is complete (loading is asynchronous).
    	if (!m_loadingComplete)
    	{
    		return;
    	}
    
    	m_d3dContext->OMSetRenderTargets(
    		1,
    		m_renderTargetView.GetAddressOf(),
    		m_depthStencilView.Get()
    		);
    
    
    	if (true == onPressed)
    	{
    		m_spriteBatch->Begin();
    		m_spriteBatch->Draw(m_catTexture, XMFLOAT2(x, y));
    		m_spriteBatch->End();
    				
    	}	
    }

    Monday, March 03, 2014 1:13 PM

Answers