Esempio n. 1
0
 public TiledResourcePool(DxDevice device, int initialPageCount = 16)
 {
     /*this.device = device;
      * this.pageCount = initialPageCount;
      * var memSize = initialPageCount * 65536;
      *
      * BufferDescription bdPool = new BufferDescription()
      * {
      *  BindFlags = BindFlags.None,
      *  CpuAccessFlags = CpuAccessFlags.None,
      *  OptionFlags = ResourceOptionFlags.TilePool,
      *  SizeInBytes = memSize,
      *  Usage = ResourceUsage.Default
      * };
      *
      * this.tilePoolBuffer = new SharpDX.Direct3D11.Buffer(device, bdPool);*/
 }
Esempio n. 2
0
 public EffectInstance(DxDevice device, ShaderBytecode bytecode)
 {
     this.device           = device;
     this.effect           = new Effect(device.Device, bytecode);
     this.currenttechnique = this.effect.GetTechniqueByIndex(0);
 }
Esempio n. 3
0
 public EffectInstance(DxDevice device, DX11Effect effect)
 {
     this.device           = device;
     this.effect           = new Effect(device.Device, effect.ByteCode);
     this.currenttechnique = this.effect.GetTechniqueByIndex(0);
 }
Esempio n. 4
0
        public static T GetShaderInstance <T>(DxDevice device, Assembly assembly, string path) where T : class
        {
            ShaderBytecode sb = LoadFromResource(assembly, path);

            return(GetShaderInstance <T>(device, sb));
        }
Esempio n. 5
0
 public static string GetShaderProfile <T>(DxDevice device) where T : class
 {
     return(GetProfileType <T>() + GetFeature(device));
 }
Esempio n. 6
0
        public static T CompileFromResource <T>(DxDevice device, Assembly assembly, string path, string entrypoint) where T : class
        {
            ShaderBytecode sb = CompileFromResource(assembly, path, GetShaderProfile <T>(device), entrypoint);

            return(GetShaderInstance <T>(device, sb));
        }
Esempio n. 7
0
 public SamplerStates(DxDevice device)
 {
     this.device = device;
     this.Initialize();
 }
Esempio n. 8
0
 public RasterizerStates(DxDevice device)
 {
     this.device = device;
     this.Initialize();
 }
Esempio n. 9
0
 public DefaultTextures(DxDevice device)
 {
     this.device = device;
 }
Esempio n. 10
0
 public DepthStencilPool(DxDevice device)
     : base(device)
 {
 }
Esempio n. 11
0
 public RenderTargetPool(DxDevice device)
     : base(device)
 {
 }
Esempio n. 12
0
 public VolumeTexturePool(DxDevice device)
     : base(device)
 {
 }
Esempio n. 13
0
 public StructuredBufferPool(DxDevice device)
     : base(device)
 {
 }
Esempio n. 14
0
 public VertexBufferPool(DxDevice device)
     : base(device)
 {
 }
Esempio n. 15
0
 public EffectInstance(DxDevice device, Effect effect)
 {
     this.device           = device;
     this.effect           = effect;
     this.currenttechnique = this.effect.GetTechniqueByIndex(0);
 }
Esempio n. 16
0
 public DepthStencilStates(DxDevice device)
 {
     this.device = device;
     this.Initialize();
 }
Esempio n. 17
0
        public static T CompileFromString <T>(DxDevice device, string code, string entrypoint) where T : class
        {
            ShaderBytecode sb = CompileFromString(code, GetShaderProfile <T>(device), entrypoint);

            return(GetShaderInstance <T>(device, sb));
        }
Esempio n. 18
0
        public static T CompileFromFile <T>(DxDevice device, string path, string entrypoint) where T : class
        {
            ShaderBytecode sb = CompileFromFile(path, GetShaderProfile <T>(device), entrypoint, null);

            return(GetShaderInstance <T>(device, sb));
        }
Esempio n. 19
0
 public ResourcePool(DxDevice device)
 {
     this.device = device;
 }