mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibWeb/WebGL2: Implement createSampler
This commit is contained in:
committed by
Alexander Kalenik
parent
71521a7004
commit
8a9d1de1cf
Notes:
github-actions[bot]
2024-12-14 08:10:32 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/8a9d1de1cfd Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2905
@@ -354,6 +354,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
#include <LibWeb/WebGL/WebGLProgram.h>
|
||||
#include <LibWeb/WebGL/WebGLRenderbuffer.h>
|
||||
#include <LibWeb/WebGL/@class_name@.h>
|
||||
#include <LibWeb/WebGL/WebGLSampler.h>
|
||||
#include <LibWeb/WebGL/WebGLShader.h>
|
||||
#include <LibWeb/WebGL/WebGLShaderPrecisionFormat.h>
|
||||
#include <LibWeb/WebGL/WebGLTexture.h>
|
||||
@@ -508,6 +509,15 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "createSampler"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
GLuint handle = 0;
|
||||
glGenSamplers(1, &handle);
|
||||
return WebGLSampler::create(m_realm, handle);
|
||||
)~~~");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (function.name == "shaderSource"sv) {
|
||||
function_impl_generator.append(R"~~~(
|
||||
Vector<GLchar*> strings;
|
||||
|
||||
Reference in New Issue
Block a user