mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibGL: Add Texture Name Allocation
Texture names can now be allocated via `glGenTextures` and deallocated via `glDeleteTextures`.
This commit is contained in:
parent
8a69e6714e
commit
21dff6d40b
8 changed files with 118 additions and 0 deletions
20
Userland/Libraries/LibGL/GLTexture.cpp
Normal file
20
Userland/Libraries/LibGL/GLTexture.cpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Jesse Buhagiar <jooster669@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "GLContext.h"
|
||||
#include <LibGL/GL/gl.h>
|
||||
|
||||
extern GL::GLContext* g_gl_context;
|
||||
|
||||
void glGenTextures(GLsizei n, GLuint* textures)
|
||||
{
|
||||
g_gl_context->gl_gen_textures(n, textures);
|
||||
}
|
||||
|
||||
void glDeleteTextures(GLsizei n, const GLuint* textures)
|
||||
{
|
||||
g_gl_context->gl_delete_textures(n, textures);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue