pack_currentheader.py revision fcded3b75bf930c68355adc3e3757e35e9cabde4
# Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
# This script generates the include/state/cr_currentpointers.h file.
import sys
import apiutil
from pack_currenttypes import *
print """
/* DO NOT EDIT - THIS FILE GENERATED BY THE pack_currentheader.py SCRIPT */
#ifndef CR_CURRENT_H
#define CR_CURRENT_H
#include "state/cr_limits.h"
"""
for k in current_fns.keys():
print "typedef struct {"
else:
print "\tconst unsigned char *ptr;"
else:
print "} GL%s_p;\n" % name
print "typedef struct attrs {"
for k in current_fns.keys():
print " } CRCurrentStateAttr;"
print "typedef struct {"
print """
CRCurrentStateAttr c;
unsigned char *vtx_op;
unsigned char *vtx_data;
unsigned char *begin_op;
unsigned char *begin_data;
unsigned int vtx_count;
unsigned int vtx_max;
unsigned int vtx_count_begin;
unsigned int attribsUsedMask;
unsigned int changedVertexAttrib;
} CRCurrentStatePointers;
#endif /* CR_CURRENT_H */
"""