Package com.jogamp.opencl.llb

Examples of com.jogamp.opencl.llb.CLImageBinding


    }

    static <B extends Buffer> CLImage2d<B> createImage(CLContext context, B directBuffer,
            int width, int height, int rowPitch, CLImageFormat format, int flags) {

        CLImageBinding cl = context.getPlatform().getImageBinding();
        IntBuffer err = Buffers.newDirectIntBuffer(1);
        B host_ptr = null;
        if(isHostPointerFlag(flags)) {
            host_ptr = directBuffer;
        }
        long id = cl.clCreateImage2D(context.ID, flags, format.getFormatImpl(), width, height, rowPitch, host_ptr, err);
        checkForError(err.get(), "can not create 2d image");

        return new CLImage2d<B>(context, directBuffer, format, width, height, id, flags);
    }
View Full Code Here


   

    static <B extends Buffer> CLImage3d<B> createImage(CLContext context, B directBuffer,
            int width, int height, int depth, int rowPitch, int slicePitch, CLImageFormat format, int flags) {

        CLImageBinding cl = context.getPlatform().getImageBinding();
        IntBuffer err = Buffers.newDirectIntBuffer(1);
        B host_ptr = null;
        if(isHostPointerFlag(flags)) {
            host_ptr = directBuffer;
        }
        long id = cl.clCreateImage3D(context.ID, flags, format.getFormatImpl(), width, height, depth, rowPitch, slicePitch, host_ptr, err);
        checkForError(err.get(), "can not create 2d image");

        return new CLImage3d<B>(context, directBuffer, format, width, height, depth, id, flags);
    }
View Full Code Here

TOP

Related Classes of com.jogamp.opencl.llb.CLImageBinding

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.