summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGL/GLVertexArrays.cpp
blob: 46a3a8d2a927afa6de297c024e531a1fdaeaf33a (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, Stephan Unverwerth <s.unverwerth@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

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

extern GL::GLContext* g_gl_context;

void glVertexPointer(GLint size, GLenum type, GLsizei stride, const void* pointer)
{
    g_gl_context->gl_vertex_pointer(size, type, stride, pointer);
}

void glColorPointer(GLint size, GLenum type, GLsizei stride, const void* pointer)
{
    g_gl_context->gl_color_pointer(size, type, stride, pointer);
}

void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void* pointer)
{
    g_gl_context->gl_tex_coord_pointer(size, type, stride, pointer);
}

void glDrawArrays(GLenum mode, GLint first, GLsizei count)
{
    g_gl_context->gl_draw_arrays(mode, first, count);
}

void glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices)
{
    g_gl_context->gl_draw_elements(mode, count, type, indices);
}