Cleanup.
This commit is contained in:
parent
e5aa71db4d
commit
c97f6c41c4
@ -250,33 +250,21 @@ class ExamplePicking : public entry::AppI
|
|||||||
|
|
||||||
for (uint32_t mesh = 0; mesh < 12; ++mesh)
|
for (uint32_t mesh = 0; mesh < 12; ++mesh)
|
||||||
{
|
{
|
||||||
|
const float scale = m_meshScale[mesh];
|
||||||
|
|
||||||
// Set up transform matrix for each mesh
|
// Set up transform matrix for each mesh
|
||||||
float mtxRot[16];
|
float mtx[16];
|
||||||
bx::mtxRotateXY(mtxRot
|
bx::mtxSRT(mtx
|
||||||
|
, scale, scale, scale
|
||||||
, 0.0f
|
, 0.0f
|
||||||
, time*0.37f*(mesh % 2 ? 1.0f : -1.0f)
|
, time*0.37f*(mesh % 2 ? 1.0f : -1.0f)
|
||||||
);
|
, 0.0f
|
||||||
float mtxScale[16];
|
|
||||||
float scale = m_meshScale[mesh];
|
|
||||||
bx::mtxScale(mtxScale
|
|
||||||
, scale
|
|
||||||
, scale
|
|
||||||
, scale
|
|
||||||
);
|
|
||||||
float mtxTrans[16];
|
|
||||||
bx::mtxTranslate(mtxTrans
|
|
||||||
, (mesh % 4) - 1.5f
|
, (mesh % 4) - 1.5f
|
||||||
, (mesh / 4) - 1.25f
|
, (mesh / 4) - 1.25f
|
||||||
, 0.0f
|
, 0.0f
|
||||||
);
|
);
|
||||||
|
|
||||||
float mtx[16];
|
|
||||||
float mtxTransScale[16];
|
|
||||||
bx::mtxMul(mtxTransScale, mtxScale, mtxTrans);
|
|
||||||
bx::mtxMul(mtx, mtxRot, mtxTransScale);
|
|
||||||
|
|
||||||
// Submit mesh to both of our render passes
|
// Submit mesh to both of our render passes
|
||||||
|
|
||||||
// Set uniform based on if this is the highlighted mesh
|
// Set uniform based on if this is the highlighted mesh
|
||||||
bgfx::setUniform(u_tint
|
bgfx::setUniform(u_tint
|
||||||
, mesh == m_highlighted
|
, mesh == m_highlighted
|
||||||
|
Loading…
x
Reference in New Issue
Block a user