Module Expr Str Import alias Import alias ImportFrom alias Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ClassDef bases NameLoad body Assign NameStore Dict Num Num Num Str Str Str FunctionDef arguments args NameParam defaults body If NameLoad body Import alias Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str ExtSlice Slice Slice Index Num attr Assign AttributeStore NameLoad attr TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Call AttributeLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str attr Assign AttributeStore NameLoad attr TupleLoad NameLoad BinOpFloorDiv Call NameLoad AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr TupleLoad Num Num Num Assign AttributeStore NameLoad attr TupleLoad Num Num Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore BinOpMult AttributeLoad NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Slice NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Slice NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad NameLoad Print BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Str If UnaryOpNot NameLoad body Raise Call NameLoad Str orelse If NameLoad body Assign AttributeStore NameLoad attr NameLoad Print NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Num Num Call NameLoad SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num If AttributeLoad NameLoad attr body Pass orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call BinOpMult AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Num NameLoad NameLoad NameLoad Num NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr TupleLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Raise Call NameLoad orelse If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num NameLoad Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num NameLoad Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Num BinOpFloorDiv Call NameLoad AttributeLoad NameLoad attr Num orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Num Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr UnaryOpUAdd Num Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Num UnaryOpUAdd Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Num UnaryOpUAdd Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr UnaryOpUAdd Num Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr UnaryOpUAdd Num UnaryOpUAdd Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list
N/A N/A  Class that contains the OpenGL code to show a texture.

The code is written so that it can run on both old and new systems,
switching between the fixed function and modern pipeline as necessary.
 N/A os N/A ctypes gllib gl N/A TEX_WIDTH 512 N/A GL_VERSION 7938 N/A GL_COLOR_BUFFER_BIT 16384 N/A GL_TRIANGLES 4 N/A GL_BLEND 3042 N/A GL_SRC_ALPHA 770 N/A GL_ONE_MINUS_SRC_ALPHA 771 N/A GL_LUMINANCE 6409 N/A GL_ALPHA 6406 N/A GL_RGBA 6408 N/A GL_FLOAT 5126 N/A GL_UNSIGNED_BYTE 5121 N/A GL_TEXTURE_2D 3553 N/A GL_TEXTURE_WRAP_S 10242 N/A GL_TEXTURE_WRAP_T 10243 N/A GL_TEXTURE_MAG_FILTER 10240 N/A GL_TEXTURE_MIN_FILTER 10241 N/A GL_LINEAR 9729 N/A GL_REPEAT 10497 N/A GL_VERTEX_ARRAY 32884 N/A GL_TEXTURE_COORD_ARRAY 32888 N/A GL_PROJECTION 5889 N/A GL_MODELVIEW 5888 N/A GL_FLAT 7424 N/A THISDIR N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ Tex N/A object N/A N/A _known_errors N/A 1280 1281 1282 invalid enum invalid value invalid operation __init__ N/A N/A self N/A N/A N/A False N/A N/A imageio N/A im N/A N/A N/A N/A N/A imageio imread astronaut.png N/A N/A N/A N/A 1 copy N/A N/A self _tex_size N/A N/A N/A im shape N/A 1 N/A N/A im shape N/A 0 N/A N/A self _data N/A N/A im tostring N/A N/A N/A self _data N/A N/A N/A open N/A N/A N/A os path join THISDIR glyphs.blob rb read N/A N/A self _tex_size N/A TEX_WIDTH N/A N/A len N/A self _data TEX_WIDTH N/A N/A self _use_new_gl True N/A N/A self _bgcolor N/A 0.8 0.8 0.8 N/A N/A self _color N/A 0 0 0 N/A N/A N/A self init_gl N/A set_vertex_data N/A N/A self vcoords tcoords N/A N/A N/A BufferType N/A N/A ctypes c_float N/A len vcoords N/A N/A self _vcoords N/A BufferType N/A N/A self _tcoords N/A BufferType N/A N/A N/A self _vcoords N/A vcoords N/A N/A N/A self _tcoords N/A tcoords N/A _check_error N/A N/A self where N/A N/A N/A err N/A N/A gl glGetError N/A err N/A N/A err N/A N/A N/A self _known_errors get err N/A str err N/A N/A OpenGL error %s (%s) N/A where err N/A init_gl N/A N/A self N/A N/A N/A N/A N/A gl activate N/A version N/A N/A N/A N/A gl glGetString GL_VERSION decode utf-8 N/A N/A version N/A N/A N/A RuntimeError No context yet N/A N/A True N/A N/A N/A self _use_new_gl False N/A version N/A N/A self _use_new_gl N/A N/A N/A N/A self _create_texture N/A N/A N/A self _create_program N/A N/A N/A N/A self _create_texture N/A _reshape N/A N/A self size N/A N/A N/A N/A N/A gl glViewport 0 0 N/A int N/A size N/A 0 N/A int N/A size N/A 1 N/A N/A self _use_new_gl N/A N/A N/A N/A N/A N/A gl glMatrixMode GL_PROJECTION N/A N/A N/A gl glLoadIdentity N/A N/A N/A gl glMatrixMode GL_MODELVIEW N/A N/A N/A gl glLoadIdentity N/A N/A N/A self _check_error reshaping N/A _create_texture N/A N/A self N/A N/A N/A textures N/A N/A N/A ctypes c_uint 1 N/A N/A N/A gl glGenTextures 1 textures N/A N/A self _texid N/A textures N/A 0 N/A N/A N/A gl glBindTexture GL_TEXTURE_2D N/A self _texid N/A N/A N/A gl glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_S GL_REPEAT N/A N/A N/A gl glTexParameteri GL_TEXTURE_2D GL_TEXTURE_WRAP_T GL_REPEAT N/A N/A N/A gl glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MAG_FILTER GL_LINEAR N/A N/A N/A gl glTexParameteri GL_TEXTURE_2D GL_TEXTURE_MIN_FILTER GL_LINEAR N/A N/A w h N/A self _tex_size N/A ptr N/A N/A ctypes cast N/A self _data N/A ctypes c_void_p N/A N/A N/A gl glTexImage2D GL_TEXTURE_2D 0 GL_ALPHA w h 0 GL_ALPHA GL_UNSIGNED_BYTE ptr N/A N/A N/A self _check_error creating texture N/A _create_program N/A N/A self N/A N/A N/A N/A draw N/A N/A self N/A N/A N/A N/A N/A gl glClearColor N/A N/A self _bgcolor N/A 1.0 N/A N/A N/A gl glClear GL_COLOR_BUFFER_BIT N/A N/A N/A gl glEnable GL_BLEND N/A N/A N/A gl glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA N/A N/A N/A gl glColor3f N/A self _color N/A N/A N/A gl glEnable GL_TEXTURE_2D N/A N/A N/A gl glBindTexture GL_TEXTURE_2D N/A self _texid N/A N/A N/A self _check_error preparing for drawing N/A N/A self _use_new_gl N/A N/A N/A NotImplementedError N/A N/A True N/A N/A N/A N/A gl glEnableClientState GL_VERTEX_ARRAY N/A N/A N/A gl glEnableClientState GL_TEXTURE_COORD_ARRAY N/A N/A N/A gl glVertexPointer 2 GL_FLOAT 0 N/A self _vcoords N/A N/A N/A gl glTexCoordPointer 2 GL_FLOAT 0 N/A self _tcoords N/A N/A N/A gl glDrawArrays GL_TRIANGLES 0 N/A N/A len N/A self _vcoords 2 N/A N/A N/A N/A N/A gl _lib glBegin GL_TRIANGLES N/A N/A N/A gl glTexCoord2f 0 1 N/A N/A N/A gl glVertex3f -1 -1 0 N/A N/A N/A gl glTexCoord2f 1 1 N/A N/A N/A gl glVertex3f N/A 1 -1 0 N/A N/A N/A gl glTexCoord2f 0 0 N/A N/A N/A gl glVertex3f -1 N/A 1 0 N/A N/A N/A gl glTexCoord2f 0 0 N/A N/A N/A gl glVertex3f -1 N/A 1 0 N/A N/A N/A gl glTexCoord2f 1 1 N/A N/A N/A gl glVertex3f N/A 1 -1 0 N/A N/A N/A gl glTexCoord2f 1 0 N/A N/A N/A gl glVertex3f N/A 1 N/A 1 0 N/A N/A N/A N/A gl _lib glEnd N/A N/A N/A gl glFlush N/A N/A N/A self _check_error drawing N/A N/A