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.CLImageFormat;
35import com.jogamp.opencl.llb.impl.CLImageFormatImpl;
37import java.nio.Buffer;
49 public CLGLTexture2d(
final CLContext context,
final B directBuffer,
final CLImageFormat format,
final CLImageInfoAccessor accessor,
final int target,
final int mipLevel,
final int width,
final int height,
final long id,
final int glid,
final int flags) {
50 super(context, directBuffer, format, accessor, width, height,
id, glid, flags);
52 this.mipMapLevel = mipLevel;
55 static <B extends Buffer>
CLGLTexture2d<B> createFromGLTexture2d(
final CLContext context,
final B directBuffer,
final int target,
final int texture,
final int mipLevel,
final int flags) {
59 final CL cl = getCL(context);
60 final int[] result =
new int[1];
65 final CLImageInfoAccessor accessor =
new CLImageInfoAccessor(cl,
id);
67 final CLImageFormat format = createUninitializedImageFormat();
73 return new CLGLTexture2d<B>(context, directBuffer, format, accessor,
target, mipLevel, width, height,
id, texture, 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.
final long ID
The OpenCL object handle.
Shared buffer between OpenGL and OpenCL contexts.
2D OpenCL image representing an OpenGL renderbuffer.
2D OpenCL image representing an 2D OpenGL texture.
GLObjectType getGLObjectType()
Returns the OpenGL buffer type of this shared object.
CLGLTexture2d(final CLContext context, final B directBuffer, final CLImageFormat format, final CLImageInfoAccessor accessor, final int target, final int mipLevel, final int width, final int height, final long id, final int glid, final int flags)
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 clCreateFromGLTexture2D(long context, long flags, int target, int miplevel, int texture, IntBuffer errcode_ret)
Interface to C language function: cl_mem {@native clCreateFromGLTexture2D}(cl_context context,...