diff options
author | Joshua Slack <[email protected]> | 2013-01-16 12:57:00 -0800 |
---|---|---|
committer | Joshua Slack <[email protected]> | 2013-01-16 12:57:00 -0800 |
commit | 56408ff521085d93803e6c729944bc78900238bf (patch) | |
tree | ecc8a3ce977de485685e5e859e7001170f580583 /ardor3d-jogl/src/main | |
parent | ad69dc874e5fafaee9a76472fed92c71b03bdb4e (diff) | |
parent | 766a88b1acc83d018be0dde14cff4dc8e73f9073 (diff) |
Merge pull request #15 from gouessej/master
Improves the creation of GLCapabilities
Diffstat (limited to 'ardor3d-jogl/src/main')
-rw-r--r-- | ardor3d-jogl/src/main/java/com/ardor3d/framework/jogl/CapsUtil.java | 13 |
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; } |