Name
glCopyTexImage2D — copy pixels into a 2D texture image
C Specification
void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
Apparently, the pixels must be stored somewhere, but where? The function returns void and does not use a pointer parameter.
SO, where does glCopyTexImage2D save its pixels to?
Into a texture you specify as target
(e.g. GL_TEXTURE_2D
, which would mean currently bound 2D texture). After using that you can use glGetTexImage
to fetch the pixels from the texture to your own buffer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With