コード例 #1
0
ファイル: DeviceImage.cs プロジェクト: yeerkkiller1/Go-AI
        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;
        }
コード例 #2
0
ファイル: DeviceImage.cs プロジェクト: lu4/ManOCL
        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);
        }