public final class PixelFormat extends java.lang.Object implements PixelFormatLWJGL
PixelFormat pf = new PixelFormat().withDepth(24).withSamples(4);
Attributes that correspond to EGL extensions will be silently ignored if those
extensions are not supported by the EGLDisplay.| Modifier and Type | Class and Description |
|---|---|
static class |
PixelFormat.Attrib |
| Constructor and Description |
|---|
PixelFormat()
Creates a new PixelFormat with rgbSize = 8, alphaSize = 8 and depthSize = 16.
|
PixelFormat(int alphaSize,
int depthSize,
int stencilSize)
Creates a new PixelFormat with rgbSize = 8 and the specified
alphaSize, depthSize and stencilSize.
|
PixelFormat(int alphaSize,
int depthSize,
int stencilSize,
int samples)
Creates a new PixelFormat with rgbSize = 8 and the specified
alphaSize, depthSize, stencilSize and samples.
|
PixelFormat(int rgbSize,
int alphaSize,
int luminanceSize,
int depthSize,
int stencilSize,
int samples)
Creates a new PixelFormat with the specified RGB sizes, EGL_ALPHA_SIZE,
EGL_LUMINANCE_SIZE, EGL_DEPTH_SIZE, EGL_STENCIL_SIZE, EGL_SAMPLES.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAttrib(PixelFormat.Attrib attrib)
Returns the value of the specified attribute.
|
java.nio.IntBuffer |
getAttribBuffer(EGLDisplay display,
int surfaceType,
int[] lwjglAttribs)
Returns an IntBuffer that can be used to get/choose EGLConfigs.
|
EGLConfig |
getBestMatch(EGLConfig[] configs)
Returns the EGL config from the specified array that best matches this PixelFormat.
|
void |
setSurfaceAttribs(EGLSurface surface)
Applies this PixelFormat's surface attributes to the specified EGL surface.
|
PixelFormat |
withAlphaSize(int alphaSize)
Returns a new PixelFormat with the specified EGL_ALPHA_SIZE.
|
PixelFormat |
withCoverageSamplesNV(int samples)
Returns a new PixelFormat with the specified number of EGL_COVERAGE_SAMPLES_NV.
|
PixelFormat |
withDepthEncodingNonlinearNV(int depthEncoding)
Returns a new PixelFormat with the specified EGL_DEPTH_ENCODING_NONLINEAR_NV.
|
PixelFormat |
withDepthSize(int depthSize)
Returns a new PixelFormat with the specified EGL_DEPTH_SIZE.
|
PixelFormat |
withLuminanceSize(int luminanceSize)
Returns a new PixelFormat with the specified EGL_LUMINANCE_SIZE.
|
PixelFormat |
withMaxSwapInterval(int maxSwapInterval)
Returns a new PixelFormat with the specified EGL_MAX_SWAP_INTERVAL.
|
PixelFormat |
withMinSwapInterval(int minSwapInterval)
Returns a new PixelFormat with the specified EGL_MIN_SWAP_INTERVAL.
|
PixelFormat |
withMultisampleResolve(int multisampleResolve)
Returns a new PixelFormat with the specified EGL_MULTISAMPLE_RESOLVE value.
|
PixelFormat |
withRGBSize(int rgb)
Returns a new PixelFormat with the specified RGB sizes.
|
PixelFormat |
withRGBSize(int r,
int g,
int b)
Returns a new PixelFormat with the specified EGL_RED_SIZE, EGL_GREEN_SIZE and EGL_BLUE_SIZE.
|
PixelFormat |
withSamples(int samples)
Returns a new PixelFormat with the specified number of EGL_SAMPLES.
|
PixelFormat |
withStencilSize(int stencilSize)
Returns a new PixelFormat with the specified EGL_STENCIL_SIZE.
|
PixelFormat |
withSwapBehavior(int swapBehavior)
Returns a new PixelFormat with the specified EGL_SWAP_BEHAVIOR value.
|
PixelFormat |
withTransparentType(int transparentType,
int r,
int g,
int b)
Returns a new PixelFormat with the specified EGL_TRANSPARENT_TYPE and
the specified transparent RGB values.
|
public PixelFormat()
public PixelFormat(int alphaSize,
int depthSize,
int stencilSize)
alphaSize - the EGL_ALPHA_SIZE valuedepthSize - the EGL_DEPTH_SIZE valuestencilSize - the EGL_STENCIL_SIZE valuePixelFormat(int, int, int, int, int, int)public PixelFormat(int alphaSize,
int depthSize,
int stencilSize,
int samples)
alphaSize - the EGL_ALPHA_SIZE valuedepthSize - the EGL_DEPTH_SIZE valuestencilSize - the EGL_STENCIL_SIZE valuesamples - the EGL_SAMPLE_SIZE valuePixelFormat(int, int, int, int, int, int)public PixelFormat(int rgbSize,
int alphaSize,
int luminanceSize,
int depthSize,
int stencilSize,
int samples)
rgbSize - the RGB sizesalphaSize - the EGL_ALPHA_SIZE valueluminanceSize - the EGL_LUMINANCE_SIZE valuedepthSize - the EGL_DEPTH_SIZE valuestencilSize - the EGL_STENCIL_SIZE valuesamples - the EGL_SAMPLE_SIZE valuepublic java.nio.IntBuffer getAttribBuffer(EGLDisplay display, int surfaceType, int[] lwjglAttribs)
display - the EGL display from which the EGLConfig is going to be retrievedlwjglAttribs - the LWJGL attributespublic EGLConfig getBestMatch(EGLConfig[] configs) throws LWJGLException
configs - the EGL configsLWJGLExceptionpublic void setSurfaceAttribs(EGLSurface surface) throws LWJGLException
surface - the EGL surfaceLWJGLExceptionpublic int getAttrib(PixelFormat.Attrib attrib)
attrib - the attribute to retrievepublic PixelFormat withRGBSize(int rgb)
rgb - the new EGL_RED_SIZE, EGL_GREEN_SIZE and EGL_BLUE_SIZEwithRGBSize(int, int, int)public PixelFormat withRGBSize(int r, int g, int b)
r - the new EGL_RED_SIZEg - the new EGL_GREEN_SIZEb - the new EGL_BLUE_SIZEpublic PixelFormat withAlphaSize(int alphaSize)
alphaSize - the new EGL_ALPHA_SIZEpublic PixelFormat withLuminanceSize(int luminanceSize)
luminanceSize - the new EGL_LUMINANCE_SIZEpublic PixelFormat withDepthSize(int depthSize)
depthSize - the new EGL_DEPTH_SIZEpublic PixelFormat withStencilSize(int stencilSize)
stencilSize - the new EGL_STENCIL_SIZEpublic PixelFormat withMinSwapInterval(int minSwapInterval)
minSwapInterval - the new EGL_MIN_SWAP_INTERVAL valuepublic PixelFormat withMaxSwapInterval(int maxSwapInterval)
maxSwapInterval - the new EGL_MAX_SWAP_INTERVAL valuepublic PixelFormat withSamples(int samples)
samples - the new EGL_SAMPLES valuepublic PixelFormat withTransparentType(int transparentType, int r, int g, int b)
transparentType - the new EGL_TRANSPARENT_TYPE valuer - the new EGL_TRANSPARENT_RED_VALUEg - the new EGL_TRANSPARENT_GREEN_VALUEb - the new EGL_TRANSPARENT_BLUE_VALUEpublic PixelFormat withMultisampleResolve(int multisampleResolve)
multisampleResolve - the new EGL_MULTISAMPLE_RESOLVE valuepublic PixelFormat withSwapBehavior(int swapBehavior)
swapBehavior - the new EGL_SWAP_BEHAVIOR valuepublic PixelFormat withCoverageSamplesNV(int samples)
samples - the new EGL_SAMPLES valuepublic PixelFormat withDepthEncodingNonlinearNV(int depthEncoding)
depthEncoding - the new EGL_DEPTH_ENCODING_NONLINEAR_NV valueCopyright © 2002-2009 lwjgl.org. All Rights Reserved.