Fixed more variable shadowing warnings.

This commit is contained in:
Branimir Karadžić 2015-03-30 14:38:16 -07:00
parent 1dc10fa48f
commit 0490fbcd1e
4 changed files with 15 additions and 14 deletions

View file

@ -292,8 +292,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
for (uint32_t ii = 0, num = bx::uint32_min(10, (uint32_t)quads.size() ); ii < num; ++ii)
{
const PackCube& face = quads.front();
cube.clear(face);
cube.clear(quads.front() );
quads.pop_front();
}
}

View file

@ -20,7 +20,7 @@ KnightPos knightTour[8*4] =
{0,0}, {1,2}, {3,3}, {4,1}, {5,3}, {7,2}, {6,0}, {5,2},
{7,3}, {6,1}, {4,0}, {3,2}, {2,0}, {0,1}, {1,3}, {2,1},
{0,2}, {1,0}, {2,2}, {0,3}, {1,1}, {3,0}, {4,2}, {5,0},
{7,1}, {6,3}, {5,1}, {7,0}, {6,2}, {4,3}, {3,1}, {2,3}
{7,1}, {6,3}, {5,1}, {7,0}, {6,2}, {4,3}, {3,1}, {2,3},
};
int _main_(int /*_argc*/, char** /*_argv*/)
@ -55,15 +55,19 @@ int _main_(int /*_argc*/, char** /*_argv*/)
bgfx::TextureHandle textureStipple;
const bgfx::Memory* stipple = bgfx::alloc(8*4);
memset(stipple->data, 0, stipple->size);
const bgfx::Memory* stippleTex = bgfx::alloc(8*4);
memset(stippleTex->data, 0, stippleTex->size);
for (uint32_t ii = 0; ii < 32; ++ii)
{
stipple->data[knightTour[ii].m_y * 8 + knightTour[ii].m_x] = ii*4;
stippleTex->data[knightTour[ii].m_y * 8 + knightTour[ii].m_x] = ii*4;
}
textureStipple = bgfx::createTexture2D(8, 4, 1, bgfx::TextureFormat::R8, BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIN_POINT, stipple);
textureStipple = bgfx::createTexture2D(8, 4, 1
, bgfx::TextureFormat::R8
, BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIN_POINT
, stippleTex
);
Mesh* meshTop[3] =
{

View file

@ -1319,10 +1319,10 @@ int _main_(int /*_argc*/, char** /*_argv*/)
);
// Cubes.
for (uint8_t ii = 0; ii < numCubes; ++ii)
for (uint8_t jj = 0; jj < numCubes; ++jj)
{
cubeMesh.submit(viewId
, cubeMtx[ii]
, cubeMtx[jj]
, programTextureLightning
, s_renderStates[RenderState::ProjectionShadows_DrawDiffuse]
, figureTex

View file

@ -209,7 +209,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
imguiSlider("Random seed", u_paramsData.baseSeed, 0, 100);
int32_t shape = imguiChoose(u_paramsData.initialShape, "Point", "Sphere", "Box", "Donut");
imguiSlider("Initial speed", u_paramsData.initialSpeed, 0.0f, 300.0f, 0.1f);
bool reset = imguiButton("Reset");
bool defaults = imguiButton("Reset");
imguiSeparatorLine();
imguiSlider("Particle count (x512)", u_paramsData.dispatchSize, 1, 64);
imguiSlider("Gravity", u_paramsData.gravity, 0.0f, 0.3f, 0.001f);
@ -226,11 +226,11 @@ int _main_(int /*_argc*/, char** /*_argv*/)
// Modify parameters and reset if shape is changed
if (shape != u_paramsData.initialShape)
{
reset = true;
defaults = true;
InitializeParams(shape, &u_paramsData);
}
if (reset)
if (defaults)
{
bgfx::setBuffer(0, prevPositionBuffer0, bgfx::Access::Write);
bgfx::setBuffer(1, currPositionBuffer0, bgfx::Access::Write);
@ -248,8 +248,6 @@ int _main_(int /*_argc*/, char** /*_argv*/)
bx::xchg(currPositionBuffer0, currPositionBuffer1);
bx::xchg(prevPositionBuffer0, prevPositionBuffer1);
float view[16];
// Update camera.
cameraUpdate(deltaTime, mouseState);
cameraGetViewMtx(view);