Skip to content

Commit

Permalink
Main: deprecate RSC_VERTEX_TEXTURE_FETCH
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Aug 17, 2024
1 parent 3a291fd commit 723c4ed
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion OgreMain/include/OgreRenderSystemCapabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespace Ogre
RSC_POINT_EXTENDED_PARAMETERS = RSC_POINT_SPRITES,
/// Supports rendering to vertex buffers
RSC_HWRENDER_TO_VERTEX_BUFFER = OGRE_CAPS_VALUE(CAPS_CATEGORY_COMMON, 23),
/// Supports vertex texture fetch
/// @deprecated use getNumVertexTextureUnits()
RSC_VERTEX_TEXTURE_FETCH = OGRE_CAPS_VALUE(CAPS_CATEGORY_COMMON, 24),
/// Supports mipmap LOD biasing
RSC_MIPMAP_LOD_BIAS = OGRE_CAPS_VALUE(CAPS_CATEGORY_COMMON, 25),
Expand Down
2 changes: 1 addition & 1 deletion OgreMain/src/OgreGpuProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ namespace Ogre

// Vertex texture fetch required?
if (isVertexTextureFetchRequired() &&
!caps->hasCapability(RSC_VERTEX_TEXTURE_FETCH))
!caps->getNumVertexTextureUnits())
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion OgreMain/src/OgreInstanceBatchHW_VTF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ namespace Ogre

//VTF & HW Instancing must be supported
if( capabilities->hasCapability( RSC_VERTEX_BUFFER_INSTANCE_DATA ) &&
capabilities->hasCapability( RSC_VERTEX_TEXTURE_FETCH ) )
capabilities->getNumVertexTextureUnits() )
{
//TODO: Check PF_FLOAT32_RGBA is supported (should be, since it was the 1st one)
const size_t numBones = std::max<size_t>( 1, baseSubMesh->blendIndexToBoneIndexMap.size() );
Expand Down
2 changes: 1 addition & 1 deletion OgreMain/src/OgreInstanceBatchVTF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ namespace Ogre
const RenderSystemCapabilities *capabilities = renderSystem->getCapabilities();

//VTF must be supported
if( capabilities->hasCapability( RSC_VERTEX_TEXTURE_FETCH ) )
if( capabilities->getNumVertexTextureUnits() )
{
//TODO: Check PF_FLOAT32_RGBA is supported (should be, since it was the 1st one)
const size_t numBones = std::max<size_t>( 1, baseSubMesh->blendIndexToBoneIndexMap.size() );
Expand Down
8 changes: 2 additions & 6 deletions OgreMain/src/OgreRenderSystemCapabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ namespace Ogre {
, mMaxPointSize(1)
, mNonPOW2TexturesLimited(false)
, mMaxSupportedAnisotropy(0)
, mNumVertexTextureUnits(0)
, mGeometryProgramNumOutputVertices(0)
, mNumVertexAttributes(1)
{
Expand Down Expand Up @@ -149,6 +150,7 @@ namespace Ogre {
pLog->logMessage(" * Number of vertex attributes: " + StringConverter::toString(mNumVertexAttributes));
pLog->logMessage(" * Textures");
pLog->logMessage(" - Number of texture units: " + StringConverter::toString(mNumTextureUnits));
pLog->logMessage(" - Number of vertex textures: " + StringConverter::toString(mNumVertexTextureUnits));
pLog->logMessage(" - Floating point: " + StringConverter::toString(hasCapability(RSC_TEXTURE_FLOAT), true));
pLog->logMessage(
" - Non-power-of-two: " + StringConverter::toString(hasCapability(RSC_NON_POWER_OF_2_TEXTURES), true) +
Expand Down Expand Up @@ -196,12 +198,6 @@ namespace Ogre {
StringConverter::toString(hasCapability(RSC_VERTEX_FORMAT_INT_10_10_10_2), true));
pLog->logMessage(" - 16x3 element types: " +
StringConverter::toString(hasCapability(RSC_VERTEX_FORMAT_16X3), true));
pLog->logMessage(" * Vertex texture fetch: " +
StringConverter::toString(hasCapability(RSC_VERTEX_TEXTURE_FETCH), true));
if (hasCapability(RSC_VERTEX_TEXTURE_FETCH))
{
pLog->logMessage(" - Max vertex textures: " + StringConverter::toString(mNumVertexTextureUnits));
}
pLog->logMessage(" * Read/Write Buffers: " +
StringConverter::toString(hasCapability(RSC_READ_WRITE_BUFFERS), true));
pLog->logMessage(
Expand Down

0 comments on commit 723c4ed

Please sign in to comment.