mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
LibWeb/WebGL: Implement getProgramInfoLog()
This commit is contained in:
parent
b8109c3047
commit
ae6edfb845
Notes:
github-actions[bot]
2024-12-05 15:43:07 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/ae6edfb8457 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2786
2 changed files with 15 additions and 1 deletions
|
@ -116,7 +116,7 @@ interface mixin WebGLRenderingContextBase {
|
|||
|
||||
[FIXME] any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, GLenum pname);
|
||||
any getProgramParameter(WebGLProgram program, GLenum pname);
|
||||
[FIXME] DOMString? getProgramInfoLog(WebGLProgram program);
|
||||
DOMString? getProgramInfoLog(WebGLProgram program);
|
||||
[FIXME] any getRenderbufferParameter(GLenum target, GLenum pname);
|
||||
any getShaderParameter(WebGLShader shader, GLenum pname);
|
||||
[FIXME] WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype);
|
||||
|
|
|
@ -582,6 +582,20 @@ public:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "getProgramInfoLog"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
GLint info_log_length = 0;
|
||||
glGetProgramiv(program->handle(), GL_INFO_LOG_LENGTH, &info_log_length);
|
||||
Vector<GLchar> info_log;
|
||||
info_log.resize(info_log_length);
|
||||
if (!info_log_length)
|
||||
return String {};
|
||||
glGetProgramInfoLog(program->handle(), info_log_length, nullptr, info_log.data());
|
||||
return String::from_utf8_without_validation(ReadonlyBytes { info_log.data(), static_cast<size_t>(info_log_length - 1) });
|
||||
)~~~");
|
||||
continue;
|
||||
}
|
||||
|
||||
Vector<ByteString> gl_call_arguments;
|
||||
for (size_t i = 0; i < function.parameters.size(); ++i) {
|
||||
auto const& parameter = function.parameters[i];
|
||||
|
|
Loading…
Reference in a new issue