src/video/windowsrt/SDL_winrtrenderer.cpp
changeset 8371 0814a5de5b48
parent 8370 a7b682df854c
child 8375 e33eb49b7f42
     1.1 --- a/src/video/windowsrt/SDL_winrtrenderer.cpp	Sun Nov 25 19:10:02 2012 -0500
     1.2 +++ b/src/video/windowsrt/SDL_winrtrenderer.cpp	Sun Nov 25 19:13:45 2012 -0500
     1.3 @@ -130,8 +130,8 @@
     1.4  			);
     1.5  	});
     1.6  
     1.7 -	auto createCubeTask = (createPSTask && createVSTask).then([this] () {
     1.8 -		VertexPositionColor cubeVertices[] = 
     1.9 +	auto createVertexBuffer = (createPSTask && createVSTask).then([this] () {
    1.10 +		VertexPositionColor vertices[] = 
    1.11  		{
    1.12  			{XMFLOAT3(-1.0f, -1.0f, 0.0f),  XMFLOAT2(0.0f, 1.0f)},
    1.13  			{XMFLOAT3(-1.0f, 1.0f, 0.0f), XMFLOAT2(0.0f, 0.0f)},
    1.14 @@ -139,13 +139,13 @@
    1.15  			{XMFLOAT3(1.0f, 1.0f, 0.0f), XMFLOAT2(1.0f, 0.0f)},
    1.16  		};
    1.17  
    1.18 -		m_vertexCount = ARRAYSIZE(cubeVertices);
    1.19 +		m_vertexCount = ARRAYSIZE(vertices);
    1.20  
    1.21  		D3D11_SUBRESOURCE_DATA vertexBufferData = {0};
    1.22 -		vertexBufferData.pSysMem = cubeVertices;
    1.23 +		vertexBufferData.pSysMem = vertices;
    1.24  		vertexBufferData.SysMemPitch = 0;
    1.25  		vertexBufferData.SysMemSlicePitch = 0;
    1.26 -		CD3D11_BUFFER_DESC vertexBufferDesc(sizeof(cubeVertices), D3D11_BIND_VERTEX_BUFFER);
    1.27 +		CD3D11_BUFFER_DESC vertexBufferDesc(sizeof(vertices), D3D11_BIND_VERTEX_BUFFER);
    1.28  		DX::ThrowIfFailed(
    1.29  			m_d3dDevice->CreateBuffer(
    1.30  				&vertexBufferDesc,
    1.31 @@ -155,7 +155,7 @@
    1.32  			);
    1.33  	});
    1.34  
    1.35 -    auto createMainSamplerTask = createCubeTask.then([this] () {
    1.36 +    auto createMainSamplerTask = createVertexBuffer.then([this] () {
    1.37  		D3D11_SAMPLER_DESC samplerDesc;
    1.38  		samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
    1.39  		samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
    1.40 @@ -435,7 +435,7 @@
    1.41  		blackColor
    1.42  		);
    1.43  
    1.44 -	// Only draw the cube once it is loaded (loading is asynchronous).
    1.45 +	// Only draw the screen once it is loaded (some loading is asynchronous).
    1.46  	if (!m_loadingComplete)
    1.47  	{
    1.48  		return;