mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:17:35 +00:00
LibGL: Add buffer API stubs
No implemented functionality, but this makes it easier to see if software is using this family of functions.
This commit is contained in:
parent
1c32d93a12
commit
03258f4c96
6 changed files with 80 additions and 1 deletions
42
Userland/Libraries/LibGL/Buffer.cpp
Normal file
42
Userland/Libraries/LibGL/Buffer.cpp
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022, Jelle Raaijmakers <jelle@gmta.nl>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <AK/Debug.h>
|
||||||
|
#include <LibGL/GLContext.h>
|
||||||
|
|
||||||
|
namespace GL {
|
||||||
|
|
||||||
|
void GLContext::gl_bind_buffer(GLenum target, GLuint buffer)
|
||||||
|
{
|
||||||
|
// FIXME: implement me
|
||||||
|
dbgln_if(GL_DEBUG, "{}({:#x}, {})): unimplemented", __FUNCTION__, target, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GLContext::gl_buffer_data(GLenum target, GLsizeiptr size, void const* data, GLenum usage)
|
||||||
|
{
|
||||||
|
// FIXME: implement me
|
||||||
|
dbgln_if(GL_DEBUG, "{}({:#x}, {}, {:p}, {:#x}): unimplemented", __FUNCTION__, target, size, data, usage);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GLContext::gl_buffer_sub_data(GLenum target, GLintptr offset, GLsizeiptr size, void const* data)
|
||||||
|
{
|
||||||
|
// FIXME: implement me
|
||||||
|
dbgln_if(GL_DEBUG, "{}({:#x}, {}, {}, {:p}): unimplemented", __FUNCTION__, target, offset, size, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GLContext::gl_delete_buffers(GLsizei n, GLuint const* buffers)
|
||||||
|
{
|
||||||
|
// FIXME: implement me
|
||||||
|
dbgln_if(GL_DEBUG, "{}({}, {:p}): unimplemented", __FUNCTION__, n, buffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GLContext::gl_gen_buffers(GLsizei n, GLuint* buffers)
|
||||||
|
{
|
||||||
|
// FIXME: implement me
|
||||||
|
dbgln_if(GL_DEBUG, "{}({}, {:p}): unimplemented", __FUNCTION__, n, buffers);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
|
Buffer.cpp
|
||||||
ClipPlane.cpp
|
ClipPlane.cpp
|
||||||
ContextParameter.cpp
|
ContextParameter.cpp
|
||||||
GLAPI.cpp
|
GLAPI.cpp
|
||||||
|
|
|
@ -718,7 +718,6 @@ GLAPI void glEnableClientState(GLenum cap);
|
||||||
GLAPI void glDisableClientState(GLenum cap);
|
GLAPI void glDisableClientState(GLenum cap);
|
||||||
GLAPI void glClientActiveTextureARB(GLenum target);
|
GLAPI void glClientActiveTextureARB(GLenum target);
|
||||||
GLAPI void glClientActiveTexture(GLenum target);
|
GLAPI void glClientActiveTexture(GLenum target);
|
||||||
|
|
||||||
GLAPI void glVertexPointer(GLint size, GLenum type, GLsizei stride, void const* pointer);
|
GLAPI void glVertexPointer(GLint size, GLenum type, GLsizei stride, void const* pointer);
|
||||||
GLAPI void glColorPointer(GLint size, GLenum type, GLsizei stride, void const* pointer);
|
GLAPI void glColorPointer(GLint size, GLenum type, GLsizei stride, void const* pointer);
|
||||||
GLAPI void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, void const* pointer);
|
GLAPI void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, void const* pointer);
|
||||||
|
@ -794,6 +793,11 @@ GLAPI void glClipPlane(GLenum plane, GLdouble const* equation);
|
||||||
GLAPI void glGetClipPlane(GLenum plane, GLdouble* equation);
|
GLAPI void glGetClipPlane(GLenum plane, GLdouble* equation);
|
||||||
GLAPI void glArrayElement(GLint i);
|
GLAPI void glArrayElement(GLint i);
|
||||||
GLAPI void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
GLAPI void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
|
GLAPI void glBindBuffer(GLenum target, GLuint buffer);
|
||||||
|
GLAPI void glBufferData(GLenum target, GLsizeiptr size, void const* data, GLenum usage);
|
||||||
|
GLAPI void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void const* data);
|
||||||
|
GLAPI void glDeleteBuffers(GLsizei n, GLuint const* buffers);
|
||||||
|
GLAPI void glGenBuffers(GLsizei n, GLuint* buffers);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,9 +28,11 @@ typedef unsigned char GLboolean;
|
||||||
typedef short GLshort;
|
typedef short GLshort;
|
||||||
typedef unsigned short GLushort;
|
typedef unsigned short GLushort;
|
||||||
typedef int GLint;
|
typedef int GLint;
|
||||||
|
typedef long GLintptr;
|
||||||
typedef unsigned int GLuint;
|
typedef unsigned int GLuint;
|
||||||
typedef int GLfixed;
|
typedef int GLfixed;
|
||||||
typedef int GLsizei;
|
typedef int GLsizei;
|
||||||
|
typedef unsigned long GLsizeiptr;
|
||||||
typedef void GLvoid;
|
typedef void GLvoid;
|
||||||
typedef float GLfloat;
|
typedef float GLfloat;
|
||||||
typedef double GLclampd;
|
typedef double GLclampd;
|
||||||
|
|
|
@ -67,6 +67,11 @@ void glBegin(GLenum mode)
|
||||||
g_gl_context->gl_begin(mode);
|
g_gl_context->gl_begin(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void glBindBuffer(GLenum target, GLuint buffer)
|
||||||
|
{
|
||||||
|
g_gl_context->gl_bind_buffer(target, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
void glBindTexture(GLenum target, GLuint texture)
|
void glBindTexture(GLenum target, GLuint texture)
|
||||||
{
|
{
|
||||||
g_gl_context->gl_bind_texture(target, texture);
|
g_gl_context->gl_bind_texture(target, texture);
|
||||||
|
@ -82,6 +87,16 @@ void glBlendFunc(GLenum sfactor, GLenum dfactor)
|
||||||
return g_gl_context->gl_blend_func(sfactor, dfactor);
|
return g_gl_context->gl_blend_func(sfactor, dfactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void glBufferData(GLenum target, GLsizeiptr size, void const* data, GLenum usage)
|
||||||
|
{
|
||||||
|
g_gl_context->gl_buffer_data(target, size, data, usage);
|
||||||
|
}
|
||||||
|
|
||||||
|
void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void const* data)
|
||||||
|
{
|
||||||
|
g_gl_context->gl_buffer_sub_data(target, offset, size, data);
|
||||||
|
}
|
||||||
|
|
||||||
void glCallList(GLuint list)
|
void glCallList(GLuint list)
|
||||||
{
|
{
|
||||||
return g_gl_context->gl_call_list(list);
|
return g_gl_context->gl_call_list(list);
|
||||||
|
@ -226,6 +241,11 @@ void glCullFace(GLenum mode)
|
||||||
g_gl_context->gl_cull_face(mode);
|
g_gl_context->gl_cull_face(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void glDeleteBuffers(GLsizei n, GLuint const* buffers)
|
||||||
|
{
|
||||||
|
g_gl_context->gl_delete_buffers(n, buffers);
|
||||||
|
}
|
||||||
|
|
||||||
void glDepthFunc(GLenum func)
|
void glDepthFunc(GLenum func)
|
||||||
{
|
{
|
||||||
g_gl_context->gl_depth_func(func);
|
g_gl_context->gl_depth_func(func);
|
||||||
|
@ -384,6 +404,11 @@ void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLd
|
||||||
g_gl_context->gl_frustum(left, right, bottom, top, nearVal, farVal);
|
g_gl_context->gl_frustum(left, right, bottom, top, nearVal, farVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void glGenBuffers(GLsizei n, GLuint* buffers)
|
||||||
|
{
|
||||||
|
g_gl_context->gl_gen_buffers(n, buffers);
|
||||||
|
}
|
||||||
|
|
||||||
GLuint glGenLists(GLsizei range)
|
GLuint glGenLists(GLsizei range)
|
||||||
{
|
{
|
||||||
return g_gl_context->gl_gen_lists(range);
|
return g_gl_context->gl_gen_lists(range);
|
||||||
|
|
|
@ -213,6 +213,11 @@ public:
|
||||||
void gl_array_element(GLint i);
|
void gl_array_element(GLint i);
|
||||||
void gl_copy_tex_sub_image_2d(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
void gl_copy_tex_sub_image_2d(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||||
void gl_point_size(GLfloat size);
|
void gl_point_size(GLfloat size);
|
||||||
|
void gl_bind_buffer(GLenum target, GLuint buffer);
|
||||||
|
void gl_buffer_data(GLenum target, GLsizeiptr size, void const* data, GLenum usage);
|
||||||
|
void gl_buffer_sub_data(GLenum target, GLintptr offset, GLsizeiptr size, void const* data);
|
||||||
|
void gl_delete_buffers(GLsizei n, GLuint const* buffers);
|
||||||
|
void gl_gen_buffers(GLsizei n, GLuint* buffers);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void sync_device_config();
|
void sync_device_config();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue