X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglwrap.c;fp=source%2Fglwrap.c;h=59bf1fb12cedc3333a77abf1e1a044edf26edc22;hb=be68706254c62406d4924fffa7f43d2b1c17f52e;hp=38f5e274e72d07d9fc9d1d50faf502cb53498c98;hpb=0cdc7b50b0e7758a1660c94be664a810504a88f4;p=gldbg.git diff --git a/source/glwrap.c b/source/glwrap.c index 38f5e27..59bf1fb 100644 --- a/source/glwrap.c +++ b/source/glwrap.c @@ -116,7 +116,7 @@ static inline void write_data(const void *data, unsigned size) static inline void write_string(const unsigned char *s) { - write_data(s, strlen(s)); + write_data(s, strlen(s)+1); } static inline void begin_packet(int func) @@ -237,4 +237,12 @@ static inline int mapsize(GLenum target) return 1; } +void (*glXGetProcAddress(const GLubyte *procname))(void) +{ + void *handle = dlopen(NULL, RTLD_LAZY); + return dlsym(handle, (const char *)procname); +} + +void (*glXGetProcAddressARB(const GLubyte *))(void) __attribute__((alias("glXGetProcAddress"))); + #include "glwrap.funcs"