Added float format to GL11.glReadPixels
This commit is contained in:
parent
e1662c6659
commit
0b1939dce5
|
@ -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);
|
||||
|
|
|
@ -1031,6 +1031,7 @@ public interface GL11 {
|
|||
@GLbyte
|
||||
@GLshort
|
||||
@GLint
|
||||
@GLfloat
|
||||
Buffer pixels);
|
||||
|
||||
void glReadBuffer(@GLenum int mode);
|
||||
|
|
Loading…
Reference in New Issue