Beispiel #1
0
 // most types should be added via the ShaderType.* functions.
 // this function is used to ensure the shader type belongs to this container
 internal FoundryHandle AddShaderType(ShaderType shaderType, bool convertNonexistantToVoid)
 {
     if (shaderType.Exists)
     {
         if (shaderType.Container == this)
         {
             return(shaderType.handle);
         }
         else
         {
             // TODO: have to deep copy the definition from another container
             return(FoundryHandle.Invalid());
         }
     }
     else
     {
         // invalid shader type...
         if (convertNonexistantToVoid)
         {
             return(ShaderTypeInternal.Void(this));
         }
         else
         {
             return(FoundryHandle.Invalid());
         }
     }
 }
Beispiel #2
0
 internal extern bool SetTypeInternal(FoundryHandle typeHandle, ShaderTypeInternal type);