public BumpmapSpriteDrawable( Surface surface, Surface bumpmap, Vector2D[] vertexes, Vector2D[] coordinates, bool flip, bool xInverted, bool yInverted, Light light) { this.light = light; this.size = Math.Max(surface.Width, surface.Height); this.xInverted = xInverted; if (flip) { this.yInverted = !yInverted; } else { this.yInverted = yInverted; } this.vertexes = new ARBArrayBuffer<Vector2D>(vertexes, Vector2D.Size); this.coordinates = new ARBArrayBuffer<Vector2D>(coordinates, Vector2D.Size); this.bumpmap = new Texture2D(bumpmap, flip, new TextureOptions()); this.sprite = new Texture2D(surface, flip, new TextureOptions()); }
public SpriteDrawable(Surface surface, Vector2D[] vertexes, Vector2D[] coordinates, bool flip, TextureOptions options) { this.vertexes = new ARBArrayBuffer<Vector2D>(vertexes, Vector2D.Size); this.coordinates = new ARBArrayBuffer<Vector2D>(coordinates, Vector2D.Size); this.texture = new Texture2D(surface, flip, options); this.color = new ScalarColor4(1, 1, 1, 1); }