diff options
author | brianp <brianp> | 2000-02-12 23:09:21 +0000 |
---|---|---|
committer | brianp <brianp> | 2000-02-12 23:09:21 +0000 |
commit | 9232e84c16da284b2ce68e441004df381cec7e91 (patch) | |
tree | 34d9b5a50f95d08bbb27a542bd659dd002d88ad3 /xc/lib/GL/glx/indirect_init.c | |
parent | 40bd68454309639eebe1c2cee60a61f7fcff0520 (diff) |
Merged dispatch-0-0-2
Diffstat (limited to 'xc/lib/GL/glx/indirect_init.c')
-rw-r--r-- | xc/lib/GL/glx/indirect_init.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/xc/lib/GL/glx/indirect_init.c b/xc/lib/GL/glx/indirect_init.c index 99b6994c9..3e1d9f909 100644 --- a/xc/lib/GL/glx/indirect_init.c +++ b/xc/lib/GL/glx/indirect_init.c @@ -29,8 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* * Authors: * Kevin E. Martin <kevin@precisioninsight.com> - * - * $PI: xc/lib/GL/glx/indirect_init.c,v 1.2 1999/04/05 05:24:32 martin Exp $ + * Brian Paul <brian@precisioninsight.com> */ #ifdef GLX_DIRECT_RENDERING @@ -49,21 +48,6 @@ static int NoOp(void) } -/* -** Initialize the given dispatch table to all no-op functions. -*/ -static void InitNoOpAPI(__GLapi *glAPI) -{ - const int entries = sizeof(__GLapi) / sizeof(void *); - int i; - void **dispatch = (void **) glAPI; - - for (i = 0; i < entries; i++) { - dispatch[i] = (void *) NoOp; - } -} - - __GLapi *__glXNewIndirectAPI(void) { __GLapi *glAPI; @@ -72,7 +56,13 @@ __GLapi *__glXNewIndirectAPI(void) glAPI = (__GLapi *) Xmalloc(entries * sizeof(void *)); /* first, set all entries to point to no-op functions */ - InitNoOpAPI(glAPI); + { + int i; + void **dispatch = (void **) glAPI; + for (i = 0; i < entries; i++) { + dispatch[i] = (void *) NoOp; + } + } /* now, initialize the entries we understand */ glAPI->Accum = __indirect_glAccum; |