Automatically Generated GTC Python Bindings Documentation


Index
clear
color
colors
combine
depth_func
disable
disable_client_state
draw_elements
draw_mesh
enable
enable_client_state
gotoxy
gtcDBBuf
gtcServer
gtcServerMessage
gtcSimpleMesh
gtcTexture
gtc_debug_level
gtc_time
identity
invert
light
lightv
load_identity
load_matrix
mesh_load
new_buf
normals
ortho
perspective
rot
send_font_size
send_layout
server_get_message
server_new
server_send
set_current_font
string_xsize
swapbuffers
tex_coords
tex_env_i
text
text_linecount
texture_image_2d
texture_load
vertices
viewport
xlat


Functionclear
ArgumentsgtcDBBuf buf
int mask
Return valuevoid
Documentationsend a glClear to the client
Referenced byN/A

Functioncolor
ArgumentsgtcDBBuf buf
char_array colors
Return valuevoid
DocumentationThis function sends a message to a client through the gtcDBBuf buf.
sends a glColor to the client.
Referenced byN/A

Functioncolors
ArgumentsgtcDBBuf buf
int size
char_array C
Return valuevoid
Documentationsend a gtcColorPointer to the client
Referenced byN/A

Functioncombine
Argumentsfloat_array a
float_array b
Return valuefloat_array
DocumentationReturns the product of a and b (a*b) as matrices.
Referenced byN/A

Functiondepth_func
ArgumentsgtcDBBuf buf
int func
Return valuevoid
DocumentationglDepthFunc sent to the client
Referenced byN/A

Functiondisable
ArgumentsgtcDBBuf buf
int cap
Return valuevoid
DocumentationglDisable sent to the client
Referenced byN/A

Functiondisable_client_state
ArgumentsgtcDBBuf buf
int state
Return valuevoid
Documentationsend a glDisableClientState to the client
Referenced byN/A

Functiondraw_elements
ArgumentsgtcDBBuf buf
int mode
int_array index
Return valuevoid
Documentationsend a glDrawElements to the client
Referenced byN/A

Functiondraw_mesh
ArgumentsgtcDBBuf buf
gtcSimpleMesh mesh
Return valuevoid
DocumentationDraws the mesh using vertex arrays and such.
Referenced bygtcSimpleMesh

Functionenable
ArgumentsgtcDBBuf buf
int cap
Return valuevoid
DocumentationglEnable sent to the client
Referenced byN/A

Functionenable_client_state
ArgumentsgtcDBBuf buf
int state
Return valuevoid
Documentationsend a glEnableClientState to the client
Referenced byN/A

Functiongotoxy
ArgumentsgtcDBBuf buf
int x
int y
Return valuevoid
DocumentationThis function sends a message to a client through the gtcDBBuf buf.
Send the raster position to (x,y). This is done using a combination of glRasterPos and glBitmap (read the manpage of the latter to learn why.)
Referenced bysend_layout

TypegtcDBBuf
Attributesnone (opaque object/black box)
DocumentationThis opaque object contains a buffer of bits used to communicate with clients. See new_buf.
Referenced byclear | color | colors | depth_func | disable | disable_client_state | draw_elements | draw_mesh | enable | enable_client_state | gotoxy | light | lightv | load_identity | load_matrix | new_buf | normals | ortho | perspective | send_font_size | send_layout | server_send | set_current_font | swapbuffers | tex_coords | tex_env_i | text | texture_image_2d | vertices | viewport

TypegtcServer
Attributesdouble default_sec_per_byte
int verbose
DocumentationA nearly opaque object to represent a server object. The field default_sec_per_byte can be set to reflect the default bandwidth allocated to each client. The verbose field can be used to get some output on stdout. See server_new and server_get_message.
Referenced byserver_get_message | server_new | server_send

TypegtcServerMessage
Attributesint t
int op
int x1
int x2
int x3
int x4
int client
DocumentationThis almost transparent object is what you get when a client sends you a message. The t field tells you what kind of message it is (one of gtcNewClient, gtcDeadClient, gtcReceivedPacket, gtcReadyForSending or gtcTimeout.)

gtcNewClient indicates that a new client has connected; the client field will be used to identify that client from now on. Similarly, gtcDeadClient indicates that the client is now gone. After receiving a gtcDeadClient message, the client id will be recycled by the server and reused on subsequently connecting clients. gtcReadyForSending indicates when would be appropriate to send a new packet to this client, given its allocated bandwidth. gtcTimeout indicates that no events happened before the timeout ran out.

gtcReceivedPacket is more interesting.

op will be one of gtcKeyPress, gtcKeyRelease, gtcKeyRepeat, gtcConfigureNotify, gtcButtonPress, gtcButtonRelease.

gtcKeyPress, gtcKeyRelease and gtcKeyRepeat indicate the appropriate keyboard event on the client. Then, the field x1 holds the keysym for the key, (x2,x3) is the location of the mouse pointer at key event x4 is the time at which the event took place.

gtcConfigureNotify indicates that the window on the client has changed shape. (x1,x2) is (width,height).

gtcButtonPress and gtcButtonRelease indicate that a mouse button event occured. x1 has the button number, (x2,x3) has the position on the screen, x4 has the time.

See also server_get_message
Referenced byserver_get_message

TypegtcSimpleMesh
Attributesnone (opaque object/black box)
DocumentationOpaque object for a mesh with normals and texture coordinates. See mesh_load and draw_mesh.
Referenced bydraw_mesh | mesh_load

TypegtcTexture
Attributesint w
int h
int type
DocumentationSemi-opaque object to conatain a texture. Size in pixels is (w,h) and the underlying type is also given. See texture_load and texture_image_2d
Referenced bytexture_image_2d | texture_load

Functiongtc_debug_level
Argumentsint level
Return valuevoid
DocumentationSets the debug level. The debug level is a bitfield, so if you want maximum debug output (a LOT!), set it to 0xffffffff. You can play around with bit values to get less information.
Referenced byN/A

Functiongtc_time
Argumentsnone
Return valuedouble
DocumentationReturns the current time in seconds since 1970 or something.
Referenced byN/A

Functionidentity
Argumentsnone
Return valuefloat_array
DocumentationReturns the identity matrix
Referenced byN/A

Functioninvert
Argumentsfloat_array a
Return valuefloat_array
DocumentationReturns the matrix inverse of a.
Referenced byN/A

Functionlight
ArgumentsgtcDBBuf buf
int light
int pname
float param
Return valuevoid
Documentationsend a glLightf to the client
Referenced byN/A

Functionlightv
ArgumentsgtcDBBuf buf
int light
int pname
float_array params
Return valuevoid
Documentationsend a glLightfv to the client
Referenced byN/A

Functionload_identity
ArgumentsgtcDBBuf buf
Return valuevoid
DocumentationglLoadIdentity sent to the client
Referenced byN/A

Functionload_matrix
ArgumentsgtcDBBuf buf
float_array m
Return valuevoid
Documentationsend a glLoadMatrix to the client.
Referenced byN/A

Functionmesh_load
Argumentsstring filename
Return valuegtcSimpleMesh
DocumentationLoads a mesh from a file. The file should be a 3d Studio .ase file.
Referenced bygtcSimpleMesh

Functionnew_buf
Argumentsnone
Return valuegtcDBBuf
DocumentationCreate a new bit buffer for sending packets to clients.
Referenced bygtcDBBuf

Functionnormals
ArgumentsgtcDBBuf buf
float_array N
Return valuevoid
Documentationsend a glNormalPointer to the client
Referenced byN/A

Functionortho
ArgumentsgtcDBBuf buf
float left
float right
float bottom
float top
float zNear
float zFar
Return valuevoid
Documentationsend a glOrtho to the client
Referenced byN/A

Functionperspective
ArgumentsgtcDBBuf buf
float fovy
float aspect
float zNear
float zFar
Return valuevoid
Documentationsend a gluPerspective to the client.
Referenced byN/A

Functionrot
Argumentsfloat x
float y
float z
float theta
Return valuefloat_array
DocumentationReturns a rotation matrix about (x,y,z) by angle theta.
Referenced byN/A

Functionsend_font_size
ArgumentsgtcDBBuf buf
unsigned pixels_x
unsigned pixels_y
Return valuevoid
DocumentationThis function sends a message to a client through the gtcDBBuf buf.
sets the current client-side font size.
Referenced byN/A

Functionsend_layout
ArgumentsgtcDBBuf buf
string text
int x
int y
unsigned w
unsigned dy
unsigned mode
Return valuevoid
DocumentationThis function sends a message to a client through the gtcDBBuf buf.
sends text to the client for layout. The text will be written at position (x,y), with a width of w pixels. Each line will be dy pixels below the preceding line. mode can be any one of gtcLeft, gtcRight, gtcCenter or gtcJustify and specifies the alignment of paragraphs. Raster position after this call is completely undefined(really!). This uses glBitmap and gotoxy so the same caveats as in gotoxy and text apply.
Referenced byN/A

Functionserver_get_message
ArgumentsgtcServer server
double timeout
Return valuegtcServerMessage
DocumentationGet the next message from a server object. You can give a timeout, if you do not want to wait forever.
Referenced bygtcServer | gtcServerMessage | server_new

Functionserver_new
Argumentsint port
int verbose
float sec_per_byte
Return valuegtcServer
DocumentationCreate a new server object. This object will be used to receive connections from clients and communicate with them. You poll this server with server_get_message to get events from clients.
Referenced bygtcServer

Functionserver_send
ArgumentsgtcServer server
int client
gtcDBBuf buf
Return valuevoid
DocumentationSend a bit buffer to a client.
Referenced byN/A

Functionset_current_font
ArgumentsgtcDBBuf buf
unsigned id
Return valuevoid
DocumentationThis function sends a message to a client through the gtcDBBuf buf.
set client-side current font. For id, try the constants such as gtcCharter or gtcLuciduxSans.
Referenced byN/A

Functionstring_xsize
Argumentsint fontid
string s
unsigned pixels_x
unsigned pixels_y
Return valueint
DocumentationMeasures the width, in pixels, of a given string, in the specified font and pixel size.
Referenced byN/A

Functionswapbuffers
ArgumentsgtcDBBuf buf
Return valuevoid
Documentationsend a glXSwapBuffers to the client
Referenced byN/A

Functiontex_coords
ArgumentsgtcDBBuf buf
float_array T
Return valuevoid
Documentationsend a glTexCoordPointer to the client
Referenced byN/A

Functiontex_env_i
ArgumentsgtcDBBuf buf
int mode
Return valuevoid
DocumentationglTexEnvi sent to the client
Referenced byN/A

Functiontext
ArgumentsgtcDBBuf buf
string text
Return valuevoid
DocumentationThis function sends a message to a client through the gtcDBBuf buf.
Writes a string of text at the current raster position. glBitmap is used to render the text, so you have to set up the environment properly. For instance, you'd probably want to disable textures and set the color.
Referenced bysend_layout

Functiontext_linecount
Argumentsint fontid
string text
int w
unsigned pixels_x
unsigned pixels_y
Return valuevoid
DocumentationCount the number of lines used to lay out a string of text given the width w in pixels and the pixel size of the font.
Referenced byN/A

Functiontexture_image_2d
ArgumentsgtcDBBuf buf
gtcTexture tex
int level
int border
Return valuevoid
DocumentationglTextureImage2d sent to the client, loading the texture object specified. See also texture_load.
Referenced bygtcTexture

Functiontexture_load
Argumentsstring filename
Return valuegtcTexture
DocumentationLoads a texture object from a file. The file should be a png file.
Referenced bygtcTexture | texture_image_2d

Functionvertices
ArgumentsgtcDBBuf buf
float_array V
Return valuevoid
Documentationsend a glVertexPointer to the client
Referenced byN/A

Functionviewport
ArgumentsgtcDBBuf buf
int x
int y
int w
int h
Return valuevoid
Documentationsend a glViewport to the client
Referenced byN/A

Functionxlat
Argumentsfloat x
float y
float z
Return valuefloat_array
DocumentationReturns a translation matrix by (x,y,z).
Referenced byN/A

ConstantGTC_ALPHA
ConstantGTC_ALPHA12
ConstantGTC_ALPHA16
ConstantGTC_ALPHA4
ConstantGTC_ALPHA8
ConstantGTC_ALPHA_TEST
ConstantGTC_ALWAYS
ConstantGTC_AMBIENT
ConstantGTC_AUTO_NORMAL
ConstantGTC_BITMAP
ConstantGTC_BLEND
ConstantGTC_BYTE
ConstantGTC_CLIP_PLANE0
ConstantGTC_CLIP_PLANE1
ConstantGTC_CLIP_PLANE2
ConstantGTC_CLIP_PLANE3
ConstantGTC_CLIP_PLANE4
ConstantGTC_CLIP_PLANE5
ConstantGTC_COLOR_ARRAY
ConstantGTC_COLOR_LOGIC_OP
ConstantGTC_COLOR_MATERIAL
ConstantGTC_CONSTANT_ATTENUATION
ConstantGTC_CULL_FACE
ConstantGTC_DECAL
ConstantGTC_DEPTH_TEST
ConstantGTC_DIFFUSE
ConstantGTC_DITHER
ConstantGTC_EDGE_FLAG_ARRAY
ConstantGTC_EQUAL
ConstantGTC_FLOAT
ConstantGTC_FOG
ConstantGTC_GEQUAL
ConstantGTC_GREATER
ConstantGTC_INDEX_ARRAY
ConstantGTC_INDEX_LOGIC_OP
ConstantGTC_INT
ConstantGTC_INTENSITY
ConstantGTC_INTENSITY12
ConstantGTC_INTENSITY16
ConstantGTC_INTENSITY4
ConstantGTC_INTENSITY8
ConstantGTC_INTERNALFORMAT_1
ConstantGTC_INTERNALFORMAT_2
ConstantGTC_INTERNALFORMAT_3
ConstantGTC_INTERNALFORMAT_4
ConstantGTC_LEQUAL
ConstantGTC_LESS
ConstantGTC_LIGHT0
ConstantGTC_LIGHT1
ConstantGTC_LIGHT2
ConstantGTC_LIGHT3
ConstantGTC_LIGHT4
ConstantGTC_LIGHT5
ConstantGTC_LIGHT6
ConstantGTC_LIGHT7
ConstantGTC_LIGHTING
ConstantGTC_LINEAR_ATTENUATION
ConstantGTC_LINES
ConstantGTC_LINE_LOOP
ConstantGTC_LINE_SMOOTH
ConstantGTC_LINE_STIPPLE
ConstantGTC_LINE_STRIP
ConstantGTC_LUMINANCE
ConstantGTC_LUMINANCE12
ConstantGTC_LUMINANCE12_ALPHA12
ConstantGTC_LUMINANCE12_ALPHA4
ConstantGTC_LUMINANCE16
ConstantGTC_LUMINANCE16_ALPHA16
ConstantGTC_LUMINANCE4
ConstantGTC_LUMINANCE4_ALPHA4
ConstantGTC_LUMINANCE6_ALPHA2
ConstantGTC_LUMINANCE8
ConstantGTC_LUMINANCE8_ALPHA8
ConstantGTC_LUMINANCE_ALPHA
ConstantGTC_MAP1_COLOR_4
ConstantGTC_MAP1_INDEX
ConstantGTC_MAP1_NORMAL
ConstantGTC_MAP1_TEXTURE_COORD_1
ConstantGTC_MAP1_TEXTURE_COORD_2
ConstantGTC_MAP1_TEXTURE_COORD_3
ConstantGTC_MAP1_TEXTURE_COORD_4
ConstantGTC_MAP1_VERTEX_3
ConstantGTC_MAP1_VERTEX_4
ConstantGTC_MAP2_COLOR_4
ConstantGTC_MAP2_INDEX
ConstantGTC_MAP2_NORMAL
ConstantGTC_MAP2_TEXTURE_COORD_1
ConstantGTC_MAP2_TEXTURE_COORD_2
ConstantGTC_MAP2_TEXTURE_COORD_3
ConstantGTC_MAP2_TEXTURE_COORD_4
ConstantGTC_MAP2_VERTEX_3
ConstantGTC_MAP2_VERTEX_4
ConstantGTC_MODULATE
ConstantGTC_NEVER
ConstantGTC_NORMALIZE
ConstantGTC_NORMAL_ARRAY
ConstantGTC_NOTEQUAL
ConstantGTC_POINTS
ConstantGTC_POINT_SMOOTH
ConstantGTC_POLYGON
ConstantGTC_POLYGON_OFFSET_FILL
ConstantGTC_POLYGON_OFFSET_LINE
ConstantGTC_POLYGON_OFFSET_POINT
ConstantGTC_POLYGON_SMOOTH
ConstantGTC_POLYGON_STIPPLE
ConstantGTC_POSITION
ConstantGTC_QUADRATIC_ATTENUATION
ConstantGTC_QUADS
ConstantGTC_QUAD_STRIP
ConstantGTC_R3_G3_B2
ConstantGTC_REPLACE
ConstantGTC_RGB
ConstantGTC_RGB10
ConstantGTC_RGB10_A2
ConstantGTC_RGB12
ConstantGTC_RGB16
ConstantGTC_RGB4
ConstantGTC_RGB5
ConstantGTC_RGB5_A1
ConstantGTC_RGB8
ConstantGTC_RGBA
ConstantGTC_RGBA12
ConstantGTC_RGBA16
ConstantGTC_RGBA2
ConstantGTC_RGBA4
ConstantGTC_RGBA8
ConstantGTC_SCISSOR_TEST
ConstantGTC_SHORT
ConstantGTC_SPECULAR
ConstantGTC_SPOT_CUTOFF
ConstantGTC_SPOT_DIRECTION
ConstantGTC_SPOT_EXPONENT
ConstantGTC_STENCIL_TEST
ConstantGTC_TEXTURE_1D
ConstantGTC_TEXTURE_2D
ConstantGTC_TEXTURE_COORD_ARRAY
ConstantGTC_TEXTURE_GEN_Q
ConstantGTC_TEXTURE_GEN_R
ConstantGTC_TEXTURE_GEN_S
ConstantGTC_TEXTURE_GEN_T
ConstantGTC_TRIANGLES
ConstantGTC_TRIANGLE_FAN
ConstantGTC_TRIANGLE_STRIP
ConstantGTC_UNSIGNED_BYTE
ConstantGTC_UNSIGNED_INT
ConstantGTC_UNSIGNED_SHORT
ConstantGTC_VERTEX_ARRAY
ConstantgtcButtonPress
ConstantgtcButtonRelease
ConstantgtcCenter
ConstantgtcCharter
ConstantgtcCharterBold
ConstantgtcCharterBoldItalic
ConstantgtcCharterItalic
ConstantgtcColorBufferBit
ConstantgtcConfigureNotify
ConstantgtcCourier
ConstantgtcCourierBold
ConstantgtcCourierBoldItalic
ConstantgtcCourierItalic
ConstantgtcDeadClient
ConstantgtcDepthBufferBit
ConstantgtcJustify
ConstantgtcKeyPress
ConstantgtcKeyRelease
ConstantgtcKeyRepeat
ConstantgtcLeft
ConstantgtcLuciduxSans
ConstantgtcLuciduxSansOblique
ConstantgtcNewClient
ConstantgtcReadyForSending
ConstantgtcReceivedPacket
ConstantgtcRight
ConstantgtcStencilBufferBit
ConstantgtcTimeout