29package com.jogamp.opencl.gl;
31import com.jogamp.opencl.llb.CL;
32import com.jogamp.opencl.CLContext;
33import com.jogamp.opencl.CLException;
34import com.jogamp.opencl.CLImage2d;
35import com.jogamp.opencl.CLImageFormat;
36import com.jogamp.opencl.llb.impl.CLImageFormatImpl;
38import java.nio.Buffer;
40import com.jogamp.opengl.GLContext;
58 static <B extends Buffer>
CLGLImage2d<B> createFromGLRenderbuffer(
final CLContext context,
final B directBuffer,
final int flags,
final int renderbuffer) {
62 final CL cl = getCL(context);
63 final int[] result =
new int[1];
68 return createImage(context,
id, directBuffer, renderbuffer, flags);
71 static <B extends Buffer> CLGLImage2d<B> createImage(
final CLContext context,
final long id,
final B directBuffer,
final int glObject,
final int flags) {
72 final CLImageInfoAccessor accessor =
new CLImageInfoAccessor(getCL(context),
id);
80 return new CLGLImage2d<B>(context, directBuffer,
format, accessor,
width,
height,
id, glObject, flags);
CLContext is responsible for managing objects such as command-queues, memory, program and kernel obje...
Main Exception type for runtime OpenCL errors and failed function calls (e.g.
static void checkForError(final int status, final String message)
Throws a CLException when status != CL_SUCCESS.
static CLImageFormat createUninitializedImageFormat()
final long ID
The OpenCL object handle.
Shared buffer between OpenGL and OpenCL contexts.
OpenCL Context supporting JOGL-JOCL interoperablity.
GLContext getGLContext()
Returns the OpenGL context this context was shared with.
CLGLContext getContext()
Returns the context for this OpenCL object.
2D OpenCL image representing an OpenGL renderbuffer.
GLObjectType getGLObjectType()
Returns the OpenGL buffer type of this shared object.
GLContext getGLContext()
Returns the OpenGL context of this shared object.
int getGLObjectID()
Returns the OpenGL object id of this shared object.
final int GLID
The OpenGL object handle.
CLGLImage2d(final CLContext context, final B directBuffer, final CLImageFormat format, final CLImageInfoAccessor accessor, final int width, final int height, final long id, final int glid, final int flags)
CLGLContext getContext()
Returns the OpenCL context of this shared object.
Java bindings to OpenCL, the Open Computing Language.
static final int CL_IMAGE_FORMAT
Define "CL_IMAGE_FORMAT" with expression '0x1110', CType: int.
static final int CL_IMAGE_HEIGHT
Define "CL_IMAGE_HEIGHT" with expression '0x1115', CType: int.
static final int CL_IMAGE_WIDTH
Define "CL_IMAGE_WIDTH" with expression '0x1114', CType: int.
long clCreateFromGLRenderbuffer(long context, long flags, int renderbuffer, IntBuffer errcode_ret)
Interface to C language function: cl_mem {@native clCreateFromGLRenderbuffer}(cl_context context,...