Merge pull request #462 from Georgeto/fix_lwjgl_alphabits

Let lwjgl respect the AlphaBits setting
cleanup_build_scripts
Kirill Vainer 9 years ago
commit ed90d3ef42
  1. 4
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglCanvas.java
  2. 3
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglDisplay.java
  3. 2
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java

@ -301,7 +301,7 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex
// crashes on bad drivers // crashes on bad drivers
if (pbufferFormat == null){ if (pbufferFormat == null){
pbufferFormat = new PixelFormat(settings.getBitsPerPixel(), pbufferFormat = new PixelFormat(settings.getBitsPerPixel(),
0, settings.getAlphaBits(),
settings.getDepthBits(), settings.getDepthBits(),
settings.getStencilBits(), settings.getStencilBits(),
0, // samples 0, // samples
@ -315,7 +315,7 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex
if (canvasFormat == null){ if (canvasFormat == null){
int samples = getNumSamplesToUse(); int samples = getNumSamplesToUse();
canvasFormat = new PixelFormat(settings.getBitsPerPixel(), canvasFormat = new PixelFormat(settings.getBitsPerPixel(),
0, settings.getAlphaBits(),
settings.getDepthBits(), settings.getDepthBits(),
settings.getStencilBits(), settings.getStencilBits(),
samples, samples,

@ -84,7 +84,7 @@ public class LwjglDisplay extends LwjglAbstractDisplay {
int samples = getNumSamplesToUse(); int samples = getNumSamplesToUse();
PixelFormat pf = new PixelFormat(settings.getBitsPerPixel(), PixelFormat pf = new PixelFormat(settings.getBitsPerPixel(),
0, settings.getAlphaBits(),
settings.getDepthBits(), settings.getDepthBits(),
settings.getStencilBits(), settings.getStencilBits(),
samples, samples,
@ -99,6 +99,7 @@ public class LwjglDisplay extends LwjglAbstractDisplay {
boolean pixelFormatChanged = false; boolean pixelFormatChanged = false;
if (created.get() && (pixelFormat.getBitsPerPixel() != pf.getBitsPerPixel() if (created.get() && (pixelFormat.getBitsPerPixel() != pf.getBitsPerPixel()
||pixelFormat.getAlphaBits() != pf.getAlphaBits()
||pixelFormat.getDepthBits() != pf.getDepthBits() ||pixelFormat.getDepthBits() != pf.getDepthBits()
||pixelFormat.getStencilBits() != pf.getStencilBits() ||pixelFormat.getStencilBits() != pf.getStencilBits()
||pixelFormat.getSamples() != pf.getSamples())){ ||pixelFormat.getSamples() != pf.getSamples())){

@ -62,7 +62,7 @@ public class LwjglOffscreenBuffer extends LwjglContext implements Runnable {
int samples = getNumSamplesToUse(); int samples = getNumSamplesToUse();
pixelFormat = new PixelFormat(settings.getBitsPerPixel(), pixelFormat = new PixelFormat(settings.getBitsPerPixel(),
0, settings.getAlphaBits(),
settings.getDepthBits(), settings.getDepthBits(),
settings.getStencilBits(), settings.getStencilBits(),
samples); samples);

Loading…
Cancel
Save