aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2013-01-16 21:10:10 +0100
committerJulien Gouesse <[email protected]>2013-01-16 21:10:10 +0100
commit766a88b1acc83d018be0dde14cff4dc8e73f9073 (patch)
treeecc8a3ce977de485685e5e859e7001170f580583
parent50ec97835bcfc3440a1ce9ec5c33d252eaa32b71 (diff)
Improves the creation of GLCapabilities
-rw-r--r--ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java
index c23b8a0..733fbfe 100644
--- a/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java
+++ b/ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java
@@ -40,6 +40,19 @@ public class CapsUtil {
caps.setSampleBuffers(settings.getSamples() != 0);
caps.setStereo(settings.isStereo());
caps.setStencilBits(settings.getStencilBits());
+ switch (settings.getColorDepth()) {
+ case 32:
+ case 24:
+ caps.setRedBits(8);
+ caps.setBlueBits(8);
+ caps.setGreenBits(8);
+ break;
+ case 16:
+ caps.setRedBits(4);
+ caps.setBlueBits(4);
+ caps.setGreenBits(4);
+ break;
+ }
return caps;
}