Merge pull request #1452 from rextimmy/skybox_vertex_format_fix

Corrected SkyBox vertex format
This commit is contained in:
Areloch 2015-10-27 01:00:24 -05:00
commit 000649e840
2 changed files with 6 additions and 6 deletions

View file

@ -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()

View file

@ -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;