Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: mikeboers/0x10c-toolkit
base: 3ebee0e762
...
head fork: mikeboers/0x10c-toolkit
compare: 69f6cb0891
Checking mergeability… Don't worry, you can still create the pull request.
  • 18 commits
  • 39 files changed
  • 0 commit comments
  • 1 contributor
Showing with 2,450 additions and 472 deletions.
  1. +1 −0  .gitignore
  2. +24 −0 LICENSE.txt
  3. +17 −0 Makefile
  4. +0 −111 README.md
  5. +110 −0 TODO.md
  6. 0  dcpu16/__init__.py
  7. +123 −93 { → dcpu16}/asm.py
  8. +1,515 −0 dcpu16/c_opengl.pxd
  9. 0  { → dcpu16}/cpu.pxd
  10. +3 −1 { → dcpu16}/cpu.pyx
  11. +7 −2 { → dcpu16}/dis.py
  12. +39 −28 { → dcpu16}/link.py
  13. 0  { → dcpu16}/macros.pyi
  14. 0  { → dcpu16}/mygl.py
  15. 0  { → dcpu16}/ops.pxd
  16. 0  { → dcpu16}/ops.pyx
  17. +206 −0 dcpu16/run.pyx
  18. +39 −0 dcpu16/utils.py
  19. 0  { → dcpu16}/values.pxd
  20. +4 −2 { → dcpu16}/values.pyx
  21. +31 −0 examples/color_chart.dasm16
  22. +26 −0 examples/cycle.dasm16
  23. +8 −5 fib.asm → examples/fib.dasm16
  24. +36 −36 alloc.asm → examples/malloc.dasm16
  25. +21 −0 examples/print.dasm16
  26. 0  sample.asm → examples/sample.dasm16
  27. 0  sample.hex → examples/sample.dhex16
  28. BIN  font.png
  29. +0 −18 print.asm
  30. +0 −117 run.py
  31. +2 −2 setup.cfg
  32. +30 −4 setup.py
  33. +142 −0 spec/v1.1.txt
  34. +15 −11 tests/__init__.py
  35. +22 −10 tests/test_asm.py
  36. +21 −12 tests/test_linker.py
  37. +5 −10 tests/test_ops.py
  38. +2 −6 tests/test_sample.py
  39. +1 −4 tests/test_values.py
View
1  .gitignore
@@ -8,3 +8,4 @@ man
build
*.so
*.c
+*.egg-info
View
24 LICENSE.txt
@@ -0,0 +1,24 @@
+Copyright (c) 2012, Mike Boers
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the <organization> nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
17 Makefile
@@ -0,0 +1,17 @@
+
+.PHONY: default build clean test
+
+default: build
+
+build:
+ python setup.py build_ext --inplace
+
+clean:
+ rm -rf build
+ rm dcpu16/*.{c,so}
+
+color: build
+ run examples/color_chart.dasm16
+
+test: build
+ nosetests
View
111 README.md
@@ -4,115 +4,4 @@ This repo contains my tools for experimenting with [the DCPU-16 spec](http://0x1
## TODO
-- pull in examples from https://github.com/jtauber/DCPU-16-Examples
-- look for more TODOs http://dwilliamson.github.com/
-- https://github.com/noname22/dtools/
-
-√ disassembler script
-√ running script
-√ assembling script
-√ linking script
-
-- incorperate normal assembler syntax
- - appears to be intel/MASM/NASM syntax
- - see:
- - http://en.wikipedia.org/wiki/X86_assembly_language#Syntax
- - http://en.wikibooks.org/wiki/X86_Assembly/FASM_Syntax
-
- - FASM:
- - anonymous labels (@@, @f, @b)
- - global vs local labels (starting with period)
- global:
- .local:
-
- can reference like "global.local"
- - macro <name> <parameters> { code }
-
- - NASM:
- - %define newline 0xA
- - %define func(a, b) ((a) * (b) + 2)
-
- - GAS:
- - comments can start with any of #!;@|
-
-- assembler
- √ assemble into object files
- √ do not resolve symbols; output them into comments in the object files
- ; Global-Symbols: start=0x0
- ; Local-Symbols: loop=0x1234
- ; Symbol-References: loop=0x1500
- - how do deal with short labels?
- It may not be all that important to deal with, as it only really
- benifits jumps to the first 0x1f words of code.
-
-- linker
- √ link assembled object files and resolve all labels/symbols
- - add final symbol addr into the words that are placeholders for it,
- which will allow us to have positive offsets from them
- x if an object has start at the beginning, put it first, otherwise throw
- in a `set PC, start`. Not going to do this as one can easily add a stub
- file as the first argument to the linker which contains: `set PC, start`
- - consider adding special global symbols:
- - __HEAP__ would point to the first word after the end of memory
- - __KEYBOARD__ to the keyboard buffer
- - __VIDEO__ to the video screen
-
-- C compiler
-
-- optimize
- - easly binding Cython everywhere
-
-- move modules into a package
-
-- consider adding label offsets to registers: [A + data]
- This would be handy if we are iterating across some words located at `data`.
- Would be handy if we could swap out nearly any number for a label.
-
-√ abstract offsets to a sequence of numbers, labels, and registers, where you
- can have upto 1 register and up to 1 label, and everything else is determined at link time
- - no really special treatment needed from the linker: symbols are added on
- top of hard-coded offsets
- - all cases:
- √ [A + label]
- √ [A + label + 1]
- √ [label]
- √ [label + 1]
- √ label
- √ label + 1
-
-- be able to have negative labels and offsets, in addition to multiple labels
- set A, two - one
- - negative offsets are taken %2^16
-
-- start utils module
- - hex stream normalizer
- - comment stripping normalizer
- - value parsing?
-
-- convert scripts into setuptools entrypoints
-
-- alloc.asm has a bug: unallocated blocks of length 0 encode to 0, which flags
- the start of fresh heap. Headers should track the length to the next header
- (what it does now, but +1).
-
-- assembler directives:
- √ .GLOBAL start
-
-- entrypoints
- - all equal SECTIONS get assembled next to each other
- .SECTION startup_function
- - or a way to have a location in memory be a null terminated list of start of section addresses
- startup_functions: DAT start_*, 0 (pattern matching labels)
-
-- assembly for debugging
- PRX (print hex) addr, num
- PRC (print chars) addr, num
- PRS (print string), addr
- PRD (print decimal)
- BRK
- kill the emulator; could just be a `DAT 0`
-
- put these all the end of the reserved special opcode space
-
-- cycle costs
View
110 TODO.md
@@ -0,0 +1,110 @@
+- pull in examples from https://github.com/jtauber/DCPU-16-Examples
+- look for more TODOs http://dwilliamson.github.com/
+- https://github.com/noname22/dtools/
+- http://pastie.org/pastes/3772655/text?key=xw0dmiwx5khzoagoemyww
+- http://0x10cwiki.com/wiki/DCPU-16#cite_note-leakspec-1
+
+- incorperate normal assembler syntax
+ - appears to be intel/MASM/NASM syntax
+ - see:
+ - http://en.wikipedia.org/wiki/X86_assembly_language#Syntax
+ - http://en.wikibooks.org/wiki/X86_Assembly/FASM_Syntax
+
+ - FASM:
+ - anonymous labels (@@, @f, @b)
+ - global vs local labels (starting with period)
+ global:
+ .local:
+
+ can reference like "global.local"
+ - macro <name> <parameters> { code }
+
+ - NASM:
+ - %define newline 0xA
+ - %define func(a, b) ((a) * (b) + 2)
+
+ - GAS:
+ - comments can start with any of #!;@|
+
+- move font.png into some resource directory and make sure setup.py includes it
+
+- how do deal with short labels?
+ It may not be all that important to deal with, as it only really
+ benifits jumps to the first 0x1f words of code.
+
+- optimize
+ - easly binding Cython everywhere
+
+- be able to have negative labels and offsets, in addition to multiple labels
+ set A, two - one
+ - negative offsets are taken %2^16
+
+- start utils module
+ - hex stream normalizer
+ - comment stripping normalizer
+ - value parsing?
+
+- alloc.asm has a bug: unallocated blocks of length 0 encode to 0, which flags
+ the start of fresh heap. Headers should track the length to the next header
+ (what it does now, but +1).
+ - free should assume it was given the first word
+ - xfree does not
+
+- assembler directives:
+ .macro name -> .mend
+ .fill count value
+ .zero count
+
+- entrypoints
+ - all equal SECTIONS get assembled next to each other
+ .SECTION startup_function
+ - or a way to have a location in memory be a null terminated list of start of section addresses
+ startup_functions: DAT start_*, 0 (pattern matching labels)
+
+- assembly for debugging
+ PRX (print hex) addr, num
+ PRC (print chars) addr, num
+ PRS (print string), addr
+ PRD (print decimal)
+ BRK
+ kill the emulator; could just be a `DAT 0`
+
+ put these all the end of the reserved special opcode space
+
+- cycle costs
+
+- fix compiling for linux
+
+- runner should support multiple CPUs networked together
+
+- GUI in TK, WX, or QT
+ - manually edit memory
+ - manually edit registers
+ - single step
+ - PC highlighting in memory
+
+- start a BASIC-like compiler
+- start a C-like compiler
+ - use http://code.google.com/p/pycparser/
+ - uchar/ushort are both unsigned words
+ - uint, ulong are 32/64 bits long
+ - local variables at the top of functions and control blocks
+
+- .define CONSTANT value
+ - predefined VIDEO, KEYBOARD, RADIO (eventually)
+
+- split run.py into EmulatorApp and CPUWindow so that we may have multiple CPUS
+ running at the same time
+
+- force textmate icon
+
+- make tool to conform syntax to other established convensions
+ - expand all macros and constants
+
+- crypto
+ - http://en.wikipedia.org/wiki/XXTEA
+ - http://en.wikipedia.org/wiki/RC4#Description
+ - http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
+ - http://en.wikipedia.org/wiki/BLAKE_(hash_function)
+ - md5?
+
View
0  dcpu16/__init__.py
No changes.
View
216 asm.py → dcpu16/asm.py
@@ -2,8 +2,8 @@
import re
import ast
-import ops
-import values
+from . import ops
+from . import values
@@ -54,6 +54,10 @@ def __init__(self):
self.global_symbols = []
self.local_symbols = []
self.symbol_references = []
+ self.constants = dict(
+ VIDEO='0x8000',
+ KEYBOARD='0x9000',
+ )
def _get_args(self, line):
args = []
@@ -89,73 +93,11 @@ def parse_register(raw):
def match(exp, line, flags=0):
return re.match(r'\s*' + exp + r'\s*(?:,\s*|$)', line, re.I | flags)
- # Literal values.
- m = match(r'(' + NUMBER + ')', line)
- if m:
- return values.Literal(parse_number(m.group(1))), line[m.end(0):]
-
- # Basic registers.
- m = match(r'(' + REGISTER + ')', line)
- if m:
- return values.Register(parse_register(m.group(1))), line[m.end(0):]
-
- # Indirect registers and labels with offsets.
- m = match(r'\[([^\]]+)\]', line)
- if m:
-
- reg = None
- label = None
- offset = 0
-
- for chunk in m.group(1).split('+'):
- chunk = chunk.strip()
-
- try:
- offset += parse_number(chunk)
- except ValueError:
- pass
- else:
- continue
-
- try:
- new_reg = parse_register(chunk)
- except ValueError:
- pass
- else:
- if reg:
- raise ValueError('cannot have two registers in indirect value')
- reg = new_reg
- continue
-
- if not re.match(r'^\w+$', chunk):
- raise ValueError('cannot identity chunk in indirect value: %r' % chunk)
- if label:
- raise ValueError('cannot have two labels in indirect value')
- label = chunk
-
- # print 'reg', reg, 'label', repr(label), 'offset', offset
-
- if reg is not None:
- return values.Register(reg, indirect=True, offset=offset, label=label), line[m.end(0):]
- elif label:
- return values.Label(label, indirect=True, offset=offset), line[m.end(0):]
- else:
- return values.Indirect(offset), line[m.end(0):]
-
# Stack values.
m = match(r'(POP|PEEK|PUSH)', line)
if m:
- return values.Stack(dict(POP=0, PEEK=1, PUSH=2)[m.group(1)]), line[m.end(0):]
-
- # Basic (and offset) labels.
- m = match(r'(?:(' + NUMBER + ')\s*\+\s*)?' +
- r'(\w+)' +
- r'(?:\s*\+\s*(' + NUMBER + '))?', line)
- if m:
- pre, label, post = m.groups()
- offset = parse_number(pre or '0') + parse_number(post or '0')
- return values.Label(label, indirect=False, offset=offset), line[m.end(0):]
-
+ return values.Stack(dict(POP=0, PEEK=1, PUSH=2)[m.group(1).upper()]), line[m.end(0):]
+
# Character literals.
m = match(r"('[^']*?')", line)
if m:
@@ -169,28 +111,102 @@ def match(exp, line, flags=0):
if m:
value = ast.literal_eval(m.group(1))
return StringValue(value), line[m.end(0):]
-
- raise ValueError('could not extract values from %r' % line)
+
+
+ # Below here handles registers (with offsets), labels, and literals.
+
+
+ # Extract indirect sequences.
+ m = match(r'\[([^\]]+)\]', line)
+ if m:
+ indirect = True
+ this_value = m.group(1)
+ line = line[m.end(0):]
+
+ # Extract non-indirect sequences.
+ else:
+ indirect = False
+ line_chunks = line.split(',', 1)
+ if len(line_chunks) == 2:
+ this_value, line = line_chunks
+ else:
+ this_value = line_chunks[0]
+ line = ''
+
+ reg = None
+ label = None
+ offset = 0
+
+ chunks = re.split(r'(\+|-)', this_value)
+ for i in range(0, len(chunks), 2):
+ if not i:
+ operation = '+'
+ else:
+ operation = chunks[i-1]
+ chunk = chunks[i].strip()
+
+ # Lookup constants.
+ chunk = self.constants.get(chunk, chunk)
+
+ try:
+ if operation == '+':
+ offset += parse_number(chunk)
+ else:
+ offset -= parse_number(chunk)
+ except ValueError:
+ pass
+ else:
+ continue
+
+ try:
+ new_reg = parse_register(chunk)
+ except ValueError:
+ pass
+ else:
+ if reg:
+ raise ValueError('cannot have two registers in value %r' % this_value)
+ if operation != '+':
+ raise ValueError('cannot use operator %r on registers in value %r' % (operation, this_value))
+ reg = new_reg
+ continue
+
+ if not re.match(r'^\w+$', chunk):
+ raise ValueError('cannot identity chunk %r in value %r' % (chunk, this_value))
+ if label:
+ raise ValueError('cannot have two labels in value %r' % this_value)
+
+ label = chunk
+
+ offset = offset % 0x10000
+
+ if reg is not None:
+ if offset and not indirect:
+ raise ValueError('cannot offset direct register in value %r' % this_value)
+ return values.Register(reg, indirect=indirect, offset=offset, label=label), line
+ elif label:
+ return values.Label(label, indirect=indirect, offset=offset, subtract=operation=='-'), line
+ elif indirect:
+ return values.Indirect(offset), line
+ else:
+ return values.Literal(offset), line
+
+
def load(self, infile):
+ if isinstance(infile, basestring):
+ infile = infile.splitlines()
for line in infile:
self._load_line(line)
-
- def loads(self, source):
- for line in source.splitlines():
- self._load_line(line)
def _load_line(self, line):
# Strip comments.
- line = re.sub(r'[#;].*', '', line).strip()
+ line = re.sub(r';.*', '', line).strip()
- m = re.match(r':\w+|\w+:', line)
+ m = re.match(r':(\w+)', line)
if m:
- label = m.group().strip(':')
- # print '%s:' % label
- self.operations.append(Label(label))
+ self.operations.append(Label(m.group(1)))
line = line[m.end(0):].strip()
if not line:
@@ -223,11 +239,8 @@ def _load_line(self, line):
op = opcls(*args)
self.operations.append(op)
-
- def dump(self, file):
- file.write(self.dumps())
- def dumps(self):
+ def assemble(self):
raw_code = []
@@ -246,25 +259,38 @@ def dumps(self):
code = []
for x in raw_code:
if isinstance(x, values.Label):
- self.symbol_references.append((x.label, len(code)))
+ self.symbol_references.append((x.label, x.subtract, len(code)))
code.append(x.offset)
elif isinstance(x, int):
code.append(x)
else:
raise TypeError('cannot assemble code object %r' % x)
+
+
out = []
- for header_name, header_value in [
- ('Global-Symbols', self.global_symbols),
- ('Local-Symbols', self.local_symbols),
- ('Symbol-References', self.symbol_references),
- ]:
- if header_value:
- out.append('; %s:' % header_name)
- for i, (sym, loc) in enumerate(header_value):
+
+ def format_symbol_defs(values):
+ if values:
+ for i, (sym, loc) in enumerate(values):
out.append(', ' if i else ' ')
out.append('%s=0x%04x' % (sym, loc))
out.append('\n')
+ def format_symbol_refs(values):
+ if values:
+ for i, (sym, sub, loc) in enumerate(values):
+ out.append(', ' if i else ' ')
+ out.append('0x%04x%s%s' % (loc, '-' if sub else '+', sym))
+ out.append('\n')
+
+ for header_name, header_value, formatter in [
+ ('Global-Symbols', self.global_symbols, format_symbol_defs),
+ ('Local-Symbols', self.local_symbols, format_symbol_defs),
+ ('Symbol-References', self.symbol_references, format_symbol_refs),
+ ]:
+ if header_value:
+ out.append('; %s:' % header_name)
+ formatter(header_value)
for i, x in enumerate(code):
if i % 8 == 0:
@@ -278,8 +304,7 @@ def dumps(self):
return ''.join(out)
-
-if __name__ == '__main__':
+def main():
if len(sys.argv) == 1:
infile = sys.stdin
@@ -290,5 +315,10 @@ def dumps(self):
asm = Assembler()
asm.load(infile)
- print asm.dumps()
+ print asm.assemble()
+
+
+if __name__ == '__main__':
+ main()
+
View
1,515 dcpu16/c_opengl.pxd
@@ -0,0 +1,1515 @@
+# -*- indent-tabs-mode: t -*-
+
+# Soya 3D
+# Copyright (C) 2003-2004 Jean-Baptiste LAMY -- jiba@tuxfamily.org
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ctypedef void (*_GLUfuncptr)()
+
+cdef extern from "GLUT/glut.h":
+ ctypedef unsigned int GLenum
+ ctypedef unsigned char GLboolean
+ ctypedef unsigned int GLbitfield
+ ctypedef void GLvoid
+ ctypedef signed char GLbyte
+ ctypedef short GLshort
+ ctypedef int GLint
+ ctypedef unsigned char GLubyte
+ ctypedef unsigned short GLushort
+ ctypedef unsigned int GLuint
+ ctypedef int GLsizei
+ ctypedef float GLfloat
+ ctypedef float GLclampf
+ ctypedef double GLdouble
+ ctypedef double GLclampd
+ ctypedef char GLchar
+ ctypedef unsigned int GLhandleARB
+
+ int GL_FALSE
+ int GL_TRUE
+ int GL_BYTE
+ int GL_UNSIGNED_BYTE
+ int GL_SHORT
+ int GL_UNSIGNED_SHORT
+ int GL_INT
+ int GL_UNSIGNED_INT
+ int GL_FLOAT
+ int GL_DOUBLE
+ int GL_2_BYTES
+ int GL_3_BYTES
+ int GL_4_BYTES
+ int GL_POINTS
+ int GL_LINES
+ int GL_LINE_LOOP
+ int GL_LINE_STRIP
+ int GL_TRIANGLES
+ int GL_TRIANGLE_STRIP
+ int GL_TRIANGLE_FAN
+ int GL_QUADS
+ int GL_QUAD_STRIP
+ int GL_POLYGON
+ int GL_VERTEX_ARRAY
+ int GL_NORMAL_ARRAY
+ int GL_COLOR_ARRAY
+ int GL_INDEX_ARRAY
+ int GL_TEXTURE_COORD_ARRAY
+ int GL_EDGE_FLAG_ARRAY
+ int GL_VERTEX_ARRAY_SIZE
+ int GL_VERTEX_ARRAY_TYPE
+ int GL_VERTEX_ARRAY_STRIDE
+ int GL_NORMAL_ARRAY_TYPE
+ int GL_NORMAL_ARRAY_STRIDE
+ int GL_COLOR_ARRAY_SIZE
+ int GL_COLOR_ARRAY_TYPE
+ int GL_COLOR_ARRAY_STRIDE
+ int GL_INDEX_ARRAY_TYPE
+ int GL_INDEX_ARRAY_STRIDE
+ int GL_TEXTURE_COORD_ARRAY_SIZE
+ int GL_TEXTURE_COORD_ARRAY_TYPE
+ int GL_TEXTURE_COORD_ARRAY_STRIDE
+ int GL_EDGE_FLAG_ARRAY_STRIDE
+ int GL_VERTEX_ARRAY_POINTER
+ int GL_NORMAL_ARRAY_POINTER
+ int GL_COLOR_ARRAY_POINTER
+ int GL_INDEX_ARRAY_POINTER
+ int GL_TEXTURE_COORD_ARRAY_POINTER
+ int GL_EDGE_FLAG_ARRAY_POINTER
+ int GL_V2F
+ int GL_V3F
+ int GL_C4UB_V2F
+ int GL_C4UB_V3F
+ int GL_C3F_V3F
+ int GL_N3F_V3F
+ int GL_C4F_N3F_V3F
+ int GL_T2F_V3F
+ int GL_T4F_V4F
+ int GL_T2F_C4UB_V3F
+ int GL_T2F_C3F_V3F
+ int GL_T2F_N3F_V3F
+ int GL_T2F_C4F_N3F_V3F
+ int GL_T4F_C4F_N3F_V4F
+ int GL_MATRIX_MODE
+ int GL_MODELVIEW
+ int GL_PROJECTION
+ int GL_TEXTURE
+ int GL_POINT_SMOOTH
+ int GL_POINT_SIZE
+ int GL_POINT_SIZE_GRANULARITY
+ int GL_POINT_SIZE_RANGE
+ int GL_LINE_SMOOTH
+ int GL_LINE_STIPPLE
+ int GL_LINE_STIPPLE_PATTERN
+ int GL_LINE_STIPPLE_REPEAT
+ int GL_LINE_WIDTH
+ int GL_LINE_WIDTH_GRANULARITY
+ int GL_LINE_WIDTH_RANGE
+ int GL_POINT
+ int GL_LINE
+ int GL_FILL
+ int GL_CW
+ int GL_CCW
+ int GL_FRONT
+ int GL_BACK
+ int GL_POLYGON_MODE
+ int GL_POLYGON_SMOOTH
+ int GL_POLYGON_STIPPLE
+ int GL_EDGE_FLAG
+ int GL_CULL_FACE
+ int GL_CULL_FACE_MODE
+ int GL_FRONT_FACE
+ int GL_POLYGON_OFFSET_FACTOR
+ int GL_POLYGON_OFFSET_UNITS
+ int GL_POLYGON_OFFSET_POINT
+ int GL_POLYGON_OFFSET_LINE
+ int GL_POLYGON_OFFSET_FILL
+ int GL_COMPILE
+ int GL_COMPILE_AND_EXECUTE
+ int GL_LIST_BASE
+ int GL_LIST_INDEX
+ int GL_LIST_MODE
+ int GL_NEVER
+ int GL_LESS
+ int GL_EQUAL
+ int GL_LEQUAL
+ int GL_GREATER
+ int GL_NOTEQUAL
+ int GL_GEQUAL
+ int GL_ALWAYS
+ int GL_DEPTH_TEST
+ int GL_DEPTH_BITS
+ int GL_DEPTH_CLEAR_VALUE
+ int GL_DEPTH_FUNC
+ int GL_DEPTH_RANGE
+ int GL_DEPTH_WRITEMASK
+ int GL_DEPTH_COMPONENT
+ int GL_LIGHTING
+ int GL_LIGHT0
+ int GL_LIGHT1
+ int GL_LIGHT2
+ int GL_LIGHT3
+ int GL_LIGHT4
+ int GL_LIGHT5
+ int GL_LIGHT6
+ int GL_LIGHT7
+ int GL_SPOT_EXPONENT
+ int GL_SPOT_CUTOFF
+ int GL_CONSTANT_ATTENUATION
+ int GL_LINEAR_ATTENUATION
+ int GL_QUADRATIC_ATTENUATION
+ int GL_AMBIENT
+ int GL_DIFFUSE
+ int GL_SPECULAR
+ int GL_SHININESS
+ int GL_EMISSION
+ int GL_POSITION
+ int GL_SPOT_DIRECTION
+ int GL_AMBIENT_AND_DIFFUSE
+ int GL_COLOR_INDEXES
+ int GL_LIGHT_MODEL_TWO_SIDE
+ int GL_LIGHT_MODEL_LOCAL_VIEWER
+ int GL_LIGHT_MODEL_AMBIENT
+ int GL_FRONT_AND_BACK
+ int GL_SHADE_MODEL
+ int GL_FLAT
+ int GL_SMOOTH
+ int GL_COLOR_MATERIAL
+ int GL_COLOR_MATERIAL_FACE
+ int GL_COLOR_MATERIAL_PARAMETER
+ int GL_NORMALIZE
+ int GL_CLIP_PLANE0
+ int GL_CLIP_PLANE1
+ int GL_CLIP_PLANE2
+ int GL_CLIP_PLANE3
+ int GL_CLIP_PLANE4
+ int GL_CLIP_PLANE5
+ int GL_ACCUM_RED_BITS
+ int GL_ACCUM_GREEN_BITS
+ int GL_ACCUM_BLUE_BITS
+ int GL_ACCUM_ALPHA_BITS
+ int GL_ACCUM_CLEAR_VALUE
+ int GL_ACCUM
+ int GL_ADD
+ int GL_LOAD
+ int GL_MULT
+ int GL_RETURN
+ int GL_ALPHA_TEST
+ int GL_ALPHA_TEST_REF
+ int GL_ALPHA_TEST_FUNC
+ int GL_BLEND
+ int GL_BLEND_SRC
+ int GL_BLEND_DST
+ int GL_ZERO
+ int GL_ONE
+ int GL_SRC_COLOR
+ int GL_ONE_MINUS_SRC_COLOR
+ int GL_SRC_ALPHA
+ int GL_ONE_MINUS_SRC_ALPHA
+ int GL_DST_ALPHA
+ int GL_ONE_MINUS_DST_ALPHA
+ int GL_DST_COLOR
+ int GL_ONE_MINUS_DST_COLOR
+ int GL_SRC_ALPHA_SATURATE
+ int GL_CONSTANT_COLOR
+ int GL_ONE_MINUS_CONSTANT_COLOR
+ int GL_CONSTANT_ALPHA
+ int GL_ONE_MINUS_CONSTANT_ALPHA
+ int GL_FEEDBACK
+ int GL_RENDER
+ int GL_SELECT
+ int GL_2D
+ int GL_3D
+ int GL_3D_COLOR
+ int GL_3D_COLOR_TEXTURE
+ int GL_4D_COLOR_TEXTURE
+ int GL_POINT_TOKEN
+ int GL_LINE_TOKEN
+ int GL_LINE_RESET_TOKEN
+ int GL_POLYGON_TOKEN
+ int GL_BITMAP_TOKEN
+ int GL_DRAW_PIXEL_TOKEN
+ int GL_COPY_PIXEL_TOKEN
+ int GL_PASS_THROUGH_TOKEN
+ int GL_FEEDBACK_BUFFER_POINTER
+ int GL_FEEDBACK_BUFFER_SIZE
+ int GL_FEEDBACK_BUFFER_TYPE
+ int GL_SELECTION_BUFFER_POINTER
+ int GL_SELECTION_BUFFER_SIZE
+ int GL_FOG
+ int GL_FOG_MODE
+ int GL_FOG_DENSITY
+ int GL_FOG_COLOR
+ int GL_FOG_INDEX
+ int GL_FOG_START
+ int GL_FOG_END
+ int GL_LINEAR
+ int GL_EXP
+ int GL_EXP2
+ int GL_LOGIC_OP
+ int GL_INDEX_LOGIC_OP
+ int GL_COLOR_LOGIC_OP
+ int GL_LOGIC_OP_MODE
+ int GL_CLEAR
+ int GL_SET
+ int GL_COPY
+ int GL_COPY_INVERTED
+ int GL_NOOP
+ int GL_INVERT
+ int GL_AND
+ int GL_NAND
+ int GL_OR
+ int GL_NOR
+ int GL_XOR
+ int GL_EQUIV
+ int GL_AND_REVERSE
+ int GL_AND_INVERTED
+ int GL_OR_REVERSE
+ int GL_OR_INVERTED
+ int GL_STENCIL_TEST
+ int GL_STENCIL_WRITEMASK
+ int GL_STENCIL_BITS
+ int GL_STENCIL_FUNC
+ int GL_STENCIL_VALUE_MASK
+ int GL_STENCIL_REF
+ int GL_STENCIL_FAIL
+ int GL_STENCIL_PASS_DEPTH_PASS
+ int GL_STENCIL_PASS_DEPTH_FAIL
+ int GL_STENCIL_CLEAR_VALUE
+ int GL_STENCIL_INDEX
+ int GL_KEEP
+ int GL_REPLACE
+ int GL_INCR
+ int GL_DECR
+ int GL_NONE
+ int GL_LEFT
+ int GL_RIGHT
+ int GL_FRONT_LEFT
+ int GL_FRONT_RIGHT
+ int GL_BACK_LEFT
+ int GL_BACK_RIGHT
+ int GL_AUX0
+ int GL_AUX1
+ int GL_AUX2
+ int GL_AUX3
+ int GL_COLOR_INDEX
+ int GL_RED
+ int GL_GREEN
+ int GL_BLUE
+ int GL_ALPHA
+ int GL_LUMINANCE
+ int GL_LUMINANCE_ALPHA
+ int GL_ALPHA_BITS
+ int GL_RED_BITS
+ int GL_GREEN_BITS
+ int GL_BLUE_BITS
+ int GL_INDEX_BITS
+ int GL_SUBPIXEL_BITS
+ int GL_AUX_BUFFERS
+ int GL_READ_BUFFER
+ int GL_DRAW_BUFFER
+ int GL_DOUBLEBUFFER
+ int GL_STEREO
+ int GL_BITMAP
+ int GL_COLOR
+ int GL_DEPTH
+ int GL_STENCIL
+ int GL_DITHER
+ int GL_RGB
+ int GL_RGBA
+ int GL_MAX_LIST_NESTING
+ int GL_MAX_ATTRIB_STACK_DEPTH
+ int GL_MAX_MODELVIEW_STACK_DEPTH
+ int GL_MAX_NAME_STACK_DEPTH
+ int GL_MAX_PROJECTION_STACK_DEPTH
+ int GL_MAX_TEXTURE_STACK_DEPTH
+ int GL_MAX_EVAL_ORDER
+ int GL_MAX_LIGHTS
+ int GL_MAX_CLIP_PLANES
+ int GL_MAX_TEXTURE_SIZE
+ int GL_MAX_PIXEL_MAP_TABLE
+ int GL_MAX_VIEWPORT_DIMS
+ int GL_MAX_CLIENT_ATTRIB_STACK_DEPTH
+ int GL_ATTRIB_STACK_DEPTH
+ int GL_CLIENT_ATTRIB_STACK_DEPTH
+ int GL_COLOR_CLEAR_VALUE
+ int GL_COLOR_WRITEMASK
+ int GL_CURRENT_INDEX
+ int GL_CURRENT_COLOR
+ int GL_CURRENT_NORMAL
+ int GL_CURRENT_RASTER_COLOR
+ int GL_CURRENT_RASTER_DISTANCE
+ int GL_CURRENT_RASTER_INDEX
+ int GL_CURRENT_RASTER_POSITION
+ int GL_CURRENT_RASTER_TEXTURE_COORDS
+ int GL_CURRENT_RASTER_POSITION_VALID
+ int GL_CURRENT_TEXTURE_COORDS
+ int GL_INDEX_CLEAR_VALUE
+ int GL_INDEX_MODE
+ int GL_INDEX_WRITEMASK
+ int GL_MODELVIEW_MATRIX
+ int GL_MODELVIEW_STACK_DEPTH
+ int GL_NAME_STACK_DEPTH
+ int GL_PROJECTION_MATRIX
+ int GL_PROJECTION_STACK_DEPTH
+ int GL_RENDER_MODE
+ int GL_RGBA_MODE
+ int GL_TEXTURE_MATRIX
+ int GL_TEXTURE_STACK_DEPTH
+ int GL_VIEWPORT
+ int GL_AUTO_NORMAL
+ int GL_MAP1_COLOR_4
+ int GL_MAP1_GRID_DOMAIN
+ int GL_MAP1_GRID_SEGMENTS
+ int GL_MAP1_INDEX
+ int GL_MAP1_NORMAL
+ int GL_MAP1_TEXTURE_COORD_1
+ int GL_MAP1_TEXTURE_COORD_2
+ int GL_MAP1_TEXTURE_COORD_3
+ int GL_MAP1_TEXTURE_COORD_4
+ int GL_MAP1_VERTEX_3
+ int GL_MAP1_VERTEX_4
+ int GL_MAP2_COLOR_4
+ int GL_MAP2_GRID_DOMAIN
+ int GL_MAP2_GRID_SEGMENTS
+ int GL_MAP2_INDEX
+ int GL_MAP2_NORMAL
+ int GL_MAP2_TEXTURE_COORD_1
+ int GL_MAP2_TEXTURE_COORD_2
+ int GL_MAP2_TEXTURE_COORD_3
+ int GL_MAP2_TEXTURE_COORD_4
+ int GL_MAP2_VERTEX_3
+ int GL_MAP2_VERTEX_4
+ int GL_COEFF
+ int GL_DOMAIN
+ int GL_ORDER
+ int GL_FOG_HINT
+ int GL_LINE_SMOOTH_HINT
+ int GL_PERSPECTIVE_CORRECTION_HINT
+ int GL_POINT_SMOOTH_HINT
+ int GL_POLYGON_SMOOTH_HINT
+ int GL_DONT_CARE
+ int GL_FASTEST
+ int GL_NICEST
+ int GL_SCISSOR_TEST
+ int GL_SCISSOR_BOX
+ int GL_MAP_COLOR
+ int GL_MAP_STENCIL
+ int GL_INDEX_SHIFT
+ int GL_INDEX_OFFSET
+ int GL_RED_SCALE
+ int GL_RED_BIAS
+ int GL_GREEN_SCALE
+ int GL_GREEN_BIAS
+ int GL_BLUE_SCALE
+ int GL_BLUE_BIAS
+ int GL_ALPHA_SCALE
+ int GL_ALPHA_BIAS
+ int GL_DEPTH_SCALE
+ int GL_DEPTH_BIAS
+ int GL_PIXEL_MAP_S_TO_S_SIZE
+ int GL_PIXEL_MAP_I_TO_I_SIZE
+ int GL_PIXEL_MAP_I_TO_R_SIZE
+ int GL_PIXEL_MAP_I_TO_G_SIZE
+ int GL_PIXEL_MAP_I_TO_B_SIZE
+ int GL_PIXEL_MAP_I_TO_A_SIZE
+ int GL_PIXEL_MAP_R_TO_R_SIZE
+ int GL_PIXEL_MAP_G_TO_G_SIZE
+ int GL_PIXEL_MAP_B_TO_B_SIZE
+ int GL_PIXEL_MAP_A_TO_A_SIZE
+ int GL_PIXEL_MAP_S_TO_S
+ int GL_PIXEL_MAP_I_TO_I
+ int GL_PIXEL_MAP_I_TO_R
+ int GL_PIXEL_MAP_I_TO_G
+ int GL_PIXEL_MAP_I_TO_B
+ int GL_PIXEL_MAP_I_TO_A
+ int GL_PIXEL_MAP_R_TO_R
+ int GL_PIXEL_MAP_G_TO_G
+ int GL_PIXEL_MAP_B_TO_B
+ int GL_PIXEL_MAP_A_TO_A
+ int GL_PACK_ALIGNMENT
+ int GL_PACK_LSB_FIRST
+ int GL_PACK_ROW_LENGTH
+ int GL_PACK_SKIP_PIXELS
+ int GL_PACK_SKIP_ROWS
+ int GL_PACK_SWAP_BYTES
+ int GL_UNPACK_ALIGNMENT
+ int GL_UNPACK_LSB_FIRST
+ int GL_UNPACK_ROW_LENGTH
+ int GL_UNPACK_SKIP_PIXELS
+ int GL_UNPACK_SKIP_ROWS
+ int GL_UNPACK_SWAP_BYTES
+ int GL_ZOOM_X
+ int GL_ZOOM_Y
+ int GL_TEXTURE_ENV
+ int GL_TEXTURE_ENV_MODE
+ int GL_TEXTURE_1D
+ int GL_TEXTURE_2D
+ int GL_TEXTURE_WRAP_S
+ int GL_TEXTURE_WRAP_T
+ int GL_TEXTURE_MAG_FILTER
+ int GL_TEXTURE_MIN_FILTER
+ int GL_TEXTURE_ENV_COLOR
+ int GL_TEXTURE_GEN_S
+ int GL_TEXTURE_GEN_T
+ int GL_TEXTURE_GEN_MODE
+ int GL_TEXTURE_BORDER_COLOR
+ int GL_TEXTURE_WIDTH
+ int GL_TEXTURE_HEIGHT
+ int GL_TEXTURE_BORDER
+ int GL_TEXTURE_COMPONENTS
+ int GL_TEXTURE_RED_SIZE
+ int GL_TEXTURE_GREEN_SIZE
+ int GL_TEXTURE_BLUE_SIZE
+ int GL_TEXTURE_ALPHA_SIZE
+ int GL_TEXTURE_LUMINANCE_SIZE
+ int GL_TEXTURE_INTENSITY_SIZE
+ int GL_NEAREST_MIPMAP_NEAREST
+ int GL_NEAREST_MIPMAP_LINEAR
+ int GL_LINEAR_MIPMAP_NEAREST
+ int GL_LINEAR_MIPMAP_LINEAR
+ int GL_OBJECT_LINEAR
+ int GL_OBJECT_PLANE
+ int GL_EYE_LINEAR
+ int GL_EYE_PLANE
+ int GL_SPHERE_MAP
+ int GL_DECAL
+ int GL_MODULATE
+ int GL_NEAREST
+ int GL_REPEAT
+ int GL_CLAMP
+ int GL_S
+ int GL_T
+ int GL_R
+ int GL_Q
+ int GL_TEXTURE_GEN_R
+ int GL_TEXTURE_GEN_Q
+ int GL_VENDOR
+ int GL_RENDERER
+ int GL_VERSION
+ int GL_EXTENSIONS
+ int GL_NO_ERROR
+ int GL_INVALID_VALUE
+ int GL_INVALID_ENUM
+ int GL_INVALID_OPERATION
+ int GL_STACK_OVERFLOW
+ int GL_STACK_UNDERFLOW
+ int GL_OUT_OF_MEMORY
+ int GL_CURRENT_BIT
+ int GL_POINT_BIT
+ int GL_LINE_BIT
+ int GL_POLYGON_BIT
+ int GL_POLYGON_STIPPLE_BIT
+ int GL_PIXEL_MODE_BIT
+ int GL_LIGHTING_BIT
+ int GL_FOG_BIT
+ int GL_DEPTH_BUFFER_BIT
+ int GL_ACCUM_BUFFER_BIT
+ int GL_STENCIL_BUFFER_BIT
+ int GL_VIEWPORT_BIT
+ int GL_TRANSFORM_BIT
+ int GL_ENABLE_BIT
+ int GL_COLOR_BUFFER_BIT
+ int GL_HINT_BIT
+ int GL_EVAL_BIT
+ int GL_LIST_BIT
+ int GL_TEXTURE_BIT
+ int GL_SCISSOR_BIT
+ int GL_ALL_ATTRIB_BITS
+ int GL_PROXY_TEXTURE_1D
+ int GL_PROXY_TEXTURE_2D
+ int GL_TEXTURE_PRIORITY
+ int GL_TEXTURE_RESIDENT
+ int GL_TEXTURE_BINDING_1D
+ int GL_TEXTURE_BINDING_2D
+ int GL_TEXTURE_INTERNAL_FORMAT
+ int GL_ALPHA4
+ int GL_ALPHA8
+ int GL_ALPHA12
+ int GL_ALPHA16
+ int GL_LUMINANCE4
+ int GL_LUMINANCE8
+ int GL_LUMINANCE12
+ int GL_LUMINANCE16
+ int GL_LUMINANCE4_ALPHA4
+ int GL_LUMINANCE6_ALPHA2
+ int GL_LUMINANCE8_ALPHA8
+ int GL_LUMINANCE12_ALPHA4
+ int GL_LUMINANCE12_ALPHA12
+ int GL_LUMINANCE16_ALPHA16
+ int GL_INTENSITY
+ int GL_INTENSITY4
+ int GL_INTENSITY8
+ int GL_INTENSITY12
+ int GL_INTENSITY16
+ int GL_R3_G3_B2
+ int GL_RGB4
+ int GL_RGB5
+ int GL_RGB8
+ int GL_RGB10
+ int GL_RGB12
+ int GL_RGB16
+ int GL_RGBA2
+ int GL_RGBA4
+ int GL_RGB5_A1
+ int GL_RGBA8
+ int GL_RGB10_A2
+ int GL_RGBA12
+ int GL_RGBA16
+ int GL_CLIENT_PIXEL_STORE_BIT
+ int GL_CLIENT_VERTEX_ARRAY_BIT
+ int GL_CLIENT_ALL_ATTRIB_BITS
+ int GL_RESCALE_NORMAL
+ int GL_CLAMP_TO_EDGE
+ int GL_MAX_ELEMENTS_VERTICES
+ int GL_MAX_ELEMENTS_INDICES
+ int GL_BGR
+ int GL_BGRA
+ int GL_UNSIGNED_BYTE_3_3_2
+ int GL_UNSIGNED_BYTE_2_3_3_REV
+ int GL_UNSIGNED_SHORT_5_6_5
+ int GL_UNSIGNED_SHORT_5_6_5_REV
+ int GL_UNSIGNED_SHORT_4_4_4_4
+ int GL_UNSIGNED_SHORT_4_4_4_4_REV
+ int GL_UNSIGNED_SHORT_5_5_5_1
+ int GL_UNSIGNED_SHORT_1_5_5_5_REV
+ int GL_UNSIGNED_INT_8_8_8_8
+ int GL_UNSIGNED_INT_8_8_8_8_REV
+ int GL_UNSIGNED_INT_10_10_10_2
+ int GL_UNSIGNED_INT_2_10_10_10_REV
+ int GL_LIGHT_MODEL_COLOR_CONTROL
+ int GL_SINGLE_COLOR
+ int GL_SEPARATE_SPECULAR_COLOR
+ int GL_TEXTURE_MIN_LOD
+ int GL_TEXTURE_MAX_LOD
+ int GL_TEXTURE_BASE_LEVEL
+ int GL_TEXTURE_MAX_LEVEL
+ int GL_SMOOTH_POINT_SIZE_RANGE
+ int GL_SMOOTH_POINT_SIZE_GRANULARITY
+ int GL_SMOOTH_LINE_WIDTH_RANGE
+ int GL_SMOOTH_LINE_WIDTH_GRANULARITY
+ int GL_ALIASED_POINT_SIZE_RANGE
+ int GL_ALIASED_LINE_WIDTH_RANGE
+ int GL_PACK_SKIP_IMAGES
+ int GL_PACK_IMAGE_HEIGHT
+ int GL_UNPACK_SKIP_IMAGES
+ int GL_UNPACK_IMAGE_HEIGHT
+ int GL_TEXTURE_3D
+ int GL_PROXY_TEXTURE_3D
+ int GL_TEXTURE_DEPTH
+ int GL_TEXTURE_WRAP_R
+ int GL_MAX_3D_TEXTURE_SIZE
+ int GL_TEXTURE_BINDING_3D
+ int GL_COLOR_TABLE
+ int GL_POST_CONVOLUTION_COLOR_TABLE
+ int GL_POST_COLOR_MATRIX_COLOR_TABLE
+ int GL_PROXY_COLOR_TABLE
+ int GL_PROXY_POST_CONVOLUTION_COLOR_TABLE
+ int GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE
+ int GL_COLOR_TABLE_SCALE
+ int GL_COLOR_TABLE_BIAS
+ int GL_COLOR_TABLE_FORMAT
+ int GL_COLOR_TABLE_WIDTH
+ int GL_COLOR_TABLE_RED_SIZE
+ int GL_COLOR_TABLE_GREEN_SIZE
+ int GL_COLOR_TABLE_BLUE_SIZE
+ int GL_COLOR_TABLE_ALPHA_SIZE
+ int GL_COLOR_TABLE_LUMINANCE_SIZE
+ int GL_COLOR_TABLE_INTENSITY_SIZE
+ int GL_CONVOLUTION_1D
+ int GL_CONVOLUTION_2D
+ int GL_SEPARABLE_2D
+ int GL_CONVOLUTION_BORDER_MODE
+ int GL_CONVOLUTION_FILTER_SCALE
+ int GL_CONVOLUTION_FILTER_BIAS
+ int GL_REDUCE
+ int GL_CONVOLUTION_FORMAT
+ int GL_CONVOLUTION_WIDTH
+ int GL_CONVOLUTION_HEIGHT
+ int GL_MAX_CONVOLUTION_WIDTH
+ int GL_MAX_CONVOLUTION_HEIGHT
+ int GL_POST_CONVOLUTION_RED_SCALE
+ int GL_POST_CONVOLUTION_GREEN_SCALE
+ int GL_POST_CONVOLUTION_BLUE_SCALE
+ int GL_POST_CONVOLUTION_ALPHA_SCALE
+ int GL_POST_CONVOLUTION_RED_BIAS
+ int GL_POST_CONVOLUTION_GREEN_BIAS
+ int GL_POST_CONVOLUTION_BLUE_BIAS
+ int GL_POST_CONVOLUTION_ALPHA_BIAS
+ int GL_CONSTANT_BORDER
+ int GL_REPLICATE_BORDER
+ int GL_CONVOLUTION_BORDER_COLOR
+ int GL_COLOR_MATRIX
+ int GL_COLOR_MATRIX_STACK_DEPTH
+ int GL_MAX_COLOR_MATRIX_STACK_DEPTH
+ int GL_POST_COLOR_MATRIX_RED_SCALE
+ int GL_POST_COLOR_MATRIX_GREEN_SCALE
+ int GL_POST_COLOR_MATRIX_BLUE_SCALE
+ int GL_POST_COLOR_MATRIX_ALPHA_SCALE
+ int GL_POST_COLOR_MATRIX_RED_BIAS
+ int GL_POST_COLOR_MATRIX_GREEN_BIAS
+ int GL_POST_COLOR_MATRIX_BLUE_BIAS
+ int GL_POST_COLOR_MATRIX_ALPHA_BIAS
+ int GL_HISTOGRAM
+ int GL_PROXY_HISTOGRAM
+ int GL_HISTOGRAM_WIDTH
+ int GL_HISTOGRAM_FORMAT
+ int GL_HISTOGRAM_RED_SIZE
+ int GL_HISTOGRAM_GREEN_SIZE
+ int GL_HISTOGRAM_BLUE_SIZE
+ int GL_HISTOGRAM_ALPHA_SIZE
+ int GL_HISTOGRAM_LUMINANCE_SIZE
+ int GL_HISTOGRAM_SINK
+ int GL_MINMAX
+ int GL_MINMAX_FORMAT
+ int GL_MINMAX_SINK
+ int GL_TABLE_TOO_LARGE
+ int GL_BLEND_EQUATION
+ int GL_MIN
+ int GL_MAX
+ int GL_FUNC_ADD
+ int GL_FUNC_SUBTRACT
+ int GL_FUNC_REVERSE_SUBTRACT
+ int GL_BLEND_COLOR
+ int GL_TEXTURE0
+ int GL_TEXTURE1
+ int GL_TEXTURE2
+ int GL_TEXTURE3
+ int GL_TEXTURE4
+ int GL_TEXTURE5
+ int GL_TEXTURE6
+ int GL_TEXTURE7
+ int GL_TEXTURE8
+ int GL_TEXTURE9
+ int GL_TEXTURE10
+ int GL_TEXTURE11
+ int GL_TEXTURE12
+ int GL_TEXTURE13
+ int GL_TEXTURE14
+ int GL_TEXTURE15
+ int GL_TEXTURE16
+ int GL_TEXTURE17
+ int GL_TEXTURE18
+ int GL_TEXTURE19
+ int GL_TEXTURE20
+ int GL_TEXTURE21
+ int GL_TEXTURE22
+ int GL_TEXTURE23
+ int GL_TEXTURE24
+ int GL_TEXTURE25
+ int GL_TEXTURE26
+ int GL_TEXTURE27
+ int GL_TEXTURE28
+ int GL_TEXTURE29
+ int GL_TEXTURE30
+ int GL_TEXTURE31
+ int GL_ACTIVE_TEXTURE
+ int GL_CLIENT_ACTIVE_TEXTURE
+ int GL_MAX_TEXTURE_UNITS
+ int GL_NORMAL_MAP
+ int GL_REFLECTION_MAP
+ int GL_TEXTURE_CUBE_MAP
+ int GL_TEXTURE_BINDING_CUBE_MAP
+ int GL_TEXTURE_CUBE_MAP_POSITIVE_X
+ int GL_TEXTURE_CUBE_MAP_NEGATIVE_X
+ int GL_TEXTURE_CUBE_MAP_POSITIVE_Y
+ int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
+ int GL_TEXTURE_CUBE_MAP_POSITIVE_Z
+ int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
+ int GL_PROXY_TEXTURE_CUBE_MAP
+ int GL_MAX_CUBE_MAP_TEXTURE_SIZE
+ int GL_COMPRESSED_ALPHA
+ int GL_COMPRESSED_LUMINANCE
+ int GL_COMPRESSED_LUMINANCE_ALPHA
+ int GL_COMPRESSED_INTENSITY
+ int GL_COMPRESSED_RGB
+ int GL_COMPRESSED_RGBA
+ int GL_TEXTURE_COMPRESSION_HINT
+ int GL_TEXTURE_COMPRESSED_IMAGE_SIZE
+ int GL_TEXTURE_COMPRESSED
+ int GL_NUM_COMPRESSED_TEXTURE_FORMATS
+ int GL_COMPRESSED_TEXTURE_FORMATS
+ int GL_MULTISAMPLE
+ int GL_SAMPLE_ALPHA_TO_COVERAGE
+ int GL_SAMPLE_ALPHA_TO_ONE
+ int GL_SAMPLE_COVERAGE
+ int GL_SAMPLE_BUFFERS
+ int GL_SAMPLES
+ int GL_SAMPLE_COVERAGE_VALUE
+ int GL_SAMPLE_COVERAGE_INVERT
+ int GL_MULTISAMPLE_BIT
+ int GL_TRANSPOSE_MODELVIEW_MATRIX
+ int GL_TRANSPOSE_PROJECTION_MATRIX
+ int GL_TRANSPOSE_TEXTURE_MATRIX
+ int GL_TRANSPOSE_COLOR_MATRIX
+ int GL_COMBINE
+ int GL_COMBINE_RGB
+ int GL_COMBINE_ALPHA
+ int GL_SOURCE0_RGB
+ int GL_SOURCE1_RGB
+ int GL_SOURCE2_RGB
+ int GL_SOURCE0_ALPHA
+ int GL_SOURCE1_ALPHA
+ int GL_SOURCE2_ALPHA
+ int GL_OPERAND0_RGB
+ int GL_OPERAND1_RGB
+ int GL_OPERAND2_RGB
+ int GL_OPERAND0_ALPHA
+ int GL_OPERAND1_ALPHA
+ int GL_OPERAND2_ALPHA
+ int GL_RGB_SCALE
+ int GL_ADD_SIGNED
+ int GL_INTERPOLATE
+ int GL_SUBTRACT
+ int GL_CONSTANT
+ int GL_PRIMARY_COLOR
+ int GL_PREVIOUS
+ int GL_DOT3_RGB
+ int GL_DOT3_RGBA
+ int GL_CLAMP_TO_BORDER
+ int GL_DEPTH_COMPONENT24
+
+ cdef void glClearIndex(GLfloat c)
+ cdef void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+ cdef void glClear(GLbitfield mask)
+ cdef void glIndexMask(GLuint mask)
+ cdef void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
+ cdef void glAlphaFunc(GLenum func, GLclampf ref)
+ cdef void glBlendFunc(GLenum sfactor, GLenum dfactor)
+ cdef void glLogicOp(GLenum opcode)
+ cdef void glCullFace(GLenum mode)
+ cdef void glFrontFace(GLenum mode)
+ cdef void glPointSize(GLfloat size)
+ cdef void glLineWidth(GLfloat width)
+ cdef void glLineStipple(GLint factor, GLushort pattern)
+ cdef void glPolygonMode(GLenum face, GLenum mode)
+ cdef void glPolygonOffset(GLfloat factor, GLfloat units)
+ cdef void glPolygonStipple(GLubyte *mask)
+ cdef void glGetPolygonStipple(GLubyte *mask)
+ cdef void glEdgeFlag(GLboolean flag)
+ cdef void glEdgeFlagv(GLboolean *flag)
+ cdef void glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
+ cdef void glClipPlane(GLenum plane, GLdouble *equation)
+ cdef void glGetClipPlane(GLenum plane, GLdouble *equation)
+ cdef void glDrawBuffer(GLenum mode)
+ cdef void glReadBuffer(GLenum mode)
+ cdef void glEnable(GLenum cap)
+ cdef void glDisable(GLenum cap)
+ cdef GLboolean glIsEnabled(GLenum cap)
+ cdef void glEnableClientState(GLenum cap)
+ cdef void glDisableClientState(GLenum cap)
+ cdef void glGetBooleanv(GLenum pname, GLboolean *params)
+ cdef void glGetDoublev(GLenum pname, GLdouble *params)
+ cdef void glGetFloatv(GLenum pname, GLfloat *params)
+ cdef void glGetIntegerv(GLenum pname, GLint *params)
+ cdef void glPushAttrib(GLbitfield mask)
+ cdef void glPopAttrib()
+ cdef void glPushClientAttrib(GLbitfield mask)
+ cdef void glPopClientAttrib()
+ cdef GLint glRenderMode(GLenum mode)
+ cdef GLenum glGetError()
+ cdef GLubyte* glGetString(GLenum name)
+ cdef void glFinish()
+ cdef void glFlush()
+ cdef void glHint(GLenum target, GLenum mode)
+ cdef void glClearDepth(GLclampd depth)
+ cdef void glDepthFunc(GLenum func)
+ cdef void glDepthMask(GLboolean flag)
+ cdef void glDepthRange(GLclampd near_val, GLclampd far_val)
+ cdef void glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+ cdef void glAccum(GLenum op, GLfloat value)
+ cdef void glMatrixMode(GLenum mode)
+ cdef void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val)
+ cdef void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val)
+ cdef void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
+ cdef void glPushMatrix()
+ cdef void glPopMatrix()
+ cdef void glLoadIdentity()
+ cdef void glLoadMatrixd(GLdouble *m)
+ cdef void glLoadMatrixf(GLfloat *m)
+ cdef void glMultMatrixd(GLdouble *m)
+ cdef void glMultMatrixf(GLfloat *m)
+ cdef void glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
+ cdef void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
+ cdef void glScaled(GLdouble x, GLdouble y, GLdouble z)
+ cdef void glScalef(GLfloat x, GLfloat y, GLfloat z)
+ cdef void glTranslated(GLdouble x, GLdouble y, GLdouble z)
+ cdef void glTranslatef(GLfloat x, GLfloat y, GLfloat z)
+ cdef GLboolean glIsList(GLuint list)
+ cdef void glDeleteLists(GLuint list, GLsizei range)
+ cdef GLuint glGenLists(GLsizei range)
+ cdef void glNewList(GLuint list, GLenum mode)
+ cdef void glEndList()
+ cdef void glCallList(GLuint list)
+ cdef void glCallLists(GLsizei n, GLenum type, GLvoid *lists)
+ cdef void glListBase(GLuint base)
+ cdef void glBegin(GLenum mode)
+ cdef void glEnd()
+ cdef void glVertex2d(GLdouble x, GLdouble y)
+ cdef void glVertex2f(GLfloat x, GLfloat y)
+ cdef void glVertex2i(GLint x, GLint y)
+ cdef void glVertex2s(GLshort x, GLshort y)
+ cdef void glVertex3d(GLdouble x, GLdouble y, GLdouble z)
+ cdef void glVertex3f(GLfloat x, GLfloat y, GLfloat z)
+ cdef void glVertex3i(GLint x, GLint y, GLint z)
+ cdef void glVertex3s(GLshort x, GLshort y, GLshort z)
+ cdef void glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+ cdef void glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+ cdef void glVertex4i(GLint x, GLint y, GLint z, GLint w)
+ cdef void glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
+ cdef void glVertex2dv(GLdouble *v)
+ cdef void glVertex2fv(GLfloat *v)
+ cdef void glVertex2iv(GLint *v)
+ cdef void glVertex2sv(GLshort *v)
+ cdef void glVertex3dv(GLdouble *v)
+ cdef void glVertex3fv(GLfloat *v)
+ cdef void glVertex3iv(GLint *v)
+ cdef void glVertex3sv(GLshort *v)
+ cdef void glVertex4dv(GLdouble *v)
+ cdef void glVertex4fv(GLfloat *v)
+ cdef void glVertex4iv(GLint *v)
+ cdef void glVertex4sv(GLshort *v)
+ cdef void glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
+ cdef void glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
+ cdef void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
+ cdef void glNormal3i(GLint nx, GLint ny, GLint nz)
+ cdef void glNormal3s(GLshort nx, GLshort ny, GLshort nz)
+ cdef void glNormal3bv(GLbyte *v)
+ cdef void glNormal3dv(GLdouble *v)
+ cdef void glNormal3fv(GLfloat *v)
+ cdef void glNormal3iv(GLint *v)
+ cdef void glNormal3sv(GLshort *v)
+ cdef void glIndexd(GLdouble c)
+ cdef void glIndexf(GLfloat c)
+ cdef void glIndexi(GLint c)
+ cdef void glIndexs(GLshort c)
+ cdef void glIndexub(GLubyte c)
+ cdef void glIndexdv(GLdouble *c)
+ cdef void glIndexfv(GLfloat *c)
+ cdef void glIndexiv(GLint *c)
+ cdef void glIndexsv(GLshort *c)
+ cdef void glIndexubv(GLubyte *c)
+ cdef void glColor3b(GLbyte red, GLbyte green, GLbyte blue)
+ cdef void glColor3d(GLdouble red, GLdouble green, GLdouble blue)
+ cdef void glColor3f(GLfloat red, GLfloat green, GLfloat blue)
+ cdef void glColor3i(GLint red, GLint green, GLint blue)
+ cdef void glColor3s(GLshort red, GLshort green, GLshort blue)
+ cdef void glColor3ub(GLubyte red, GLubyte green, GLubyte blue)
+ cdef void glColor3ui(GLuint red, GLuint green, GLuint blue)
+ cdef void glColor3us(GLushort red, GLushort green, GLushort blue)
+ cdef void glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
+ cdef void glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
+ cdef void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
+ cdef void glColor4i(GLint red, GLint green, GLint blue, GLint alpha)
+ cdef void glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
+ cdef void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
+ cdef void glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
+ cdef void glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
+ cdef void glColor3bv(GLbyte *v)
+ cdef void glColor3dv(GLdouble *v)
+ cdef void glColor3fv(GLfloat *v)
+ cdef void glColor3iv(GLint *v)
+ cdef void glColor3sv(GLshort *v)
+ cdef void glColor3ubv(GLubyte *v)
+ cdef void glColor3uiv(GLuint *v)
+ cdef void glColor3usv(GLushort *v)
+ cdef void glColor4bv(GLbyte *v)
+ cdef void glColor4dv(GLdouble *v)
+ cdef void glColor4fv(GLfloat *v)
+ cdef void glColor4iv(GLint *v)
+ cdef void glColor4sv(GLshort *v)
+ cdef void glColor4ubv(GLubyte *v)
+ cdef void glColor4uiv(GLuint *v)
+ cdef void glColor4usv(GLushort *v)
+ cdef void glTexCoord1d(GLdouble s)
+ cdef void glTexCoord1f(GLfloat s)
+ cdef void glTexCoord1i(GLint s)
+ cdef void glTexCoord1s(GLshort s)
+ cdef void glTexCoord2d(GLdouble s, GLdouble t)
+ cdef void glTexCoord2f(GLfloat s, GLfloat t)
+ cdef void glTexCoord2i(GLint s, GLint t)
+ cdef void glTexCoord2s(GLshort s, GLshort t)
+ cdef void glTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
+ cdef void glTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
+ cdef void glTexCoord3i(GLint s, GLint t, GLint r)
+ cdef void glTexCoord3s(GLshort s, GLshort t, GLshort r)
+ cdef void glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+ cdef void glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+ cdef void glTexCoord4i(GLint s, GLint t, GLint r, GLint q)
+ cdef void glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
+ cdef void glTexCoord1dv(GLdouble *v)
+ cdef void glTexCoord1fv(GLfloat *v)
+ cdef void glTexCoord1iv(GLint *v)
+ cdef void glTexCoord1sv(GLshort *v)
+ cdef void glTexCoord2dv(GLdouble *v)
+ cdef void glTexCoord2fv(GLfloat *v)
+ cdef void glTexCoord2iv(GLint *v)
+ cdef void glTexCoord2sv(GLshort *v)
+ cdef void glTexCoord3dv(GLdouble *v)
+ cdef void glTexCoord3fv(GLfloat *v)
+ cdef void glTexCoord3iv(GLint *v)
+ cdef void glTexCoord3sv(GLshort *v)
+ cdef void glTexCoord4dv(GLdouble *v)
+ cdef void glTexCoord4fv(GLfloat *v)
+ cdef void glTexCoord4iv(GLint *v)
+ cdef void glTexCoord4sv(GLshort *v)
+ cdef void glRasterPos2d(GLdouble x, GLdouble y)
+ cdef void glRasterPos2f(GLfloat x, GLfloat y)
+ cdef void glRasterPos2i(GLint x, GLint y)
+ cdef void glRasterPos2s(GLshort x, GLshort y)
+ cdef void glRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
+ cdef void glRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
+ cdef void glRasterPos3i(GLint x, GLint y, GLint z)
+ cdef void glRasterPos3s(GLshort x, GLshort y, GLshort z)
+ cdef void glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+ cdef void glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+ cdef void glRasterPos4i(GLint x, GLint y, GLint z, GLint w)
+ cdef void glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
+ cdef void glRasterPos2dv(GLdouble *v)
+ cdef void glRasterPos2fv(GLfloat *v)
+ cdef void glRasterPos2iv(GLint *v)
+ cdef void glRasterPos2sv(GLshort *v)
+ cdef void glRasterPos3dv(GLdouble *v)
+ cdef void glRasterPos3fv(GLfloat *v)
+ cdef void glRasterPos3iv(GLint *v)
+ cdef void glRasterPos3sv(GLshort *v)
+ cdef void glRasterPos4dv(GLdouble *v)
+ cdef void glRasterPos4fv(GLfloat *v)
+ cdef void glRasterPos4iv(GLint *v)
+ cdef void glRasterPos4sv(GLshort *v)
+ cdef void glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
+ cdef void glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
+ cdef void glRecti(GLint x1, GLint y1, GLint x2, GLint y2)
+ cdef void glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
+ cdef void glRectdv(GLdouble *v1, GLdouble *v2)
+ cdef void glRectfv(GLfloat *v1, GLfloat *v2)
+ cdef void glRectiv(GLint *v1, GLint *v2)
+ cdef void glRectsv(GLshort *v1, GLshort *v2)
+ cdef void glVertexPointer(GLint size, GLenum type, GLsizei stride, GLvoid *ptr)
+ cdef void glNormalPointer(GLenum type, GLsizei stride, GLvoid *ptr)
+ cdef void glColorPointer(GLint size, GLenum type, GLsizei stride, GLvoid *ptr)
+ cdef void glIndexPointer(GLenum type, GLsizei stride, GLvoid *ptr)
+ cdef void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, GLvoid *ptr)
+ cdef void glEdgeFlagPointer(GLsizei stride, GLvoid *ptr)
+ cdef void glGetPointerv(GLenum pname, GLvoid **params)
+ cdef void glArrayElement(GLint i)
+ cdef void glDrawArrays(GLenum mode, GLint first, GLsizei count)
+ cdef void glDrawElements(GLenum mode, GLsizei count, GLenum type, GLvoid *indices)
+ cdef void glInterleavedArrays(GLenum format, GLsizei stride, GLvoid *pointer)
+ cdef void glShadeModel(GLenum mode)
+ cdef void glLightf(GLenum light, GLenum pname, GLfloat param)
+ cdef void glLighti(GLenum light, GLenum pname, GLint param)
+ cdef void glLightfv(GLenum light, GLenum pname, GLfloat *params)
+ cdef void glLightiv(GLenum light, GLenum pname, GLint *params)
+ cdef void glGetLightfv(GLenum light, GLenum pname, GLfloat *params)
+ cdef void glGetLightiv(GLenum light, GLenum pname, GLint *params)
+ cdef void glLightModelf(GLenum pname, GLfloat param)
+ cdef void glLightModeli(GLenum pname, GLint param)
+ cdef void glLightModelfv(GLenum pname, GLfloat *params)
+ cdef void glLightModeliv(GLenum pname, GLint *params)
+ cdef void glMaterialf(GLenum face, GLenum pname, GLfloat param)
+ cdef void glMateriali(GLenum face, GLenum pname, GLint param)
+ cdef void glMaterialfv(GLenum face, GLenum pname, GLfloat *params)
+ cdef void glMaterialiv(GLenum face, GLenum pname, GLint *params)
+ cdef void glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
+ cdef void glGetMaterialiv(GLenum face, GLenum pname, GLint *params)
+ cdef void glColorMaterial(GLenum face, GLenum mode)
+ cdef void glPixelZoom(GLfloat xfactor, GLfloat yfactor)
+ cdef void glPixelStoref(GLenum pname, GLfloat param)
+ cdef void glPixelStorei(GLenum pname, GLint param)
+ cdef void glPixelTransferf(GLenum pname, GLfloat param)
+ cdef void glPixelTransferi(GLenum pname, GLint param)
+ cdef void glPixelMapfv(GLenum map, GLint mapsize, GLfloat *values)
+ cdef void glPixelMapuiv(GLenum map, GLint mapsize, GLuint *values)
+ cdef void glPixelMapusv(GLenum map, GLint mapsize, GLushort *values)
+ cdef void glGetPixelMapfv(GLenum map, GLfloat *values)
+ cdef void glGetPixelMapuiv(GLenum map, GLuint *values)
+ cdef void glGetPixelMapusv(GLenum map, GLushort *values)
+ cdef void glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte *bitmap)
+ cdef void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
+ cdef void glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
+ cdef void glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
+ cdef void glStencilFunc(GLenum func, GLint ref, GLuint mask)
+ cdef void glStencilMask(GLuint mask)
+ cdef void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
+ cdef void glClearStencil(GLint s)
+ cdef void glTexGend(GLenum coord, GLenum pname, GLdouble param)
+ cdef void glTexGenf(GLenum coord, GLenum pname, GLfloat param)
+ cdef void glTexGeni(GLenum coord, GLenum pname, GLint param)
+ cdef void glTexGendv(GLenum coord, GLenum pname, GLdouble *params)
+ cdef void glTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
+ cdef void glTexGeniv(GLenum coord, GLenum pname, GLint *params)
+ cdef void glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
+ cdef void glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
+ cdef void glGetTexGeniv(GLenum coord, GLenum pname, GLint *params)
+ cdef void glTexEnvf(GLenum target, GLenum pname, GLfloat param)
+ cdef void glTexEnvi(GLenum target, GLenum pname, GLint param)
+ cdef void glTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glTexEnviv(GLenum target, GLenum pname, GLint *params)
+ cdef void glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glGetTexEnviv(GLenum target, GLenum pname, GLint *params)
+ cdef void glTexParameterf(GLenum target, GLenum pname, GLfloat param)
+ cdef void glTexParameteri(GLenum target, GLenum pname, GLint param)
+ cdef void glTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glTexParameteriv(GLenum target, GLenum pname, GLint *params)
+ cdef void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
+ cdef void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
+ cdef void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
+ cdef void glTexImage1D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid *pixels)
+ cdef void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid *pixels)
+ cdef void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)
+ cdef void glGenTextures(GLsizei n, GLuint *textures)
+ cdef void glDeleteTextures(GLsizei n, GLuint *textures)
+ cdef void glBindTexture(GLenum target, GLuint texture)
+ cdef void glPrioritizeTextures(GLsizei n, GLuint *textures, GLclampf *priorities)
+ cdef GLboolean glAreTexturesResident(GLsizei n, GLuint *textures, GLboolean *residences)
+ cdef GLboolean glIsTexture(GLuint texture)
+ cdef void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid *pixels)
+ cdef void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
+ cdef void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)
+ cdef void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
+ cdef void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
+ cdef void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+ cdef void glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble *points)
+ cdef void glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat *points)
+ cdef void glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble *points)
+ cdef void glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat *points)
+ cdef void glGetMapdv(GLenum target, GLenum query, GLdouble *v)
+ cdef void glGetMapfv(GLenum target, GLenum query, GLfloat *v)
+ cdef void glGetMapiv(GLenum target, GLenum query, GLint *v)
+ cdef void glEvalCoord1d(GLdouble u)
+ cdef void glEvalCoord1f(GLfloat u)
+ cdef void glEvalCoord1dv(GLdouble *u)
+ cdef void glEvalCoord1fv(GLfloat *u)
+ cdef void glEvalCoord2d(GLdouble u, GLdouble v)
+ cdef void glEvalCoord2f(GLfloat u, GLfloat v)
+ cdef void glEvalCoord2dv(GLdouble *u)
+ cdef void glEvalCoord2fv(GLfloat *u)
+ cdef void glMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
+ cdef void glMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
+ cdef void glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
+ cdef void glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
+ cdef void glEvalPoint1(GLint i)
+ cdef void glEvalPoint2(GLint i, GLint j)
+ cdef void glEvalMesh1(GLenum mode, GLint i1, GLint i2)
+ cdef void glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+ cdef void glFogf(GLenum pname, GLfloat param)
+ cdef void glFogi(GLenum pname, GLint param)
+ cdef void glFogfv(GLenum pname, GLfloat *params)
+ cdef void glFogiv(GLenum pname, GLint *params)
+ cdef void glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer)
+ cdef void glPassThrough(GLfloat token)
+ cdef void glSelectBuffer(GLsizei size, GLuint *buffer)
+ cdef void glInitNames()
+ cdef void glLoadName(GLuint name)
+ cdef void glPushName(GLuint name)
+ cdef void glPopName()
+ cdef void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLvoid *indices)
+ cdef void glTexImage3D(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLvoid *pixels)
+ cdef void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *pixels)
+ cdef void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
+ cdef void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid *table)
+ cdef void glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, GLvoid *data)
+ cdef void glColorTableParameteriv(GLenum target, GLenum pname, GLint *params)
+ cdef void glColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
+ cdef void glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+ cdef void glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid *table)
+ cdef void glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glGetColorTableParameteriv(GLenum target, GLenum pname, GLint *params)
+ cdef void glBlendEquation(GLenum mode)
+ cdef void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
+ cdef void glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
+ cdef void glResetHistogram(GLenum target)
+ cdef void glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
+ cdef void glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glGetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
+ cdef void glMinmax(GLenum target, GLenum internalformat, GLboolean sink)
+ cdef void glResetMinmax(GLenum target)
+ cdef void glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values)
+ cdef void glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
+ cdef void glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, GLvoid *image)
+ cdef void glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *image)
+ cdef void glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
+ cdef void glConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glConvolutionParameteri(GLenum target, GLenum pname, GLint params)
+ cdef void glConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
+ cdef void glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
+ cdef void glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
+ cdef void glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image)
+ cdef void glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
+ cdef void glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
+ cdef void glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *row, GLvoid *column)
+ cdef void glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
+ cdef void glActiveTextureARB(GLenum texture)
+ cdef void glClientActiveTexture(GLenum texture)
+ cdef void glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid *data)
+ cdef void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid *data)
+ cdef void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid *data)
+ cdef void glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, GLvoid *data)
+ cdef void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid *data)
+ cdef void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid *data)
+ cdef void glGetCompressedTexImage(GLenum target, GLint lod, GLvoid *img)
+ cdef void glMultiTexCoord1dARB(GLenum target, GLdouble s)
+ cdef void glMultiTexCoord1dvARB(GLenum target, GLdouble *v)
+ cdef void glMultiTexCoord1fARB(GLenum target, GLfloat s)
+ cdef void glMultiTexCoord1fvARB(GLenum target, GLfloat *v)
+ cdef void glMultiTexCoord1iARB(GLenum target, GLint s)
+ cdef void glMultiTexCoord1ivARB(GLenum target, GLint *v)
+ cdef void glMultiTexCoord1sARB(GLenum target, GLshort s)
+ cdef void glMultiTexCoord1svARB(GLenum target, GLshort *v)
+ cdef void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t)
+ cdef void glMultiTexCoord2dvARB(GLenum target, GLdouble *v)
+ cdef void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t)
+ cdef void glMultiTexCoord2fvARB(GLenum target, GLfloat *v)
+ cdef void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t)
+ cdef void glMultiTexCoord2ivARB(GLenum target, GLint *v)
+ cdef void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t)
+ cdef void glMultiTexCoord2svARB(GLenum target, GLshort *v)
+ cdef void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r)
+ cdef void glMultiTexCoord3dvARB(GLenum target, GLdouble *v)
+ cdef void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r)
+ cdef void glMultiTexCoord3fvARB(GLenum target, GLfloat *v)
+ cdef void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r)
+ cdef void glMultiTexCoord3ivARB(GLenum target, GLint *v)
+ cdef void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r)
+ cdef void glMultiTexCoord3svARB(GLenum target, GLshort *v)
+ cdef void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+ cdef void glMultiTexCoord4dvARB(GLenum target, GLdouble *v)
+ cdef void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+ cdef void glMultiTexCoord4fvARB(GLenum target, GLfloat *v)
+ cdef void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q)
+ cdef void glMultiTexCoord4ivARB(GLenum target, GLint *v)
+ cdef void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
+ cdef void glMultiTexCoord4svARB(GLenum target, GLshort *v)
+ cdef void glLoadTransposeMatrixd(GLdouble m[16])
+ cdef void glLoadTransposeMatrixf(GLfloat m[16])
+ cdef void glMultTransposeMatrixd(GLdouble m[16])
+ cdef void glMultTransposeMatrixf(GLfloat m[16])
+ cdef void glSampleCoverage(GLclampf value, GLboolean invert)
+
+ int GLU_EXT_object_space_tess
+ int GLU_EXT_nurbs_tessellator
+ int GLU_FALSE
+ int GLU_TRUE
+ int GLU_VERSION_1_1
+ int GLU_VERSION_1_2
+ int GLU_VERSION_1_3
+ int GLU_VERSION
+ int GLU_EXTENSIONS
+ int GLU_INVALID_ENUM
+ int GLU_INVALID_VALUE
+ int GLU_OUT_OF_MEMORY
+ int GLU_INVALID_OPERATION
+ int GLU_OUTLINE_POLYGON
+ int GLU_OUTLINE_PATCH
+ int GLU_NURBS_ERROR
+ int GLU_ERROR
+ int GLU_NURBS_BEGIN
+ int GLU_NURBS_BEGIN_EXT
+ int GLU_NURBS_VERTEX
+ int GLU_NURBS_VERTEX_EXT
+ int GLU_NURBS_NORMAL
+ int GLU_NURBS_NORMAL_EXT
+ int GLU_NURBS_COLOR
+ int GLU_NURBS_COLOR_EXT
+ int GLU_NURBS_TEXTURE_COORD
+ int GLU_NURBS_TEX_COORD_EXT
+ int GLU_NURBS_END
+ int GLU_NURBS_END_EXT
+ int GLU_NURBS_BEGIN_DATA
+ int GLU_NURBS_BEGIN_DATA_EXT
+ int GLU_NURBS_VERTEX_DATA
+ int GLU_NURBS_VERTEX_DATA_EXT
+ int GLU_NURBS_NORMAL_DATA
+ int GLU_NURBS_NORMAL_DATA_EXT
+ int GLU_NURBS_COLOR_DATA
+ int GLU_NURBS_COLOR_DATA_EXT
+ int GLU_NURBS_TEXTURE_COORD_DATA
+ int GLU_NURBS_TEX_COORD_DATA_EXT
+ int GLU_NURBS_END_DATA
+ int GLU_NURBS_END_DATA_EXT
+ int GLU_NURBS_ERROR1
+ int GLU_NURBS_ERROR2
+ int GLU_NURBS_ERROR3
+ int GLU_NURBS_ERROR4
+ int GLU_NURBS_ERROR5
+ int GLU_NURBS_ERROR6
+ int GLU_NURBS_ERROR7
+ int GLU_NURBS_ERROR8
+ int GLU_NURBS_ERROR9
+ int GLU_NURBS_ERROR10
+ int GLU_NURBS_ERROR11
+ int GLU_NURBS_ERROR12
+ int GLU_NURBS_ERROR13
+ int GLU_NURBS_ERROR14
+ int GLU_NURBS_ERROR15
+ int GLU_NURBS_ERROR16
+ int GLU_NURBS_ERROR17
+ int GLU_NURBS_ERROR18
+ int GLU_NURBS_ERROR19
+ int GLU_NURBS_ERROR20
+ int GLU_NURBS_ERROR21
+ int GLU_NURBS_ERROR22
+ int GLU_NURBS_ERROR23
+ int GLU_NURBS_ERROR24
+ int GLU_NURBS_ERROR25
+ int GLU_NURBS_ERROR26
+ int GLU_NURBS_ERROR27
+ int GLU_NURBS_ERROR28
+ int GLU_NURBS_ERROR29
+ int GLU_NURBS_ERROR30
+ int GLU_NURBS_ERROR31
+ int GLU_NURBS_ERROR32
+ int GLU_NURBS_ERROR33
+ int GLU_NURBS_ERROR34
+ int GLU_NURBS_ERROR35
+ int GLU_NURBS_ERROR36
+ int GLU_NURBS_ERROR37
+ int GLU_AUTO_LOAD_MATRIX
+ int GLU_CULLING
+ int GLU_SAMPLING_TOLERANCE
+ int GLU_DISPLAY_MODE
+ int GLU_PARAMETRIC_TOLERANCE
+ int GLU_SAMPLING_METHOD
+ int GLU_U_STEP
+ int GLU_V_STEP
+ int GLU_NURBS_MODE
+ int GLU_NURBS_MODE_EXT
+ int GLU_NURBS_TESSELLATOR
+ int GLU_NURBS_TESSELLATOR_EXT
+ int GLU_NURBS_RENDERER
+ int GLU_NURBS_RENDERER_EXT
+ int GLU_OBJECT_PARAMETRIC_ERROR
+ int GLU_OBJECT_PARAMETRIC_ERROR_EXT
+ int GLU_OBJECT_PATH_LENGTH
+ int GLU_OBJECT_PATH_LENGTH_EXT
+ int GLU_PATH_LENGTH
+ int GLU_PARAMETRIC_ERROR
+ int GLU_DOMAIN_DISTANCE
+ int GLU_MAP1_TRIM_2
+ int GLU_MAP1_TRIM_3
+ int GLU_POINT
+ int GLU_LINE
+ int GLU_FILL
+ int GLU_SILHOUETTE
+ int GLU_SMOOTH
+ int GLU_FLAT
+ int GLU_NONE
+ int GLU_OUTSIDE
+ int GLU_INSIDE
+ int GLU_TESS_BEGIN
+ int GLU_BEGIN
+ int GLU_TESS_VERTEX
+ int GLU_VERTEX
+ int GLU_TESS_END
+ int GLU_END
+ int GLU_TESS_ERROR
+ int GLU_TESS_EDGE_FLAG
+ int GLU_EDGE_FLAG
+ int GLU_TESS_COMBINE
+ int GLU_TESS_BEGIN_DATA
+ int GLU_TESS_VERTEX_DATA
+ int GLU_TESS_END_DATA
+ int GLU_TESS_ERROR_DATA
+ int GLU_TESS_EDGE_FLAG_DATA
+ int GLU_TESS_COMBINE_DATA
+ int GLU_CW
+ int GLU_CCW
+ int GLU_INTERIOR
+ int GLU_EXTERIOR
+ int GLU_UNKNOWN
+ int GLU_TESS_WINDING_RULE
+ int GLU_TESS_BOUNDARY_ONLY
+ int GLU_TESS_TOLERANCE
+ int GLU_TESS_ERROR1
+ int GLU_TESS_ERROR2
+ int GLU_TESS_ERROR3
+ int GLU_TESS_ERROR4
+ int GLU_TESS_ERROR5
+ int GLU_TESS_ERROR6
+ int GLU_TESS_ERROR7
+ int GLU_TESS_ERROR8
+ int GLU_TESS_MISSING_BEGIN_POLYGON
+ int GLU_TESS_MISSING_BEGIN_CONTOUR
+ int GLU_TESS_MISSING_END_POLYGON
+ int GLU_TESS_MISSING_END_CONTOUR
+ int GLU_TESS_COORD_TOO_LARGE
+ int GLU_TESS_NEED_COMBINE_CALLBACK
+ int GLU_TESS_WINDING_ODD
+ int GLU_TESS_WINDING_NONZERO
+ int GLU_TESS_WINDING_POSITIVE
+ int GLU_TESS_WINDING_NEGATIVE
+ int GLU_TESS_WINDING_ABS_GEQ_TWO
+
+ float GLU_TESS_MAX_COORD
+
+ ctypedef struct GLUnurbs:
+ int _dummy
+ ctypedef struct GLUquadric:
+ int _dummy
+ ctypedef struct GLUtesselator:
+ int _dummy
+
+ cdef void gluBeginCurve(GLUnurbs* nurb)
+ cdef void gluBeginPolygon(GLUtesselator* tess)
+ cdef void gluBeginSurface(GLUnurbs* nurb)
+ cdef void gluBeginTrim(GLUnurbs* nurb)
+ cdef GLint gluBuild1DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, void *data)
+ cdef GLint gluBuild1DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, void *data)
+ cdef GLint gluBuild2DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, void *data)
+ cdef GLint gluBuild2DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, void *data)
+ cdef GLint gluBuild3DMipmapLevels(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, void *data)
+ cdef GLint gluBuild3DMipmaps(GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void *data)
+ cdef GLboolean gluCheckExtension(GLubyte *extName, GLubyte *extString)
+ cdef void gluCylinder(GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks)
+ cdef void gluDeleteNurbsRenderer(GLUnurbs* nurb)
+ cdef void gluDeleteQuadric(GLUquadric* quad)
+ cdef void gluDeleteTess(GLUtesselator* tess)
+ cdef void gluDisk(GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops)
+ cdef void gluEndCurve(GLUnurbs* nurb)
+ cdef void gluEndPolygon(GLUtesselator* tess)
+ cdef void gluEndSurface(GLUnurbs* nurb)
+ cdef void gluEndTrim(GLUnurbs* nurb)
+ cdef GLubyte * gluErrorString(GLenum error)
+ cdef void gluGetNurbsProperty(GLUnurbs* nurb, GLenum property, GLfloat* data)
+ cdef GLubyte * gluGetString(GLenum name)
+ cdef void gluGetTessProperty(GLUtesselator* tess, GLenum which, GLdouble* data)
+ cdef void gluLoadSamplingMatrices(GLUnurbs* nurb, GLfloat *model, GLfloat *perspective, GLint *view)
+ cdef void gluLookAt(GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ)
+ cdef GLUnurbs* gluNewNurbsRenderer()
+ cdef GLUquadric* gluNewQuadric()
+ cdef GLUtesselator* gluNewTess()
+ cdef void gluNextContour(GLUtesselator* tess, GLenum type)
+ cdef void gluNurbsCallback(GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc)
+ cdef void gluNurbsCallbackData(GLUnurbs* nurb, GLvoid* userData)
+ cdef void gluNurbsCallbackDataEXT(GLUnurbs* nurb, GLvoid* userData)
+ cdef void gluNurbsCurve(GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type)
+ cdef void gluNurbsProperty(GLUnurbs* nurb, GLenum property, GLfloat value)
+ cdef void gluNurbsSurface(GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type)
+ cdef void gluOrtho2D(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top)
+ cdef void gluPartialDisk(GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep)
+ cdef void gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
+ cdef void gluPickMatrix(GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport)
+ cdef GLint gluProject(GLdouble objX, GLdouble objY, GLdouble objZ, GLdouble *model, GLdouble *proj, GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ)
+ cdef void gluPwlCurve(GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type)
+ cdef void gluQuadricCallback(GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc)
+ cdef void gluQuadricDrawStyle(GLUquadric* quad, GLenum draw)
+ cdef void gluQuadricNormals(GLUquadric* quad, GLenum normal)
+ cdef void gluQuadricOrientation(GLUquadric* quad, GLenum orientation)
+ cdef void gluQuadricTexture(GLUquadric* quad, GLboolean texture)
+ cdef GLint gluScaleImage(GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut)
+ cdef void gluSphere(GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks)
+ cdef void gluTessBeginContour(GLUtesselator* tess)
+ cdef void gluTessBeginPolygon(GLUtesselator* tess, GLvoid* data)
+ cdef void gluTessCallback(GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc)
+ cdef void gluTessEndContour(GLUtesselator* tess)
+ cdef void gluTessEndPolygon(GLUtesselator* tess)
+ cdef void gluTessNormal(GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ)
+ cdef void gluTessProperty(GLUtesselator* tess, GLenum which, GLdouble data)
+ cdef void gluTessVertex(GLUtesselator* tess, GLdouble *location, GLvoid* data)
+ cdef GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble *model, GLdouble *proj, GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ)
+ cdef GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, GLdouble *model, GLdouble *proj, GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW)
+
+ cdef void glewInit()
+ cdef GLboolean glewGetExtension(char* name)
+ cdef GLboolean glewIsSupported(char* name)
+
+ # Shaders
+ int GLEW_ARB_vertex_program
+ int GLEW_ARB_fragment_program
+
+ int GL_PROGRAM_STRING_ARB
+ int GL_PROGRAM_ERROR_STRING_ARB
+ int GL_PROGRAM_ERROR_POSITION_ARB
+ int GL_PROGRAM_FORMAT_ASCII_ARB
+ int GL_PROGRAM_OBJECT_ARB
+ int GL_SHADER_OBJECT_ARB
+ int GL_OBJECT_TYPE_ARB
+ int GL_OBJECT_SUBTYPE_ARB
+ int GL_FLOAT_VEC2_ARB
+ int GL_FLOAT_VEC3_ARB
+ int GL_FLOAT_VEC4_ARB
+ int GL_INT_VEC2_ARB
+ int GL_INT_VEC3_ARB
+ int GL_INT_VEC4_ARB
+ int GL_BOOL_ARB
+ int GL_BOOL_VEC2_ARB
+ int GL_BOOL_VEC3_ARB
+ int GL_BOOL_VEC4_ARB
+ int GL_FLOAT_MAT2_ARB
+ int GL_FLOAT_MAT3_ARB
+ int GL_FLOAT_MAT4_ARB
+ int GL_SAMPLER_1D_ARB
+ int GL_SAMPLER_2D_ARB
+ int GL_SAMPLER_3D_ARB
+ int GL_SAMPLER_CUBE_ARB
+ int GL_SAMPLER_1D_SHADOW_ARB
+ int GL_SAMPLER_2D_SHADOW_ARB
+ int GL_SAMPLER_2D_RECT_ARB
+ int GL_SAMPLER_2D_RECT_SHADOW_ARB
+ int GL_OBJECT_DELETE_STATUS_ARB
+ int GL_OBJECT_COMPILE_STATUS_ARB
+ int GL_OBJECT_LINK_STATUS_ARB
+ int GL_OBJECT_VALIDATE_STATUS_ARB
+ int GL_OBJECT_INFO_LOG_LENGTH_ARB
+ int GL_OBJECT_ATTACHED_OBJECTS_ARB
+ int GL_OBJECT_ACTIVE_UNIFORMS_ARB
+ int GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB
+ int GL_OBJECT_SHADER_SOURCE_LENGTH_ARB
+ int GL_VERTEX_SHADER_ARB
+ int GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB
+ int GL_MAX_VARYING_FLOATS_ARB
+ int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB
+ int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB
+ int GL_OBJECT_ACTIVE_ATTRIBUTES_ARB
+ int GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB
+ int GL_VERTEX_PROGRAM_ARB
+ int GL_FRAGMENT_PROGRAM_ARB
+ int GL_PROGRAM_ALU_INSTRUCTIONS_ARB
+ int GL_PROGRAM_TEX_INSTRUCTIONS_ARB
+ int GL_PROGRAM_TEX_INDIRECTIONS_ARB
+ int GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB
+ int GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB
+ int GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB
+ int GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB
+ int GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB
+ int GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB
+ int GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB
+ int GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB
+ int GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB
+ int GL_MAX_TEXTURE_COORDS_ARB
+ int GL_MAX_TEXTURE_IMAGE_UNITS_ARB
+
+ # cdef void glGetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params)
+ # cdef void glGetInfoLogARB(GLhandleARB object, GLsizei maxLength, GLsizei *length, GLchar *infoLog)
+ # cdef void glShaderSourceARB(GLhandleARB shader, GLsizei nstrings, GLchar** strings, GLint *lengths)
+ # cdef void glCompileShaderARB(GLhandleARB shader)
+ # cdef GLhandleARB glCreateShaderObjectARB(GLenum shaderType)
+ # cdef void glAttachObjectARB(GLhandleARB program, GLhandleARB shader)
+ # cdef void glDetachObjectARB(GLhandleARB program, GLhandleARB shader)
+ # cdef void glLinkProgramARB(GLhandleARB program)
+ # cdef void glDeleteObjectARB(GLhandleARB object)
+
+ cdef void glGenProgramsARB(GLsizei n, GLuint* ids)
+ cdef void glBindProgramARB(GLenum target, GLuint id)
+ cdef void glProgramStringARB(GLenum target, GLenum format, GLsizei len, char* string)
+ cdef void glDeleteProgramsARB(GLsizei n, GLuint* ids)
+ cdef void glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+ cdef void glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
+ cdef void glGetProgramStringARB(GLenum target, GLenum pname, void* string)
+
+ #cdef void init_advanced_opengl()
View
0  cpu.pxd → dcpu16/cpu.pxd
File renamed without changes
View
4 cpu.pyx → dcpu16/cpu.pyx
@@ -40,7 +40,9 @@ cdef class CPU(object):
def __init__(self):
self.skip_next = False
- def loads(self, encoded, location=0):
+ def load(self, encoded, location=0):
+ if not isinstance(encoded, basestring):
+ encoded = ''.join(encoded)
encoded = re.sub(r'[#;].*$', '', encoded, 0, re.M) # strip comments
encoded = re.sub(r'^.*:', '', encoded, 0, re.M) # strip addresses
encoded = re.sub(r'[^0-9a-f]', '', encoded) # strip non-hex
View
9 dis.py → dcpu16/dis.py
@@ -2,9 +2,10 @@
import re
import time
-if __name__ == '__main__':
+
+def main():
- from cpu import CPU
+ from .cpu import CPU
if len(sys.argv) == 1:
infile = sys.stdin
@@ -22,3 +23,7 @@
cpu.disassemble()
print
+
+
+if __name__ == '__main__':
+ main()
View
67 link.py → dcpu16/link.py
@@ -2,7 +2,7 @@
import sys
-def parse_symbol_header(encoded):
+def parse_symbol_defs(encoded):
out = []
for chunk in encoded.split(', '):
chunk = chunk.strip()
@@ -16,6 +16,20 @@ def parse_symbol_header(encoded):
raise ValueError('could not parse symbol header chunk: %r' % chunk)
return out
+def parse_symbol_refs(encoded):
+ out = []
+ for chunk in encoded.split(', '):
+ chunk = chunk.strip()
+ if not chunk:
+ continue
+ m = re.match(r'0x([a-fA-F0-9]+)(\+|-)(\w+)', chunk)
+ if m:
+ value, operation, name = m.groups()
+ out.append((name, operation=='-', int(value, 16)))
+ else:
+ raise ValueError('could not parse symbol header chunk: %r' % chunk)
+ return out
+
class Linker(object):
@@ -24,11 +38,6 @@ def __init__(self):
self.global_symbols = {}
self.code = []
- def loads(self, source, name='<string>'):
- obj = Object(name)
- obj.loads(source)
- self.objects.append(obj)
-
def load(self, infile, name='<file>'):
obj = Object(name)
obj.load(infile)
@@ -59,27 +68,24 @@ def link(self):
code = obj.code[:]
- for name, from_ in obj.symbol_references:
+ for name, sub, from_ in obj.symbol_references:
to = symbols.get(name)
if to is None:
missing.append(name)
continue
- code[from_] += to
+ if sub:
+ code[from_] -= to
+ else:
+ code[from_] += to
self.code.extend(code)
offset += len(code)
if missing:
- for x in missing:
- print 'undefined symbol: %s' % x
- return False
+ raise ValueError('undefined symbols: %s' % (', '.join(sorted(missing))))
- return True
-
- def dumps(self):
-
out = []
for i, x in enumerate(self.code):
if i % 8 == 0:
@@ -92,6 +98,9 @@ def dumps(self):
return ''.join(out)
+
+
+
@@ -102,10 +111,10 @@ def __init__(self, name):
self.headers = {}
self.code = []
- def loads(self, source):
- self.load(source.splitlines())
-
def load(self, infile):
+ if isinstance(infile, basestring):
+ infile = infile.splitlines()
+
encoded = []
for line in infile:
@@ -131,14 +140,12 @@ def load(self, infile):
for i in xrange(0, len(encoded), 4):
self.code.append(int(encoded[i:i + 4], 16))
- self.global_symbols = parse_symbol_header(self.headers.get('global-symbols', ''))
- self.local_symbols = parse_symbol_header(self.headers.get('local-symbols', ''))
- self.symbol_references = parse_symbol_header(self.headers.get('symbol-references', ''))
-
+ self.global_symbols = parse_symbol_defs(self.headers.get('global-symbols', ''))
+ self.local_symbols = parse_symbol_defs(self.headers.get('local-symbols', ''))
+ self.symbol_references = parse_symbol_refs(self.headers.get('symbol-references', ''))
-
-if __name__ == '__main__':
+def main():
if len(sys.argv) == 1:
infiles = [sys.stdin]
@@ -149,11 +156,15 @@ def load(self, infile):
for infile in infiles:
linker.load(infile)
- if not linker.link():
+ try:
+ print linker.link()
+ except ValueError as e:
+ print e
exit(1)
-
- print linker.dumps()
-
+
+
+if __name__ == '__main__':
+ main()
View
0  macros.pyi → dcpu16/macros.pyi
File renamed without changes
View
0  mygl.py → dcpu16/mygl.py
File renamed without changes
View
0  ops.pxd → dcpu16/ops.pxd
File renamed without changes
View
0  ops.pyx → dcpu16/ops.pyx
File renamed without changes
View
206 dcpu16/run.pyx
@@ -0,0 +1,206 @@
+import sys
+import re
+import time
+from PIL import Image
+from c_opengl cimport *
+
+from .cpu cimport CPU
+from .mygl import glu, glut
+from . import utils
+
+
+DEF CHAR_W = 4
+DEF CHAR_H = 8
+DEF SCREEN_COLS = 32
+DEF SCREEN_ROWS = 12
+
+cdef unsigned char colours[16][3]
+for i, (r, g, b) in enumerate([
+ (0x00, 0x00, 0x00),
+ (0x00, 0x00, 0xaa),
+ (0x00, 0xaa, 0x00),
+ (0x00, 0xaa, 0xaa),
+ (0xaa, 0x00, 0x00),
+ (0xaa, 0x00, 0xaa),
+ (0xaa, 0xaa, 0x00),
+ (0xaa, 0xaa, 0xaa),
+ (0x55, 0x55, 0x55),
+ (0x55, 0x55, 0xff),
+ (0x55, 0xff, 0x55),
+ (0x55, 0xff, 0xff),
+ (0xff, 0x55, 0x55),
+ (0xff, 0x55, 0xff),
+ (0xff, 0xff, 0x55),
+ (0xff, 0xff, 0xff),
+]):
+ colours[i][0] = r
+ colours[i][1] = g
+ colours[i][2] = b
+
+
+cdef class App(object):
+
+ cdef CPU cpu
+ cdef int last_PC
+ cdef float last_time
+ cdef unsigned short keyboard_ring_i
+
+ cdef unsigned int width
+ cdef unsigned int height
+
+ cdef unsigned int font_texture
+
+
+ def __init__(self):
+ self.last_PC = -1
+ self.last_time = 0
+ self.keyboard_ring_i = 0
+
+ def setup(self, infile):
+
+ # Setup the CPU.
+ self.cpu = CPU()
+ self.cpu.load(infile)
+
+ # Setup GLUT.
+ glut.init(sys.argv)
+ glut.initDisplayMode(glut.DOUBLE | glut.RGBA | glut.DEPTH)
+
+ # Setup the main window.
+ self.width = CHAR_W * SCREEN_COLS * 3
+ self.height = CHAR_H * SCREEN_ROWS * 3
+ glut.initWindowSize(self.width, self.height)
+ glut.createWindow('DCPU-16 Emulator')
+
+ # Setup callbacks.
+ glut.reshapeFunc(self.reshape)
+ glut.displayFunc(self.display)
+ glut.idleFunc(self.idle)
+ glut.keyboardFunc(self.keyboard)
+
+ # Setup font texture.
+ # TODO: Cython should have access to this.
+ img = Image.open('font.png')
+ img = img.convert('RGBA')
+ img.putalpha(img.split()[0])
+ data = img.tostring()
+ cdef unsigned char *c_data = data
+ assert len(data) == 16384
+ glGenTextures(1, &self.font_texture)
+ glBindTexture(GL_TEXTURE_2D, self.font_texture)
+ glTexImage2D(GL_TEXTURE_2D, 0, 4, 32 * 4, 4 * 8, 0, GL_RGBA, GL_UNSIGNED_BYTE, c_data)
+
+
+ # INIT OPENGL
+
+ glClearColor(0, 0, 0, 1)
+
+ glEnable(GL_TEXTURE_2D)
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST)
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST)
+
+ glEnable(GL_BLEND)
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
+
+
+ def run(self):
+ return glut.mainLoop()
+
+ def reshape(self, width, height):
+ self.width = width
+ self.height = height
+ glViewport(0, 0, self.width, self.height)
+ glMatrixMode(GL_PROJECTION)
+ glLoadIdentity()
+ glOrtho(0, SCREEN_COLS, 0, SCREEN_ROWS, -1, 10)
+ glMatrixMode(GL_MODELVIEW)
+
+ def display(self):
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
+
+ glLoadIdentity()
+ glTranslatef(0, SCREEN_ROWS, 0)
+
+ cdef unsigned short i, c, x, y, bgx, fgx, cx, cy
+
+ for x in range(SCREEN_COLS):
+ glPushMatrix()
+
+ for y in range(SCREEN_ROWS):
+ glTranslatef(0, -1, 0)
+
+ i = y * SCREEN_COLS + x
+ c = self.cpu.memory[0x8000 + i]
+ if not c:
+ continue
+
+ bgx = ((c & 0x0f00) >> 8)
+ if bgx:
+ glDisable(GL_TEXTURE_2D)
+ glColor3ub(colours[bgx][0], colours[bgx][1], colours[bgx][2])
+ glBegin(GL_QUADS)
+ glVertex2i(0, 0)
+ glVertex2i(1, 0)
+ glVertex2i(1, 1)
+ glVertex2i(0, 1)
+ glEnd()
+ glEnable(GL_TEXTURE_2D)
+
+ fgx = ((c & 0xf000) >> 12)
+ glColor3ub(colours[fgx][0], colours[fgx][1], colours[fgx][2])
+
+ cx = (c & 0x7f) % 32
+ cy = (c & 0x7f) / 32
+
+ # Draw the character itself.
+ glBegin(GL_QUADS)
+ glTexCoord2f((cx + 0) / 32.0, (cy + 1) / 4.0)
+ glVertex2i(0, 0)
+ glTexCoord2f((cx + 1) / 32.0, (cy + 1) / 4.0)
+ glVertex2i(1, 0)
+ glTexCoord2f((cx + 1) / 32.0, (cy + 0) / 4.0)
+ glVertex2i(1, 1)
+ glTexCoord2f((cx + 0) / 32.0, (cy + 0) / 4.0)
+ glVertex2i(0, 1)
+ glEnd()
+
+
+ glPopMatrix()
+ glTranslatef(1, 0, 0)
+
+ glut.swapBuffers()
+