Skip to content

Commit

Permalink
CDRMPRIMETexture: only create the texture if it's not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
lrusak committed Nov 19, 2020
1 parent d48397e commit 32695dd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ bool CDRMPRIMETexture::Map(CVideoBufferDRMPRIME* buffer)
return false;
}

glGenTextures(1, &m_texture);
if (!glIsTexture(m_texture))
glGenTextures(1, &m_texture);
glBindTexture(m_textureTarget, m_texture);
glTexParameteri(m_textureTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(m_textureTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
Expand Down

0 comments on commit 32695dd

Please sign in to comment.