From: Jos v.d.V. <jo...@us...> - 2015-12-08 21:55:52
|
Update of /cvsroot/win32forth/win32forth/src/lib/OpenGl In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14235 Modified Files: Opengl.f Log Message: Jos: Some cleanup Index: Opengl.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/Opengl.f,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Opengl.f 5 Dec 2015 12:05:34 -0000 1.7 --- Opengl.f 8 Dec 2015 21:55:50 -0000 1.8 *************** *** 872,887 **** then ; - : _relative-direction ( adr n - ) ( f: fsum - rel fsum ) - >f@ fover f/0 fswap ; - - : relative-direction ( fref4RotD n - ) ( f: - x y z ) - over >r 1 - floats@ f+ f+ - r@ 2 _relative-direction - r@ 1 _relative-direction - r> f@ fswap f/0 - ; - - \ 27e 1e 2e 3e fref4RotD 2dup floats! relative-direction f.s abort - 0 value resizing? true value key-ready? --- 872,875 ---- *************** *** 974,978 **** then endof - upc \ Uppercase characters only --- 962,965 ---- *************** *** 983,1008 **** ascii C of ['] fref3CenterC is-fref3D endof \ center-offset of the eye - ascii D of ['] fref4RotD is-fref3D endof \ direction of the eye - ascii E of ['] fref3eyeE is-fref3D endof \ viewpoint of the eye - ascii F of ['] fref3upF is-fref3D endof \ up-offset of the eye - ascii G of ['] fref4RotG is-fref3D endof \ rotate cylinder - ascii H of ['] fref3SizeH is-fref3D endof \ size of the outlined cube - ascii I of ['] fref3TransI is-fref3D endof \ move cylinder - ascii L of ['] fref3LpositionL is-fref3D endof \ move light - ascii N of ['] fref4LambientN is-fref3D endof \ ambient - ascii P of ['] fref4PersP is-fref3D endof \ perspective - ascii R of ['] fref4RotR is-fref3D endof \ rotate all objects - ascii T of ['] fref3TransT is-fref3D endof \ move a scene - ascii S of ['] fref3ScaleS is-fref3D endof \ the scale - ascii V of ['] fref4DiffuseV is-fref3D endof \ diffuse - ascii X of ['] fref4RotX is-fref3D endof \ rotate around the center - ascii W of start/end-fullscreen endof - ascii Z of start/stop-slow-action endof - endcase - ; - - (( - - ascii C of ['] fref3CenterC is-fref3D endof \ center-offset of the eye ascii D of ['] fref4RotD is-fref3D endof \ direction of the eye ascii E of ['] fref3eyeE is-fref3D endof \ viewpoint of the eye --- 970,973 ---- *************** *** 1020,1027 **** ascii X of ['] fref4RotX is-fref3D endof \ rotate around the center ascii W of start/end-fullscreen endof - VK_F1 of fullscreen-to-window endof ascii Z of start/stop-slow-action endof ! ! )) ' (change-scene is KeyboardAction \ For the default keys --- 985,991 ---- ascii X of ['] fref4RotX is-fref3D endof \ rotate around the center ascii W of start/end-fullscreen endof ascii Z of start/stop-slow-action endof ! endcase ! ; ' (change-scene is KeyboardAction \ For the default keys *************** *** 1077,1086 **** ; - \ ------------------------------------------------------------------------------- \ buffer management \ ------------------------------------------------------------------------------- - \ clear the drawing buffer --- 1041,1048 ---- *************** *** 1096,1105 **** ; ! : DC>screen ( - ) \ Renderes the DC directy to a window. hdc-pixmap SwapBuffers ; ! defer >screen \ use a DIBsection or a DC only or another pixelformat. : StableBuffer>Screen ( - ) --- 1058,1067 ---- ; ! : DC>screen ( - ) \ Renderes the DC directly to a window. hdc-pixmap SwapBuffers ; ! defer >screen \ Use a DIBsection or a DC only or another pixelformat. : StableBuffer>Screen ( - ) *************** *** 1132,1136 **** ' DC>screen is >screen - : ScaleSize ( n - scaled ) ( f: ScaleRate - ScaleRate ) s>f fover f* f>s 5 max ; --- 1094,1097 ---- *************** *** 1264,1269 **** GL_LIGHT0 GL_POSITION lightPosition glLightfv GL_LIGHT_MODEL_AMBIENT model-ambient glLightModelfv ! ! ; \ begin a quadric object --- 1225,1229 ---- GL_LIGHT0 GL_POSITION lightPosition glLightfv GL_LIGHT_MODEL_AMBIENT model-ambient glLightModelfv ! ; \ begin a quadric object *************** *** 1275,1279 **** qobj GLU_FILL gluQuadricDrawStyle qobj GLU_SMOOTH gluQuadricNormals ! ; \ finish a quadric object --- 1235,1239 ---- qobj GLU_FILL gluQuadricDrawStyle qobj GLU_SMOOTH gluQuadricNormals ! ; \ finish a quadric object *************** *** 1283,1287 **** GL_LIGHTING glDisable GL_LIGHT0 glDisable ! ; : sphere ( stacks slices - ) ( f: wide - ) --- 1243,1247 ---- GL_LIGHTING glDisable GL_LIGHT0 glDisable ! ; : sphere ( stacks slices - ) ( f: wide - ) *************** *** 1289,1293 **** d' qobj call gluSphere drop quad] ! ; : glPushMatrix_glTranslatef ( f: xt yt zt -- ) glPushMatrix glTranslatef ; --- 1249,1253 ---- d' qobj call gluSphere drop quad] ! ; : glPushMatrix_glTranslatef ( f: xt yt zt -- ) glPushMatrix glTranslatef ; *************** *** 1446,1450 **** vocabulary GLFunctions \ To avoid duplicate names in the same vocabulary - : +GLFunctions ( -- ) \ Also search in the vocabulary GLFunctions \in-system-ok current @ also GLFunctions current ! --- 1406,1409 ---- *************** *** 1841,1845 **** frefT4RotR floatsf@+ glRotatef \ Angle in orbit x y z frefT3MoveM floatsf@+ glTranslatef \ Distance from the center x y z ! ; --- 1800,1804 ---- frefT4RotR floatsf@+ glRotatef \ Angle in orbit x y z frefT3MoveM floatsf@+ glTranslatef \ Distance from the center x y z ! ; *************** *** 1875,1884 **** frefT4RotR floatsf@+ glRotatef \ Angle in orbit x y z frefT3MoveM floatsf@+ glTranslatef \ Distance from the center x y z ! ; : xJoint ( f: deg xg yg zg xt yt zt -- ) \ Set the position and angle of a joint frefT3MoveM floatsf@+ glTranslatef \ Can be changed with the key m frefT4RotR floatsf@+ glRotatef \ Can be changed with the key r ! ; : Add3dTurtle ( -- ) --- 1834,1843 ---- frefT4RotR floatsf@+ glRotatef \ Angle in orbit x y z frefT3MoveM floatsf@+ glTranslatef \ Distance from the center x y z ! ; : xJoint ( f: deg xg yg zg xt yt zt -- ) \ Set the position and angle of a joint frefT3MoveM floatsf@+ glTranslatef \ Can be changed with the key m frefT4RotR floatsf@+ glRotatef \ Can be changed with the key r ! ; : Add3dTurtle ( -- ) *************** *** 1898,1902 **** \ End of the interactive definitions - : ;Part ( - ) \in-system-ok postpone glPopMatrix postpone ; ; immediate --- 1857,1860 ---- |