glReadPixels function opengl

void glReadPixels(
  1. int x,
  2. int y,
  3. int width,
  4. int height,
  5. int format,
  6. int type,
  7. Pointer<NativeType> pixels,
)
GLAPI void GLAPIENTRY glReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels )

Implementation

void glReadPixels(
  int x,
  int y,
  int width,
  int height,
  int format,
  int type,
  Pointer<NativeType> pixels,
) {
  final glReadPixelsAsFunction = _glReadPixels
      .cast<
        NativeFunction<
          Void Function(
            Int32 x,
            Int32 y,
            Uint32 width,
            Uint32 height,
            Uint32 format,
            Uint32 type,
            Pointer<NativeType> pixels,
          )
        >
      >()
      .asFunction<
        void Function(
          int x,
          int y,
          int width,
          int height,
          int format,
          int type,
          Pointer<NativeType> pixels,
        )
      >();
  return glReadPixelsAsFunction(x, y, width, height, format, type, pixels);
}