Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp
GLint Program::getSamplerMapping(unsigned int samplerIndex)
{
    assert(samplerIndex < sizeof(mSamplers)/sizeof(mSamplers[0]));

    GLint logicalTextureUnit = -1;

    if (mSamplers[samplerIndex].active)
    {
        logicalTextureUnit = mSamplers[samplerIndex].logicalTextureUnit;
    }

    if (logicalTextureUnit >= 0 && logicalTextureUnit < MAX_TEXTURE_IMAGE_UNITS)
    {
        return logicalTextureUnit;
    }

    return -1;
}
// Returns the index of the texture unit corresponding to a Direct3D 9 sampler
// index referenced in the compiled HLSL shader
Returns the index of the texture unit corresponding to a Direct3D 9 sampler
index referenced in the compiled HLSL shader
Returns the index of the texture unit corresponding to a Direct3D 9 sampler index referenced in the compiled HLSL shader
GLint Program::getSamplerMapping(unsigned int samplerIndex)
{
    assert(samplerIndex < sizeof(mSamplers)/sizeof(mSamplers[0]));
    GLint logicalTextureUnit = -1;
    if (mSamplers[samplerIndex].active)
    {
        logicalTextureUnit = mSamplers[samplerIndex].logicalTextureUnit;
    }
    if (logicalTextureUnit >= 0 && logicalTextureUnit < MAX_TEXTURE_IMAGE_UNITS)
    {
        return logicalTextureUnit;
    }
    return -1;
}
GLint Program :: getSamplerMapping ( unsigned int samplerIndex ) { assert ( samplerIndex < sizeof ( mSamplers ) / sizeof ( mSamplers [ 0 ] ) ) ; GLint logicalTextureUnit = -1 ; if ( mSamplers [ samplerIndex ] . active ) { logicalTextureUnit = mSamplers [ samplerIndex ] . logicalTextureUnit ; } if ( logicalTextureUnit >= 0 && logicalTextureUnit < MAX_TEXTURE_IMAGE_UNITS ) { return logicalTextureUnit ; } return -1 ; }
Returns the index of the texture unit corresponding to a Direct3D 9 sampler
index referenced in the compiled HLSL shader
Returns the index of the texture unit corresponding to a Direct3D 9 sampler index referenced in the compiled HLSL shader