mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 16:32:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			780 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			780 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Jelle Raaijmakers <jelle@gmta.nl>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include "GL/gl.h"
 | |
| #include "GLContext.h"
 | |
| 
 | |
| extern GL::GLContext* g_gl_context;
 | |
| 
 | |
| void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte const* bitmap)
 | |
| {
 | |
|     g_gl_context->gl_bitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
 | |
| }
 | |
| 
 | |
| void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void* data)
 | |
| {
 | |
|     g_gl_context->gl_draw_pixels(width, height, format, type, data);
 | |
| }
 | |
| 
 | |
| void glLineWidth(GLfloat width)
 | |
| {
 | |
|     g_gl_context->gl_line_width(width);
 | |
| }
 | |
| 
 | |
| void glRasterPos2i(GLint x, GLint y)
 | |
| {
 | |
|     g_gl_context->gl_raster_pos(static_cast<float>(x), static_cast<float>(y), 0.0f, 1.0f);
 | |
| }
 | 
