com.jogamp.opencl.gl
Class CLGLTexture2d<B extends Buffer>

java.lang.Object
  extended by com.jogamp.opencl.CLMemory<B>
      extended by com.jogamp.opencl.CLImage<B>
          extended by com.jogamp.opencl.CLImage2d<B>
              extended by com.jogamp.opencl.gl.CLGLImage2d<B>
                  extended by com.jogamp.opencl.gl.CLGLTexture2d<B>
All Implemented Interfaces:
AutoCloseable, CLResource

public class CLGLTexture2d<B extends Buffer>
extends CLGLImage2d<B>

2D OpenCL image representing an 2D OpenGL texture.

Author:
Michael Bien

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jogamp.opencl.CLImage
CLImage.CLImageInfoAccessor
 
Nested classes/interfaces inherited from class com.jogamp.opencl.CLMemory
CLMemory.GLObjectType, CLMemory.Map, CLMemory.Mem
 
Field Summary
protected  CL cl
           
protected  CLContext context
           
 long ID
          The OpenCL object handle.
 int mipMapLevel
           
 int target
           
 
Fields inherited from class com.jogamp.opencl.gl.CLGLImage2d
GLID
 
Fields inherited from class com.jogamp.opencl.CLImage
format, height, width
 
Fields inherited from class com.jogamp.opencl.CLMemory
FLAGS, size
 
Constructor Summary
CLGLTexture2d(CLContext context, B directBuffer, CLImageFormat format, CLImage.CLImageInfoAccessor accessor, int target, int mipLevel, int width, int height, long id, int glid, int flags)
           
 
Method Summary
 void close()
          Deprecated. This method is not intended to be called from client code.
 CLGLContext getContext()
          Returns the OpenCL context 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.
 CLMemory.GLObjectType getGLObjectType()
          Returns the OpenGL buffer type of this shared object.
 long getID()
          Returns the OpenCL object handle
 int getMipMapLevel()
          Returns the OpenGL mipmap level of this texture.
 CLPlatform getPlatform()
          Returns the platform for this OpenCL object.
 int getTextureTarget()
          Returns the OpenGL texture target of this texture.
 
Methods inherited from class com.jogamp.opencl.gl.CLGLImage2d
getContext, getGLContext, getGLObjectID
 
Methods inherited from class com.jogamp.opencl.CLImage2d
cloneWith, toString
 
Methods inherited from class com.jogamp.opencl.CLImage
createUninitializedImageFormat, getElementSize, getFormat, getHeight, getRowPitch, getWidth
 
Methods inherited from class com.jogamp.opencl.CLMemory
equals, getBuffer, getCL, getCLCapacity, getCLSize, getConfig, getMapCount, getNIOCapacity, getNIOSize, getSizeImpl, hashCode, isHostPointerFlag, isReadOnly, isReadWrite, isWriteOnly, registerDestructorCallback, release, sizeOfBufferElem, use
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

target

public final int target

mipMapLevel

public final int mipMapLevel

ID

public final long ID
The OpenCL object handle.


context

protected CLContext context

cl

protected final CL cl
Constructor Detail

CLGLTexture2d

public CLGLTexture2d(CLContext context,
                     B directBuffer,
                     CLImageFormat format,
                     CLImage.CLImageInfoAccessor accessor,
                     int target,
                     int mipLevel,
                     int width,
                     int height,
                     long id,
                     int glid,
                     int flags)
Method Detail

getTextureTarget

public int getTextureTarget()
Returns the OpenGL texture target of this texture.


getMipMapLevel

public int getMipMapLevel()
Returns the OpenGL mipmap level of this texture.


getGLObjectType

public CLMemory.GLObjectType getGLObjectType()
Returns the OpenGL buffer type of this shared object.

Overrides:
getGLObjectType in class CLGLImage2d<B extends Buffer>

getGLObjectID

public int getGLObjectID()
Returns the OpenGL object id of this shared object.


getContext

public CLGLContext getContext()
Returns the OpenCL context of this shared object.


getGLContext

public GLContext getGLContext()
Returns the OpenGL context of this shared object.


close

@Deprecated
public final void close()
Deprecated. This method is not intended to be called from client code.

Implementation detail. TODO remove as soon we have extension methods.

Specified by:
close in interface AutoCloseable
See Also:
AutoCloseable

getPlatform

public CLPlatform getPlatform()
Returns the platform for this OpenCL object.


getID

public long getID()
Returns the OpenCL object handle