mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:27:44 +00:00
LibGL: Add stub for glCopyTexSubImage2D
This commit is contained in:
parent
6e9ea2f21f
commit
c08dfe063a
4 changed files with 21 additions and 1 deletions
|
@ -681,6 +681,7 @@ GLAPI void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GL
|
||||||
GLAPI void glPointSize(GLfloat size);
|
GLAPI void glPointSize(GLfloat size);
|
||||||
GLAPI void glClipPlane(GLenum plane, GLdouble const* equation);
|
GLAPI void glClipPlane(GLenum plane, GLdouble const* equation);
|
||||||
GLAPI void glArrayElement(GLint i);
|
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
|
#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)
|
NonnullOwnPtr<GLContext> create_context(Gfx::Bitmap& bitmap)
|
||||||
{
|
{
|
||||||
// FIXME: Make driver selectable. This is currently hardcoded to LibSoftGPU
|
// 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_get_material(GLenum face, GLenum pname, void* params, GLenum type);
|
||||||
void gl_clip_plane(GLenum plane, GLdouble const* equation);
|
void gl_clip_plane(GLenum plane, GLdouble const* equation);
|
||||||
void gl_array_element(GLint i);
|
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();
|
void present();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -402,7 +403,8 @@ private:
|
||||||
decltype(&GLContext::gl_color_material),
|
decltype(&GLContext::gl_color_material),
|
||||||
decltype(&GLContext::gl_get_light),
|
decltype(&GLContext::gl_get_light),
|
||||||
decltype(&GLContext::gl_clip_plane),
|
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<
|
using ExtraSavedArguments = Variant<
|
||||||
FloatMatrix4x4>;
|
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);
|
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…
Add table
Add a link
Reference in a new issue