# Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import apiutil
print """
/* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED BY server_dispatch.py SCRIPT */
#include "cr_spu.h"
#include "chromium.h"
#include "cr_error.h"
#include "server_dispatch.h"
#include "server.h"
#include "cr_unpack.h"
CRCurrentStatePointers crServerCurrent;
"""
continue
if wrap:
print '#if defined(CR_%s)' % wrap
print 'void SERVER_DISPATCH_APIENTRY crServerDispatch%s( %s )' % ( func_name, apiutil.MakeDeclarationString( params ) )
print '{'
print '\tcr_server.head_spu->dispatch_table.%s( %s );' % (func_name, apiutil.MakeCallString( params ) )
print '}'
if wrap:
print '#endif'
if m :
if m :
if m :
if m :
if m :
if m :
if m :
# Vertex attribute commands w/ some special cases
if m :
if func_name == "VertexAttrib4NubARB":
if current:
print 'void SERVER_DISPATCH_APIENTRY crServerDispatch%s( %s )' % ( func_name, apiutil.MakeDeclarationString(params) )
print '{'
print '\t%s' % (condition)
print '\t{'
print '\t\tcr_server.head_spu->dispatch_table.%s( %s );' % (func_name, apiutil.MakeCallString(params) )
print '\t}'
print '}\n'
print """
void crServerInitDispatch(void)
{
crSPUInitDispatchTable( &(cr_server.dispatch) );
crSPUCopyDispatchTable( &(cr_server.dispatch), &(cr_server.head_spu->dispatch_table ) );
"""
if wrap:
print '#if defined(CR_%s)' % wrap
if wrap:
print '#endif'
print '}'