Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
WinRT: minor code cleanup regarding some variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLudwig committed Nov 26, 2012
1 parent 9ac5c38 commit 07813ef
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/video/windowsrt/SDL_winrtrenderer.cpp
Expand Up @@ -130,22 +130,22 @@ void SDL_winrtrenderer::CreateDeviceResources()
);
});

auto createCubeTask = (createPSTask && createVSTask).then([this] () {
VertexPositionColor cubeVertices[] =
auto createVertexBuffer = (createPSTask && createVSTask).then([this] () {
VertexPositionColor vertices[] =
{
{XMFLOAT3(-1.0f, -1.0f, 0.0f), XMFLOAT2(0.0f, 1.0f)},
{XMFLOAT3(-1.0f, 1.0f, 0.0f), XMFLOAT2(0.0f, 0.0f)},
{XMFLOAT3(1.0f, -1.0f, 0.0f), XMFLOAT2(1.0f, 1.0f)},
{XMFLOAT3(1.0f, 1.0f, 0.0f), XMFLOAT2(1.0f, 0.0f)},
};

m_vertexCount = ARRAYSIZE(cubeVertices);
m_vertexCount = ARRAYSIZE(vertices);

D3D11_SUBRESOURCE_DATA vertexBufferData = {0};
vertexBufferData.pSysMem = cubeVertices;
vertexBufferData.pSysMem = vertices;
vertexBufferData.SysMemPitch = 0;
vertexBufferData.SysMemSlicePitch = 0;
CD3D11_BUFFER_DESC vertexBufferDesc(sizeof(cubeVertices), D3D11_BIND_VERTEX_BUFFER);
CD3D11_BUFFER_DESC vertexBufferDesc(sizeof(vertices), D3D11_BIND_VERTEX_BUFFER);
DX::ThrowIfFailed(
m_d3dDevice->CreateBuffer(
&vertexBufferDesc,
Expand All @@ -155,7 +155,7 @@ void SDL_winrtrenderer::CreateDeviceResources()
);
});

auto createMainSamplerTask = createCubeTask.then([this] () {
auto createMainSamplerTask = createVertexBuffer.then([this] () {
D3D11_SAMPLER_DESC samplerDesc;
samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
Expand Down Expand Up @@ -435,7 +435,7 @@ void SDL_winrtrenderer::Render(SDL_Surface * surface, SDL_Rect * rects, int numr
blackColor
);

// Only draw the cube once it is loaded (loading is asynchronous).
// Only draw the screen once it is loaded (some loading is asynchronous).
if (!m_loadingComplete)
{
return;
Expand Down

0 comments on commit 07813ef

Please sign in to comment.