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

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.
This commit is contained in:
Ali Mohammad Pur 2021-05-09 08:25:15 +04:30 committed by Linus Groh
parent 02de813950
commit 720d21411b
6 changed files with 292 additions and 2 deletions

View file

@ -0,0 +1,35 @@
/*
* 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);
}