mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 04:37:44 +00:00
LibGL: Implement glGetShaderiv
This commit is contained in:
parent
69171e7a05
commit
424e0a2792
7 changed files with 87 additions and 0 deletions
|
@ -28,4 +28,26 @@ ErrorOr<void> Shader::compile()
|
|||
return {};
|
||||
}
|
||||
|
||||
size_t Shader::info_log_length() const
|
||||
{
|
||||
if (!m_info_log.has_value())
|
||||
return 0;
|
||||
|
||||
// Per the spec we return the size including the null terminator
|
||||
return m_info_log.value().bytes().size() + 1;
|
||||
}
|
||||
|
||||
size_t Shader::combined_source_length() const
|
||||
{
|
||||
if (m_sources.is_empty())
|
||||
return 0;
|
||||
|
||||
size_t combined_size = 0;
|
||||
for (auto source : m_sources)
|
||||
combined_size += source.bytes().size();
|
||||
|
||||
// Per the spec we return the size including the null terminator
|
||||
return combined_size + 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue