Beispiel #1
0
 public SpriteEffect(GraphicsDevice graphicsDevice)
     : base(
         graphicsDevice,
         "SpriteVS",
         "SpritePS",
         null,
         CreatePipelineLayoutDescription())
 {
     _textureConstantBuffer = DynamicBuffer <TextureConstants> .Create(graphicsDevice, BufferUsageFlags.ConstantBuffer);
 }
Beispiel #2
0
 public ParticleEffect(GraphicsDevice graphicsDevice)
     : base(
         graphicsDevice,
         "ParticleVS",
         "ParticlePS",
         CreateVertexDescriptor(),
         CreatePipelineLayoutDescription())
 {
     _transformConstantBuffer = DynamicBuffer <ParticleTransformConstants> .Create(graphicsDevice, BufferUsageFlags.ConstantBuffer);
 }
Beispiel #3
0
        public TerrainEffect(GraphicsDevice graphicsDevice, int numTextures)
            : base(
                graphicsDevice,
                "TerrainVS",
                "TerrainPS",
                CreateVertexDescriptor(),
                CreatePipelineLayoutDescription(numTextures))
        {
            _transformConstantBuffer = AddDisposable(DynamicBuffer <TransformConstants> .Create(graphicsDevice, BufferUsageFlags.ConstantBuffer));

            _lightingConstantBuffer = AddDisposable(DynamicBuffer <LightingConstants> .Create(graphicsDevice, BufferUsageFlags.ConstantBuffer));
        }
Beispiel #4
0
        public MeshEffect(GraphicsDevice graphicsDevice)
            : base(
                graphicsDevice,
                "MeshVS",
                "MeshPS",
                CreateVertexDescriptor(),
                CreatePipelineLayoutDescription())
        {
            _transformConstantBuffer = AddDisposable(DynamicBuffer <MeshTransformConstants> .Create(graphicsDevice, BufferUsageFlags.ConstantBuffer));

            _lightingConstantBuffer = AddDisposable(DynamicBuffer <LightingConstants> .Create(graphicsDevice, BufferUsageFlags.ConstantBuffer));

            _perDrawConstantBuffer = AddDisposable(DynamicBuffer <PerDrawConstants> .Create(graphicsDevice, BufferUsageFlags.ConstantBuffer));
        }