mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:07:45 +00:00
LibGL: Add stub glClipPlane
This commit is contained in:
parent
c9f44c746a
commit
b928fdc3ee
4 changed files with 27 additions and 1 deletions
|
@ -477,6 +477,14 @@ extern "C" {
|
|||
|
||||
#define GL_ADD 0x0104
|
||||
|
||||
// User clipping planes
|
||||
#define GL_CLIP_PLANE0 0x3000
|
||||
#define GL_CLIP_PLANE1 0x3001
|
||||
#define GL_CLIP_PLANE2 0x3002
|
||||
#define GL_CLIP_PLANE3 0x3003
|
||||
#define GL_CLIP_PLANE4 0x3004
|
||||
#define GL_CLIP_PLANE5 0x3005
|
||||
|
||||
GLAPI void glBegin(GLenum mode);
|
||||
GLAPI void glClear(GLbitfield mask);
|
||||
GLAPI void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
|
@ -670,6 +678,7 @@ GLAPI void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
|
|||
GLAPI void glRecti(GLint x1, GLint y1, GLint x2, GLint y2);
|
||||
GLAPI void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params);
|
||||
GLAPI void glPointSize(GLfloat size);
|
||||
GLAPI void glClipPlane(GLenum plane, GLdouble const* equation);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1936,6 +1936,16 @@ void GLContext::gl_depth_mask(GLboolean flag)
|
|||
m_rasterizer->set_options(options);
|
||||
}
|
||||
|
||||
void GLContext::gl_clip_plane(GLenum plane, [[maybe_unused]] GLdouble const* equation)
|
||||
{
|
||||
APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_clip_plane, plane, equation);
|
||||
|
||||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||
RETURN_WITH_ERROR_IF((plane < GL_CLIP_PLANE0) || (plane > GL_CLIP_PLANE5), GL_INVALID_ENUM);
|
||||
|
||||
dbgln_if(GL_DEBUG, "GLContext FIXME: implement gl_clip_plane() (equation = [{} {} {} {}])", equation[0], equation[1], equation[2], equation[3]);
|
||||
}
|
||||
|
||||
void GLContext::gl_enable_client_state(GLenum cap)
|
||||
{
|
||||
RETURN_WITH_ERROR_IF(m_in_draw_state, GL_INVALID_OPERATION);
|
||||
|
|
|
@ -156,6 +156,7 @@ public:
|
|||
void gl_color_material(GLenum face, GLenum mode);
|
||||
void gl_get_light(GLenum light, 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 present();
|
||||
|
||||
private:
|
||||
|
@ -396,7 +397,8 @@ private:
|
|||
decltype(&GLContext::gl_materialfv),
|
||||
decltype(&GLContext::gl_materialiv),
|
||||
decltype(&GLContext::gl_color_material),
|
||||
decltype(&GLContext::gl_get_light)>;
|
||||
decltype(&GLContext::gl_get_light),
|
||||
decltype(&GLContext::gl_clip_plane)>;
|
||||
|
||||
using ExtraSavedArguments = Variant<
|
||||
FloatMatrix4x4>;
|
||||
|
|
|
@ -189,3 +189,8 @@ void glPopAttrib()
|
|||
{
|
||||
g_gl_context->gl_pop_attrib();
|
||||
}
|
||||
|
||||
void glClipPlane(GLenum plane, GLdouble const* equation)
|
||||
{
|
||||
g_gl_context->gl_clip_plane(plane, equation);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue