X-Git-Url: http://git.tdb.fi/?p=gldbg.git;a=blobdiff_plain;f=source%2Fglwrap.c;h=0673b5ae106407860c7cfaafcee6b07dc76034f1;hp=0a22c3c1ce4b6677c0bb66cdb10d559294fbe160;hb=7c57338619688bc07f394ad82f75471aefbecc59;hpb=6475e8951e1901b247f5d1d1dd9fcfc1e77e163a diff --git a/source/glwrap.c b/source/glwrap.c index 0a22c3c..0673b5a 100644 --- a/source/glwrap.c +++ b/source/glwrap.c @@ -262,13 +262,21 @@ GLenum APIENTRY glGetError() { GLenum ret = cur_error; cur_error = GL_NO_ERROR; + begin_packet(FUNC_GLGETERROR); + write_int(ret); + send_packet(); return ret; } void (*glXGetProcAddress(const GLubyte *procname))(void) { void *handle = dlopen(NULL, RTLD_LAZY); - return dlsym(handle, (const char *)procname); + void (*ret)() = dlsym(handle, (const char *)procname); + begin_packet(FUNC_GLXGETPROCADDRESS); + write_pointer(ret); + write_string(procname); + send_packet(); + return ret; } void (*glXGetProcAddressARB(const GLubyte *))(void) __attribute__((alias("glXGetProcAddress")));