e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Copyright (c) 2001, Stanford University
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# All rights reserved.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# See the file LICENSE.txt for information on redistributing this software.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# This script generates the include/state/cr_currentpointers.h file.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncimport sys
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncsys.path.append( "../glapi_parser" )
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncimport apiutil
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncfrom pack_currenttypes import *
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncapiutil.CopyrightC()
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncprint """
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync/* DO NOT EDIT - THIS FILE GENERATED BY THE pack_currentheader.py SCRIPT */
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#ifndef CR_CURRENT_H
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#define CR_CURRENT_H
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#include "state/cr_limits.h"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync"""
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncfor k in current_fns.keys():
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync name = k.lower();
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync print "typedef struct {"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync if current_fns[k].has_key( 'array' ):
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync print "\tconst unsigned char *ptr[%s];" % current_fns[k]['array']
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync else:
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync print "\tconst unsigned char *ptr;"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync for type in current_fns[k]['types']:
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync for size in current_fns[k]['sizes']:
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync if current_fns[k].has_key( 'array' ):
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync print "\tconst unsigned char *%s%d[%s];" % (type, size, current_fns[k]['array'])
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync else:
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync print "\tconst unsigned char *%s%d;" % (type, size)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync print "} GL%s_p;\n" % name
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncprint "typedef struct attrs {"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncfor k in current_fns.keys():
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync name = k.lower()
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync field = '%s%s' % (k[:1].lower(),k[1:])
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync print "\tGL%s_p %s;" % (name,field)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncprint " } CRCurrentStateAttr;"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncprint "typedef struct {"
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncprint """
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync CRCurrentStateAttr c;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync unsigned char *vtx_op;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync unsigned char *vtx_data;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync unsigned char *begin_op;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync unsigned char *begin_data;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync unsigned int vtx_count;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync unsigned int vtx_max;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync unsigned int vtx_count_begin;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync unsigned int attribsUsedMask;
fcded3b75bf930c68355adc3e3757e35e9cabde4vboxsync unsigned int changedVertexAttrib;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync} CRCurrentStatePointers;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync#endif /* CR_CURRENT_H */
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync"""