GLTexture.cpp 687 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include "GLContext.h"
  7. #include <LibGL/GL/gl.h>
  8. extern GL::GLContext* g_gl_context;
  9. void glGenTextures(GLsizei n, GLuint* textures)
  10. {
  11. g_gl_context->gl_gen_textures(n, textures);
  12. }
  13. void glDeleteTextures(GLsizei n, const GLuint* textures)
  14. {
  15. g_gl_context->gl_delete_textures(n, textures);
  16. }
  17. void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* data)
  18. {
  19. g_gl_context->gl_tex_image_2d(target, level, internalFormat, width, height, border, format, type, data);
  20. }