mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibWeb/WebGL: Add a bunch of simple forwarding functions
This collection of functions simply check if the context is still alive, then forward the call to the GL context.
This commit is contained in:
parent
aa77c26b60
commit
39a212b54f
3 changed files with 183 additions and 0 deletions
|
@ -26,8 +26,32 @@ public:
|
|||
Optional<Vector<String>> get_supported_extensions() const;
|
||||
JS::Object* get_extension(String const& name) const;
|
||||
|
||||
void active_texture(GLenum texture);
|
||||
|
||||
void clear(GLbitfield mask);
|
||||
void clear_color(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
void clear_depth(GLclampf depth);
|
||||
void clear_stencil(GLint s);
|
||||
void color_mask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
|
||||
void cull_face(GLenum mode);
|
||||
|
||||
void depth_func(GLenum func);
|
||||
void depth_mask(GLboolean mask);
|
||||
|
||||
void finish();
|
||||
void flush();
|
||||
|
||||
void front_face(GLenum mode);
|
||||
|
||||
void polygon_offset(GLfloat factor, GLfloat units);
|
||||
|
||||
void scissor(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
void stencil_op(GLenum fail, GLenum zfail, GLenum zpass);
|
||||
void stencil_op_separate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
|
||||
|
||||
void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
protected:
|
||||
WebGLRenderingContextBase(HTML::HTMLCanvasElement& canvas_element, NonnullOwnPtr<GL::GLContext> context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue