Skip to content

Commit

Permalink
Use format where appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
skaslev committed Jul 11, 2017
1 parent 90a59c7 commit ffe6e6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gl3w_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def proc_t(proc):
return {
'p': proc,
'p_s': proc[2:],
'p_t': 'PFN' + proc.upper() + 'PROC'
'p_t': 'PFN{0}PROC'.format(proc.upper())
}

def write(f, s):
Expand All @@ -100,12 +100,12 @@ def write(f, s):

# Download glcorearb.h
if not os.path.exists(os.path.join(args.root, 'include/GL/glcorearb.h')):
print('Downloading glcorearb.h to ' + os.path.join(args.root, 'include/GL/glcorearb.h'))
print('Downloading glcorearb.h to {0}...'.format(os.path.join(args.root, 'include/GL/glcorearb.h')))
web = urllib2.urlopen('http://www.opengl.org/registry/api/GL/glcorearb.h')
with open(os.path.join(args.root, 'include/GL/glcorearb.h'), 'wb') as f:
f.writelines(web.readlines())
else:
print('Reusing glcorearb.h from ' + os.path.join(args.root, 'include/GL') + '...')
print('Reusing glcorearb.h from {0}...'.format(os.path.join(args.root, 'include/GL')))

# Parse function names from glcorearb.h
print('Parsing glcorearb.h header...')
Expand Down

0 comments on commit ffe6e6c

Please sign in to comment.