summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/GLUtils.cpp
blob: d3f37c1ce7a08e9f359fc814fb859aed0d661d42 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 * Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
 * Copyright (c) 2021, Stephan Unverwerth <s.unverwerth@gmx.de>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

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

extern GL::GLContext* g_gl_context;

void glEnable(GLenum cap)
{
    g_gl_context->gl_enable(cap);
}

void glDisable(GLenum cap)
{
    g_gl_context->gl_disable(cap);
}

void glFrontFace(GLenum mode)
{
    g_gl_context->gl_front_face(mode);
}

void glCullFace(GLenum mode)
{
    g_gl_context->gl_cull_face(mode);
}

void glClear(GLbitfield mask)
{
    g_gl_context->gl_clear(mask);
}

void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
    g_gl_context->gl_clear_color(red, green, blue, alpha);
}

void glClearDepth(GLdouble depth)
{
    g_gl_context->gl_clear_depth(depth);
}

GLubyte* glGetString(GLenum name)
{
    return g_gl_context->gl_get_string(name);
}

void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
    g_gl_context->gl_viewport(x, y, width, height);
}

GLenum glGetError()
{
    return g_gl_context->gl_get_error();
}

void glFlush()
{
    return g_gl_context->gl_flush();
}

void glFinish()
{
    return g_gl_context->gl_finish();
}