Beispiel #1
0
 public UVQuadGeometry(IndexedSurface <TVertexData> surface)
 {
     this.Size      = Vector2.One;
     this.LineWidth = 1;
     this.UV        = UVRectangle.Default;
     this.Surface   = surface;
 }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FontGeometry"/> class.
        /// </summary>
        /// <param name="surface">The surface to use for drawing</param>
        /// <param name="font">The <see cref="Font"/> used</param>
        public FontGeometry(IndexedSurface <UVColorVertexData> surface, Font font)
        {
            this.Surface         = surface;
            this.Font            = font;
            this.SizeCoefficient = Vector2.One;

            this.UnitTransformation = Matrix3.Identity;
        }
Beispiel #3
0
 public SpriteSet(ISurfaceShader shaderProgram, SurfaceSetting[] surfaceSettings)
 {
     this.sprites = new Dictionary <string, Sprite <TVertexData> >();
     this.surface = new IndexedSurface <TVertexData>();
     if (surfaceSettings != null)
     {
         this.surface.AddSettings(surfaceSettings);
     }
     if (shaderProgram != null)
     {
         shaderProgram.UseOnSurface(this.surface);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Sprite2DGeometry"/> class.
 /// </summary>
 /// <param name="surface">The surface used for drawing</param>
 public Sprite2DGeometry(IndexedSurface <UVColorVertexData> surface)
     : base(surface)
 {
 }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PrimitiveGeometry"/> class.
 /// </summary>
 /// <param name="surface">The surface used for drawing.</param>
 public PrimitiveGeometry(IndexedSurface <PrimitiveVertexData> surface)
 {
     this.surface = surface;
 }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Sprite3DGeometry"/> class.
 /// </summary>
 /// <param name="surface">The surface two draw with.</param>
 public Sprite3DGeometry(IndexedSurface <SimpleSpriteVertexData> surface)
     : base(surface)
 {
 }