GLDraw.cpp 780 B

123456789101112131415161718192021222324252627282930
  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. extern GL::GLContext* g_gl_context;
  9. void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte const* bitmap)
  10. {
  11. g_gl_context->gl_bitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
  12. }
  13. void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void* data)
  14. {
  15. g_gl_context->gl_draw_pixels(width, height, format, type, data);
  16. }
  17. void glLineWidth(GLfloat width)
  18. {
  19. g_gl_context->gl_line_width(width);
  20. }
  21. void glRasterPos2i(GLint x, GLint y)
  22. {
  23. g_gl_context->gl_raster_pos(static_cast<float>(x), static_cast<float>(y), 0.0f, 1.0f);
  24. }