aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-lwjgl
diff options
context:
space:
mode:
authorJoshua Slack <[email protected]>2013-03-27 10:35:54 -0700
committerJoshua Slack <[email protected]>2013-03-27 10:35:54 -0700
commitdb666e6411c2395172c1da142654914459037900 (patch)
tree82ce9b5166ed6fe88f4cd13f1b4ca5dc2c9a1dfe /ardor3d-lwjgl
parentb79aa24cc164775a65e9e0ad49ff6f4504a9b3fa (diff)
parent69bf5f9e34f2d6c94beb9265a1dbfd17e3a25205 (diff)
Merge pull request #30 from gouessej/master
Fixes + enhancements
Diffstat (limited to 'ardor3d-lwjgl')
-rw-r--r--ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglRenderer.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglRenderer.java b/ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglRenderer.java
index 06c72fe..4ef91e6 100644
--- a/ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglRenderer.java
+++ b/ardor3d-lwjgl/src/main/java/com/ardor3d/renderer/lwjgl/LwjglRenderer.java
@@ -32,6 +32,7 @@ import org.lwjgl.opengl.GL31;
import org.lwjgl.opengl.OpenGLException;
import com.ardor3d.image.ImageDataFormat;
+import com.ardor3d.image.PixelDataType;
import com.ardor3d.image.Texture;
import com.ardor3d.image.Texture1D;
import com.ardor3d.image.Texture2D;
@@ -264,10 +265,11 @@ public class LwjglRenderer extends AbstractRenderer {
_inOrthoMode = false;
}
- public void grabScreenContents(final ByteBuffer buff, final ImageDataFormat format, final int x, final int y,
- final int w, final int h) {
+ public void grabScreenContents(final ByteBuffer buff, final ImageDataFormat format, final PixelDataType type,
+ final int x, final int y, final int w, final int h) {
final int pixFormat = LwjglTextureUtil.getGLPixelFormat(format);
- GL11.glReadPixels(x, y, w, h, pixFormat, GL11.GL_UNSIGNED_BYTE, buff);
+ final int pixDataType = LwjglTextureUtil.getGLPixelDataType(type);
+ GL11.glReadPixels(x, y, w, h, pixFormat, pixDataType, buff);
}
public void draw(final Spatial s) {