Skip to content

Commit

Permalink
CodeGenerators: Delete unnecessary overrides in WebGL generator
Browse files Browse the repository at this point in the history
getAttribLocation() and getAttribLocation() could be generated
automatically so we don't need to have overriden function bodies for
them.
  • Loading branch information
kalenikaliaksandr committed Dec 7, 2024
1 parent f074df1 commit 46b9518
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,14 +520,6 @@ class @class_name@ {
continue;
}

if (function.name == "getAttribLocation"sv) {
function_impl_generator.append(R"~~~(
auto name_str = null_terminated_string(name);
return glGetAttribLocation(program->handle(), name_str.data());
)~~~");
continue;
}

if (function.name == "vertexAttribPointer"sv) {
function_impl_generator.append(R"~~~(
glVertexAttribPointer(index, size, type, normalized, stride, reinterpret_cast<void*>(offset));
Expand Down Expand Up @@ -629,14 +621,6 @@ class @class_name@ {
continue;
}

if (function.name == "getUniformLocation"sv) {
function_impl_generator.append(R"~~~(
auto name_str = null_terminated_string(name);
return WebGLUniformLocation::create(m_realm, glGetUniformLocation(program->handle(), name_str.data()));
)~~~");
continue;
}

if (function.name == "drawElements"sv) {
function_impl_generator.append(R"~~~(
glDrawElements(mode, count, type, reinterpret_cast<void*>(offset));
Expand Down

0 comments on commit 46b9518

Please sign in to comment.