mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 04:21:51 +00:00
[gl_stub] Make some gen functions generate indices
This makes gl_stub usable with valgrind (otherwise, the returned indices are uninitialized).
This commit is contained in:
parent
9193a92a81
commit
e2640d51a7
2 changed files with 28 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/keysym.h>
|
||||
|
@ -230,16 +232,19 @@ norm_glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderb
|
|||
void
|
||||
norm_glGenBuffers (GLsizei n, GLuint* buffers)
|
||||
{
|
||||
memset (buffers, 0, n * sizeof (GLuint));
|
||||
}
|
||||
|
||||
void
|
||||
norm_glGenFramebuffers (GLsizei n, GLuint* framebuffers)
|
||||
{
|
||||
memset (framebuffers, 0, n * sizeof (GLuint));
|
||||
}
|
||||
|
||||
void
|
||||
norm_glGenRenderbuffers (GLsizei n, GLuint* renderbuffers)
|
||||
{
|
||||
memset (renderbuffers, 0, n * sizeof (GLuint));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -281,11 +286,15 @@ norm_glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GL
|
|||
void
|
||||
norm_glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
|
||||
{
|
||||
if (bufsize > 0) {
|
||||
*infolog = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
norm_glGetProgramiv (GLuint program, GLenum pname, GLint* params)
|
||||
{
|
||||
*params = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -296,6 +305,9 @@ norm_glGetRenderbufferParameteriv (GLuint shader, GLenum pname, GLint* params)
|
|||
void
|
||||
norm_glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
|
||||
{
|
||||
if (bufsize > 0) {
|
||||
*infolog = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -311,6 +323,7 @@ norm_glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar*
|
|||
void
|
||||
norm_glGetShaderiv (GLuint shader, GLenum pname, GLint* params)
|
||||
{
|
||||
*params = 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1111,6 +1124,7 @@ norm_glGenLists (GLsizei range)
|
|||
void
|
||||
norm_glGenTextures (GLsizei n, GLuint * textures)
|
||||
{
|
||||
memset (textures, 0, n * sizeof (GLuint));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include <string.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/keysym.h>
|
||||
|
@ -260,18 +262,21 @@ void
|
|||
trace_glGenBuffers (GLsizei n, GLuint* buffers)
|
||||
{
|
||||
TRACE;
|
||||
memset (buffers, 0, n * sizeof (GLuint));
|
||||
}
|
||||
|
||||
void
|
||||
trace_glGenFramebuffers (GLsizei n, GLuint* framebuffers)
|
||||
{
|
||||
TRACE;
|
||||
memset (framebuffers, 0, n * sizeof (GLuint));
|
||||
}
|
||||
|
||||
void
|
||||
trace_glGenRenderbuffers (GLsizei n, GLuint* renderbuffers)
|
||||
{
|
||||
TRACE;
|
||||
memset (renderbuffers, 0, n * sizeof (GLuint));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -321,12 +326,16 @@ void
|
|||
trace_glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
|
||||
{
|
||||
TRACE;
|
||||
if (bufsize > 0) {
|
||||
*infolog = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
trace_glGetProgramiv (GLuint program, GLenum pname, GLint* params)
|
||||
{
|
||||
TRACE;
|
||||
*params = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -339,6 +348,9 @@ void
|
|||
trace_glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
|
||||
{
|
||||
TRACE;
|
||||
if (bufsize > 0) {
|
||||
*infolog = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -357,6 +369,7 @@ void
|
|||
trace_glGetShaderiv (GLuint shader, GLenum pname, GLint* params)
|
||||
{
|
||||
TRACE;
|
||||
*params = 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1312,6 +1325,7 @@ void
|
|||
trace_glGenTextures (GLsizei n, GLuint * textures)
|
||||
{
|
||||
TRACE;
|
||||
memset (textures, 0, n * sizeof (GLuint));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue