Added float format to GL11.glReadPixels

This commit is contained in:
Elias Naur 2005-10-06 20:03:01 +00:00
parent e1662c6659
commit 0b1939dce5
2 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -1031,6 +1031,7 @@ public interface GL11 {
@GLbyte
@GLshort
@GLint
@GLfloat
Buffer pixels);
void glReadBuffer(@GLenum int mode);