1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:07:46 +00:00

LibGL+LibGPU+LibSoftGPU: Implement and expose glClipPlane

This commit implements glClipPlane and its supporting calls, backed
by new support for user-defined clip planes in the software GPU clipper.

This fixes some visual bugs seen in the Quake III port, in which mirrors
would only reflect correctly from close distances.
This commit is contained in:
RKBethke 2022-05-06 09:40:55 +00:00 committed by Linus Groh
parent bc2f738a84
commit 0836912a6d
14 changed files with 193 additions and 63 deletions

View file

@ -481,6 +481,7 @@ extern "C" {
#define GL_ADD 0x0104
// User clipping planes
#define GL_MAX_CLIP_PLANES 0x0D32
#define GL_CLIP_PLANE0 0x3000
#define GL_CLIP_PLANE1 0x3001
#define GL_CLIP_PLANE2 0x3002
@ -682,6 +683,7 @@ 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);
GLAPI void glGetClipPlane(GLenum plane, GLdouble* 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);