gpt4 book ai didi

opengl - glCopyTexImage2D 将其像素保存到哪里?

转载 作者:行者123 更新时间:2023-12-04 19:32:10 24 4
gpt4 key购买 nike

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

显然,像素必须存储在某个地方,但是在哪里呢?该函数返回 void 并且不使用指针参数。

那么, glCopyTexImage2D 将其像素保存到哪里?

最佳答案

放入您指定为 target 的纹理中(例如 GL_TEXTURE_2D ,这意味着当前绑定(bind)的 2D 纹理)。使用后,您可以使用 glGetTexImage将像素从纹理中提取到您自己的缓冲区。

关于opengl - glCopyTexImage2D 将其像素保存到哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10884793/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com