Ejemplo n.º 1
0
 public SpriteBatch(GraphicsDevice graphicsDevice)
 {
   if (graphicsDevice == null)
     throw new ArgumentException("graphicsDevice");
   this.GraphicsDevice = graphicsDevice;
   this._spriteEffect = new Effect(graphicsDevice, SpriteEffect.Bytecode);
   this._batcher = new SpriteBatcher(graphicsDevice);
   this._beginCalled = false;
 }
Ejemplo n.º 2
0
        public SpriteBatch(GraphicsDevice graphicsDevice)
        {
            if (graphicsDevice == null) {
                throw new ArgumentException ("graphicsDevice");
            }

            this.graphicsDevice = graphicsDevice;
            //spriteEffect = new SpriteEffect (this.graphicsDevice);
            _batcher = new SpriteBatcher ();
        }
Ejemplo n.º 3
0
        public SpriteBatch(GraphicsDevice graphicsDevice)
        {
            if (graphicsDevice == null)
            {
                throw new ArgumentException("graphicsDevice");
            }

            this.graphicsDevice = graphicsDevice;
            //spriteEffect = new SpriteEffect (this.graphicsDevice);
            _batcher = new SpriteBatcher();
        }
Ejemplo n.º 4
0
 public SpriteBatch(GraphicsDevice graphicsDevice)
 {
     if (graphicsDevice == null)
     {
         throw new ArgumentException("graphicsDevice");
     }
     this.GraphicsDevice = graphicsDevice;
     this._spriteEffect  = new Effect(graphicsDevice, SpriteEffect.Bytecode);
     this._batcher       = new SpriteBatcher(graphicsDevice);
     this._beginCalled   = false;
 }
Ejemplo n.º 5
0
        public SpriteBatch(GraphicsDevice graphicsDevice)
        {
            if (graphicsDevice == null)
            {
                throw new ArgumentException("graphicsDevice");
            }

            _graphicsDevice = graphicsDevice;

            _batcher = new SpriteBatcher();
        }
Ejemplo n.º 6
0
        public SpriteBatch( GraphicsDevice graphicsDevice )
        {
            if (graphicsDevice == null )
            {
                throw new ArgumentException("graphicsDevice");
            }

            _graphicsDevice = graphicsDevice;

            _batcher = new SpriteBatcher();
        }
 public SpriteBatch (GraphicsDevice graphicsDevice)
 {
     if (graphicsDevice == null) 
     {
             throw new ArgumentException ("graphicsDevice");
     }        
     this.GraphicsDevice = graphicsDevice;
     // Use a custom SpriteEffect so we can control the transformation matrix
     _spriteEffect = new Effect(graphicsDevice, SpriteEffect.Bytecode);
     _matrixTransform = _spriteEffect.Parameters["MatrixTransform"];
     _spritePass = _spriteEffect.CurrentTechnique.Passes[0];
     _batcher = new SpriteBatcher(graphicsDevice);
     _beginCalled = false;
 }
Ejemplo n.º 8
0
        public SpriteBatch( GraphicsDevice graphicsDevice )
        {
            if (graphicsDevice == null )
            {
                throw new ArgumentException("graphicsDevice");
            }

            this.graphicsDevice = graphicsDevice;

            _batcher = new SpriteBatcher();

            if (GraphicsDevice.openGLESVersion == MonoTouch.OpenGLES.EAGLRenderingAPI.OpenGLES2)
                InitGL20();
        }
Ejemplo n.º 9
0
		public SpriteBatch (GraphicsDevice graphicsDevice)
		{
			if (graphicsDevice == null) {
				throw new ArgumentException ("graphicsDevice");
			}	

			this.GraphicsDevice = graphicsDevice;

            // Use a custom SpriteEffect so we can control the transformation matrix
            _spriteEffect = new Effect(graphicsDevice, SpriteEffect.Bytecode);

            _batcher = new SpriteBatcher(graphicsDevice);

            _beginCalled = false;
		}
Ejemplo n.º 10
0
        public SpriteBatch(GraphicsDevice graphicsDevice)
        {
            if (graphicsDevice == null)
            {
                throw new ArgumentException("graphicsDevice");
            }

            this.GraphicsDevice = graphicsDevice;

            // Use a custom SpriteEffect so we can control the transformation matrix
            _spriteEffect = new Effect(graphicsDevice, SpriteEffect.Bytecode);

            _batcher = new SpriteBatcher(graphicsDevice);

            _beginCalled = false;
        }
Ejemplo n.º 11
0
        public SpriteBatch(GraphicsDevice graphicsDevice)
        {
            if (graphicsDevice == null)
            {
                throw new ArgumentException("graphicsDevice");
            }

            this.graphicsDevice = graphicsDevice;

            _batcher = new SpriteBatcher();

            if (GraphicsDevice.openGLESVersion == MonoTouch.OpenGLES.EAGLRenderingAPI.OpenGLES2)
            {
                InitGL20();
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Constructs a <see cref="SpriteBatch"/>.
        /// </summary>
        /// <param name="graphicsDevice">The <see cref="GraphicsDevice"/>, which will be used for sprite rendering.</param>
        /// <param name="capacity">The initial capacity of the internal array holding batch items (the value will be rounded to the next multiple of 64).</param>
        /// <exception cref="ArgumentNullException">Thrown when <paramref name="graphicsDevice"/> is null.</exception>
        public SpriteBatch(GraphicsDevice graphicsDevice, int capacity)
        {
            if (graphicsDevice == null)
            {
                throw new ArgumentNullException("graphicsDevice", FrameworkResources.ResourceCreationWhenDeviceIsNull);
            }

            this.GraphicsDevice = graphicsDevice;

            _spriteEffect = new SpriteEffect(graphicsDevice);
            _spritePass   = _spriteEffect.CurrentTechnique.Passes[0];

            _batcher = new SpriteBatcher(graphicsDevice, capacity);

            _beginCalled = false;
        }
Ejemplo n.º 13
0
		public SpriteBatch (GraphicsDevice graphicsDevice)
		{
			if (graphicsDevice == null) {
				throw new ArgumentException ("graphicsDevice");
			}	

			this.GraphicsDevice = graphicsDevice;

            // Use a custom SpriteEffect so we can control the transformation matrix
            _spriteEffect = new Effect(graphicsDevice, SpriteEffect.Bytecode);
            _matrixTransform = _spriteEffect.Parameters["MatrixTransform"];
            _spritePass = _spriteEffect.CurrentTechnique.Passes[0];

            _batcher = new SpriteBatcher(graphicsDevice);

            _beginCalled = false;
		}
Ejemplo n.º 14
0
        public SpriteBatch(GraphicsDevice graphicsDevice)
        {
            if (graphicsDevice == null)
            {
                throw new ArgumentException("graphicsDevice");
            }

            this.graphicsDevice = graphicsDevice;

            _batcher = new SpriteBatcher();
#if ANDROID
            if (GraphicsDevice.OpenGLESVersion == OpenTK.Graphics.GLContextVersion.Gles2_0)
#else
            if (GraphicsDevice.OpenGLESVersion == MonoTouch.OpenGLES.EAGLRenderingAPI.OpenGLES2)
#endif
            { InitGL20(); }
        }
Ejemplo n.º 15
0
        public SpriteBatch ( GraphicsDevice graphicsDevice )
		{
			if (graphicsDevice == null )
			{
				throw new ArgumentException("graphicsDevice");
			}	

			this.graphicsDevice = graphicsDevice;
			
			_batcher = new SpriteBatcher();

#if IPHONE
			if(GraphicsDevice.OpenGLESVersion == MonoTouch.OpenGLES.EAGLRenderingAPI.OpenGLES2)
				InitGL20();
#elif ANDROID
            if (GraphicsDevice.OpenGLESVersion == OpenTK.Graphics.GLContextVersion.Gles2_0)
                InitGL20();
#endif
		}