Package d3d11

Examples of d3d11.D3D11Exception


  public final D3D11_MAPPED_SUBRESOURCE Map(ID3D11Resource resource, int subResource, ValuedEnum<D3D11_MAP> MapType, int MapFlags) {
    D3D11_MAPPED_SUBRESOURCE mappedData = new D3D11_MAPPED_SUBRESOURCE();
//    try {
      int result = Map(pointerTo(resource), subResource, MapType, MapFlags, pointerTo(mappedData));
      if(result != 0) {
        throw new D3D11Exception("Could not map resource", result);
      }
     
      return mappedData;     
//    } finally {
//      pp.release();
View Full Code Here


  }

  public final void GetData(ID3D11Asynchronous pAsync, Pointer<?> pData, int DataSize, ValuedEnum<D3D11_ASYNC_GETDATA_FLAG> GetDataFlags) {
    int result = GetData(pointerTo(pAsync), pData, DataSize, GetDataFlags);
    if(result != 0) {
      throw new D3D11Exception("Could not get data from query", result);
    }
  }
View Full Code Here

    public ID3D11DeviceContext CreateDeferredContext(int ContextFlags) {
      Pointer<Pointer<ID3D11DeviceContext>> pp = allocatePointer(ID3D11DeviceContext.class);
      try {
        int result = CreateDeferredContext(ContextFlags, pp);
        if(result != 0) {
          throw new D3D11Exception("Could not create deferred context", result);
        }
       
        return pp.get().getNativeObject(ID3D11DeviceContext.class);
      } finally {
         pp.release();
View Full Code Here

    public final ID3D11RenderTargetView CreateRenderTargetView(ID3D11Resource resource, D3D11_RENDER_TARGET_VIEW_DESC desc) {
      Pointer<Pointer<ID3D11RenderTargetView>> pp = allocatePointer(ID3D11RenderTargetView.class);
      try {
        int result = CreateRenderTargetView(pointerTo(resource), pointerTo(desc), pp);
        if(result != 0) {
          throw new D3D11Exception("", result);
        }
       
        return pp.get().getNativeObject(ID3D11RenderTargetView.class);
      } finally {
         pp.release();
View Full Code Here

                .InputSlotClass(descs[i].InputSlotClass())
                .InstanceDataStepRate(descs[i].InstanceDataStepRate());
        }
        int result = CreateInputLayout(pDescs, descs.length, shaderCode.GetBufferPointer(), (int) shaderCode.GetBufferSize(), pp);
        if(result != 0) {
          throw new D3D11Exception("Could not create input layout", result);
        }
       
        return pp.get().getNativeObject(ID3D11InputLayout.class);
      } finally {
        pDescs.release();
View Full Code Here

    public ID3D11ClassLinkage CreateClassLinkage() {
      Pointer<Pointer<ID3D11ClassLinkage>> pp = allocatePointer(ID3D11ClassLinkage.class);
      try {
        int result = this.CreateClassLinkage(pp);
        if(result != 0) {
          throw new D3D11Exception("Could not create class linkage", result);
        }       
       
        return pp.get().getNativeObject(ID3D11ClassLinkage.class);
      } finally {
        pp.release();
View Full Code Here

      try {
        int result = CreateVertexShader(compiledCode.GetBufferPointer(), (int) compiledCode.GetBufferSize(),
                        linkage != null ? pointerTo(linkage) : null,
                        pp);
        if(result != 0) {
          throw new D3D11Exception("Could not create vertex shader", result);
        }       
       
        return pp.get().getNativeObject(ID3D11VertexShader.class);
      } finally {
        pp.release();
View Full Code Here

      try {
        int result = CreatePixelShader(compiledCode.GetBufferPointer(), (int) compiledCode.GetBufferSize(),
                        linkage != null ? pointerTo(linkage) : null,
                        pp);
        if(result != 0) {
          throw new D3D11Exception("Could not create pixel shader", result);
        }       
       
        return pp.get().getNativeObject(ID3D11PixelShader.class);
      } finally {
        pp.release();
View Full Code Here

      try {
        int result = CreateGeometryShader(compiledCode.GetBufferPointer(), (int) compiledCode.GetBufferSize(),
                        linkage != null ? pointerTo(linkage) : null,
                        pp);
        if(result != 0) {
          throw new D3D11Exception("Could not create geometry shader", result);
        }       
       
        return pp.get().getNativeObject(ID3D11GeometryShader.class);
      } finally {
        pp.release();
View Full Code Here

      try {
        int result = CreateHullShader(compiledCode.GetBufferPointer(), (int) compiledCode.GetBufferSize(),
                        linkage != null ? pointerTo(linkage) : null,
                        pp);
        if(result != 0) {
          throw new D3D11Exception("Could not create hull shader", result);
        }       
       
        return pp.get().getNativeObject(ID3D11HullShader.class);
      } finally {
        pp.release();
View Full Code Here

TOP

Related Classes of d3d11.D3D11Exception

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.