Exemple #1
0
 internal DbMesh(DisplayData data, ITextureSupplier texturer, GraphicsDevice graphics)
     : base(data.Name)
 {
     _drawable         = texturer.Get(data.Name);
     _originalVertices = data.Vertices;
     // reverse to go with MonoGames standard culling direction
     // TODO ideally this would happen at content build time along with any other computation
     _indices  = data.Triangles.Reverse().ToArray();
     _uvs      = data.Uvs;
     _vertices = new VertexPositionColorTexture[_originalVertices.Length / 2];
     // edges, userEdges?
     Initialize(graphics);
 }
Exemple #2
0
 public DbImage(string textureName, ITextureSupplier texturer)
     : base(textureName)
 {
     _texture = texturer.Get(textureName);
 }
Exemple #3
0
 public DbImage(IDrawableDb texture, string name = "$default")
     : base(name)
 {
     _texture = texture;
 }