public final class PixelFormat extends java.lang.Object implements PixelFormatLWJGL
PixelFormat pf = new PixelFormat().withDepthBits(24).withSamples(4).withSRGB(true);
WARNING: Some pixel formats are known to cause troubles on certain buggy drivers.
Example: Under Windows, specifying samples != 0 will enable the ARB
pixel format selection path, which could trigger a crash.Constructor and Description |
---|
PixelFormat()
Default pixel format is minimum 8 bits depth, and no alpha
nor stencil requirements.
|
PixelFormat(int alpha,
int depth,
int stencil) |
PixelFormat(int alpha,
int depth,
int stencil,
int samples) |
PixelFormat(int bpp,
int alpha,
int depth,
int stencil,
int samples) |
PixelFormat(int bpp,
int alpha,
int depth,
int stencil,
int samples,
int num_aux_buffers,
int accum_bpp,
int accum_alpha,
boolean stereo) |
PixelFormat(int bpp,
int alpha,
int depth,
int stencil,
int samples,
int num_aux_buffers,
int accum_bpp,
int accum_alpha,
boolean stereo,
boolean floating_point) |
Modifier and Type | Method and Description |
---|---|
int |
getAccumulationAlpha() |
int |
getAccumulationBitsPerPixel() |
int |
getAlphaBits() |
int |
getAuxBuffers() |
int |
getBitsPerPixel() |
int |
getDepthBits() |
int |
getSamples() |
int |
getStencilBits() |
boolean |
isFloatingPoint() |
boolean |
isSRGB() |
boolean |
isStereo() |
PixelFormat |
withAccumulationAlpha(int accum_alpha)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new alpha bits in the accumulation buffer value.
|
PixelFormat |
withAccumulationBitsPerPixel(int accum_bpp)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new bits per pixel in the accumulation buffer value.
|
PixelFormat |
withAlphaBits(int alpha)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new alpha bits value.
|
PixelFormat |
withAuxBuffers(int num_aux_buffers)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new auxiliary buffers value.
|
PixelFormat |
withBitsPerPixel(int bpp)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new bits per pixel value.
|
PixelFormat |
withCoverageSamples(int colorSamples)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples values.
|
PixelFormat |
withCoverageSamples(int colorSamples,
int coverageSamples)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples
and coverage samples values.
|
PixelFormat |
withDepthBits(int depth)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new depth bits value.
|
PixelFormat |
withFloatingPoint(boolean floating_point)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new floating point value.
|
PixelFormat |
withFloatingPointPacked(boolean floating_point_packed)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new packed floating point value.
|
PixelFormat |
withSamples(int samples)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new samples value.
|
PixelFormat |
withSRGB(boolean sRGB)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new sRGB value.
|
PixelFormat |
withStencilBits(int stencil)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new stencil bits value.
|
PixelFormat |
withStereo(boolean stereo)
Returns a new PixelFormat object with the same properties as this PixelFormat and the new stereo value.
|
public PixelFormat()
public PixelFormat(int alpha, int depth, int stencil)
public PixelFormat(int alpha, int depth, int stencil, int samples)
public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples)
public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp, int accum_alpha, boolean stereo)
public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp, int accum_alpha, boolean stereo, boolean floating_point)
public int getBitsPerPixel()
public PixelFormat withBitsPerPixel(int bpp)
bpp
- the new bits per pixel value.public int getAlphaBits()
public PixelFormat withAlphaBits(int alpha)
alpha
- the new alpha bits value.public int getDepthBits()
public PixelFormat withDepthBits(int depth)
depth
- the new depth bits value.public int getStencilBits()
public PixelFormat withStencilBits(int stencil)
stencil
- the new stencil bits value.public int getSamples()
public PixelFormat withSamples(int samples)
samples
- the new samples value.public PixelFormat withCoverageSamples(int colorSamples)
samples
property is also greater than 0. Additionally, the
color samples value needs to be lower than or equal to the samples
property.colorSamples
- the new color samples value.public PixelFormat withCoverageSamples(int colorSamples, int coverageSamples)
colorSamples
- the new color samples value. This value must be lower than or equal to the coverage samples value.coverageSamples
- the new coverage samples value.public int getAuxBuffers()
public PixelFormat withAuxBuffers(int num_aux_buffers)
num_aux_buffers
- the new auxiliary buffers value.public int getAccumulationBitsPerPixel()
public PixelFormat withAccumulationBitsPerPixel(int accum_bpp)
accum_bpp
- the new bits per pixel in the accumulation buffer value.public int getAccumulationAlpha()
public PixelFormat withAccumulationAlpha(int accum_alpha)
accum_alpha
- the new alpha bits in the accumulation buffer value.public boolean isStereo()
public PixelFormat withStereo(boolean stereo)
stereo
- the new stereo value.public boolean isFloatingPoint()
public PixelFormat withFloatingPoint(boolean floating_point)
floating_point
- the new floating point value.public PixelFormat withFloatingPointPacked(boolean floating_point_packed)
floating_point_packed
- the new packed floating point value.public boolean isSRGB()
public PixelFormat withSRGB(boolean sRGB)
sRGB
- the new floating point value.Copyright © 2002-2009 lwjgl.org. All Rights Reserved.