mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-26 23:59:30 +00:00
Update GFXTextureManager and GBitmap
GBitmap Changes: Added all other formats to gbitmap that we support gbitmap now supports cubemaps added converters for all these other formats added stb_image_resize for extrudemips so we can extrude mipmaps for all other formats GFXTextureManager Can now directly make cubemaps and texture arrays based on the GFXTextureProfile API implementations for all functions that cubemaps and arrays needed
This commit is contained in:
parent
975fc924cc
commit
3aef90a6bc
66 changed files with 4235 additions and 2590 deletions
|
|
@ -150,7 +150,7 @@ public:
|
|||
TextureTable mTextures;
|
||||
|
||||
/// The cubemap for this stage.
|
||||
GFXCubemap* mCubemap;
|
||||
GFXTexHandle mCubemap;
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -204,10 +204,10 @@ public:
|
|||
void getFeatureSet(FeatureSet* outFeatures) const;
|
||||
|
||||
/// Returns the stage cubemap.
|
||||
GFXCubemap* getCubemap() const { return mCubemap; }
|
||||
GFXTexHandle getCubemap() const { return mCubemap; }
|
||||
|
||||
/// Set the stage cubemap.
|
||||
void setCubemap(GFXCubemap* cubemap) { mCubemap = cubemap; }
|
||||
void setCubemap(GFXTexHandle cubemap) { mCubemap = cubemap; }
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -377,12 +377,12 @@ void ProcessedCustomMaterial::setTextureStages( SceneRenderState *state, const S
|
|||
}
|
||||
case Material::Cube:
|
||||
{
|
||||
GFX->setCubeTexture( samplerRegister, rpd->mCubeMap );
|
||||
GFX->setTexture( samplerRegister, rpd->mCubeMap );
|
||||
break;
|
||||
}
|
||||
case Material::SGCube:
|
||||
{
|
||||
GFX->setCubeTexture( samplerRegister, sgData.cubemap );
|
||||
GFX->setTexture( samplerRegister, sgData.cubemap );
|
||||
break;
|
||||
}
|
||||
case Material::BackBuff:
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public:
|
|||
/// The cubemap to use when the texture type is
|
||||
/// set to Material::Cube.
|
||||
/// @see mTexType
|
||||
GFXCubemapHandle mCubeMap;
|
||||
GFXTexHandle mCubeMap;
|
||||
|
||||
U32 mNumTex;
|
||||
|
||||
|
|
|
|||
|
|
@ -854,11 +854,11 @@ void ProcessedShaderMaterial::setTextureStages( SceneRenderState *state, const S
|
|||
break;
|
||||
|
||||
case Material::Cube:
|
||||
GFX->setCubeTexture( i, rpd->mCubeMap );
|
||||
GFX->setTexture( i, rpd->mCubeMap );
|
||||
break;
|
||||
|
||||
case Material::SGCube:
|
||||
GFX->setCubeTexture( i, sgData.cubemap );
|
||||
GFX->setTexture( i, sgData.cubemap );
|
||||
break;
|
||||
|
||||
case Material::BackBuff:
|
||||
|
|
@ -1333,7 +1333,7 @@ void ProcessedShaderMaterial::setSceneInfo(SceneRenderState * state, const Scene
|
|||
}
|
||||
}
|
||||
if (sgData.cubemap)
|
||||
shaderConsts->setSafe(handles->mCubeMipsSC, (F32)sgData.cubemap->getMipMapLevels());
|
||||
shaderConsts->setSafe(handles->mCubeMipsSC, (F32)sgData.cubemap->getMipLevels());
|
||||
else
|
||||
shaderConsts->setSafe(handles->mCubeMipsSC, (F32)getBinLog2(PROBEMGR->getProbeTexSize()));
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ struct SceneData
|
|||
|
||||
// misc
|
||||
const MatrixF *objTrans;
|
||||
GFXCubemap *cubemap;
|
||||
GFXTexHandle cubemap;
|
||||
F32 visibility;
|
||||
|
||||
/// Enables wireframe rendering for the object.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue