Example #1
0
 public void RegisterScalarType(Type type)
 {
     if (!ScalarTypes.Contains(type))
     {
         ScalarTypes.Add(type);
     }
 }
Example #2
0
        /// <summary>
        /// Initializes the types.
        /// </summary>
        private void InitializeTypes()
        {
            string[] scalarTypes =
            {
                "bool",
                "int",
                "half",
                "float",
                "double",
                "string", // Actually not a scalar type, but treated similarly.
            };
            foreach (string type in scalarTypes)
            {
                ScalarTypes.Add(new TypeCompletionData(type));
            }

            string[] types =
            {
                "bool1",     "bool2",     "bool3",     "bool4",
                "bool1x1",   "bool1x2",   "bool1x3",   "bool1x4",
                "bool2x1",   "bool2x2",   "bool2x3",   "bool2x4",
                "bool3x1",   "bool3x2",   "bool3x3",   "bool3x4",
                "bool4x1",   "bool4x2",   "bool4x3",   "bool4x4",
                "int1",      "int2",      "int3",      "int4",
                "int1x1",    "int1x2",    "int1x3",    "int1x4",
                "int2x1",    "int2x2",    "int2x3",    "int2x4",
                "int3x1",    "int3x2",    "int3x3",    "int3x4",
                "int4x1",    "int4x2",    "int4x3",    "int4x4",
                "half1",     "half2",     "half3",     "half4",
                "half1x1",   "half1x2",   "half1x3",   "half1x4",
                "half2x1",   "half2x2",   "half2x3",   "half2x4",
                "half3x1",   "half3x2",   "half3x3",   "half3x4",
                "half4x1",   "half4x2",   "half4x3",   "half4x4",
                "float1",    "float2",    "float3",    "float4",
                "float1x1",  "float1x2",  "float1x3",  "float1x4",
                "float2x1",  "float2x2",  "float2x3",  "float2x4",
                "float3x1",  "float3x2",  "float3x3",  "float3x4",
                "float4x1",  "float4x2",  "float4x3",  "float4x4",
                "double1",   "double2",   "double3",   "double4",
                "double1x1", "double1x2", "double1x3", "double1x4",
                "double2x1", "double2x2", "double2x3", "double2x4",
                "double3x1", "double3x2", "double3x3", "double3x4",
                "double4x1", "double4x2", "double4x3", "double4x4",
            };
            foreach (string type in types)
            {
                Types.Add(new TypeCompletionData(type));
            }

            string[] specialTypes =
            {
                "void",
                "sampler","sampler1D",  "sampler2D", "sampler3D", "samplerCUBE", "sampler_state",
                "struct",
            };
            foreach (string type in specialTypes)
            {
                SpecialTypes.Add(new TypeCompletionData(type));
            }

            string[] effectTypes =
            {
                "technique", "pass",
                "asm",
            };
            foreach (string type in effectTypes)
            {
                EffectTypes.Add(new TypeCompletionData(type));
            }
        }