mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 19:19:44 +03:00
LibGL: Add stub for glCopyTexSubImage2D
This commit is contained in:
parent
6e9ea2f21f
commit
c08dfe063a
Notes:
sideshowbarker
2024-07-17 14:15:16 +09:00
Author: https://github.com/Quaker762 Commit: https://github.com/SerenityOS/serenity/commit/c08dfe063a Pull-request: https://github.com/SerenityOS/serenity/pull/13271 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/EWouters Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/gmta Reviewed-by: https://github.com/sunverwerth ✅
@ -681,6 +681,7 @@ GLAPI void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GL
|
||||
GLAPI void glPointSize(GLfloat size);
|
||||
GLAPI void glClipPlane(GLenum plane, GLdouble const* equation);
|
||||
GLAPI void glArrayElement(GLint i);
|
||||
GLAPI void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -3721,6 +3721,18 @@ void GLContext::get_material_param(Face face, GLenum pname, T* params)
|
||||
}
|
||||
}
|
||||
|
||||
void GLContext::gl_copy_tex_sub_image_2d(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
{
|
||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_copy_tex_sub_image_2d, target, level, xoffset, yoffset, x, y, width, height);
|
||||
RETURN_WITH_ERROR_IF(!(target == GL_TEXTURE_2D || target == GL_TEXTURE_1D_ARRAY), GL_INVALID_ENUM);
|
||||
RETURN_WITH_ERROR_IF(level < 0, GL_INVALID_VALUE);
|
||||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||
|
||||
// FIXME: implement
|
||||
dbgln_if(GL_DEBUG, "GLContext FIXME: implement gl_copy_tex_sub_image_2d({:#x}, {}, {}, {}, {}, {}, {}, {})",
|
||||
target, level, xoffset, yoffset, x, y, width, height);
|
||||
}
|
||||
|
||||
NonnullOwnPtr<GLContext> create_context(Gfx::Bitmap& bitmap)
|
||||
{
|
||||
// FIXME: Make driver selectable. This is currently hardcoded to LibSoftGPU
|
||||
|
@ -159,6 +159,7 @@ public:
|
||||
void gl_get_material(GLenum face, GLenum pname, void* params, GLenum type);
|
||||
void gl_clip_plane(GLenum plane, GLdouble const* equation);
|
||||
void gl_array_element(GLint i);
|
||||
void gl_copy_tex_sub_image_2d(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
void present();
|
||||
|
||||
private:
|
||||
@ -402,7 +403,8 @@ private:
|
||||
decltype(&GLContext::gl_color_material),
|
||||
decltype(&GLContext::gl_get_light),
|
||||
decltype(&GLContext::gl_clip_plane),
|
||||
decltype(&GLContext::gl_array_element)>;
|
||||
decltype(&GLContext::gl_array_element),
|
||||
decltype(&GLContext::gl_copy_tex_sub_image_2d)>;
|
||||
|
||||
using ExtraSavedArguments = Variant<
|
||||
FloatMatrix4x4>;
|
||||
|
@ -111,3 +111,8 @@ void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* p
|
||||
{
|
||||
g_gl_context->gl_get_tex_parameter_integerv(target, level, pname, params);
|
||||
}
|
||||
|
||||
void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
|
||||
{
|
||||
g_gl_context->gl_copy_tex_sub_image_2d(target, level, xoffset, yoffset, x, y, width, height);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user