Re: C(++?) to EUPHORIA Code
- Posted by Evan Marshall <1evan at sbcglobal.net> Jun 16, 2004
- 402 views
cklester wrote: > > Can somebody see where I'm going wrong... > > --original C code... > void glEnable2D() > { > int vPort[4]; > > glGetIntegerv(GL_VIEWPORT, vPort); > > glMatrixMode(GL_PROJECTION); > glPushMatrix(); > glLoadIdentity(); > > glOrtho(0, vPort[2], 0, vPort[3], -1, 1); > glMatrixMode(GL_MODELVIEW); > glPushMatrix(); > glLoadIdentity(); > } > > --my translation attempt: > global procedure glGo2D() > > --I have no idea what to do with this line!!! > --glGetIntegerv(GL_VIEWPORT, vPort) > > glMatrixMode(GL_PROJECTION) > glPushMatrix() > glLoadIdentity() > > glOrtho(0, vPort[2], 0, vPort[3], -1, 1) > glMatrixMode(GL_MODELVIEW) > glPushMatrix() > glLoadIdentity() > end procedure >
atom vPort vPort = allocate(16) -- space for 4 integer values
glOrtho(0, vPort[3], 0, vPort[4], -1, 1) Euphoria is 1 based }}}