EGLImageTexture: pass nullptr to glTexImage2d in last argument (#22844)

old-commit-hash: b0f9365295
This commit is contained in:
Dean Lee 2021-11-10 10:49:48 +08:00 committed by GitHub
parent efcd62fe86
commit 2bbceb0b29
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ EGLImageTexture::~EGLImageTexture() {
EGLImageTexture::EGLImageTexture(const VisionBuf *buf) {
glGenTextures(1, &frame_tex);
glBindTexture(GL_TEXTURE_2D, frame_tex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, buf->width, buf->height, 0, GL_RGB, GL_UNSIGNED_BYTE, buf->addr);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, buf->width, buf->height, 0, GL_RGB, GL_UNSIGNED_BYTE, nullptr);
glGenerateMipmap(GL_TEXTURE_2D);
}