MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetTextureType

Function GetTextureType

shadercompiler/TextureFunctionConversionDX11.cpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22};
23
24static int GetTextureType( const InlineString& name )
25{
26 const char* s_textureName[] = { "1D", "2D", "3D", "CUBE" };
27 const int s_textureType[] = { OP_TEXTURE1D, OP_TEXTURE2D, OP_TEXTURE3D, OP_TEXTURECUBE };
28 for( unsigned i = 0; i < sizeof( s_textureType ) / sizeof( int ); ++i )
29 {
30 if( ContainsSubstring( name, s_textureName[i] ) )
31 {
32 return s_textureType[i];
33 }
34 }
35 assert( false );
36 return TEX_TYPE_TYPELESS;
37}
38
39static Symbol* ExtractTextureState( Symbol* symbol )
40{

Callers 1

FindDX9TexSampleCallsFunction · 0.70

Calls 1

ContainsSubstringFunction · 0.85

Tested by

no test coverage detected