Esempio n. 1
0
		private static Vertex[] SetDataColored(Size size, ShaderWithFormat shader, Material material)
		{
			if ((shader.Flags & ShaderFlags.Textured) != 0)
				return CreateVerticesColoredTextured(size, material.DefaultColor);
			return CreateVerticesColored(size, material.DefaultColor);

		}
 protected CircularBuffer(Device device, ShaderWithFormat shader, BlendMode blendMode,
                          VerticesMode drawMode)
 {
     this.device         = device;
     this.shader         = shader;
     this.blendMode      = blendMode;
     this.drawMode       = drawMode;
     vertexSize          = shader.Format.Stride;
     indexSize           = sizeof(short);
     maxNumberOfVertices = DefaultMaxNumberOfVertices;
     maxNumberOfIndices  = DefaultMaxNumberOfIndices;
     Initialize();
 }
		private void Draw2DExample(ShaderWithFormat shader)
		{
			if (renderExample != null)
				renderExample.IsActive = false;
			if (shader.Format.HasUV)
				renderExample = new Sprite(NewMaterial,
					Rectangle.FromCenter(Vector2D.Half,
						ScreenSpace.Current.FromPixelSpace(NewMaterial.DiffuseMap.PixelSize)));
		}
		private void Draw3DExample(ShaderWithFormat shader)
		{
			new Grid3D(new Size(10));
			if (shader.Format.HasUV)
				renderExample = new Billboard(Vector3D.Zero, Size.One, NewMaterial);
		}
Esempio n. 5
0
		public abstract CircularBuffer CreateCircularBuffer(ShaderWithFormat shader,
			BlendMode blendMode, VerticesMode drawMode = VerticesMode.Triangles);
Esempio n. 6
0
 public abstract CircularBuffer CreateCircularBuffer(ShaderWithFormat shader,
                                                     BlendMode blendMode, VerticesMode drawMode = VerticesMode.Triangles);
Esempio n. 7
0
		private static Vertex[] SetDataNoColor(Size size, ShaderWithFormat shader, Material material)
		{
				return CreateVerticesTextured(size);
		}