Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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);
        }