/// <summary> /// Creates a texture object and returns it in pTexObject. pResDesc describes the data to texture from. pTexDesc /// describes how the data should be sampled. /// </summary> /// <param name="resDesc">CudaResourceDesc</param> /// <param name="texDesc">CudaTextureDescriptor</param> public CudaTexObject(CudaResourceDesc resDesc, CudaTextureDescriptor texDesc) { _resDesc = resDesc; _texDesc = texDesc; _texObject = new CUtexObject(); res = DriverAPINativeMethods.TextureObjects.cuTexObjectCreate(ref _texObject, ref _resDesc, ref _texDesc, IntPtr.Zero); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuTexObjectCreate", res)); if (res != CUResult.Success) throw new CudaException(res); }
public static extern CUResult cuTexObjectGetTextureDesc(ref CudaTextureDescriptor pTexDesc, CUtexObject texObject);
public static extern CUResult cuTexObjectCreate(ref CUtexObject pTexObject, ref CudaResourceDesc pResDesc, ref CudaTextureDescriptor pTexDesc, IntPtr pResViewDesc);