summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/GLStencil.cpp
blob: 681784fe3a9ea983b3b54fbae97a751c386a8065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * Copyright (c) 2021, Jelle Raaijmakers <jelle@gmta.nl>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include "GL/gl.h"
#include "GLContext.h"

extern GL::GLContext* g_gl_context;

void glClearStencil(GLint s)
{
    g_gl_context->gl_clear_stencil(s);
}

void glStencilFunc(GLenum func, GLint ref, GLuint mask)
{
    g_gl_context->gl_stencil_func_separate(GL_FRONT_AND_BACK, func, ref, mask);
}

void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
{
    g_gl_context->gl_stencil_func_separate(face, func, ref, mask);
}

void glStencilOp(GLenum sfail, GLenum dpfail, GLenum dppass)
{
    g_gl_context->gl_stencil_op_separate(GL_FRONT_AND_BACK, sfail, dpfail, dppass);
}

void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
{
    g_gl_context->gl_stencil_op_separate(face, sfail, dpfail, dppass);
}