mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:12:45 +00:00 
			
		
		
		
	 720d21411b
			
		
	
	
		720d21411b
		
	
	
	
	
		
			
			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.
		
			
				
	
	
		
			35 lines
		
	
	
	
		
			627 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			35 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);
 | |
| }
 |