ladybird/Userland/Libraries/LibGL/GLLists.cpp
Ali Mohammad Pur 720d21411b LibGL: Implement glGenLists and a few friends
This commit implements glGenLists(), glNewList(), glDeleteLists(), and
glCallList().
The 'compiled' records are implemented as a vector of member function
pointers and tuples containing their arguments, and a mechanism is
implemented to allow the recorded calls to copy-capture values from the
time of the call; this is currently only used with glLoadMatrix.
2021-05-11 14:09:17 +01:00

36 lines
627 B
C++

/*
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "GL/gl.h"
#include "GLContext.h"
extern GL::GLContext* g_gl_context;
GLuint glGenLists(GLsizei range)
{
return g_gl_context->gl_gen_lists(range);
}
void glCallList(GLuint list)
{
return g_gl_context->gl_call_list(list);
}
void glDeleteLists(GLuint list, GLsizei range)
{
return g_gl_context->gl_delete_lists(list, range);
}
void glEndList(void)
{
return g_gl_context->gl_end_list();
}
void glNewList(GLuint list, GLenum mode)
{
return g_gl_context->gl_new_list(list, mode);
}