Search in sources :

Example 1 with MutableGraphicsConfiguration

use of com.jogamp.nativewindow.MutableGraphicsConfiguration in project processing by processing.

the class PSurfaceJOGL method setSmooth.

public void setSmooth(int level) {
    pgl.reqNumSamples = level;
    GLCapabilities caps = new GLCapabilities(profile);
    caps.setAlphaBits(PGL.REQUESTED_ALPHA_BITS);
    caps.setDepthBits(PGL.REQUESTED_DEPTH_BITS);
    caps.setStencilBits(PGL.REQUESTED_STENCIL_BITS);
    caps.setSampleBuffers(true);
    caps.setNumSamples(pgl.reqNumSamples);
    caps.setBackgroundOpaque(true);
    caps.setOnscreen(true);
    NativeSurface target = window.getNativeSurface();
    MutableGraphicsConfiguration config = (MutableGraphicsConfiguration) target.getGraphicsConfiguration();
    config.setChosenCapabilities(caps);
}
Also used : GLCapabilities(com.jogamp.opengl.GLCapabilities) NativeSurface(com.jogamp.nativewindow.NativeSurface) MutableGraphicsConfiguration(com.jogamp.nativewindow.MutableGraphicsConfiguration)

Aggregations

MutableGraphicsConfiguration (com.jogamp.nativewindow.MutableGraphicsConfiguration)1 NativeSurface (com.jogamp.nativewindow.NativeSurface)1 GLCapabilities (com.jogamp.opengl.GLCapabilities)1