aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-jogl/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'ardor3d-jogl/src/main/java')
-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;
}