mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Merge pull request #1452 from rextimmy/skybox_vertex_format_fix
Corrected SkyBox vertex format
This commit is contained in:
commit
000649e840
2 changed files with 6 additions and 6 deletions
|
|
@ -252,7 +252,7 @@ void SkyBox::_renderObject( ObjectRenderInst *ri, SceneRenderState *state, BaseM
|
||||||
|
|
||||||
void SkyBox::_initRender()
|
void SkyBox::_initRender()
|
||||||
{
|
{
|
||||||
GFXVertexPNTT *tmpVerts = NULL;
|
GFXVertexPNT *tmpVerts = NULL;
|
||||||
|
|
||||||
U32 vertCount = 36;
|
U32 vertCount = 36;
|
||||||
|
|
||||||
|
|
@ -264,7 +264,7 @@ void SkyBox::_initRender()
|
||||||
// Create temp vertex pointer
|
// Create temp vertex pointer
|
||||||
// so we can read from it
|
// so we can read from it
|
||||||
// for generating the normals below.
|
// for generating the normals below.
|
||||||
tmpVerts = new GFXVertexPNTT[vertCount];
|
tmpVerts = new GFXVertexPNT[vertCount];
|
||||||
|
|
||||||
// We don't bother sharing
|
// We don't bother sharing
|
||||||
// vertices here, in order to
|
// vertices here, in order to
|
||||||
|
|
@ -400,14 +400,14 @@ void SkyBox::_initRender()
|
||||||
mIsVBDirty = false;
|
mIsVBDirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
GFXVertexPNTT *vertPtr = mVB.lock();
|
GFXVertexPNT *vertPtr = mVB.lock();
|
||||||
if (!vertPtr)
|
if (!vertPtr)
|
||||||
{
|
{
|
||||||
delete[] tmpVerts;
|
delete[] tmpVerts;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dMemcpy( vertPtr, tmpVerts, sizeof ( GFXVertexPNTT ) * vertCount );
|
dMemcpy(vertPtr, tmpVerts, sizeof( GFXVertexPNT) * vertCount);
|
||||||
|
|
||||||
mVB.unlock();
|
mVB.unlock();
|
||||||
|
|
||||||
|
|
@ -609,7 +609,7 @@ void SkyBox::_initMaterial()
|
||||||
features.removeFeature( MFT_Visibility );
|
features.removeFeature( MFT_Visibility );
|
||||||
|
|
||||||
// Now initialize the material.
|
// Now initialize the material.
|
||||||
mMatInstance->init( features, getGFXVertexFormat<GFXVertexPNTT>() );
|
mMatInstance->init(features, getGFXVertexFormat<GFXVertexPNT>());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SkyBox::_updateMaterial()
|
void SkyBox::_updateMaterial()
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ protected:
|
||||||
|
|
||||||
SimObjectPtr<Material> mMaterial;
|
SimObjectPtr<Material> mMaterial;
|
||||||
|
|
||||||
GFXVertexBufferHandle<GFXVertexPNTT> mVB;
|
GFXVertexBufferHandle<GFXVertexPNT> mVB;
|
||||||
|
|
||||||
GFXVertexBufferHandle<GFXVertexPC> mFogBandVB;
|
GFXVertexBufferHandle<GFXVertexPC> mFogBandVB;
|
||||||
Material *mFogBandMat;
|
Material *mFogBandMat;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue