# eglCopyBuffers

copy EGL surface color buffer to a native pixmap

## C Specification

`EGLBoolean eglCopyBuffers(` | EGLDisplay display,
| EGLSurface surface,
| NativePixmapType native_pixmap`)`

## Parameters

`display`

  Specifies the EGL display connection.

`surface`

  Specifies the EGL surface whose color buffer is to be copied.

`native_pixmap`

  Specifies the native pixmap as target of the copy.

## Description

`eglCopyBuffers` copies the color buffer of `surface` to `native_pixmap`.

`eglCopyBuffers` performs an implicit glFlush before it returns. Subsequent GL commands may be issued immediately after calling `eglCopyBuffers`, but are not executed until copying of the color buffer is completed.

## Notes

The color buffer of `surface` is left unchanged after calling `eglCopyBuffers`.

## Errors

`EGL_FALSE` is returned if swapping of the surface buffers fails, `EGL_TRUE` otherwise.

`EGL_BAD_DISPLAY` is generated if `display` is not an EGL display connection.

`EGL_NOT_INITIALIZED` is generated if `display` has not been initialized.

`EGL_BAD_SURFACE` is generated if `surface` is not an EGL drawing surface.

`EGL_BAD_NATIVE_PIXMAP` is generated if the implementation does not support native pixmaps.

`EGL_BAD_NATIVE_PIXMAP` may be generated if `native_pixmap` is not a valid native pixmap.

`EGL_BAD_MATCH` is generated if the format of `native_pixmap` is not compatible with the color buffer of `surface`.

`EGL_CONTEXT_LOST` is generated if a power management event has occurred. The application must destroy all contexts and reinitialise OpenGL ES state and objects to continue rendering.

## See Also

glFlush, eglSwapBuffers

####

Copyright © 2003-2014 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.