GLCapabilitiesImmutable.cloneMutable
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.jogamp.opengl.GLCapabilitiesImmutable.cloneMutable(Showing top 15 results out of 315)

origin: org.jogamp.jogl/jogl-all

  public static GLCapabilitiesImmutable fixGLProfile(final GLCapabilitiesImmutable caps, final GLProfile glp)
  {
    if( caps.getGLProfile() != glp ) {
      final GLCapabilities caps2 = (GLCapabilities) caps.cloneMutable();
      caps2.setGLProfile(glp);
      return caps2;
    }
    return caps;
  }
}
origin: org.jogamp.jogl/jogl-all

/** Fix double buffered setting */
public static GLCapabilitiesImmutable fixDoubleBufferedGLCapabilities(final GLCapabilitiesImmutable capsRequested, final boolean doubleBuffered)
{
  if( capsRequested.getDoubleBuffered() != doubleBuffered) {
    final GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable();
    caps2.setDoubleBuffered(doubleBuffered);
    return caps2;
  }
  return capsRequested;
}
origin: org.jogamp.jogl/jogl-all

public static GLCapabilitiesImmutable fixOnscreenGLCapabilities(final GLCapabilitiesImmutable capsRequested)
{
  if( !capsRequested.isOnscreen() || capsRequested.isFBO() || capsRequested.isPBuffer() || capsRequested.isBitmap() ) {
    // fix caps ..
    final GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable();
    caps2.setBitmap  (false);
    caps2.setPBuffer (false);
    caps2.setFBO     (false);
    caps2.setOnscreen(true);
    return caps2;
  }
  return capsRequested;
}
origin: org.jogamp.jogl/jogl-all

@Override
protected final void setRealizedImpl() {
  final MutableGraphicsConfiguration msConfig = (MutableGraphicsConfiguration) surface.getGraphicsConfiguration();
  if(realized) {
    parent.setRealized(true);
    origParentChosenCaps = (GLCapabilitiesImmutable) msConfig.getChosenCapabilities();
    final GLCapabilities chosenFBOCaps = (GLCapabilities) origParentChosenCaps.cloneMutable(); // incl. <Type>GLCapabilities, e.g. X11GLCapabilities
    chosenFBOCaps.copyFrom(getRequestedGLCapabilities()); // copy user values
    msConfig.setChosenCapabilities(chosenFBOCaps);
  } else {
    msConfig.setChosenCapabilities(origParentChosenCaps);
    parent.setRealized(false);
  }
}
origin: org.jogamp.jogl/jogl-all

@Override
protected GLDrawableImpl createOffscreenDrawableImpl(final NativeSurface target) {
 final MutableGraphicsConfiguration config = (MutableGraphicsConfiguration) target.getGraphicsConfiguration();
 final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) config.getChosenCapabilities();
 if(!caps.isPBuffer()) {
   // Actual implementation is using PBuffer ...
   final GLCapabilities modCaps = (GLCapabilities) caps.cloneMutable();
   modCaps.setPBuffer(true);
   modCaps.setBitmap(false);
   config.setChosenCapabilities(modCaps);
   return new MacOSXOffscreenCGLDrawable(this, target);
 }
 return new MacOSXPbufferCGLDrawable(this, target);
}
origin: org.jogamp.jogl/jogl-all

public static GLCapabilitiesImmutable fixGLPBufferGLCapabilities(final GLCapabilitiesImmutable capsRequested)
{
  if( capsRequested.isOnscreen() ||
    !capsRequested.isPBuffer() ||
    capsRequested.isFBO() )
  {
    // fix caps ..
    final GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable();
    caps2.setOnscreen(false);
    caps2.setFBO(false);
    caps2.setPBuffer(true);
    caps2.setBitmap(false);
    return caps2;
  }
  return capsRequested;
}
origin: org.jogamp.jogl/jogl-all

public static GLCapabilitiesImmutable clipRGBAGLCapabilities(final GLCapabilitiesImmutable caps, final boolean allowRGB555, final boolean allowAlpha)
{
  final int iR = caps.getRedBits();
  final int iG = caps.getGreenBits();
  final int iB = caps.getBlueBits();
  final int iA = caps.getAlphaBits();
  final int oR = clipColor(iR, allowRGB555);
  final int oG = clipColor(iG, allowRGB555);
  final int oB = clipColor(iB, allowRGB555);
  final int oA = ( allowAlpha && 0 < iA ) ? oR : 0 ; // align alpha to red if requested and allowed
  if( iR != oR || iG != oG || iB != oB || iA != oA ) {
    final GLCapabilities caps2 = (GLCapabilities) caps.cloneMutable();
    caps2.setRedBits(oR);
    caps2.setGreenBits(oG);
    caps2.setBlueBits(oB);
    caps2.setAlphaBits(oA);
    return caps2;
  }
  return caps;
}
origin: org.jogamp.jogl/jogl-all

public static GLCapabilitiesImmutable fixOffscreenBitOnly(final GLCapabilitiesImmutable capsRequested)
{
  if( capsRequested.isOnscreen() ) {
    // fix caps ..
    final GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable();
    caps2.setOnscreen(false);
    return caps2;
  }
  return capsRequested;
}
origin: org.jogamp.jogl/jogl-all

  caps = (GLCapabilities) userCapsRequest.cloneMutable();
} else {
  caps = new GLCapabilities(GLProfile.getDefault(GLProfile.getDefaultDevice()));
origin: brandonborkholder/glg2d

/**
 * Creates a {@code Component} that is also a {@code GLAutoDrawable}. This is
 * where all the drawing takes place. The advantage of a {@code GLCanvas} is
 * that it is faster, but a {@code GLJPanel} is more portable. The component
 * should also be disabled so that it does not receive events that should be
 * sent to the {@code drawableComponent}. A {@code GLCanvas} is a heavyweight
 * component and on some platforms will not pass through mouse events even
 * though it is disabled. A {@code GLJPanel} supports this better.
 */
protected GLAutoDrawable createGLComponent(GLCapabilitiesImmutable capabilities, GLContext shareWith) {
 GLCanvas canvas = new GLCanvas(capabilities);
 if (shareWith != null) {
   canvas.setSharedContext(shareWith);
 }
 canvas.setEnabled(false);
 chosenCapabilities = (GLCapabilitiesImmutable) capabilities.cloneMutable();
 return canvas;
}
origin: org.jogamp.jogl/jogl-all

final boolean reqNewGLADOnscrn = gladCaps.isOnscreen();
final GLCapabilities newGLADCaps = (GLCapabilities)gladCaps.cloneMutable();
newGLADCaps.setDoubleBuffered(false);
newGLADCaps.setOnscreen(false);
origin: org.jogamp.jogl/jogl-all

final GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable();
caps2.setOnscreen(false);
caps2.setFBO( useFBO );
origin: org.jogamp.jogl/jogl-all

  this.capsRequested = new GLCapabilities(GLProfile.getDefault(screen.getDevice()));
} else {
  this.capsRequested = (GLCapabilitiesImmutable) capsReqUser.cloneMutable();
origin: org.jogamp.jogl/jogl-all

final boolean reqNewGLADOnscrn = gladCaps.isOnscreen();
final GLCapabilities newGLADCaps = (GLCapabilities)gladCaps.cloneMutable();
newGLADCaps.setDoubleBuffered(false);
newGLADCaps.setOnscreen(false);
origin: org.jogamp.jogl/jogl-all

                printAWTTiles.customTileHeight != -1 && printAWTTiles.customTileHeight != printDrawable.getSurfaceHeight();
final GLCapabilities newGLADCaps = (GLCapabilities)gladCaps.cloneMutable();
newGLADCaps.setDoubleBuffered(false);
newGLADCaps.setOnscreen(false);
com.jogamp.openglGLCapabilitiesImmutablecloneMutable

Popular methods of GLCapabilitiesImmutable

  • getDepthBits
    Returns the number of depth buffer bits.
  • getDoubleBuffered
    Returns whether double-buffering is requested, available or chosen. Default is true.
  • getGLProfile
    Returns the GL profile you desire or used by the drawable.
  • getNumSamples
    Returns the number of sample buffers to be allocated if sample buffers are enabled, otherwise return
  • getStencilBits
    Returns the number of stencil buffer bits. Default is 0.
  • isFBO
    Returns whether FBO offscreen mode is requested, available or chosen. Default is false. For chosen
  • isOnscreen
  • toString
  • getAccumAlphaBits
    Returns the number of bits for the accumulation buffer's alpha component. On some systems only the a
  • getAccumBlueBits
    Returns the number of bits for the accumulation buffer's blue component. On some systems only the ac
  • getAccumGreenBits
    Returns the number of bits for the accumulation buffer's green component. On some systems only the a
  • getAccumRedBits
    Returns the number of bits for the accumulation buffer's red component. On some systems only the acc
  • getAccumGreenBits,
  • getAccumRedBits,
  • getAlphaBits,
  • getBlueBits,
  • getGreenBits,
  • getHardwareAccelerated,
  • getRedBits,
  • getSampleBuffers,
  • getSampleExtension

Popular classes and methods

  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • putExtra (Intent)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • File (java.io)
    LocalStorage based File implementation for GWT. Should probably have used Harmony as a starting poin
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • BoxLayout (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)