From 0b1939dce5a4185f46f454022114dbb71cd02349 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Thu, 6 Oct 2005 20:03:01 +0000 Subject: [PATCH] Added float format to GL11.glReadPixels --- src/generated/org/lwjgl/opengl/GL11.java | 7 +++++++ src/templates/org/lwjgl/opengl/GL11.java | 1 + 2 files changed, 8 insertions(+) diff --git a/src/generated/org/lwjgl/opengl/GL11.java b/src/generated/org/lwjgl/opengl/GL11.java index 5b721ccb..1cd7d134 100644 --- a/src/generated/org/lwjgl/opengl/GL11.java +++ b/src/generated/org/lwjgl/opengl/GL11.java @@ -1900,6 +1900,13 @@ public final class GL11 { BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); nglReadPixels(x, y, width, height, format, type, pixels, pixels.position(), function_pointer); } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, FloatBuffer pixels) { + long function_pointer = GLContext.getCapabilities().GL11_glReadPixels_pointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, pixels, pixels.position() << 2, function_pointer); + } public static void glReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer pixels) { long function_pointer = GLContext.getCapabilities().GL11_glReadPixels_pointer; BufferChecks.checkFunctionAddress(function_pointer); diff --git a/src/templates/org/lwjgl/opengl/GL11.java b/src/templates/org/lwjgl/opengl/GL11.java index 18bef258..a6626881 100644 --- a/src/templates/org/lwjgl/opengl/GL11.java +++ b/src/templates/org/lwjgl/opengl/GL11.java @@ -1031,6 +1031,7 @@ public interface GL11 { @GLbyte @GLshort @GLint + @GLfloat Buffer pixels); void glReadBuffer(@GLenum int mode);