Skip to content

Commit

Permalink
More support for using short-string types for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
mcfletch committed Jan 3, 2020
1 parent 1b7c3c3 commit 8cf737d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions OpenGL/arrays/ctypesparameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,13 @@ def dimensions( self, value, typeCode=None ):
GL_1_1.GL_CHAR: _types.GLchar,
GL_1_1.GL_BYTE: _types.GLbyte,
GL_1_1.GL_UNSIGNED_BYTE: _types.GLubyte,
'f': _types.GLfloat,
'd': _types.GLdouble,
'i': _types.GLint,
'I': _types.GLuint,
'h': _types.GLshort,
'H': _types.GLushort,
'b': _types.GLbyte,
'B': _types.GLubyte,
's': _types.GLchar,
}
9 changes: 9 additions & 0 deletions OpenGL/arrays/ctypespointers.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,13 @@ def dimensions( self, value, typeCode=None ):
GL_1_1.GL_CHAR: _types.GLchar,
GL_1_1.GL_BYTE: _types.GLbyte,
GL_1_1.GL_UNSIGNED_BYTE: _types.GLubyte,
'f': _types.GLfloat,
'd': _types.GLdouble,
'i': _types.GLint,
'I': _types.GLuint,
'h': _types.GLshort,
'H': _types.GLushort,
'b': _types.GLbyte,
'B': _types.GLubyte,
's': _types.GLchar,
}
9 changes: 9 additions & 0 deletions OpenGL/arrays/lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,13 @@ def arrayByteCount( cls, value, typeCode = None ):
GL_1_1.GL_CHAR: _types.GLchar,
GL_1_1.GL_BYTE: _types.GLbyte,
GL_1_1.GL_UNSIGNED_BYTE: _types.GLubyte,
'f': _types.GLfloat,
'd': _types.GLdouble,
'i': _types.GLint,
'I': _types.GLuint,
'h': _types.GLshort,
'H': _types.GLushort,
'b': _types.GLbyte,
'B': _types.GLubyte,
's': _types.GLchar,
}
9 changes: 9 additions & 0 deletions OpenGL/arrays/numpybuffers.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,13 @@ def lookupDtype( char ):
GL_1_1.GL_UNSIGNED_SHORT: lookupDtype(USHORT_TYPE),
_types.GL_VOID_P: lookupDtype('P'),
None: None,
'f': lookupDtype('f'),
'd': lookupDtype('d'),
'i': lookupDtype('i'),
'I': lookupDtype('I'),
'h': lookupDtype('h'),
'H': lookupDtype('H'),
'b': lookupDtype('b'),
'B': lookupDtype('B'),
's': lookupDtype('B'),
}
9 changes: 9 additions & 0 deletions OpenGL/arrays/numpymodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,13 @@ def lookupDtype( char ):
GL_1_1.GL_UNSIGNED_SHORT: lookupDtype(USHORT_TYPE),
_types.GL_VOID_P: lookupDtype('P'),
None: None,
'f': lookupDtype('f'),
'd': lookupDtype('d'),
'i': lookupDtype('i'),
'I': lookupDtype('I'),
'h': lookupDtype('h'),
'H': lookupDtype('H'),
'b': lookupDtype('b'),
'B': lookupDtype('B'),
's': lookupDtype('B'),
}

0 comments on commit 8cf737d

Please sign in to comment.