Graphics-related opcode quick reference


Graphic engine setup-related
Vertex-related 1
Vertex-related 2
Primitives
Fragments
Texture mapping
Evaluators
Display Lists
Vertex arrays
Modes and Execution
State Information
Persepctive and Point of View
Simple Quadric Surfaces
Polygon tessellation
NURBS Curves
GLUT shapes
3D Models
Texture Mapped shapes
3D Text fonts
Video
Controlling Execution Flow of Graphic Engine
Frame-rate Assign and Math Operators
Frame-rate Vector Operators
Frame-rate Signal Generators
RGB Image Processing
Height fields
GLE Tubing and Extrusion Library wrapping
Two-dimensional text fonts
Macros


Graphic engine setup-related

GLpanel name [, iwidth, iheight, ix, iy, iborder]
GLpanel_end

GLfps ifps [, iresolution]

GLinsert iposition
GLinsert_i iposition

GLfullscreen iflag
GLredraw ktrig        (works at k-rate not  at t-rate)

GLclearwhen trig, imask
GLwaitInitStage

GLratio iratio, iflag


Vertex-related 1

glBegin tmode
glEnd

glColor tred, tgreen, tblue, talpha
glColor3 tred, tgreen, tblue

glColorMaterial ----- not implemented yet -----
glEdgeFlag* ----- not implemented yet -----

glFrontFace imode

glIndex ----- not implemented yet -----

glLight ilight, ipname, tparam
glLightv ilight, ipname, tparam0, tparam1, tparam2, tparam3
glLightModel ipname, tparam
glLightModelv ipname, tparam0, tparam1, tparam2, tparam3

glLoadIdentity
glLoadMatrix
t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15
glLoadMatrixv imatrixFunc
glMatrixMode imode
glMultMatrix t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15
glMultMatrixv imatrixFunc
glPushMatrix
glPopMatrix


Vertex-related 2

glMaterial tpname, tred, tgreen, tblue, talpha
Glshininess tparam

glNormal3 tnx, tny, tnz

glRasterPos* ----- not implemented yet -----
glRect* ----- not implemented yet -----

glRotate tangle, tx, ty, tz
glScale tx, ty, tz
glTranslate tx, ty, tz

glShadeModel tmode

glTexCoord1 ----- not implemented yet -----
glTexCoord2 ts, tt
glTexCoord3 ----- not implemented yet -----
glTexCoord4 ----- not implemented yet -----

glTexGeni icoord, tparam
glTexGenfv icoord, ipname, tparam0, tparam1, tparam2, tparam3

glVertex1 ----- not implemented yet -----
glVertex2 ----- not implemented yet -----

glVertex3 tx, ty, tz
glVertex4 ----- not implemented yet -----


Primitives

glBitmap ----- not implemented yet -----

glClipPlane iplane, tcoeff1, tcoeff2, tcoeff3, tcoeff4
glCullFace imode

glDepthRange ----- not implemented yet -----
glDrawPixels ----- not implemented yet -----
glFog ----- not implemented yet -----

glFrontFace imode

glFrustum tleft, tright, tbottom, ttop, tznear, tzfar
glOrtho tleft, tright, tbottom, ttop, tnear, tfar

glLineStipple ----- not implemented yet -----
glLineWidth twidth

glPixelMap imap, imapsize, ifn_values

glPixelStore* ----- not implemented yet -----

glPixelTransfer ipname, tparam

glPixelZoom ----- not implemented yet -----
glPointSize ----- not implemented yet -----
glPolygonMode ----- not implemented yet -----
glPolygonStipple ----- not implemented yet -----
glRasterPos* ----- not implemented yet -----
glViewport ----- not implemented yet -----

glClearColor tred, tgreen, tblue, talpha

glDrawBuffer imode

glReadBuffer ----- not implemented yet -----


Fragments

glAlphaFunc ----- not implemented yet -----
glBlendFunc isfactor, idfactor
glDepthFunc ----- not implemented yet -----
glLogicOp ----- not implemented yet -----
glScissor ----- not implemented yet -----
glStencilFunc ----- not implemented yet -----
glStencilOp ----- not implemented yet -----


Texture mapping

glBindTexture tTexHandle

glTexCoord2 ts, tt
glTexCoord3 ----- not implemented yet -----
glTexCoord4 ----- not implemented yet -----

glTexGeni icoord, tparam
glTexGenfv icoord, ipname, tcoeffx, tcoeffy, tcoeffz, tcoeffw

glTexEnvi tparam
glTexEnvfv tred, tgreen, tblue, talpha

glTexImage1D ----- not implemented yet -----
glTexImage2D ----- not implemented yet -----

glTexParameter* ----- not implemented yet -----


Evaluators

glEvalCoord1 tu
glEvalCoord2 tu, tv

glEvalMesh1 tmode, ti1, ti2
glEvalMesh2 tmode, ti1, ti2, tj1, tj2

glEvalPoint ----- not implemented yet -----

glMap1 itarget, iu1, iu2, iustride, iuorder, ifn_points
glMap2 itarget, iu1, iu2, iustride, iuorder, iv1, iv2, ivstride, ivorder, ifn_points

glMapGrid1 tun, tu1, tu2
glMapGrid2 tun, tu1, tu2, tvn, tv1, tv2

Selection and Feedback

glRenderMode ----- not implemented yet -----
glInitNames ----- not implemented yet -----
glLoadName ----- not implemented yet -----
glPopName ----- not implemented yet -----
glPushName ----- not implemented yet -----
glSelectBuffer ----- not implemented yet -----
gluPickMatrix ----- not implemented yet -----
glFeedbackBuffer ----- not implemented yet -----
glPassThrough ----- not implemented yet -----


Display Lists

glCallList ilist
glCallLists ----- not implemented yet -----
glDeleteLists ----- not implemented yet -----

glEndList
glGenLists ----- not implemented yet -----
glIsLis ----- not implemented yet -----
glListBase ----- not implemented yet -----

glNewList ilist


Vertex arrays

glArrayElement tindex
glDrawArrays tmode, tfirst, tcount

glVertexPointer istride, ioffset, itable
glNormalPointer istride, ioffset, itable
glColorPointer istride, ioffset, itable
glIndexPointer istride, ioffset, itable
glTexCoordPointer istride, ioffset, itable
glEdgeFlagPointer istride, ioffset, itable

glGetPointerv ----- not implemented yet -----
glDrawElements tmode, icount, ifn

glInterleavedArrays ----- not implemented yet -----

glEnableClientState iarray
glDisableClientState iarray


Modes and Execution

glEnable icap
glDisable icap

glFinish ----- not implemented yet -----
glFlush ----- not implemented yet -----

glHint itarget, imode

glIsEnabled ----- not implemented yet -----


State Information

glGet ----- not implemented yet -----
glGetBooleanv ----- not implemented yet -----
glGetClipPlane ----- not implemented yet -----
glGetDoublev ----- not implemented yet -----
glGetError ----- not implemented yet -----
glGetFloatv ----- not implemented yet -----
glGetIntegerv ----- not implemented yet -----
glIsEnabled ----- not implemented yet -----
glGetLight ----- not implemented yet -----

glGetMap ----- not implemented yet -----
glGetMaterial ----- not implemented yet -----
glGetPixelMap ----- not implemented yet -----
glGetPolygonStipple ----- not implemented yet -----
glGetString ----- not implemented yet -----
glGetTexEnv ----- not implemented yet -----
glGetTexGen ----- not implemented yet -----
glGetTexImage ----- not implemented yet -----
glGetTexLevelParameter ----- not implemented yet -----
glGetTexParameter ----- not implemented yet -----
glPopAttrib ----- not implemented yet -----
glPushAttrib ----- not implemented yet -----


Middle-level and GLU-related Opcodes

Persepctive and Point of View (trasforming coordinates)

gluPerspective tfovy, tzNear, tzFar

gluLookAt teyex, teyey, teyez, tcenterx, tcentery, tcenterz, tupx, tupy, tupz

gluOrtho2D ----- not implemented yet -----


Simple Quadric Surfaces

ihandle gluNewQuadric [iflag]

gluSphere ihandle, tradius, tslices, tstacts
gluCylinder ihandle, tBaseRadius, tTopRadius, theight, tslices, tstacks
gluDisk ihandle, tInnerRadius, tOuterRadius, tslices, tloops;

gluQuadricDrawStyle ihandle, tDrawStyle

gluQuadricNormals ihandle, tnormals
gluQuadricTexture ihandle, tTextureCoords


Polygon tessellation

gluTessBeginPolygon
gluTessEndPolygon

gluTessBeginContour
gluTessEndContour

gluTessVertex tx, ty, tz
gluTessVertexv ifn, tindex


NURBS Curves

ihandle gluNewNurbsRenderer

gluBeginCurve ihandle
gluEndCurve ihandle

gluBeginSurface ihandle
gluEndSurface ihandle

gluBeginTrim ihandle
gluEndTrim ihandle

gluNurbsCurve ihandle, inknots, ifn_knot, istride, ifn_ctlarray, iorder, itype
gluNurbsSurface ihandle, isknot_count, ifn_sknot, itknot_count, ifn_tknot, is_stride, it_stride, ifn_ctlarray, isorder, itorder, itype;

gluNurbsProperty ihandle, iproperty, tvalue
gluPwlCurve ihandle, icount, ifn_array, istride, itype

gluNurbsCallback ----- not implemented yet -----


High-level OpenGL opcodes

GLUT shapes

glutSphere tradius, tslices, tstacts, itype
glutTorus tinnerRadius, touterRadius, tsides, trings, itype
glutCube tsize, itype
glutDodecahedron itype
glutOctahedron itype
glutTetrahedron itype
glutIcosahedron itype


3D Models

iDispList GLwavefrontModel “filename”, imode, ismooth_angle, itexture_type, iwireframe

ihandle GL3dStudioModel ----- not implemented yet -----
GLrender3dStudioModel ----- not implemented yet -----

iHandle, iNumPieces GLloadPicasso “filename”
GLrenderPicasso tHandle, tmode, tp1, tr1, tg1, tb1, ta1 [, tp2, tr2, tg2, tb2, ta2, ... , tpN, trN, tgN, tbN, taN]


Texture Mapped shapes

iTexHandle GLloadTexture “filename”, itrans, iwrapst

GLtexSquare tsize, tcoord1s, tcoord1t, tcoord2s, tcoord2t, tcoord3s, tcoord3t, tcoord4s, tcoord4t
GLtexCube tsize, tcoord1s, tcoord1t, tcoord2s, tcoord2t, tcoord3s, tcoord3t, tcoord4s, tcoord4t
GLtexCircle tradius, islices, tcoord1s, tcoord1t, tzooms, tzoomt


3D Text Fonts

ihandle GLfont3d “itypeface”, idepth, iweight, italic   à Windows only
GLtext3d “textString”, ihandle   à Windows only


Video

iVideoHandle GLopenVideoFile “filename”, iAlpha   àWindows only
tTexHandle GLvideo2tex tVideoHandle, tReqFrame   àWindows only

GLvideoCapture idevice_num, ivid_xsize, ivid_ysize, img_handle [, img_xsize, img_ysize, ivid_xpos, ivid_ypos] àWindows only; could be changed in the future


Controlling Execution Flow of Graphic Engine

tvar GLfor tstart, tstop, tincr
GLend_for

GLwhile (tbool)
GLend_while

GLdoWhile
GLend_doWhile (tbool)

GLif  (tbool)
GLelse
GLend_if


Frame-rate Assign and Math Operators

tvar = tx
tvar = ix
tvar init ix
tvar = t(kexpression)

tr = ta + tb
tr = ta - tb
tr = ta * tb
tr = ta / tb
tr = ta % tb
tr = ta ^ tb

tr GLsum ta, tb
tr GLsub ta, tb
tr GLmul ta, tb
tr GLdiv ta, tb
tr GLmod ta, tb
tr GLpow ta, tb

tr GLint tx
tr GLfrac tx
tr GLrnd tx
tr GLbirnd tx
tr GLabs tx
tr GLexp tx
tr GLlog tx
tr GLsqr tx
tr GLsin tx
tr GLcos tx
tr GLtan tx
tr GLasin tx
tr GLacos tx
tr GLatan tx
tr GLsinh tx
tr GLcosh tx
tr GLtanh tx
tr GLlog10 tx

tr GLlimit tsig, tlow, thigh
tr GLwrap tsig, tlow, thigh
tr GLmirror tsig, tlow, thigh


Frame-rate Vector Operators

GLvadd ifn, tval, ielements
GLvmult ifn, tval, ielements
GLvpow ifn, tval, ielements
GLvexp ifn, tval, ielements

GLvaddv ifn1, ifn2, ielements
GLvsubv ifn1, ifn2, ielements
GLvmultv ifn1, ifn2, ielements
GLvdivv ifn1, ifn2, ielements
GLvpowv ifn1, ifn2, ielements
GLvexpv ifn1, ifn2, ielements
GLvcopy ifn1, ifn2, ielements
GLvmap ifn1, ifn2, ielements

GLvlimit ifn, tmin, tmax, ielements
GLvwrap ifn, tmin, tmax, ielements
GLvmirror ifn, tmin, tmax, ielements


Frame-rate Signal Generators

tr GLtab tndx, ifn [, ixmod]
GLtabw tval, tndx, ifn [, ixmod]

GLvtab tndx, ifn, tout1 [, tout2, tout3, .... , toutN ]
GLvtabw tndx, ifn, tinarg1 [, tinarg2, tinarg3 , .... , tinargN ]

tr GLphasor tframes [, iphs]
tr GLoscil tamp, tframes, ifn[, iphs]
tr GLoscili tamp, tframes, ifn[, iphs]
trig GLmetro tframes [, iphs]

GLvphaseseg tphase, ioutab, ielem, itab1,idist1,itab2 [,idist2,itab3,...,idistN-1,itabN]


RGB Image Processing

iTexHandle img2Gltex ktrig, kimgHandle, kclamp, kMagFilter

kOutTrig imgGain ioutHandle, ktrig, kred, kgreen, kblue, kalpha, ihandle [, iprocessing_time]
imgConvolve ioutHandle, ktrig, kConvRange, kConvMatrix_fn, ihandle

imgPoint ktrig, kx, ky, kred, kgreen, kblue, kalpha, ihandle

imgCreate iwidth, iheight, ibpp, ihandle [, ired, igreen, iblue, ialpha]


Height fields

GLhf   tmode, tscale, inumx, inumy, tnorm, ifn
GLtexHF  tmode, tscale, ts1, tt1, ts2, tt2, inumx, inumy, tnorm, ifn


GLE Tubing and Extrusion Library wrapping

glePolyCylinder   tnpoints, ifnPointArray, ifnColorArray, tradius
glePolyCone   tnpoints, ifnPointArray, ifnColorArray, ifnRadiusArray
gleExtrusion   tncp, ifnContour, ifnCont_normal, tup0, tup1, tup2, tnpoints, ifnPointArray, ifnColorArray, ifnXform_array
gleSuperExtrusion   tncp, ifnContour, ifnCont_normal, tup0, tup1, tup2, tnpoints, ifnPointArray, ifnColorArray, ifnXform_array  
gleTwistExtrusion   tncp, ifnContour, ifnCont_normal, tup0, tup1, tup2, tnpoints, ifnPointArray, ifnColorArray, ifnTwist_array
gleTaper   tncp, ifnContour, ifnCont_normal, tup0, tup1, tup2, tnpoints, ifnPointArray, ifnColorArray, ifnTaper, ifnTwist
gleSpiral  tncp, ifnContour, ifnCont_normal, tup0, tup1, tup2, tstartRadius, tdrdTheta, tstartZ, tdzdTheta, ifn_startXform, ifn_dXformdTheta, tstartTheta, tsweepTheta
gleLathe  tncp, ifnContour, ifnCont_normal, tup0, tup1, tup2, tstartRadius, tdrdTheta, tstartZ, tdzdTheta, ifn_startXform, ifn_dXformdTheta, tstartTheta, tsweepTheta
gleHelicoid   trToroid, tstartRadius, tdrdTheta, tstartZ, tdzdTheta, ifn_startXform, ifn_dXformdTheta, tstartTheta, tsweepTheta
gleToroid   trToroid, tstartRadius, tdrdTheta, tstartZ, tdzdTheta, ifn_startXform, ifn_dXformdTheta, tstartTheta, tsweepTheta
gleScrew   tncp, ifnContour, ifnCont_normal, tup0, tup1, tup2, tstartz, tendz, twist
gleBuildNormals  ifnOUT, ifnIN, ielements
gleSetJoinStyle     
tstyle
tstyle   gleGetJoinStyle
gleSetNumSides   tslices
tslices  gleGetNumSides
gleTextureMode   tmode


Two-dimensional text fonts

GLUTprints "string", tfont, tvertical_spacing, tx, ty, tz


Macros

$glFPS( fps )

$glHEADER

$glPANEL(width' height)

$glSCREEN

$glORTHO(size)

$glCLEAR

$glPERSPECTIVE(angle)

$glLIGHTING

$glSPHERE_MAP

$glSURFACE_3D(S' outTable' formula' numX' xmin' xmax' numY' ymin' ymax )