ladybird/Userland/Libraries/LibWeb/WebGL/OpenGLContext.h
Aliaksandr Kalenik 215931daac LibWeb/WebGL: Make Context::activate() non-virtual
This method is only relevant for AccelGfx so no reason to keep it
virtual.
2024-01-21 16:09:54 +01:00

46 lines
1.5 KiB
C++

/*
* Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGfx/Bitmap.h>
#include <LibWeb/WebGL/Types.h>
namespace Web::WebGL {
class OpenGLContext {
public:
static OwnPtr<OpenGLContext> create(Gfx::Bitmap&);
virtual void present(Gfx::Bitmap&) = 0;
void clear_buffer_to_default_values();
virtual GLenum gl_get_error() = 0;
virtual void gl_get_doublev(GLenum, GLdouble*) = 0;
virtual void gl_get_integerv(GLenum, GLint*) = 0;
virtual void gl_clear(GLbitfield) = 0;
virtual void gl_clear_color(GLfloat, GLfloat, GLfloat, GLfloat) = 0;
virtual void gl_clear_depth(GLdouble) = 0;
virtual void gl_clear_stencil(GLint) = 0;
virtual void gl_active_texture(GLenum) = 0;
virtual void gl_viewport(GLint, GLint, GLsizei, GLsizei) = 0;
virtual void gl_line_width(GLfloat) = 0;
virtual void gl_polygon_offset(GLfloat, GLfloat) = 0;
virtual void gl_scissor(GLint, GLint, GLsizei, GLsizei) = 0;
virtual void gl_depth_mask(GLboolean) = 0;
virtual void gl_depth_func(GLenum) = 0;
virtual void gl_depth_range(GLdouble, GLdouble) = 0;
virtual void gl_cull_face(GLenum) = 0;
virtual void gl_color_mask(GLboolean, GLboolean, GLboolean, GLboolean) = 0;
virtual void gl_front_face(GLenum) = 0;
virtual void gl_finish() = 0;
virtual void gl_flush() = 0;
virtual void gl_stencil_op_separate(GLenum, GLenum, GLenum, GLenum) = 0;
virtual ~OpenGLContext() { }
};
}