public static DeviceImage CreateFromTexture2D(UInt32 texture, Int32 mipLevel, DeviceBufferAccess access, Context context) { CLError error = CLError.None; CLMem mem = ManOCL.Internal.OpenCL.OpenGL.OpenCLGLDriver.clCreateFromGLTexture2D(context.CLContext, GetMemFlags(access), 3553 /* GL_TEXTURE_2D */, mipLevel, texture, ref error); OpenCLError.Validate(error); DeviceImage result = new DeviceImage(new Mem { Value = mem.Value }); return result; }
public static DeviceImage CreateFromTexture2D(UInt32 texture, Int32 mipLevel, DeviceBufferAccess access, Context context) { CLError error = CLError.None; CLMem mem = ManOCL.Internal.OpenCL.OpenGL.OpenCLGLDriver.clCreateFromGLTexture2D(context.CLContext, GetMemFlags(access), 3553 /* GL_TEXTURE_2D */, mipLevel, texture, ref error); OpenCLError.Validate(error); DeviceImage result = new DeviceImage(new Mem { Value = mem.Value }); return(result); }