Examples of CLImageFormat


Examples of com.jogamp.opencl.CLImageFormat

        long id = clgli.clCreateFromGLTexture2D(context.ID, flags, target, mipLevel, texture, result, 0);
        checkForError((int)id, "can not share memory with texture #"+texture+".");

        CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id);

        CLImageFormat format = createUninitializedImageFormat();
        accessor.getInfo(CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null);

        int width = (int)accessor.getLong(CL_IMAGE_WIDTH);
        int height = (int)accessor.getLong(CL_IMAGE_HEIGHT);

        return new CLGLTexture2d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, id, texture, flags);
View Full Code Here

Examples of com.jogamp.opencl.CLImageFormat

        long id = clgli.clCreateFromGLTexture3D(context.ID, flags, target, mipLevel, texture, result, 0);

        CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id);

        CLImageFormat format = createUninitializedImageFormat();
        accessor.getInfo(CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null);

        int width = (int)accessor.getLong(CL_IMAGE_WIDTH);
        int height = (int)accessor.getLong(CL_IMAGE_HEIGHT);
        int depth = (int)accessor.getLong(CL_IMAGE_DEPTH);
View Full Code Here

Examples of com.jogamp.opencl.CLImageFormat

    }

    static <B extends Buffer> CLGLImage2d<B> createImage(CLContext context, long id, B directBuffer, int glObject, int flags) {
        CLImageInfoAccessor accessor = new CLImageInfoAccessor(getCL(context), id);

        CLImageFormat format = createUninitializedImageFormat();
        accessor.getInfo(CL_IMAGE_FORMAT, CLImageFormatImpl.size(), format.getFormatImpl().getBuffer(), null);

        int width = (int)accessor.getLong(CL_IMAGE_WIDTH);
        int height = (int)accessor.getLong(CL_IMAGE_HEIGHT);

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

Examples of org.lwjgl.opencl.api.CLImageFormat

      clGetSupportedImageFormats(context, flags, image_type, formatBuffer, null);

      final List<CLImageFormat> formats = new ArrayList<CLImageFormat>(num_image_formats);
      for ( int i = 0; i < num_image_formats; i++ ) {
        final int offset = num_image_formats * CLImageFormat.STRUCT_SIZE;
        final CLImageFormat format = new CLImageFormat(
          formatBuffer.getInt(offset),
          formatBuffer.getInt(offset + 4)
        );
        if ( filter == null || filter.accept(format) )
          formats.add(format);
View Full Code Here

Examples of org.lwjgl.opencl.api.CLImageFormat

      final ByteBuffer format = APIUtil.getBufferByte(2 * 4);

      clGetImageInfo(mem, CL_IMAGE_FORMAT, format, null);

      return new CLImageFormat(format.getInt(0), format.getInt(4));
    }
View Full Code Here

Examples of org.lwjgl.opencl.api.CLImageFormat

      clGetSupportedImageFormats(context, flags, image_type, formatBuffer, null);

      final List<CLImageFormat> formats = new ArrayList<CLImageFormat>(num_image_formats);
      for ( int i = 0; i < num_image_formats; i++ ) {
        final int offset = num_image_formats * CLImageFormat.STRUCT_SIZE;
        final CLImageFormat format = new CLImageFormat(
          formatBuffer.getInt(offset),
          formatBuffer.getInt(offset + 4)
        );
        if ( filter == null || filter.accept(format) )
          formats.add(format);
View Full Code Here

Examples of org.lwjgl.opencl.api.CLImageFormat

      final ByteBuffer format = APIUtil.getBufferByte(2 * 4);

      clGetImageInfo(mem, CL_IMAGE_FORMAT, format, null);

      return new CLImageFormat(format.getInt(0), format.getInt(4));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.