mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
LibGL: Remove TextureUnit::unbind_texture()
This commit is contained in:
parent
a4603fbc06
commit
bed0f3466a
3 changed files with 9 additions and 17 deletions
|
@ -11,6 +11,13 @@ namespace GL {
|
|||
|
||||
void TextureUnit::bind_texture_to_target(GLenum texture_target, const RefPtr<Texture>& texture)
|
||||
{
|
||||
if (!texture) {
|
||||
m_texture_target_2d = nullptr;
|
||||
m_currently_bound_target = GL_NONE;
|
||||
m_currently_bound_texture = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (texture_target) {
|
||||
case GL_TEXTURE_2D:
|
||||
m_texture_target_2d = static_ptr_cast<Texture2D>(texture);
|
||||
|
@ -22,18 +29,4 @@ void TextureUnit::bind_texture_to_target(GLenum texture_target, const RefPtr<Tex
|
|||
}
|
||||
}
|
||||
|
||||
void TextureUnit::unbind_texture(GLenum texture_target)
|
||||
{
|
||||
switch (texture_target) {
|
||||
case GL_TEXTURE_2D:
|
||||
m_texture_target_2d = nullptr;
|
||||
m_currently_bound_target = GL_NONE;
|
||||
break;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
m_currently_bound_texture = nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue