コード例 #1
0
        /// <summary>Pulls out a reference to a texture and increments the hardware instancing tracker.</summary>
        /// <param name="textureId">The name associated with the texture (what you caled it when you added it).</param>
        /// <returns>A reference to the desired texture.</returns>
        public static Texture Get(string textureId)
        {
            Texture texture = _textureDatabase.Get <string>(textureId, Texture.CompareTo);

            texture.ExistingReferences++;
            return(texture);
        }
コード例 #2
0
        /// <summary>Get an extended geometry shader that has been loaded and compiled on the GPU.</summary>
        /// <param name="shaderId">The name associated with the shader when you loaded it.</param>
        /// <returns>The shader if it exists.</returns>
        public static ExtendedGeometryShader GetExtendedGeometryShader(string shaderId)
        {
            //ExtendedGeometryShader shader = _extendedGeometryShaderDatabase[shaderId];
            ExtendedGeometryShader shader = _extendedGeometryShaderDatabase.Get <string>(shaderId, ExtendedGeometryShader.CompareTo);

            shader.ExistingReferences++;
            return(shader);
        }
コード例 #3
0
        /// <summary>Get a geometry shader that has been loaded and compiled on the GPU.</summary>
        /// <param name="shaderId">The name associated with the shader when you loaded it.</param>
        /// <returns>The shader if it exists.</returns>
        public static GeometryShader GetGeometryShader(string shaderId)
        {
            //GeometryShader shader = _geometryShaderDatabase[shaderId];
            GeometryShader shader = _geometryShaderDatabase.Get <string>(shaderId, GeometryShader.CompareTo);

            shader.ExistingReferences++;
            return(shader);
        }
コード例 #4
0
        /// <summary>Get a fragment shader that has been loaded and compiled on the GPU.</summary>
        /// <param name="shaderId">The name associated with the shader when you loaded it.</param>
        /// <returns>The shader if it exists.</returns>
        public static FragmentShader GetFragmentShader(string shaderId)
        {
            //FragmentShader shader = _fragmentShaderDatabase[shaderId];
            FragmentShader shader = _fragmentShaderDatabase.Get <string>(shaderId, FragmentShader.CompareTo);

            shader.ExistingReferences++;
            return(shader);
        }
コード例 #5
0
        /// <summary>Get a vertex shader that has been loaded and compiled on the GPU.</summary>
        /// <param name="shaderId">The name associated with the shader when you loaded it.</param>
        /// <returns>The shader if it exists.</returns>
        public static VertexShader GetVertexShader(string shaderId)
        {
            //VertexShader shader = _vertexShaderDatabase[shaderId];
            VertexShader shader = _vertexShaderDatabase.Get <string>(shaderId, VertexShader.CompareTo);

            shader.ExistingReferences++;
            return(shader);
        }
コード例 #6
0
        /// <summary>Get a shader program that has been loaded and compiled on the GPU.</summary>
        /// <param name="shaderId">The name associated with the shader when you loaded it.</param>
        /// <returns>The shader if it exists.</returns>
        public static ShaderProgram GetShaderProgram(string shaderId)
        {
            //ShaderProgram shaderProgram = _shaderProgramDatabase[shaderId];
            ShaderProgram shaderProgram = _shaderProgramDatabase.Get <string>(shaderId, ShaderProgram.CompareTo);

            shaderProgram.ExistingReferences++;
            return(shaderProgram);
        }