コード例 #1
0
ファイル: SpriteBatch.cs プロジェクト: phr00t/FocusEngine
        /// <summary>
        /// Initializes a new instance of the <see cref="SpriteBatch" /> class.
        /// </summary>
        /// <param name="graphicsDevice">The graphics device.</param>
        /// <param name="bufferElementCount">The maximum number element that can be batched in one time.</param>
        /// <param name="batchCapacity">The batch capacity default to 64.</param>
        public SpriteBatch(GraphicsDevice graphicsDevice, int bufferElementCount = 1024, int batchCapacity = 64)
            : base(graphicsDevice, Bytecode, BytecodeSRgb, StaticQuadBufferInfo.CreateQuadBufferInfo("SpriteBatch.VertexIndexBuffer", true, bufferElementCount, batchCapacity), VertexPositionColorTextureSwizzle.Layout)
        {
            DefaultDepth = 200f;

            // For signed distance field thumbnail rendering
            textureSpriteFontEffect = new EffectInstance(new Effect(graphicsDevice, SpriteSignedDistanceFieldFontShader.Bytecode)
            {
                Name = "TextureSpriteFontEffect"
            });
        }
コード例 #2
0
ファイル: Sprite3DBatch.cs プロジェクト: vvvv/stride
 /// <summary>
 /// Creates a new instance of <see cref="Sprite3DBatch"/>.
 /// </summary>
 /// <param name="device"></param>
 /// <param name="bufferElementCount">The maximum number element that can be batched in one time.</param>
 /// <param name="batchCapacity">The batch capacity default to 64.</param>
 public Sprite3DBatch(GraphicsDevice device, int bufferElementCount = 1024, int batchCapacity = 64)
     : base(device, SpriteBatch.Bytecode, SpriteBatch.BytecodeSRgb, StaticQuadBufferInfo.CreateQuadBufferInfo("Sprite3DBatch.VertexIndexBuffer", false, bufferElementCount, batchCapacity), VertexPositionColorTextureSwizzle.Layout)
 {
 }
コード例 #3
0
ファイル: SpriteBatch.cs プロジェクト: ddevelopment/paradox
 /// <summary>
 /// Initializes a new instance of the <see cref="SpriteBatch" /> class.
 /// </summary>
 /// <param name="graphicsDevice">The graphics device.</param>
 /// <param name="bufferElementCount">The maximum number element that can be batched in one time.</param>
 /// <param name="batchCapacity">The batch capacity default to 64.</param>
 public SpriteBatch(GraphicsDevice graphicsDevice, int bufferElementCount = 1024, int batchCapacity = 64)
     : base(graphicsDevice, Bytecode, StaticQuadBufferInfo.CreateQuadBufferInfo("SpriteBatch.VertexIndexBuffer", true, bufferElementCount, batchCapacity), VertexPositionColorTextureSwizzle.Layout)
 {
     DefaultDepth = 200f;
 }