Ejemplo n.º 1
0
        public VertexStreamGL VertexStreamGL(AttributeMappings mappings)
        {
            int index     = mappings.InstanceIndex;
            var bindings0 = vertexStreamsGL[index];

            if (bindings0 == null)
            {
                var bindings = vertexStreamsGL[index] = new VertexStreamGL();
                mappings.BindAttributes(
                    bindings,
                    vertexFormat
                    );
                return(bindings);
            }
            else
            {
                return(bindings0);
            }
        }
Ejemplo n.º 2
0
        public VertexStreamGL VertexStreamGL(AttributeMappings mappings)
        {
            int index          = mappings.InstanceIndex;
            var existingStream = vertexStreamsGL[index];

            if (existingStream == null)
            {
                var stream = vertexStreamsGL[index] = new VertexStreamGL();
                mappings.BindAttributes(
                    stream,
                    vertexFormat
                    );
                return(stream);
            }
            else
            {
                return(existingStream);
            }
        }