Inheritance: HardwareVertexBuffer
Ejemplo n.º 1
0
        /// Creates a vertex buffer
        public override HardwareVertexBuffer CreateVertexBuffer(VertexDeclaration vertexDeclaration, int numVerts,
                                                                BufferUsage usage, bool useShadowBuffer)
        {
            var vb = new DefaultHardwareVertexBuffer(this, vertexDeclaration, numVerts, usage);

            return(vb);
        }
Ejemplo n.º 2
0
        public HardwareVertexBuffer(HardwareBufferManagerBase manager, VertexDeclaration vertexDeclaration, int numVertices,
                                    BufferUsage usage, bool useSystemMemory, bool useShadowBuffer)
            : base(usage, useSystemMemory, useShadowBuffer)
        {
            this.vertexDeclaration = vertexDeclaration;
            this.numVertices       = numVertices;
            this.Manager           = manager;

            // calculate the size in bytes of this buffer
            sizeInBytes = vertexDeclaration.GetVertexSize() * numVertices;

            // create a shadow buffer if required
            if (useShadowBuffer)
            {
                shadowBuffer = new DefaultHardwareVertexBuffer(this.Manager, vertexDeclaration, numVertices, BufferUsage.Dynamic);
            }

            this.useCount = 0;
        }
Ejemplo n.º 3
0
		public HardwareVertexBuffer( HardwareBufferManagerBase manager, VertexDeclaration vertexDeclaration, int numVertices,
		                             BufferUsage usage, bool useSystemMemory, bool useShadowBuffer )
			: base( usage, useSystemMemory, useShadowBuffer )
		{
			this.vertexDeclaration = vertexDeclaration;
			this.numVertices = numVertices;
			this.Manager = manager;

			// calculate the size in bytes of this buffer
			sizeInBytes = vertexDeclaration.GetVertexSize()*numVertices;

			// create a shadow buffer if required
			if ( useShadowBuffer )
			{
				shadowBuffer = new DefaultHardwareVertexBuffer( this.Manager, vertexDeclaration, numVertices, BufferUsage.Dynamic );
			}

			this.useCount = 0;
		}
		/// Creates a vertex buffer
        public override HardwareVertexBuffer CreateVertexBuffer( VertexDeclaration vertexDeclaration, int numVerts, BufferUsage usage, bool useShadowBuffer )
		{
			DefaultHardwareVertexBuffer vb = new DefaultHardwareVertexBuffer( this, vertexDeclaration, numVerts, usage );
			return vb;
		}