import { GfxBindingLayoutSamplerDescriptor , GfxSamplerFormatKind , GfxTextureDimension } from "./GfxPlatform" ; export enum _T { Buffer , Texture , RenderTarget , Sampler , Program , Bindings , InputLayout , InputState , RenderPipeline , Readback , QueryPool } export interface GfxResourceBase { ResourceName ? : string ; ResourceUniqueId : number ; } ; export interface GfxBuffer extends GfxResourceBase { _T : _T . Buffer ; } ; export interface GfxTexture extends GfxResourceBase { _T : _T . Texture ; } ; export interface GfxRenderTarget extends GfxResourceBase { _T : _T . RenderTarget ; } ; export interface GfxSampler extends GfxResourceBase { _T : _T . Sampler ; } ; export interface GfxProgram extends GfxResourceBase { _T : _T . Program ; } ; export interface GfxBindings extends GfxResourceBase { _T : _T . Bindings ; } ; export interface GfxInputLayout extends GfxResourceBase { _T : _T . InputLayout ; } ; export interface GfxInputState extends GfxResourceBase { _T : _T . InputState ; } ; export interface GfxRenderPipeline extends GfxResourceBase { _T : _T . RenderPipeline ; } ; export interface GfxReadback extends GfxResourceBase { _T : _T . Readback ; } ; export interface GfxQueryPool extends GfxResourceBase { _T : _T . QueryPool ; } ; export type GfxResource = GfxBuffer | GfxTexture | GfxRenderTarget | GfxSampler | GfxProgram | GfxBindings | GfxInputLayout | GfxInputState | GfxRenderPipeline | GfxReadback | GfxQueryPool ; export const defaultBindingLayoutSamplerDescriptor = { formatKind : GfxSamplerFormatKind . Float , dimension : GfxTextureDimension . n2D , } ;