com.jogamp.opengl.impl.egl
Class EGLDrawable

java.lang.Object
  extended by com.jogamp.opengl.impl.GLDrawableImpl
      extended by com.jogamp.opengl.impl.egl.EGLDrawable
All Implemented Interfaces:
GLDrawable
Direct Known Subclasses:
EGLOnscreenDrawable, EGLPbufferDrawable

public abstract class EGLDrawable
extends GLDrawableImpl


Field Summary
protected  long eglDisplay
           
protected  long eglSurface
           
protected  boolean ownEGLDisplay
           
protected  boolean ownEGLSurface
           
 
Fields inherited from class com.jogamp.opengl.impl.GLDrawableImpl
DEBUG, factory, realized, requestedCapabilities, surface
 
Constructor Summary
protected EGLDrawable(EGLDrawableFactory factory, NativeSurface component)
           
 
Method Summary
abstract  GLContext createContext(GLContext shareWith)
          Creates a new context for drawing to this drawable that will optionally share display lists and other server-side OpenGL objects with the specified GLContext.
protected abstract  long createSurface(long eglDpy, long eglNativeCfg, long surfaceHandle)
           
 GLCapabilitiesImmutable getChosenGLCapabilities()
          Fetches the GLCapabilitiesImmutable corresponding to the chosen OpenGL capabilities (pixel format / visual / GLProfile) for this drawable.
On some platforms, the pixel format is not directly associated with the drawable; a best attempt is made to return a reasonable value in this case.
 long getDisplay()
           
 GLDynamicLookupHelper getGLDynamicLookupHelper()
          Returns the DynamicLookupHelper
 EGLGraphicsConfiguration getGraphicsConfiguration()
           
 long getHandle()
          This is the GL/Windowing drawable handle.
It is usually the NativeSurface.getSurfaceHandle(), ie the native surface handle of the underlying windowing toolkit.
However, on X11/GLX this reflects a GLXDrawable, which represents a GLXWindow, GLXPixmap, or GLXPbuffer.
On EGL, this represents the EGLSurface.
 int getHeight()
          Returns the current height of this GLDrawable.
 int getWidth()
          Returns the current width of this GLDrawable.
protected  void setRealizedImpl()
           
 String toString()
           
 
Methods inherited from class com.jogamp.opengl.impl.GLDrawableImpl
destroy, destroyHandle, destroyImpl, getFactory, getFactoryImpl, getGLProfile, getNativeSurface, getRequestedGLCapabilities, isRealized, isSurfaceLocked, lockSurface, setRealized, swapBuffers, swapBuffersImpl, toHexString, unlockSurface, updateHandle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ownEGLDisplay

protected boolean ownEGLDisplay

ownEGLSurface

protected boolean ownEGLSurface

eglDisplay

protected long eglDisplay

eglSurface

protected long eglSurface
Constructor Detail

EGLDrawable

protected EGLDrawable(EGLDrawableFactory factory,
                      NativeSurface component)
               throws GLException
Throws:
GLException
Method Detail

getDisplay

public long getDisplay()

getHandle

public long getHandle()
Description copied from interface: GLDrawable
This is the GL/Windowing drawable handle.
It is usually the NativeSurface.getSurfaceHandle(), ie the native surface handle of the underlying windowing toolkit.
However, on X11/GLX this reflects a GLXDrawable, which represents a GLXWindow, GLXPixmap, or GLXPbuffer.
On EGL, this represents the EGLSurface.

Specified by:
getHandle in interface GLDrawable
Overrides:
getHandle in class GLDrawableImpl

getGraphicsConfiguration

public EGLGraphicsConfiguration getGraphicsConfiguration()

getChosenGLCapabilities

public GLCapabilitiesImmutable getChosenGLCapabilities()
Description copied from interface: GLDrawable
Fetches the GLCapabilitiesImmutable corresponding to the chosen OpenGL capabilities (pixel format / visual / GLProfile) for this drawable.
On some platforms, the pixel format is not directly associated with the drawable; a best attempt is made to return a reasonable value in this case.
This object shall be directly associated to the attached NativeSurface's AbstractGraphicsConfiguration, and if changes are necessary, they should reflect those as well.

Specified by:
getChosenGLCapabilities in interface GLDrawable
Overrides:
getChosenGLCapabilities in class GLDrawableImpl
Returns:
A copy of the queried object.

createContext

public abstract GLContext createContext(GLContext shareWith)
Description copied from interface: GLDrawable
Creates a new context for drawing to this drawable that will optionally share display lists and other server-side OpenGL objects with the specified GLContext.

The GLContext share need not be associated with this GLDrawable and may be null if sharing of display lists and other objects is not desired. See the note in the overview documentation on context sharing.


createSurface

protected abstract long createSurface(long eglDpy,
                                      long eglNativeCfg,
                                      long surfaceHandle)

setRealizedImpl

protected void setRealizedImpl()
Specified by:
setRealizedImpl in class GLDrawableImpl

getWidth

public int getWidth()
Description copied from interface: GLDrawable
Returns the current width of this GLDrawable.

Specified by:
getWidth in interface GLDrawable
Overrides:
getWidth in class GLDrawableImpl

getHeight

public int getHeight()
Description copied from interface: GLDrawable
Returns the current height of this GLDrawable.

Specified by:
getHeight in interface GLDrawable
Overrides:
getHeight in class GLDrawableImpl

getGLDynamicLookupHelper

public GLDynamicLookupHelper getGLDynamicLookupHelper()
Description copied from class: GLDrawableImpl
Returns the DynamicLookupHelper

Specified by:
getGLDynamicLookupHelper in class GLDrawableImpl

toString

public String toString()
Specified by:
toString in interface GLDrawable
Overrides:
toString in class GLDrawableImpl


Copyright 2010 JogAmp Community.