* Fixed issue with default samples value causing "No support for WGL_ARB_multisample" error

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9021 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent 9c6ca69b34
commit bd828d629c
  1. 8
      engine/src/lwjgl/com/jme3/system/lwjgl/LwjglCanvas.java
  2. 6
      engine/src/lwjgl/com/jme3/system/lwjgl/LwjglDisplay.java
  3. 4
      engine/src/lwjgl/com/jme3/system/lwjgl/LwjglOffscreenBuffer.java

@ -1,4 +1,4 @@
/*
F/*
* Copyright (c) 2009-2010 jMonkeyEngine
* All rights reserved.
*
@ -307,11 +307,15 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex
return pbufferFormat;
}else{
if (canvasFormat == null){
int samples = 0;
if (settings.getSamples() > 1){
samples = settings.getSamples();
}
canvasFormat = new PixelFormat(settings.getBitsPerPixel(),
0,
settings.getDepthBits(),
settings.getStencilBits(),
settings.getSamples());
samples);
}
return canvasFormat;
}

@ -81,11 +81,15 @@ public class LwjglDisplay extends LwjglAbstractDisplay {
displayMode = new DisplayMode(settings.getWidth(), settings.getHeight());
}
int samples = 0;
if (settings.getSamples() > 1){
samples = settings.getSamples();
}
PixelFormat pf = new PixelFormat(settings.getBitsPerPixel(),
0,
settings.getDepthBits(),
settings.getStencilBits(),
settings.getSamples());
samples);
frameRate = settings.getFrameRate();
logger.log(Level.INFO, "Selected display mode: {0}", displayMode);

@ -60,6 +60,10 @@ public class LwjglOffscreenBuffer extends LwjglContext implements Runnable {
return;
}
int samples = 0;
if (settings.getSamples() > 1){
samples = settings.getSamples();
}
pixelFormat = new PixelFormat(settings.getBitsPerPixel(),
0,
settings.getDepthBits(),

Loading…
Cancel
Save