GLDraw.cpp 926 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2021, Jelle Raaijmakers <jelle@gmta.nl>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include "GL/gl.h"
  7. #include "GLContext.h"
  8. #include <AK/Debug.h>
  9. extern GL::GLContext* g_gl_context;
  10. void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte const* bitmap)
  11. {
  12. g_gl_context->gl_bitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
  13. }
  14. void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void* data)
  15. {
  16. g_gl_context->gl_draw_pixels(width, height, format, type, data);
  17. }
  18. void glLineWidth(GLfloat width)
  19. {
  20. g_gl_context->gl_line_width(width);
  21. }
  22. void glPointSize(GLfloat size)
  23. {
  24. // FIXME: implement
  25. dbgln_if(GL_DEBUG, "glPointSize({}): unimplemented", size);
  26. }
  27. void glRasterPos2i(GLint x, GLint y)
  28. {
  29. g_gl_context->gl_raster_pos(static_cast<float>(x), static_cast<float>(y), 0.0f, 1.0f);
  30. }