You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(70) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(38) |
Feb
(4) |
Mar
(11) |
Apr
(49) |
May
(81) |
Jun
(65) |
Jul
(36) |
Aug
(57) |
Sep
(63) |
Oct
(57) |
Nov
(49) |
Dec
(41) |
2006 |
Jan
(75) |
Feb
(80) |
Mar
(10) |
Apr
(13) |
May
(100) |
Jun
(100) |
Jul
(77) |
Aug
(87) |
Sep
(80) |
Oct
(124) |
Nov
(39) |
Dec
(41) |
2007 |
Jan
(20) |
Feb
(32) |
Mar
(32) |
Apr
(43) |
May
(146) |
Jun
(40) |
Jul
(49) |
Aug
(33) |
Sep
(25) |
Oct
(19) |
Nov
(11) |
Dec
(8) |
2008 |
Jan
(4) |
Feb
(11) |
Mar
(31) |
Apr
(40) |
May
(34) |
Jun
(24) |
Jul
(39) |
Aug
(104) |
Sep
(27) |
Oct
(35) |
Nov
(34) |
Dec
(97) |
2009 |
Jan
(75) |
Feb
(29) |
Mar
(45) |
Apr
(76) |
May
(121) |
Jun
(103) |
Jul
(67) |
Aug
(28) |
Sep
(22) |
Oct
(39) |
Nov
(9) |
Dec
(15) |
2010 |
Jan
(7) |
Feb
(39) |
Mar
(40) |
Apr
(57) |
May
(67) |
Jun
(69) |
Jul
(49) |
Aug
(68) |
Sep
(22) |
Oct
(7) |
Nov
(2) |
Dec
(10) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(4) |
May
(6) |
Jun
(10) |
Jul
(16) |
Aug
(23) |
Sep
(9) |
Oct
|
Nov
(28) |
Dec
(3) |
2012 |
Jan
(11) |
Feb
(10) |
Mar
(1) |
Apr
|
May
(4) |
Jun
(3) |
Jul
(3) |
Aug
(4) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
(7) |
Mar
(30) |
Apr
(4) |
May
(4) |
Jun
(8) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(24) |
Dec
(13) |
2014 |
Jan
(7) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(9) |
Jun
|
Jul
(3) |
Aug
(9) |
Sep
|
Oct
(2) |
Nov
|
Dec
(3) |
2015 |
Jan
(4) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
(1) |
Oct
(4) |
Nov
(7) |
Dec
(39) |
2016 |
Jan
(17) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
2017 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2018 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jos v.d.V. <jo...@us...> - 2015-12-04 17:50:34
|
Update of /cvsroot/win32forth/win32forth/demos/OpenGLdemos In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5521 Added Files: Body.bmp CUBE.BMP Floor.bmp HelpForm.f OpenGl_Hello.f UfoWithRobot.f Log Message: Jos: Putting all OpenGL demos in one map and adding a new one. Just one demo still to go... --- NEW FILE: CUBE.BMP --- (This appears to be a binary file; contents omitted.) --- NEW FILE: OpenGl_Hello.f --- anew -OpenGl_Hello.f \ To show how an OpenGL drawing can be made in Win32Forth s" src\lib\OpenGl" "fpath+ \ For OpenGL support needs opengl.f \ The OpenGl wrapper and many tools menubar Openglmenu \ Define a menu for the OpenGL window popup "&File" menuitem "E&xit" bye ; endbar needs oglwin.f \ The OpenGL window \ Next starts the OpenGL part. That might need some study. Font vFont 0 value baselist : init-3Dfont ( -- ) sizeof glyphmetricsfloat 256 * malloc to lpgmf_buffer 255 glGenLists to baselist s" Comic Sans MS" SetFaceName: vFont Create: vFont Handle: vFont ghdc call SelectObject \ Old font on the stack ghdc 1 255 baselist 0.2e 0.09e \ create display lists WGL_FONT_POLYGONS lpgmf_buffer wglUseFontOutlines \ for the selected font ( OldFont) ghdc call SelectObject \ Restore the old font call DeleteObject ?winerror ; \ Delete the new font. It is now in the list : eye-parameters ( f: -- eyex eyey eyez centerx centery centerz upx upy upz ) \ eyex eyey eyez .0000e .2300e 4.130e \ centerx centery centerz .0000e .1724e 3.340e \ upx upy upz 00000e .000e -.02000e ; : set-viewpoint GL_PROJECTION glMatrixMode \ starting the projection matrix glLoadIdentity GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT OR glClear 0.0e0 0e0 .0e0 glColor3f \ The screen color \ Setting up a perspective in the projection matrix. \ This will affect the entire scene. 47.00e 1.000e .0100e 15.00e gluPerspective 0.00e .00e -.200e .000e glRotatef \ deg x y z rotate eye \ Setting up a viewing transformation eye-parameters gluLookAt .1290e .1583e .1700e glscalef \ Scale it a bit 0.00e .00e -.200e .000e glRotatef \ deg x y z Rotate around the center -.8700e 1.399e 21.40e glTranslatef \ x y z position of the scene 4.000e -1.400e .0000e .0000e glRotatef \ deg x y z Rotate all objects \ Continue with the model matrix for the object(s) GL_MODELVIEW glMatrixMode ; : InitGL ( -- ) init-3Dfont \ Enable a number of features GL_SMOOTH glShadeModel GL_DEPTH_TEST glEnable GL_FRONT GL_AMBIENT glColorMaterial GL_COLOR_MATERIAL glEnable GL_LIGHTING glEnable GL_LIGHT0 glEnable ; : DrawIntro ( -- ) 0.00e 1.1624e .1766e 0.3000e objectcolor! \ Prepair the color of the object GL_POLYGON \ fill -10.00e 0e 0.5e 0e \ Rotation f: deg xg yg zg .2333e .2531e .7000e \ Scaling f: xs ys zs -.4000e .2100e -.4000e \ Transformation f: xt yt zt [rot-scaled-object ( fill -- ) ( f: deg xg yg zg xs ys zs xt yt zt -- ) s" Hello OpenGL" baselist glType object] 0.00e -4.038e 1.977e .3000e objectcolor! GL_POLYGON -10.00e 0e 0.5e 0e .2333e .2531e .7000e -.4000e -.1900e -.4000e [rot-scaled-object ( fill -- ) ( f: deg xg yg zg xs ys zs xt yt zt -- ) s" in Win32Forth." baselist glType object] show-frame ; \ Startup and exit part: : RefreshIntro ( - ) \ Should be used when the window is repainted InitGL \ Initialize the scene set-viewpoint DrawIntro ; \ Draw the scene true to static-scene \ This drawing does not change : ShowIntro ( -- ) Start: OpenGLWindow \ Starting the OpenGl window ['] drop is KeyboardAction \ Disable all keys here except escape RefreshIntro ; : ExitIntro ( - ) \ The cleanup part baselist 255 glDeleteLists \ Kill the 3d Font in the list lpgmf_buffer free ; \ Free the lpgmf_buffer ShowIntro \ Start the OpenGL window with the OpenGL drawing. ' RefreshIntro is painting \ Action when the window is repainted ( resized etc ) \s --- NEW FILE: UfoWithRobot.f --- Anew UfoWithRobot \ To demonstrate the new 3D turtle. s" src\lib\OpenGl" "fpath+ \ For OpenGL support needs opengl.f \ The OpenGl wrapper and many tools menubar Openglmenu \ Define a menu for the OpenGL window popup "&File" menuitem "E&xit" bye ; endbar needs oglwin.f \ The OpenGL window needs Helpform.f \ For the help window \ ---[ DrawGLScene ]------------------------------------------------- \ Here goes our drawing code \ Define the various display lists /BoxList mkstruct: SmallBox /BoxList mkstruct: floor /BoxList mkstruct: Body /BoxList mkstruct: NodeUnit : BuildLists ( #lists -- ) glGenLists to lists \ Compile the lists and specify the width height and depth (xyz) .32e .32e .32e SmallBox CompileBox 14e .2e 4e Floor CompileBox .3e .85e .3e Body CompileBox .05e .15e .15e NodeUnit CompileBox ; \ Define and load various textures 0 value Texture-Ufo 0 value Texture-Floor 0 value Texture-Body : LoadGLTextures ( -- ) 3 Create-Textures \ Create the all the needed textures s" cube.bmp" LoadTexture to Texture-Ufo \ Load the texture and save the name s" floor.bmp" LoadTexture to Texture-Floor \ Load the texture and save the name s" Body.bmp" LoadTexture to Texture-Body \ Load the texture and save the name ; : SetupLight GL_LIGHT0 glEnable \ enable light0 GL_LIGHTING glEnable \ enable lighting \ gray blue green red 4.50000e 4.5e 4.5e 4.5e fref4LambientN floatsf@+ model-ambient GLfloat! GL_LIGHT_MODEL_AMBIENT model-ambient glLightModelfv \ gray blue green red \ 1e 1e 1e 1e fref4DiffuseV floatsf@+ lightcolor GLfloat! \ GL_LIGHT0 GL_DIFFUSE lightcolor glLightfv \ ??? y z x 1e .9900e 1.478e 0.021e fref3LpositionL floatsf@+ lightPosition GLfloat! GL_LIGHT0 GL_POSITION lightPosition glLightfv ; \ Initialization OpenGL 0 value 0quadratic : InitGL ( -- boolean ) LoadGLTextures \ Load in the texture GL_TEXTURE_2D glEnable \ Enable texture mapping GL_SMOOTH glShadeModel \ Enable smooth shading .2e .2e .5e 0.5e glClearColor \ A blue background 1e glClearDepth \ Depth buffer setup GL_DEPTH_TEST glEnable \ Enable depth testing GL_LEQUAL glDepthFunc \ Type of depth test to do GL_COLOR_MATERIAL glEnable \ enable material coloring GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint \ Really nice perspective calculations 4 BuildLists \ Build the display lists SetupLight ; \ Set the viewpoint : set-viewpoint ( -- ) \ The call to glViewport is done in Opengl.f GL_PROJECTION glMatrixMode \ Switch to the projection view \ Set our perspective - the F/ calcs the aspect ratio of w/h 100e widthViewport S>F heightViewport S>F F/ 0.1e 100e GluPerspective \ ( f: fovy aspect near far-- ) GL_MODELVIEW glMatrixMode \ Switch to the model view ; create 0colors 1e F, 0e F, 0e F, : Save#elements ( n - n ) dup to #elements ; : AddElement ( f: red green blue - ) glColor3f DrawReposition ; \ Various parts for the round Ufo : AddGreenElements ( n - ) Save#elements 0 do 0e i IncrColor 0e AddElement loop ; \ Adding a colored element : AddRedElements ( n - ) Save#elements 0 do i IncrColor 0e 0e AddElement loop ; : AddBlueElements ( n - ) Save#elements 0 do 0e 0e i IncrColor AddElement loop ; : AddYelloElements ( n - ) Save#elements 0 do i IncrColor fdup 0e AddElement loop ; \ For the robot body : AddBodyElements ( n - ) Save#elements 0 do .175e fdup 0e AddElement loop ; : AddWhiteElements ( n - ) Save#elements 0 do i IncrColor fdup fdup AddElement loop ; \ Various parts in the drawing :Part .Floor ( f: deg xg yg zg xt yt zt -- ) Floor to element \ Using the display list of the floor which contains the sizes Texture-Floor Bind2DTexture \ Select it's texture 0.08e fdup fdup glColor3f \ Select a color DrawReposition \ It consists of 1 element and contains no additional elements ;Part :Part .Ufo ( f: deg xg yg zg xt yt zt -- ) SmallBox to element \ Each element is a SmallBox Texture-Ufo Bind2DTexture \ Select it's texture 5 AddGreenElements \ Add a number of green cubes 60 0 do \ Repeat 90e 0e 0e 1e glRotatef \ Turn Z ( up) 5 AddRedElements 90e 0e 1e 1e glRotatef \ Turn Y and Z ( down + left ) 5 AddBlueElements \ Add blue cubes 90e 0e 0e 1e glRotatef \ Turn Z 9 AddYelloElements \ Add yello cubes 90e 0e 1e 1e glRotatef \ Turn Y and Z 9 AddWhiteElements \ Add white cubes loop ;Part \ All parts are attached to .Body, so keep the body in the starting matrix \ Do not use glPushMatrix or :Part here. : .Body ( -- ) body to element \ Use body as the element for expanding .175e fdup 0.09e glColor3f \ Select a color DrawReposition \ The body has 1 element and contains no additional elements ; :Part .RightArm ( f: deg xg yg zg xt yt zt -- ) \ :Part also takes care for the joint 7 AddWhiteElements \ Draw the upper right arm -29.00e .0000e .0000e 1.600e 0e 0e 0e joint \ The joint for the lower right arm 8 AddWhiteElements \ Draw the lower right arm ;Part :Part .LeftArm ( f: deg xg yg zg xt yt zt -- ) 7 AddWhiteElements \ The upper arm 97.00e .0000e .0000e 1.600e 0e 0e 0e joint \ The Lower left arm 8 AddWhiteElements ;Part :Part .head ( f: deg xg yg zg xt yt zt -- ) 3 AddWhiteElements \ The neck 90.00e .0000e -.0593e 1.600e .0403e -.1139e .0000e joint 5 AddWhiteElements \ The head ;Part :Part .LeftLeg ( f: deg xg yg zg xt yt zt -- ) 11 AddWhiteElements \ The upper left leg -23.00e .4000e .0000e -1.200e -.0173e -.0025e .0000e joint 12 AddWhiteElements \ The lower left leg ;Part :Part .RightLeg ( f: deg xg yg zg xt yt zt -- ) 11 AddWhiteElements \ The upper right leg 25.00e .0000e .0000e -.6000e -.0173e -.0025e .0000e joint 12 AddWhiteElements \ The lower right leg ;Part :xPart .Robot ( f: deg xg yg zg xt yt zt -- ) \ :xPart activates also the m and r key functions Texture-Body Bind2DTexture \ Select the texture for the body .Body \ The next parts are attached to the body Texture-Ufo Bind2DTexture \ Select the texture for the other parts NodeUnit to element \ Use the NodeUnit for expanding the other parts 180.0e .1580e .1580e .0000e -.3168e .4529e .0185e .head 184.0e .0000e .1709e .0000e -.47e .3535e .0185e .LeftArm -4.000e .0000e -.8000e -1.400e -.1717e .3535e .0185e .RightArm 114.0e .0000e .0000e -.6000e -.3705e -.4376e .0185e .LeftLeg 65.00e .0000e .0000e -.6000e -.2134e -.4376e .0185e .RightLeg ;Part : .Scene ( -- ) GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT OR glClear \ Clear the screen \ glLoadIdentity 0e 0e 0e 0e .0000e -5.00e -7.600e .Floor -.000e .00e 0.100e 00e fref4RotG floatsf@+ -1.200e .4000e -7.000e fref3TransI floatsf@+ .Ufo \ The keys g and i can be used -47.e .20e .800e .0e 4.007e -3.163e -6.430e .Robot ; : DrawGLScene ( -- ) .Scene .changed-fps>title show-frame ; \ ---[ Help text available Keys ]---------------------------------------------- :long$ h12$ $| General key functions for the ufo and the robot: $| <Del> Resets the active function $| <Home> Resets the whole scene $| <w> toggles between fullscreen and windowed modes $| $| Activate one of the following functions: $| <i> To move the ufo $| <g> To rotate the ufo $| <m> To move the robot $| <r> To rotate the robot $| $| Then use: $| <Left> <Right> <Up> <Down> <PageUp> <PageDown> $| to change the offset of the active function. $| $| Extra: $| <,> Decrement rotation after a rotation function $| <.> Increment rotation after a rotation function $| <-> Decrement the amount to change $| <=> Increment the amount to change ;long$ : .change-Turtle ( adr-flookat - ) ( f: n - ) f! ( DrawGLScene) ; : HandleKeyPress ( &event -- ) case VK_RIGHT of zx .change-Turtle endof \ right VK_LEFT of -zx .change-Turtle endof \ left VK_UP of zy .change-Turtle endof \ up VK_DOWN of -zy .change-Turtle endof \ down VK_PGUP of -zz .change-Turtle endof \ zoom- VK_PGDN of zz .change-Turtle endof \ zoom. Forwards is DOWN on the negative z-axis! 117 VK_HOME of reset-active-function painting endof \ use defaults VK_. of -zr if .change-Turtle then endof \ rotate- VK_, of zr if .change-Turtle then endof \ rotate VK_DEL of clear-all-offsets painting endof VK_- of decr_interval endof \ decr VK_= of incr_interval endof \ incr ascii w of start/end-fullscreen endof ascii i of ['] fref3TransI is-fref3D endof \ move ufo ascii g of ['] fref4RotG is-fref3D endof \ rotate ufo ascii m of ['] frefT3MoveM is-fref3D endof \ move robot ascii r of ['] frefT4RotR is-fref3D endof \ rotate robot \ Only active when the source is changed: ascii c of ['] frefT3Color is-fref3D endof \ color turtle ascii s of ['] frefT3RotS is-fref3D endof \ scale the elements ascii n of ['] frefT3Elements is-fref3D endof \ #elements turtle ascii x of ['] frefT3MoveX is-fref3D endof \ orbit araound a turnpoint ascii z of start/stop-slow-action endof h12$ ShowHelp \ Show help when an inactive key is pressed endcase DrawGLScene ; : _exitdrawing ( -- ) \ For a clean start of the next drawing DeleteTextures true to resizing? ; : DrawUfoWithRobot ( -- ) \ (R)edraw of the scene. ResetOpenGL \ Cleanup from a previous drawing InitGL \ Enable some features and load textures set-viewpoint \ Set the viewpoint DrawGLScene \ Draw the scene ; : InitUfoWithRobot ( -- ) \ The startup ['] HandleKeyPress is KeyboardAction \ Use the keystrokes for this drawing only ['] _Exitdrawing is ExitScene \ Specify Exitdrawing to free allocated memory Start: OpenGLWindow DrawUfoWithRobot ; true to static-scene \ No automatic scene change InitUfoWithRobot ' DrawUfoWithRobot is painting \s --- NEW FILE: Floor.bmp --- (This appears to be a binary file; contents omitted.) --- NEW FILE: HelpForm.f --- \ Helpform.f \- textbox needs excontrols.f aNew -Helpform.f defer FocusOpenGLWindow : $| ( -<line>- ) 0 temp$ ! source 3 /string temp$ +place crlf$ count temp$ +place here temp$ c@ allot temp$ 1+ swap temp$ c@ cmove (source) @ >IN ! ; immediate : :long$ create -1 , does> lcount ; immediate : ;long$ ( - ) here last @ name> cell+ dup>r - r> ! \ Store the lcount 0 , \ Add a zero ; 0 value zHelpText$ : zHelpText ( adr cnt - ) drop to zHelpText$ ; :Object HelpForm <Super DialogWindow Font WinFont \ default font ' 2drop value WmCommand-Func \ function pointer for WM_COMMAND ColorObject FrmColor \ the background color \ Font setting definitions Font MText1-font : Set-MText1-font ( -- ) -14 Height: MText1-font 0 Width: MText1-font 0 Escapement: MText1-font 0 Orientation: MText1-font 400 Weight: MText1-font 0 CharSet: MText1-font 3 OutPrecision: MText1-font 2 ClipPrecision: MText1-font 1 Quality: MText1-font 49 PitchAndFamily: MText1-font s" Courier New" SetFacename: MText1-font ; MultiLineTextBox MText1 PushButton btOK :M ClassInit: ( -- ) ClassInit: super \ Insert your code here, e.g initialize variables, values etc. ;M :M WindowStyle: ( -- style ) WS_POPUPWINDOW WS_DLGFRAME or ;M \ N.B if this form is a modal form a non-zero parent must be set :M ParentWindow: ( -- hwndparent | 0 if no parent ) hWndParent ;M :M WindowTitle: ( -- ztitle ) z" Help" ;M :M StartSize: ( -- width height ) 611 490 ;M :M StartPos: ( -- x y ) CenterWindow: Self swap width 2/ + 60 + swap 14 + ;M :M Close: ( -- ) \ Insert your code here, e.g any data entered in form that needs to be saved Close: super ;M :M WM_COMMAND ( h m w l -- res ) dup 0= \ id is from a menu if lparam is zero if over LOWORD CurrentMenu if dup DoMenu: CurrentMenu then CurrentPopup if dup DoMenu: CurrentPopup then drop else over LOWORD ( ID ) self \ object address on stack WMCommand-Func ?dup \ must not be zero if execute else 2drop \ drop ID and object address then then 0 ;M : FormAction { id obj -- } id IDOK = if close: Self then ; :M SetCommand: ( cfa -- ) \ set WMCommand function to WMCommand-Func ;M :M On_Init: ( -- ) On_Init: Super ['] FormAction SetCommand: self s" MS Sans Serif" SetFaceName: WinFont 8 Width: WinFont Create: WinFont \ set form color to system color COLOR_BTNFACE Call GetSysColor NewColor: FrmColor 1000 SetTextLimit: MText1 self Start: MText1 30 32 556 383 Move: MText1 Set-MText1-font Create: MText1-font Handle: MText1-font SetFont: MText1 zHelpText$ SetTextZ: MText1 true ReadOnly: MText1 10 5 SetMargins: MText1 IDOK SetID: btOK self Start: btOK 253 440 100 25 Move: btOK Handle: Winfont SetFont: btOK s" OK" SetText: btOK ;M :M start: ( -- ) start: Super \ FocusOpenGLWindow ;M :M On_Paint: ( -- ) 0 0 GetSize: self Addr: FrmColor FillArea: dc ;M :M On_Done: ( -- ) Delete: WinFont Delete: MText1-font \ Insert your code here, e.g delete fonts, any bitmaps etc. On_Done: super ;M ;Object : ShowHelp ( zHelpText cnt - ) zHelpText close: HelpForm start: HelpForm ; \ Use: :long$ InitialText$ $| zHelpText$ has not been set. $| Use zHelpText first. $| zHelpText expects a long counted 0 terminated string. ;long$ InitialText$ zHelpText \ start: HelpForm abort \ Activate this line for a demo. \s --- NEW FILE: Body.bmp --- (This appears to be a binary file; contents omitted.) |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 17:46:29
|
Update of /cvsroot/win32forth/win32forth/demos/OpenGLdemos In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5308/OpenGLdemos Log Message: Directory /cvsroot/win32forth/win32forth/demos/OpenGLdemos added to the repository |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 15:57:27
|
Update of /cvsroot/win32forth/win32forth/Help/html In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv834 Modified Files: class-EventClass.htm class-WaitableTimer.htm Log Message: Jos: Minor change Index: class-WaitableTimer.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/Help/html/class-WaitableTimer.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** class-WaitableTimer.htm 4 Dec 2015 15:44:54 -0000 1.1 --- class-WaitableTimer.htm 4 Dec 2015 15:57:24 -0000 1.2 *************** *** 12,16 **** </h1><h2>Abstract </h2><p>A waitable timer gives a very stable result for small wait times. <br /> ! </p><p><b><code>:Class WaitableTimer <Super EventObject </code></b><br>Create a waitable timer object. </p><p><b><code>:M CreateTimer: ( - ) --- 12,17 ---- </h1><h2>Abstract </h2><p>A waitable timer gives a very stable result for small wait times. <br /> ! </p><h2>Glossary ! </h2><p><b><code>:Class WaitableTimer <Super EventObject </code></b><br>Create a waitable timer object. </p><p><b><code>:M CreateTimer: ( - ) Index: class-EventClass.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/Help/html/class-EventClass.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** class-EventClass.htm 4 Dec 2015 15:43:48 -0000 1.1 --- class-EventClass.htm 4 Dec 2015 15:57:24 -0000 1.2 *************** *** 16,20 **** Also useable to wait for a thread or process.<br /> An array of events needs an other class. ! </p><p><b><code>: .wait ( wait-value - ) </code></b><br>Shows the wait state. </p><p><b><code>:Class EventObject <Super Object --- 16,21 ---- Also useable to wait for a thread or process.<br /> An array of events needs an other class. ! </p><h2>Glossary ! </h2><p><b><code>: .wait ( wait-value - ) </code></b><br>Shows the wait state. </p><p><b><code>:Class EventObject <Super Object |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 15:55:53
|
Update of /cvsroot/win32forth/win32forth/src/lib/Ext_classes In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv758 Modified Files: EventClass.f WaitableTimer.f Log Message: Jos: Minor change. Index: EventClass.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/Ext_classes/EventClass.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EventClass.f 4 Dec 2015 15:38:41 -0000 1.2 --- EventClass.f 4 Dec 2015 15:55:51 -0000 1.3 *************** *** 13,16 **** --- 13,19 ---- \ ** An array of events needs an other class. + + \ *S Glossary + 0x7fffffff constant max-sleep \ This is not endless 46 days is the maximum Index: WaitableTimer.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/Ext_classes/WaitableTimer.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WaitableTimer.f 4 Dec 2015 15:38:41 -0000 1.2 --- WaitableTimer.f 4 Dec 2015 15:55:51 -0000 1.3 *************** *** 11,14 **** --- 11,15 ---- \ *P A waitable timer gives a very stable result for small wait times. \n + \ *S Glossary :Class WaitableTimer <Super EventObject |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 15:49:21
|
Update of /cvsroot/win32forth/win32forth/Help/html In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv518 Modified Files: w32f-classes.htm Log Message: Jos: Changed the order. Index: w32f-classes.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/Help/html/w32f-classes.htm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** w32f-classes.htm 4 Dec 2015 15:46:27 -0000 1.5 --- w32f-classes.htm 4 Dec 2015 15:49:18 -0000 1.6 *************** *** 151,156 **** <li><a href="class-EventClass.htm">EventClass</a> To manage unnamed event object.</li> <li><a href="class-File.htm#File">File</a> Class for file I/O.</li> - <li><a href="class-File.htm#ReadFile">ReadFile</a> Class for loading/saving a complete file from/to memory.</li> <li><a href="class-MultiTaskingClass.htm">MultiTaskingClass</a> For clustered tasks in objects.</li> <li><a href="class-SQLite.htm">SQLite</a> Database Class for SQLite</li> <li><a href="class-WaitableTimer.htm">WaitableTimer</a> For high resolution waitable timers.</li> --- 151,156 ---- <li><a href="class-EventClass.htm">EventClass</a> To manage unnamed event object.</li> <li><a href="class-File.htm#File">File</a> Class for file I/O.</li> <li><a href="class-MultiTaskingClass.htm">MultiTaskingClass</a> For clustered tasks in objects.</li> + <li><a href="class-File.htm#ReadFile">ReadFile</a> Class for loading/saving a complete file from/to memory.</li> <li><a href="class-SQLite.htm">SQLite</a> Database Class for SQLite</li> <li><a href="class-WaitableTimer.htm">WaitableTimer</a> For high resolution waitable timers.</li> |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 15:46:29
|
Update of /cvsroot/win32forth/win32forth/Help/html In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv414 Modified Files: w32f-classes.htm Log Message: Jos: Added the new clases. Index: w32f-classes.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/Help/html/w32f-classes.htm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** w32f-classes.htm 15 Aug 2014 13:29:52 -0000 1.4 --- w32f-classes.htm 4 Dec 2015 15:46:27 -0000 1.5 *************** *** 149,156 **** <ul> <li><a href="class-File.htm#File">File</a> Class for file I/O.</li> - <li><a href="class-MultiTaskingClass.htm">MultiTaskingClass</a> For clustered tasks in objects.</li> <li><a href="class-File.htm#ReadFile">ReadFile</a> Class for loading/saving a complete file from/to memory.</li> <li><a href="class-SQLite.htm">SQLite</a> Database Class for SQLite</li> </ul> --- 149,158 ---- <ul> + <li><a href="class-EventClass.htm">EventClass</a> To manage unnamed event object.</li> <li><a href="class-File.htm#File">File</a> Class for file I/O.</li> <li><a href="class-File.htm#ReadFile">ReadFile</a> Class for loading/saving a complete file from/to memory.</li> + <li><a href="class-MultiTaskingClass.htm">MultiTaskingClass</a> For clustered tasks in objects.</li> <li><a href="class-SQLite.htm">SQLite</a> Database Class for SQLite</li> + <li><a href="class-WaitableTimer.htm">WaitableTimer</a> For high resolution waitable timers.</li> </ul> |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 15:44:56
|
Update of /cvsroot/win32forth/win32forth/Help/html In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv309 Added Files: class-WaitableTimer.htm Log Message: Jos: Added documentation --- NEW FILE: class-WaitableTimer.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta name="GENERATOR" content="DexH v03" /> <title> WaitableTimer.f</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <h1>WaitableTimerClass -- For high resolution waitable timers. </h1><h2>Abstract </h2><p>A waitable timer gives a very stable result for small wait times. <br /> </p><p><b><code>:Class WaitableTimer <Super EventObject </code></b><br>Create a waitable timer object. </p><p><b><code>:M CreateTimer: ( - ) </code></b><br>Create a waitable timer. </p><p><b><code>:M StartTimer: ( F: fseconds - ) </code></b><br>To start the Waitable timer. StartTimer: needs a floating point number on the stack to specify the time to wait. The timer has a resolution of 10,000 times better than the resulution of sleep. </p><p><b><code>:M CancelWaitableTimer: ( - ) </code></b><br>Sets the waitable timer to the inactive state </p><p><b><code>:M ClassInit: ( -- ) </code></b><br>Initializes the object. </p><h2>Example </h2><pre> WaitableTimer MyTimer \ Create a timer : testTimer ( - ) 0.5e StartTimer: MyTimer \ Set to a half second. \ CancelWaitableTimer: MyTimer \ Then it will not signal anymore Wait: MyTimer \ Start waiting using the wait of the inherted EventObject beep ; cr .( WaitableTimer.f ) cr testTimer .( ok) </pre></body></html> |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 15:43:50
|
Update of /cvsroot/win32forth/win32forth/Help/html In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv32724 Added Files: class-EventClass.htm Log Message: JosL Added documentation. --- NEW FILE: class-EventClass.htm --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta name="GENERATOR" content="DexH v03" /> <title> EventClass.f</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <h1>EventClass -- To manage unnamed event object. </h1><h2>Abstract </h2><p>Event objects <br /> The class EventObject is the root for various event objects like<br /> a mutex, semaphore, or WaitableTimer.<br /> Also useable to wait for a thread or process.<br /> An array of events needs an other class. </p><p><b><code>: .wait ( wait-value - ) </code></b><br>Shows the wait state. </p><p><b><code>:Class EventObject <Super Object </code></b><br>Create an eventobject. </p><p><b><code>:M GetHandle: ( - hEvent ) </code></b><br>Returns the handle of the event object. </p><p><b><code>:M SetHandle: ( hEvent - ) </code></b><br>Sets the handle of the event object. </p><p><b><code>:M ClassInit: ( -- ) </code></b><br>Initializes the object. </p><p><b><code>:M Close: ( -- ) </code></b><br>Clean up the handle. </p><p><b><code>:Class Event <Super EventObject </code></b><br>To create events from eventObject </p><p><b><code>:M Set: ( - ) </code></b><br>Sets the specified event object to the signaled state. </p><p><b><code>:M Reset: ( - ) </code></b><br>Sets the specified event object to the nonsignaled state </p><p><b><code>:M Pulse: ( - ) </code></b><br>Sets the specified event object to the signaled state and then resets it to the nonsignaled state after releasing the appropriate number of waiting threads. The advise is not to use it. </p><p><b><code>:M ClassInit: ( -- ) </code></b><br>Initializes the object. </p><h2>Example </h2><pre> Event MyEvent \ Create an event : signal? ( - WaitValue ) \ signal? is not useable in critical operations. 0 WaitForSingleObject: MyEvent dup WAIT_OBJECT_0 = if Set: MyEvent \ restoring event after WaitForSingleObject ends with WAIT_OBJECT_0 then ; : .signal ( - ) cr signal? .wait ." -- " ; : TestEvent cls cr ." Event test:" .signal ." Initial state" cr ." Wait for 1 seconds. " 1000 WaitForSingleObject: MyEvent .wait \ Wait 1 seconds \ Set: MyEvent cr ." Event has now been set" \ Disable this line to wait for 7 seconds .signal ." **** Before WaitForSingleObject: **** " cr cr ." Wait only when the event is nonsignaled." cr cr \ The following line will wait when the event is NOT set 7000 WaitForSingleObject: MyEvent .wait ." **** After WaitForSingleObject: **** " Pulse: MyEvent .signal ." After first pulse" Pulse: MyEvent .signal ." After second pulse" ; TestEvent </pre></body></html> |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 15:38:43
|
Update of /cvsroot/win32forth/win32forth/src/lib/Ext_classes In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv32525 Modified Files: EventClass.f WaitableTimer.f Log Message: Jos: Added documentation. Index: EventClass.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/Ext_classes/EventClass.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** EventClass.f 4 Dec 2015 11:55:06 -0000 1.1 --- EventClass.f 4 Dec 2015 15:38:41 -0000 1.2 *************** *** 10,14 **** \ ** The class EventObject is the root for various event objects like\n \ ** a mutex, semaphore, or WaitableTimer.\n ! \ ** Also useable to wait for a thread or process \ ** An array of events needs an other class. --- 10,14 ---- \ ** The class EventObject is the root for various event objects like\n \ ** a mutex, semaphore, or WaitableTimer.\n ! \ ** Also useable to wait for a thread or process.\n \ ** An array of events needs an other class. *************** *** 16,28 **** : .wait ( wait-value - ) case ! WAIT_ABANDONED of ." The mutex object that was not released the mutex is set to nonsignaled." endof WAIT_OBJECT_0 of ." The state of the specified object is signaled." endof ! WAIT_TIMEOUT of ." The time-out interval elapsed, and the object's state is nonsignaled." endof ! WAIT_ABANDONED of ." The function WaitForSingleObject failed." endof endcase ; :Class EventObject <Super Object int Hndl \ handle of an event object. --- 16,30 ---- : .wait ( wait-value - ) + \ *G Shows the wait state. case ! WAIT_ABANDONED of ." The mutex object that was not released the mutex is set to nonsignaled." endof WAIT_OBJECT_0 of ." The state of the specified object is signaled." endof ! WAIT_TIMEOUT of ." The time-out interval elapsed, and the object's state is nonsignaled." endof ! WAIT_ABANDONED of ." The function WaitForSingleObject failed." endof endcase ; :Class EventObject <Super Object + \ *G Create an eventobject. int Hndl \ handle of an event object. *************** *** 65,68 **** --- 67,71 ---- :Class Event <Super EventObject + \ *G To create events from eventObject :M Create: ( - ) \ In Win32 *************** *** 75,81 **** ;M ! :M Set: ( - ) Hndl Call SetEvent 0= abort" Event not set" ;M ! :M Reset: ( - ) Hndl Call ResetEvent 0= abort" Event not reset" ;M ! :M Pulse: ( - ) Hndl Call PulseEvent ?win-error ;M --- 78,94 ---- ;M ! :M Set: ( - ) ! \ *G Sets the specified event object to the signaled state. ! Hndl Call SetEvent 0= abort" Event not set" ;M ! ! :M Reset: ( - ) ! \ *G Sets the specified event object to the nonsignaled state ! Hndl Call ResetEvent 0= abort" Event not reset" ;M ! ! :M Pulse: ( - ) ! \ *G Sets the specified event object to the signaled state and then resets ! \ ** it to the nonsignaled state after releasing the appropriate number ! \ ** of waiting threads. The advise is not to use it. ! Hndl Call PulseEvent ?win-error ;M *************** *** 88,99 **** ;Class ! \s Use: Event MyEvent \ Create an event ! : signal? ( - WaitValue ) \ Not useable in critical operations. 0 WaitForSingleObject: MyEvent dup WAIT_OBJECT_0 = ! if Set: MyEvent \ restoring event after WaitForSingleObject ends with WAIT_OBJECT_0 then ; --- 101,114 ---- ;Class ! \s ! \ *S Example ! \ *+ Event MyEvent \ Create an event ! : signal? ( - WaitValue ) \ signal? is not useable in critical operations. 0 WaitForSingleObject: MyEvent dup WAIT_OBJECT_0 = ! if Set: MyEvent \ restoring event after WaitForSingleObject ends with WAIT_OBJECT_0 then ; *************** *** 118,120 **** ; ! TestEvent abort --- 133,137 ---- ; ! TestEvent ! \ *- ! \ *Z Index: WaitableTimer.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/Ext_classes/WaitableTimer.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WaitableTimer.f 4 Dec 2015 11:55:06 -0000 1.1 --- WaitableTimer.f 4 Dec 2015 15:38:41 -0000 1.2 *************** *** 9,16 **** \ *S Abstract ! \ *P A waitable timer gives a very stable result when small wait times are needed. \n :Class WaitableTimer <Super EventObject 2 cells bytes *pDueTime --- 9,17 ---- \ *S Abstract ! \ *P A waitable timer gives a very stable result for small wait times. \n :Class WaitableTimer <Super EventObject + \ *G Create a waitable timer object. 2 cells bytes *pDueTime *************** *** 33,36 **** --- 34,38 ---- :M CancelWaitableTimer: ( - ) + \ *G Sets the waitable timer to the inactive state Hndl call CancelWaitableTimer ?win-error ;M *************** *** 45,49 **** ! \s Use: WaitableTimer MyTimer \ Create a timer --- 47,53 ---- ! \s ! \ *S Example ! \ *+ WaitableTimer MyTimer \ Create a timer *************** *** 57,62 **** cr .( WaitableTimer.f ) cr ! testTimer .( ok) abort ! ! \s --- 61,66 ---- cr .( WaitableTimer.f ) cr ! testTimer .( ok) + \ *- + \ *Z |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 12:05:30
|
Update of /cvsroot/win32forth/win32forth/apps/Chess In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23788 Modified Files: _fcp3D.f Log Message: Jos: No need to turn sys warnings off any more. Index: _fcp3D.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Chess/_fcp3D.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** _fcp3D.f 2 Dec 2015 17:23:57 -0000 1.5 --- _fcp3D.f 4 Dec 2015 12:05:28 -0000 1.6 *************** *** 1,6 **** \ loader for fcp3D. - sys-warning-off - synonym random-wf32 random --- 1,4 ---- *************** *** 29,38 **** s" t1600017.bmp" needed-file - (( File list for click twice, click right, and Open Highlighted File: - - Werror.f struct.f toolset.f multithr.f oglevts.f bmpdot.f - palette.f gldefs.h opengl.f bmpio.f fullscreen.f - FCP131wf32.f fcp-book.f oglwin.f fcp3D.f fcp_inputwin.f )) - true to static-scene --- 27,30 ---- |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 11:57:13
|
Update of /cvsroot/win32forth/win32forth/src/lib/OpenGl In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23486 Modified Files: Opengl.f Log Message: Jos: for the new location of EventClass.f and WaitableTimer.f Index: Opengl.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/Opengl.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Opengl.f 3 Dec 2015 18:23:47 -0000 1.3 --- Opengl.f 4 Dec 2015 11:57:11 -0000 1.4 *************** *** 100,104 **** needs AcceleratorTables.f needs struct.f \ For the use of C-like structures. ! needs WaitableTimer.f \ A class for high resolution waitable timers. needs AskIntWindow.f \ To ask for a number in a window. needs oglevts.f \ Defines the threads and events --- 100,104 ---- needs AcceleratorTables.f needs struct.f \ For the use of C-like structures. ! needs Ext_classes\WaitableTimer.f \ A class for high resolution waitable timers. needs AskIntWindow.f \ To ask for a number in a window. needs oglevts.f \ Defines the threads and events |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 11:55:08
|
Update of /cvsroot/win32forth/win32forth/src/lib/Ext_classes In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23407 Added Files: EventClass.f WaitableTimer.f Log Message: Jos Adding EventClass.f and WaitableTimer.f to lib\Ext_classes --- NEW FILE: EventClass.f --- anew -EventClass.f \ *D doc\classes\ \ *! EventClass \ *T EventClass -- To manage unnamed event object. \ *S Abstract \ *P Event objects \n \ ** The class EventObject is the root for various event objects like\n \ ** a mutex, semaphore, or WaitableTimer.\n \ ** Also useable to wait for a thread or process \ ** An array of events needs an other class. 0x7fffffff constant max-sleep \ This is not endless 46 days is the maximum : .wait ( wait-value - ) case WAIT_ABANDONED of ." The mutex object that was not released the mutex is set to nonsignaled." endof WAIT_OBJECT_0 of ." The state of the specified object is signaled." endof WAIT_TIMEOUT of ." The time-out interval elapsed, and the object's state is nonsignaled." endof WAIT_ABANDONED of ." The function WaitForSingleObject failed." endof endcase ; :Class EventObject <Super Object int Hndl \ handle of an event object. :M GetHandle: ( - hEvent ) \ *G Returns the handle of the event object. Hndl ;M :M SetHandle: ( hEvent - ) \ *G Sets the handle of the event object. to Hndl ;M :M Wait: ( - ) \ Returns when the specified object is in the signaled state. INFINITE Hndl Call WaitForSingleObject drop ;M :M WaitForSingleObject: ( time-out-in-ms - wait ) \ Returns when the specified object is in the signaled state (set) \ or when the time-out interval elapses. \ Meaning of the returned value: \ WAIT_ABANDONED The specified object is a mutex object that was not released by the thread \ that owned the mutex object before the owning thread terminated. \ Ownership of the mutex object is granted to the calling thread, and the mutex is set to nonsignaled. \ WAIT_OBJECT_0 The state of the specified object is signaled. \ WAIT_TIMEOUT The time-out interval elapsed, and the object's state is nonsignaled. \ WAIT_FAILED The function failed. Hndl Call WaitForSingleObject ;M :M ClassInit: ( -- ) \ *G Initializes the object. ClassInit: Super ;M :M Close: ( -- ) \ *G Clean up the handle. Hndl close-file drop ;M ;Class :Class Event <Super EventObject :M Create: ( - ) \ In Win32 0 \ No name false \ Initial state ( seems ignored ? ) false \ Manuel reset ( seems ignored ? ) NULL \ lpSecurityAttrib Call CreateEvent \ Create the handle event, the event seems allways NOT set to Hndl \ save the handle ;M :M Set: ( - ) Hndl Call SetEvent 0= abort" Event not set" ;M :M Reset: ( - ) Hndl Call ResetEvent 0= abort" Event not reset" ;M :M Pulse: ( - ) Hndl Call PulseEvent ?win-error ;M :M ClassInit: ( -- ) \ *G Initializes the object. ClassInit: Super Create: Self ;M ;Class \s Use: Event MyEvent \ Create an event : signal? ( - WaitValue ) \ Not useable in critical operations. 0 WaitForSingleObject: MyEvent dup WAIT_OBJECT_0 = if Set: MyEvent \ restoring event after WaitForSingleObject ends with WAIT_OBJECT_0 then ; : .signal ( - ) cr signal? .wait ." -- " ; : TestEvent cls cr ." Event test:" .signal ." Initial state" cr ." Wait for 1 seconds. " 1000 WaitForSingleObject: MyEvent .wait \ Wait 1 seconds \ Set: MyEvent cr ." Event has now been set" \ Disable this line to wait for 7 seconds .signal ." **** Before WaitForSingleObject: **** " cr cr ." Wait only when the event is nonsignaled." cr cr \ The following line will wait when the event is NOT set 7000 WaitForSingleObject: MyEvent .wait ." **** After WaitForSingleObject: **** " Pulse: MyEvent .signal ." After first pulse" Pulse: MyEvent .signal ." After second pulse" ; TestEvent abort --- NEW FILE: WaitableTimer.f --- anew -WaitableTimer.f \ April 26th, 2013 by Jos v.d.Ven Version needs Ext_classes\EventClass.f \ *D doc\classes\ \ *! WaitableTimerClass \ *T WaitableTimerClass -- For high resolution waitable timers. \ *S Abstract \ *P A waitable timer gives a very stable result when small wait times are needed. \n :Class WaitableTimer <Super EventObject 2 cells bytes *pDueTime :M CreateTimer: ( - ) \ *G Create a waitable timer. 0 true 0 call CreateWaitableTimer to Hndl ;M 10000000e fconstant #fsecond \ Time for one second :M StartTimer: ( F: fseconds - ) \ *G To start the Waitable timer. \ ** StartTimer: needs a floating point number on the stack to specify the time to wait. \ ** The timer has a resolution of 10,000 times better than the resulution of sleep. #fsecond f* \ Convert to 100 nanoseconds fnegate \ For a relative time f>d swap *pDueTime 2! false 0 0 0 *pDueTime Hndl call SetWaitableTimer drop ;M :M CancelWaitableTimer: ( - ) Hndl call CancelWaitableTimer ?win-error ;M :M ClassInit: ( -- ) \ *G Initializes the object. ClassInit: Super CreateTimer: Self ;M ;Class \s Use: WaitableTimer MyTimer \ Create a timer : testTimer ( - ) 0.5e StartTimer: MyTimer \ Set to a half second. \ CancelWaitableTimer: MyTimer \ Then it will not signal anymore Wait: MyTimer \ Start waiting using the wait of the inherted EventObject beep ; cr .( WaitableTimer.f ) cr testTimer .( ok) abort \s |
From: Jos v.d.V. <jo...@us...> - 2015-12-04 11:53:41
|
Update of /cvsroot/win32forth/win32forth/src/lib/OpenGl In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23325 Removed Files: EventClass.f WaitableTimer.f Log Message: Jos Moving EventClass.f and WaitableTimer.f to lib\Ext_classes --- EventClass.f DELETED --- --- WaitableTimer.f DELETED --- |
From: Jos v.d.V. <jo...@us...> - 2015-12-03 18:23:50
|
Update of /cvsroot/win32forth/win32forth/src/lib/OpenGl In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11495 Modified Files: Gldefs.f Opengl.f Log Message: Jos: Sorry, I forgot about glext.h and it's consequences. Index: Opengl.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/Opengl.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Opengl.f 3 Dec 2015 17:43:41 -0000 1.2 --- Opengl.f 3 Dec 2015 18:23:47 -0000 1.3 *************** *** 105,109 **** needs bmpdot.f \ Header definitions for bmpio.f needs palette.f \ Defines a palette. Needed when 256 colors are used. ! needs gldefs.f \ Opengl constants. needs bmpio.f \ Bitmap support needs ReformatStrings.f \ To show a long string in short lines --- 105,114 ---- needs bmpdot.f \ Header definitions for bmpio.f needs palette.f \ Defines a palette. Needed when 256 colors are used. ! needs glext.h \ Adding Opengl constants. ! needs gldefs.f \ More Opengl constants. ! ! 0 value ogl-hwnd ! 0 value hdc-pixmap ! needs bmpio.f \ Bitmap support needs ReformatStrings.f \ To show a long string in short lines Index: Gldefs.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/Gldefs.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Gldefs.f 3 Dec 2015 17:43:40 -0000 1.2 --- Gldefs.f 3 Dec 2015 18:23:47 -0000 1.3 *************** *** 1,3 **** ! \ April 26th, 2013 \ --------------------------------------------------- \ file: gldefs.f - OpenGL constant #defines --- 1,3 ---- ! \ December 3rd, 2015 \ --------------------------------------------------- \ file: gldefs.f - OpenGL constant #defines *************** *** 947,952 **** #define GL_INTENSITY16 0x804D #define GL_R3_G3_B2 0x2A10 - #define GL_BGR 0x80E0 - #define GL_BGRA 0x80E1 #define GL_RGB4 0x804F #define GL_RGB5 0x8050 --- 947,950 ---- *************** *** 1025,1086 **** #define GL_EXT_paletted_texture 1 - \ EXT_vertex_array - #define GL_VERTEX_ARRAY_EXT 0x8074 - #define GL_NORMAL_ARRAY_EXT 0x8075 - #define GL_COLOR_ARRAY_EXT 0x8076 - #define GL_INDEX_ARRAY_EXT 0x8077 - #define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 - #define GL_EDGE_FLAG_ARRAY_EXT 0x8079 - #define GL_VERTEX_ARRAY_SIZE_EXT 0x807A - #define GL_VERTEX_ARRAY_TYPE_EXT 0x807B - #define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C - #define GL_VERTEX_ARRAY_COUNT_EXT 0x807D - #define GL_NORMAL_ARRAY_TYPE_EXT 0x807E - #define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F - #define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 - #define GL_COLOR_ARRAY_SIZE_EXT 0x8081 - #define GL_COLOR_ARRAY_TYPE_EXT 0x8082 - #define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 - #define GL_COLOR_ARRAY_COUNT_EXT 0x8084 - #define GL_INDEX_ARRAY_TYPE_EXT 0x8085 - #define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 - #define GL_INDEX_ARRAY_COUNT_EXT 0x8087 - #define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 - #define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 - #define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A - #define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B - #define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C - #define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D - #define GL_VERTEX_ARRAY_POINTER_EXT 0x808E - #define GL_NORMAL_ARRAY_POINTER_EXT 0x808F - #define GL_COLOR_ARRAY_POINTER_EXT 0x8090 - #define GL_INDEX_ARRAY_POINTER_EXT 0x8091 - #define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 - #define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 - #define GL_DOUBLE_EXT GL_DOUBLE - - \ EXT_bgra - #define GL_BGR_EXT 0x80E0 - #define GL_BGRA_EXT 0x80E1 - - \ EXT_paletted_texture - - \ These must match the GL_COLOR_TABLE_*_SGI enumerants - #define GL_COLOR_TABLE_FORMAT_EXT 0x80D8 - #define GL_COLOR_TABLE_WIDTH_EXT 0x80D9 - #define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA - #define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB - #define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC - #define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD - #define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE - #define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF - - #define GL_COLOR_INDEX1_EXT 0x80E2 - #define GL_COLOR_INDEX2_EXT 0x80E3 - #define GL_COLOR_INDEX4_EXT 0x80E4 - #define GL_COLOR_INDEX8_EXT 0x80E5 - #define GL_COLOR_INDEX12_EXT 0x80E6 - #define GL_COLOR_INDEX16_EXT 0x80E7 - \ For compatibility with OpenGL v1.0 #define GL_LOGIC_OP GL_INDEX_LOGIC_OP --- 1023,1026 ---- *************** *** 1088,1098 **** \ *********************************************************** ! \ *** NURBS constants ****/ ! \ NurbsProperty */ ! #define GLU_AUTO_LOAD_MATRIX 100200 ! #define GLU_CULLING 100201 ! #define GLU_SAMPLING_TOLERANCE 100203 ! #define GLU_DISPLAY_MODE 100204 #define GLU_PARAMETRIC_TOLERANCE 100202 #define GLU_SAMPLING_METHOD 100205 --- 1028,1038 ---- \ *********************************************************** ! \ NURBS constants ! \ NurbsProperty ! #define GLU_AUTO_LOAD_MATRIX 100200 ! #define GLU_CULLING 100201 ! #define GLU_SAMPLING_TOLERANCE 100203 ! #define GLU_DISPLAY_MODE 100204 #define GLU_PARAMETRIC_TOLERANCE 100202 #define GLU_SAMPLING_METHOD 100205 *************** *** 1100,1104 **** #define GLU_V_STEP 100207 ! \ NurbsSampling */ #define GLU_PATH_LENGTH 100215 #define GLU_PARAMETRIC_ERROR 100216 --- 1040,1044 ---- #define GLU_V_STEP 100207 ! \ NurbsSampling #define GLU_PATH_LENGTH 100215 #define GLU_PARAMETRIC_ERROR 100216 *************** *** 1106,1122 **** ! \ NurbsTrim */ #define GLU_MAP1_TRIM_2 100210 #define GLU_MAP1_TRIM_3 100211 ! \ NurbsDisplay */ ! \ GLU_FILL 100012 */ #define GLU_OUTLINE_POLYGON 100240 #define GLU_OUTLINE_PATCH 100241 ! \ NurbsCallback */ #define GLU_ERROR 100103 ! \ NurbsErrors */ #define GLU_NURBS_ERROR1 100251 #define GLU_NURBS_ERROR2 100252 --- 1046,1062 ---- ! \ NurbsTrim #define GLU_MAP1_TRIM_2 100210 #define GLU_MAP1_TRIM_3 100211 ! \ NurbsDisplay ! \ GLU_FILL 100012 #define GLU_OUTLINE_POLYGON 100240 #define GLU_OUTLINE_PATCH 100241 ! \ NurbsCallback #define GLU_ERROR 100103 ! \ NurbsErrors #define GLU_NURBS_ERROR1 100251 #define GLU_NURBS_ERROR2 100252 *************** *** 1157,1200 **** #define GLU_NURBS_ERROR37 100287 - 0 value ogl-hwnd - 0 value hdc-pixmap - - \ ARB extensions - #define GL_TEXTURE0_ARB 0x84C0 - #define GL_TEXTURE1_ARB 0x84C1 - #define GL_TEXTURE2_ARB 0x84C2 - #define GL_TEXTURE3_ARB 0x84C3 - #define GL_TEXTURE4_ARB 0x84C4 - #define GL_TEXTURE5_ARB 0x84C5 - #define GL_TEXTURE6_ARB 0x84C6 - #define GL_TEXTURE7_ARB 0x84C7 - #define GL_TEXTURE8_ARB 0x84C8 - #define GL_TEXTURE9_ARB 0x84C9 - #define GL_TEXTURE10_ARB 0x84CA - #define GL_TEXTURE11_ARB 0x84CB - #define GL_TEXTURE12_ARB 0x84CC - #define GL_TEXTURE13_ARB 0x84CD - #define GL_TEXTURE14_ARB 0x84CE - #define GL_TEXTURE15_ARB 0x84CF - #define GL_TEXTURE16_ARB 0x84D0 - #define GL_TEXTURE17_ARB 0x84D1 - #define GL_TEXTURE18_ARB 0x84D2 - #define GL_TEXTURE19_ARB 0x84D3 - #define GL_TEXTURE20_ARB 0x84D4 - #define GL_TEXTURE21_ARB 0x84D5 - #define GL_TEXTURE22_ARB 0x84D6 - #define GL_TEXTURE23_ARB 0x84D7 - #define GL_TEXTURE24_ARB 0x84D8 - #define GL_TEXTURE25_ARB 0x84D9 - #define GL_TEXTURE26_ARB 0x84DA - #define GL_TEXTURE27_ARB 0x84DB - #define GL_TEXTURE28_ARB 0x84DC - #define GL_TEXTURE29_ARB 0x84DD - #define GL_TEXTURE30_ARB 0x84DE - #define GL_TEXTURE31_ARB 0x84DF - #define GL_ACTIVE_TEXTURE_ARB 0x84E0 - #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 - #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 - \s --- 1097,1100 ---- |
From: Jos v.d.V. <jo...@us...> - 2015-12-03 17:53:15
|
Update of /cvsroot/win32forth/win32forth/src/lib/OpenGl In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10393 Added Files: EventClass.f Log Message: Jos: Needed for WaitableTimerClass --- NEW FILE: EventClass.f --- anew -EventClass.f \ *D doc\classes\ \ *! EventClass \ *T EventClass -- To manage unnamed event object. \ *S Abstract \ *P Event objects \n \ ** The class EventObject is the root for various event objects like\n \ ** a mutex, semaphore, or WaitableTimer.\n \ ** Also useable to wait for a thread or process \ ** An array of events needs an other class. 0x7fffffff constant max-sleep \ This is not endless 46 days is the maximum : .wait ( wait-value - ) case WAIT_ABANDONED of ." The mutex object that was not released the mutex is set to nonsignaled." endof WAIT_OBJECT_0 of ." The state of the specified object is signaled." endof WAIT_TIMEOUT of ." The time-out interval elapsed, and the object's state is nonsignaled." endof WAIT_ABANDONED of ." The function WaitForSingleObject failed." endof endcase ; :Class EventObject <Super Object int Hndl \ handle of an event object. :M GetHandle: ( - hEvent ) \ *G Returns the handle of the event object. Hndl ;M :M SetHandle: ( hEvent - ) \ *G Sets the handle of the event object. to Hndl ;M :M Wait: ( - ) \ Returns when the specified object is in the signaled state. INFINITE Hndl Call WaitForSingleObject drop ;M :M WaitForSingleObject: ( time-out-in-ms - wait ) \ Returns when the specified object is in the signaled state (set) \ or when the time-out interval elapses. \ Meaning of the returned value: \ WAIT_ABANDONED The specified object is a mutex object that was not released by the thread \ that owned the mutex object before the owning thread terminated. \ Ownership of the mutex object is granted to the calling thread, and the mutex is set to nonsignaled. \ WAIT_OBJECT_0 The state of the specified object is signaled. \ WAIT_TIMEOUT The time-out interval elapsed, and the object's state is nonsignaled. \ WAIT_FAILED The function failed. Hndl Call WaitForSingleObject ;M :M ClassInit: ( -- ) \ *G Initializes the object. ClassInit: Super ;M :M Close: ( -- ) \ *G Clean up the handle. Hndl close-file drop ;M ;Class :Class Event <Super EventObject :M Create: ( - ) \ In Win32 0 \ No name false \ Initial state ( seems ignored ? ) false \ Manuel reset ( seems ignored ? ) NULL \ lpSecurityAttrib Call CreateEvent \ Create the handle event, the event seems allways NOT set to Hndl \ save the handle ;M :M Set: ( - ) Hndl Call SetEvent 0= abort" Event not set" ;M :M Reset: ( - ) Hndl Call ResetEvent 0= abort" Event not reset" ;M :M Pulse: ( - ) Hndl Call PulseEvent ?win-error ;M :M ClassInit: ( -- ) \ *G Initializes the object. ClassInit: Super Create: Self ;M ;Class \s Use Event MyEvent \ Create an event : signal? ( - WaitValue ) \ Not useable in critical operations. 0 WaitForSingleObject: MyEvent dup WAIT_OBJECT_0 = if Set: MyEvent \ restoring event after WaitForSingleObject ends with WAIT_OBJECT_0 then ; : .signal ( - ) cr signal? .wait ." -- " ; : TestEvent cr cr ." Event test:" .signal ." Initial state" cr ." Wait for 2 seconds. " 2000 WaitForSingleObject: MyEvent .wait \ Wait 2 seconds Set: MyEvent \ Disable this line and the next line will wait for 10 seconds cr ." Event has now been set" .signal ." After event set" cr ." No wait here." 10000 WaitForSingleObject: MyEvent .wait \ Will not wait since the event is set .signal ." After WaitForSingleObject:" Pulse: MyEvent .signal ." After first pulse" Pulse: MyEvent .signal ." After second pulse" ; TestEvent abort |
From: Jos v.d.V. <jo...@us...> - 2015-12-03 17:43:43
|
Update of /cvsroot/win32forth/win32forth/src/lib/OpenGl In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10040 Modified Files: BMPIO.F Gldefs.f OGLEVTS.F Oglwin.f Opengl.f WaitableTimer.f Log Message: Jos: Adapting for WaitableTimerClass and added 3D turtle extensions. Index: BMPIO.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/BMPIO.F,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BMPIO.F 2 Dec 2015 17:18:28 -0000 1.1 --- BMPIO.F 3 Dec 2015 17:43:40 -0000 1.2 *************** *** 153,158 **** \ Note: GetDIBits is not able to write to a mapped file. - 0 value ogl-hwnd \ Needs to be filled at the start - : save-to-bitmap ( dc-source nBits - ) ogl-hwnd call UpdateWindow drop \ for w2k --- 153,156 ---- Index: Opengl.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/Opengl.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Opengl.f 2 Dec 2015 17:18:28 -0000 1.1 --- Opengl.f 3 Dec 2015 17:43:41 -0000 1.2 *************** *** 1,3 **** ! anew -opengl.f \ April 26th, 2013 by Jos v.d.Ven : OldVersion? ( version# - ) --- 1,3 ---- ! anew -opengl.f \ : OldVersion? ( version# - ) *************** *** 9,12 **** --- 9,13 ---- [...1191 lines suppressed...] ! [ MB_YESNOCANCEL MB_ICONQUESTION or MB_TASKMODAL or ] literal msgbox&title ; : full-screen? ( - flag ) --- 1942,1946 ---- : qbox ( adr2 len2 adr1 len1 - button ) ! [ MB_YESNOCANCEL MB_ICONQUESTION or MB_TASKMODAL or ] literal msgbox ; : full-screen? ( - flag ) *************** *** 1860,1863 **** --- 1986,1993 ---- 9 value menu-hmnu + true value OtherScene? + defer ExitLesson + + : AnewScene s" Anew Scene" evaluate ; immediate needs fullscreen.f \ Switch to fullscreen or to a indow Index: Gldefs.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/Gldefs.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Gldefs.f 2 Dec 2015 17:18:28 -0000 1.1 --- Gldefs.f 3 Dec 2015 17:43:40 -0000 1.2 *************** *** 1,3 **** ! \ April 23rd, 2002 - 22:25 added 0 value ogl-hwnd at the end \ --------------------------------------------------- \ file: gldefs.f - OpenGL constant #defines --- 1,3 ---- ! \ April 26th, 2013 \ --------------------------------------------------- \ file: gldefs.f - OpenGL constant #defines *************** *** 947,950 **** --- 947,952 ---- #define GL_INTENSITY16 0x804D #define GL_R3_G3_B2 0x2A10 + #define GL_BGR 0x80E0 + #define GL_BGRA 0x80E1 #define GL_RGB4 0x804F #define GL_RGB5 0x8050 *************** *** 1023,1026 **** --- 1025,1086 ---- #define GL_EXT_paletted_texture 1 + \ EXT_vertex_array + #define GL_VERTEX_ARRAY_EXT 0x8074 + #define GL_NORMAL_ARRAY_EXT 0x8075 + #define GL_COLOR_ARRAY_EXT 0x8076 + #define GL_INDEX_ARRAY_EXT 0x8077 + #define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 + #define GL_EDGE_FLAG_ARRAY_EXT 0x8079 + #define GL_VERTEX_ARRAY_SIZE_EXT 0x807A + #define GL_VERTEX_ARRAY_TYPE_EXT 0x807B + #define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C + #define GL_VERTEX_ARRAY_COUNT_EXT 0x807D + #define GL_NORMAL_ARRAY_TYPE_EXT 0x807E + #define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F + #define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 + #define GL_COLOR_ARRAY_SIZE_EXT 0x8081 + #define GL_COLOR_ARRAY_TYPE_EXT 0x8082 + #define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 + #define GL_COLOR_ARRAY_COUNT_EXT 0x8084 + #define GL_INDEX_ARRAY_TYPE_EXT 0x8085 + #define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 + #define GL_INDEX_ARRAY_COUNT_EXT 0x8087 + #define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 + #define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 + #define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A + #define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B + #define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C + #define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D + #define GL_VERTEX_ARRAY_POINTER_EXT 0x808E + #define GL_NORMAL_ARRAY_POINTER_EXT 0x808F + #define GL_COLOR_ARRAY_POINTER_EXT 0x8090 + #define GL_INDEX_ARRAY_POINTER_EXT 0x8091 + #define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 + #define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 + #define GL_DOUBLE_EXT GL_DOUBLE + + \ EXT_bgra + #define GL_BGR_EXT 0x80E0 + #define GL_BGRA_EXT 0x80E1 + + \ EXT_paletted_texture + + \ These must match the GL_COLOR_TABLE_*_SGI enumerants + #define GL_COLOR_TABLE_FORMAT_EXT 0x80D8 + #define GL_COLOR_TABLE_WIDTH_EXT 0x80D9 + #define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA + #define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB + #define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC + #define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD + #define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE + #define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF + + #define GL_COLOR_INDEX1_EXT 0x80E2 + #define GL_COLOR_INDEX2_EXT 0x80E3 + #define GL_COLOR_INDEX4_EXT 0x80E4 + #define GL_COLOR_INDEX8_EXT 0x80E5 + #define GL_COLOR_INDEX12_EXT 0x80E6 + #define GL_COLOR_INDEX16_EXT 0x80E7 + \ For compatibility with OpenGL v1.0 #define GL_LOGIC_OP GL_INDEX_LOGIC_OP *************** *** 1028,1038 **** \ *********************************************************** ! \ NURBS constants ! \ NurbsProperty ! #define GLU_AUTO_LOAD_MATRIX 100200 ! #define GLU_CULLING 100201 ! #define GLU_SAMPLING_TOLERANCE 100203 ! #define GLU_DISPLAY_MODE 100204 #define GLU_PARAMETRIC_TOLERANCE 100202 #define GLU_SAMPLING_METHOD 100205 --- 1088,1098 ---- \ *********************************************************** ! \ *** NURBS constants ****/ ! \ NurbsProperty */ ! #define GLU_AUTO_LOAD_MATRIX 100200 ! #define GLU_CULLING 100201 ! #define GLU_SAMPLING_TOLERANCE 100203 ! #define GLU_DISPLAY_MODE 100204 #define GLU_PARAMETRIC_TOLERANCE 100202 #define GLU_SAMPLING_METHOD 100205 *************** *** 1040,1044 **** #define GLU_V_STEP 100207 ! \ NurbsSampling #define GLU_PATH_LENGTH 100215 #define GLU_PARAMETRIC_ERROR 100216 --- 1100,1104 ---- #define GLU_V_STEP 100207 ! \ NurbsSampling */ #define GLU_PATH_LENGTH 100215 #define GLU_PARAMETRIC_ERROR 100216 *************** *** 1046,1062 **** ! \ NurbsTrim #define GLU_MAP1_TRIM_2 100210 #define GLU_MAP1_TRIM_3 100211 ! \ NurbsDisplay ! \ GLU_FILL 100012 #define GLU_OUTLINE_POLYGON 100240 #define GLU_OUTLINE_PATCH 100241 ! \ NurbsCallback #define GLU_ERROR 100103 ! \ NurbsErrors #define GLU_NURBS_ERROR1 100251 #define GLU_NURBS_ERROR2 100252 --- 1106,1122 ---- ! \ NurbsTrim */ #define GLU_MAP1_TRIM_2 100210 #define GLU_MAP1_TRIM_3 100211 ! \ NurbsDisplay */ ! \ GLU_FILL 100012 */ #define GLU_OUTLINE_POLYGON 100240 #define GLU_OUTLINE_PATCH 100241 ! \ NurbsCallback */ #define GLU_ERROR 100103 ! \ NurbsErrors */ #define GLU_NURBS_ERROR1 100251 #define GLU_NURBS_ERROR2 100252 *************** *** 1097,1100 **** --- 1157,1200 ---- #define GLU_NURBS_ERROR37 100287 + 0 value ogl-hwnd + 0 value hdc-pixmap + + \ ARB extensions + #define GL_TEXTURE0_ARB 0x84C0 + #define GL_TEXTURE1_ARB 0x84C1 + #define GL_TEXTURE2_ARB 0x84C2 + #define GL_TEXTURE3_ARB 0x84C3 + #define GL_TEXTURE4_ARB 0x84C4 + #define GL_TEXTURE5_ARB 0x84C5 + #define GL_TEXTURE6_ARB 0x84C6 + #define GL_TEXTURE7_ARB 0x84C7 + #define GL_TEXTURE8_ARB 0x84C8 + #define GL_TEXTURE9_ARB 0x84C9 + #define GL_TEXTURE10_ARB 0x84CA + #define GL_TEXTURE11_ARB 0x84CB + #define GL_TEXTURE12_ARB 0x84CC + #define GL_TEXTURE13_ARB 0x84CD + #define GL_TEXTURE14_ARB 0x84CE + #define GL_TEXTURE15_ARB 0x84CF + #define GL_TEXTURE16_ARB 0x84D0 + #define GL_TEXTURE17_ARB 0x84D1 + #define GL_TEXTURE18_ARB 0x84D2 + #define GL_TEXTURE19_ARB 0x84D3 + #define GL_TEXTURE20_ARB 0x84D4 + #define GL_TEXTURE21_ARB 0x84D5 + #define GL_TEXTURE22_ARB 0x84D6 + #define GL_TEXTURE23_ARB 0x84D7 + #define GL_TEXTURE24_ARB 0x84D8 + #define GL_TEXTURE25_ARB 0x84D9 + #define GL_TEXTURE26_ARB 0x84DA + #define GL_TEXTURE27_ARB 0x84DB + #define GL_TEXTURE28_ARB 0x84DC + #define GL_TEXTURE29_ARB 0x84DD + #define GL_TEXTURE30_ARB 0x84DE + #define GL_TEXTURE31_ARB 0x84DF + #define GL_ACTIVE_TEXTURE_ARB 0x84E0 + #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 + #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 + \s Index: Oglwin.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/Oglwin.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Oglwin.f 2 Dec 2015 17:18:28 -0000 1.1 --- Oglwin.f 3 Dec 2015 17:43:41 -0000 1.2 *************** *** 75,79 **** Call CreateWindowEx EraseRect: WinRect ! 10e HOpenGLTimer StartTimer \ prevent a deadlock ; --- 75,79 ---- Call CreateWindowEx EraseRect: WinRect ! 0.00001e StartTimer: RefreshTimer \ Prevent a deadlock ; Index: WaitableTimer.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/WaitableTimer.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WaitableTimer.f 2 Dec 2015 17:18:29 -0000 1.1 --- WaitableTimer.f 3 Dec 2015 17:43:41 -0000 1.2 *************** *** 1,4 **** --- 1,65 ---- anew -WaitableTimer.f \ April 26th, 2013 by Jos v.d.Ven Version + needs EventClass.f + + \ *D doc\classes\ + \ *! WaitableTimerClass + \ *T WaitableTimerClass -- For high resolution waitable timers. + + \ *S Abstract + + \ *P A waitable timer gives a very stable result when small wait times are needed. \n + + + :Class WaitableTimer <Super EventObject + 2 cells bytes *pDueTime + + :M CreateTimer: ( - ) + \ *G Create a waitable timer. + 0 true 0 call CreateWaitableTimer to Hndl + ;M + + 10000000e fconstant #fsecond \ Time for one second + + :M StartTimer: ( F: fseconds - ) + \ *G To start the Waitable timer. + \ ** StartTimer: needs a floating point number on the stack to specify the time to wait. + \ ** The timer has a resolution of 10,000 times better than the resulution of sleep. + #fsecond f* \ Convert to 100 nanoseconds + fnegate \ For a relative time + f>d swap *pDueTime 2! false 0 0 0 *pDueTime Hndl + call SetWaitableTimer drop + ;M + + :M CancelWaitableTimer: ( - ) + Hndl call CancelWaitableTimer ?win-error + ;M + + :M ClassInit: ( -- ) + \ *G Initializes the object. + ClassInit: Super + CreateTimer: Self + ;M + + ;Class + + + \s Use: + + WaitableTimer MyTimer \ Create a timer + + : testTimer ( - ) + 0.5e StartTimer: MyTimer \ Set to a half second. + \ CancelWaitableTimer: MyTimer \ Then it will not signal anymore + Wait: MyTimer \ Start waiting using the wait of the inherted EventObject + beep + ; + + cr .( WaitableTimer.f ) cr + testTimer .( ok) abort + + + \s + (( 2 cells constant 2cells *************** *** 21,27 **** : WaitHndl ( Hndl - ) INFINITE swap call WaitForSingleObject drop ! ; ! \s Use: 0 value HOpenGLTimer --- 82,88 ---- : WaitHndl ( Hndl - ) INFINITE swap call WaitForSingleObject drop ! ; )) ! \s Use: 0 value HOpenGLTimer *************** *** 43,47 **** ; ! testTimer abort \s --- 104,109 ---- ; ! cr .( WaitableTimer.f ) cr ! testTimer .( ok) abort \s Index: OGLEVTS.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/OGLEVTS.F,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OGLEVTS.F 2 Dec 2015 17:18:28 -0000 1.1 --- OGLEVTS.F 3 Dec 2015 17:43:40 -0000 1.2 *************** *** 1,4 **** --- 1,6 ---- anew oglevts.f \ April 26th, 2013 + needs MultiTaskingClass.f + \ A timer does not wait. An event does. That is the advantage. : event-set ( hEvent - ) Call SetEvent 0= abort" Event not set" ; *************** *** 9,12 **** --- 11,26 ---- INFINITE swap Call WaitForSingleObject drop ; + \ Events-to-wait-for can wait till ALL or ONE event is set. + \ The handles of the events are in an array of pHandles. + + \ if bWaitAll is false events-to-wait-for will wait till one event or object is set + \ if bWaitAll is true events-to-wait-for will wait till all events or objects are set + \ pHandles is a pointer to an array with events or object handles + \ nCount is the number of handles in the array + + : events-to-wait-for ( bWaitAll pHandles nCount - #waitobject ) + dup MAXIMUM_WAIT_OBJECTS > abort" Too many objects" + >r INFINITE -rot r> Call WaitForMultipleObjects ; + \ Note: In W98 it does not matter if bWaitAll is true or false *************** *** 28,48 **** dup event-reset ; - \ Events-to-wait-for can wait till ALL or ONE event is set. - \ The handles of the events are in an array of pHandles. - - \ if bWaitAll is false events-to-wait-for will wait till one event or object is set - \ if bWaitAll is true events-to-wait-for will wait till all events or objects are set - \ pHandles is a pointer to an array with events or object handles - \ nCount is the number of handles in the array - - - : events-to-wait-for ( bWaitAll pHandles nCount - #waitobject ) - dup MAXIMUM_WAIT_OBJECTS > abort" Too many objects" - >r INFINITE -rot r> Call WaitForMultipleObjects ; - - wTasks EventTasks \ Make the object myTasks. - - 0x7fffffff constant max-sleep \ this is not endless 46 days is the maximum 0 value h_ev_timeout_slow-action_done 0 value h_ev_slow-action --- 42,47 ---- dup event-reset ; + wTasks EventTasks \ Make the object myTasks. 0 value h_ev_timeout_slow-action_done 0 value h_ev_slow-action *************** *** 50,72 **** 0 value h_ev_Message - 0 value slow-action? ! ! ! 0 value HOpenGLTimer ! : InitOpenGLTimer ( - ) CreateTimer to HOpenGLTimer ; ! : CloseHOpenGLTimer ( -- ) HOpenGLTimer close-file drop ; ! ! initialization-chain chain-add InitOpenGLTimer ! InitOpenGLTimer ! ! unload-chain chain-add CloseHOpenGLTimer : ms-1-period ( max-periods/second - ms-1-period ) 1000 swap / 1 max ; ! : ns-1-period ( max-periods/second - ) ( f: 100ns-1-period ) 10e6 s>f f/ 1e fmax ; ! 60 ns-1-period fvalue ns-time-out-done : wait/restart-timer-slow-action --- 49,61 ---- 0 value h_ev_Message 0 value slow-action? ! WaitableTimer RefreshTimer \ Create a timer : ms-1-period ( max-periods/second - ms-1-period ) 1000 swap / 1 max ; ! : time-1-period ( max-periods/second - ) ( f: Time1Period ) 1e s>f f/ ; ! 60 time-1-period fvalue ns-time-out-done : wait/restart-timer-slow-action *************** *** 154,158 **** : start-ogl-threads ! Start: EventTasks 6 SetThreadcount: EventTasks \ Need at least 6 simultaneous tasks ( 2 spear ) ['] slow-action Submit: EventTasks --- 143,147 ---- : start-ogl-threads ! Start: EventTasks \ Need at least simultaneous tasks ( 2 spear ) 6 SetThreadcount: EventTasks \ Need at least 6 simultaneous tasks ( 2 spear ) ['] slow-action Submit: EventTasks |
From: Jos v.d.V. <jo...@us...> - 2015-12-03 09:24:59
|
Update of /cvsroot/win32forth/win32forth/src/lib/OpenGl In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv22275/src/lib/OpenGl Modified Files: ReformatStrings.f Log Message: Jos: MultiTaskingClass.f was allready included. Index: ReformatStrings.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/ReformatStrings.f,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ReformatStrings.f 2 Dec 2015 17:44:06 -0000 1.2 --- ReformatStrings.f 3 Dec 2015 09:24:57 -0000 1.3 *************** *** 74,79 **** defer NewLine ( -- ) ' cr is NewLine - \ CODE SCAN ( adr len char -- adr' len' ) - : ListWords { adrEnd Size -- } \ *G Lists all words in the buffer. --- 74,77 ---- |
From: Jos v.d.V. <jo...@us...> - 2015-12-03 09:12:28
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21803 Modified Files: task.f Removed Files: multithr.f Log Message: Jos: MultiThr.f has been replcad by MultiTaskingClass.f --- multithr.f DELETED --- Index: task.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/task.f,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** task.f 6 Aug 2014 12:30:30 -0000 1.24 --- task.f 3 Dec 2015 09:12:26 -0000 1.25 *************** *** 11,15 **** \ *P The multi-tasker is not loaded in the system by default so the file TASK.F in the lib \ ** folder should be included in any program that multi-tasks, unless using the file ! \ ** MULTITHR.F (also in the lib folder) which includes it automatically. \ *P Multi-tasking in Win32Forth is accomplished by using the Windows\_® \d multi-tasker. \ ** This is a pre-emptive multi-tasker. --- 11,15 ---- \ *P The multi-tasker is not loaded in the system by default so the file TASK.F in the lib \ ** folder should be included in any program that multi-tasks, unless using the file ! \ ** MultiTaskingClass.f (also in the lib folder) which includes it automatically. \ *P Multi-tasking in Win32Forth is accomplished by using the Windows\_® \d multi-tasker. \ ** This is a pre-emptive multi-tasker. |
From: Jos v.d.V. <jo...@us...> - 2015-12-03 09:10:18
|
Update of /cvsroot/win32forth/win32forth/Help In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21707 Modified Files: HelpScope.f Log Message: Jos: MultiThr.f has been replaced by MultiTaskingClass.f Index: HelpScope.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/Help/HelpScope.f,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** HelpScope.f 6 Nov 2015 13:39:02 -0000 1.13 --- HelpScope.f 3 Dec 2015 09:10:15 -0000 1.14 *************** *** 294,298 **** \ SrcScope: src\lib\SendMessage.f \ this file is deprecated and empty SrcScope: src\lib\MultiOpen.f ! SrcScope: src\lib\MultiThr.f SrcScope: src\lib\RecentFiles.f SrcScope: src\lib\RegistrySupport.f --- 294,298 ---- \ SrcScope: src\lib\SendMessage.f \ this file is deprecated and empty SrcScope: src\lib\MultiOpen.f ! SrcScope: src\lib\MultiTaskingClass.f SrcScope: src\lib\RecentFiles.f SrcScope: src\lib\RegistrySupport.f |
From: Jos v.d.V. <jo...@us...> - 2015-12-02 19:35:16
|
Update of /cvsroot/win32forth/win32forth/src/lib In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11198 Modified Files: w_search.f Log Message: Jos: Avoiding duplicate +trailing Index: w_search.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/w_search.f,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** w_search.f 5 Mar 2013 20:46:02 -0000 1.10 --- w_search.f 2 Dec 2015 19:35:14 -0000 1.11 *************** *** 266,269 **** --- 266,271 ---- ; + [UNDEFINED] +trailing [if] + : +trailing ( addr count char -- adr2 count2 ) \ remove leading char locals| char | *************** *** 275,278 **** --- 277,282 ---- ; + [then] + : #number-line> ( adr count which seperator - n flag ) locals| seperator | dup 0> |
From: Jos v.d.V. <jo...@us...> - 2015-12-02 19:11:51
|
Update of /cvsroot/win32forth/win32forth/demos In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9729 Added Files: OpenGl_Hello.f Log Message: Jos: A demo for OpenGl --- NEW FILE: OpenGl_Hello.f --- anew -OpenGl_Hello.f \ To show how an OpenGL drawing can be made in Win32Forth s" src\lib\OpenGl" "fpath+ \ For OpenGL support needs opengl.f \ The OpenGl wrapper and many tools menubar Openglmenu \ Define a menu for the OpenGL window popup "&File" menuitem "E&xit" bye ; endbar needs oglwin.f \ The OpenGL window \ Next starts the OpenGL part. That might need some study. Font vFont 0 value baselist : init-3Dfont ( -- ) sizeof glyphmetricsfloat 256 * malloc to lpgmf_buffer 255 glGenLists to baselist s" Comic Sans MS" SetFaceName: vFont Create: vFont Handle: vFont ghdc call SelectObject \ Old font on the stack ghdc 1 255 baselist 0.2e 0.09e \ create display lists WGL_FONT_POLYGONS lpgmf_buffer wglUseFontOutlines \ for the selected font ( OldFont) ghdc call SelectObject \ Restore the old font call DeleteObject ?winerror ; \ Delete the new font. It is now in the list : eye-parameters ( f: -- eyex eyey eyez centerx centery centerz upx upy upz ) \ eyex eyey eyez .0000e .2300e 4.130e \ centerx centery centerz .0000e .1724e 3.340e \ upx upy upz 00000e .000e -.02000e ; : set-viewpoint GL_PROJECTION glMatrixMode \ starting the projection matrix glLoadIdentity GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT OR glClear 0.0e0 0e0 .0e0 glColor3f \ The screen color \ Setting up a perspective in the projection matrix. \ This will affect the entire scene. 47.00e 1.000e .0100e 15.00e gluPerspective 0.00e .00e -.200e .000e glRotatef \ deg x y z rotate eye \ Setting up a viewing transformation eye-parameters gluLookAt .1290e .1583e .1700e glscalef \ Scale it a bit 0.00e .00e -.200e .000e glRotatef \ deg x y z Rotate around the center -.8700e 1.399e 21.40e glTranslatef \ x y z position of the scene 4.000e -1.400e .0000e .0000e glRotatef \ deg x y z Rotate all objects \ Continue with the model matrix for the object(s) GL_MODELVIEW glMatrixMode ; : InitGL ( -- ) init-3Dfont \ Enable a number of features GL_SMOOTH glShadeModel GL_DEPTH_TEST glEnable GL_FRONT GL_AMBIENT glColorMaterial GL_COLOR_MATERIAL glEnable GL_LIGHTING glEnable GL_LIGHT0 glEnable ; : DrawIntro ( -- ) 0.00e 1.1624e .1766e 0.3000e objectcolor! \ Prepair the color of the object GL_POLYGON \ fill -10.00e 0e 0.5e 0e \ Rotation f: deg xg yg zg .2333e .2531e .7000e \ Scaling f: xs ys zs -.4000e .2100e -.4000e \ Transformation f: xt yt zt [rot-scaled-object ( fill -- ) ( f: deg xg yg zg xs ys zs xt yt zt -- ) s" Hello OpenGL" baselist glType object] 0.00e -4.038e 1.977e .3000e objectcolor! GL_POLYGON -10.00e 0e 0.5e 0e .2333e .2531e .7000e -.4000e -.1900e -.4000e [rot-scaled-object ( fill -- ) ( f: deg xg yg zg xs ys zs xt yt zt -- ) s" in Win32Forth." baselist glType object] show-frame ; \ Startup and exit part: : RefreshIntro ( - ) \ Should be used when the window is repainted InitGL \ Initialize the scene set-viewpoint DrawIntro ; \ Draw the scene true to static-scene \ This drawing does not change : ShowIntro ( -- ) Start: OpenGLWindow \ Starting the OpenGl window ['] drop is KeyboardAction \ Disable all keys here except escape RefreshIntro ; : ExitIntro ( - ) \ The cleanup part baselist 255 glDeleteLists \ Kill the 3d Font in the list lpgmf_buffer free ; \ Free the lpgmf_buffer ShowIntro \ Start the OpenGL window with the OpenGL drawing. ' RefreshIntro is painting \ Action when the window is repainted ( resized etc ) \s |
From: Jos v.d.V. <jo...@us...> - 2015-12-02 17:48:03
|
Update of /cvsroot/win32forth/win32forth/src/lib/OpenGl In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4283 Added Files: MenuFile.f Log Message: Jos: Adding a replaceable file menu. --- NEW FILE: MenuFile.f --- Anew -MenuFile popup "&File" menuitem "&Load a bitmap" load-bitmap ; menuitem "&Play captured frames" show-#bitmaps ; menuitem "Save as &bitmap" hdc-pixmap save-as ; menuitem "&Capture frames" save#frames ; menuitem "E&xit" bye ; \s |
From: Jos v.d.V. <jo...@us...> - 2015-12-02 17:44:08
|
Update of /cvsroot/win32forth/win32forth/src/lib/OpenGl In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4151 Modified Files: ReformatStrings.f Log Message: Jos: Avoiding a duplicate definition. Index: ReformatStrings.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/lib/OpenGl/ReformatStrings.f,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ReformatStrings.f 2 Dec 2015 17:18:29 -0000 1.1 --- ReformatStrings.f 2 Dec 2015 17:44:06 -0000 1.2 *************** *** 11,16 **** dir *.htm abort )) - dup-warning-off : +trailing ( addr cnt char -- adr2 cnt2 ) ( 6.15 version) \ *G Remove leading a character from a string. --- 11,16 ---- dir *.htm abort )) + [UNDEFINED] +trailing [if] : +trailing ( addr cnt char -- adr2 cnt2 ) ( 6.15 version) \ *G Remove leading a character from a string. *************** *** 22,27 **** then ; ! ! dup-warning-on : GetCol ( - col ) --- 22,26 ---- then ; ! [then] : GetCol ( - col ) |
From: Jos v.d.V. <jo...@us...> - 2015-12-02 17:32:28
|
Update of /cvsroot/win32forth/win32forth/apps/Chess In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv3759 Added Files: MenuFileChess.f Log Message: Jos: Adding a missing file --- NEW FILE: MenuFileChess.f --- Anew -MenuFile popup "&File" menuitem "E&xit" bye ; \s |
From: Jos v.d.V. <jo...@us...> - 2015-12-02 17:24:00
|
Update of /cvsroot/win32forth/win32forth/apps/Chess In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv3435 Modified Files: _fcp3D.f fcp3D.htm fcp3d.f fcp_inputwin.f Removed Files: BMPDOT.F BMPIO.F Fullscreen.f Gldefs.f MenuFile.f MenuOgl.f OGLEVTS.F Oglwin.f Opengl.f PALETTE.F PIXELFRM.F Log Message: Jos: Adapting to the new OpenGL --- BMPIO.F DELETED --- --- Fullscreen.f DELETED --- --- Opengl.f DELETED --- --- PALETTE.F DELETED --- --- PIXELFRM.F DELETED --- Index: fcp3D.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Chess/fcp3D.htm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** fcp3D.htm 21 Dec 2004 00:18:44 -0000 1.1 --- fcp3D.htm 2 Dec 2015 17:23:57 -0000 1.2 *************** *** 10,18 **** <body bgcolor="#FFFFFF"> ! <p><font size="4">October 20th, 2003 loader for fcp3D<br> <br> About this version:<br> ! During long time tests there I discovered 2 bugs.<br> ! To solve them I changed .thinkResult and .$move <br> </font></p> --- 10,17 ---- <body bgcolor="#FFFFFF"> ! <p><font size="4">December 2nd, 2015<br> <br> About this version:<br> ! Updated the OpenGL system. </font></p> *************** *** 22,27 **** The chess engine was ported by Ian Osgood. <br> Ian granted me his permission to use his source. For which I am ! greatful.<br> ! Most important features:<br> - Choose to play black or white. <br> - Autoplay, endless autoplay.<br> --- 21,27 ---- The chess engine was ported by Ian Osgood. <br> Ian granted me his permission to use his source. For which I am ! greatful.</p> ! ! <p>Most important features:<br> - Choose to play black or white. <br> - Autoplay, endless autoplay.<br> *************** *** 35,40 **** - Change various parameters of the 3D OpenGL environment.<br> - Uses a small part of a fractal as a texture. <br> ! - Undo last move.<br> ! Compile: <strong>_fcp3D<br> </strong>Enter your moves in the text-box of the window Chess commands.<br> --- 35,41 ---- - Change various parameters of the 3D OpenGL environment.<br> - Uses a small part of a fractal as a texture. <br> ! - Undo last move.</p> ! ! <p>Compile: <strong>_fcp3D<br> </strong>Enter your moves in the text-box of the window Chess commands.<br> *************** *** 45,54 **** play limited by time.</font></p> - <p> </p> - <p>June 15th, 2004</p> <p><font size="4">Ian added an opening book an made a number of ! improovements.</font></p> </body> </html> --- 46,53 ---- play limited by time.</font></p> <p>June 15th, 2004</p> <p><font size="4">Ian added an opening book an made a number of ! improvements.</font></p> </body> </html> --- Gldefs.f DELETED --- Index: fcp_inputwin.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Chess/fcp_inputwin.f,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fcp_inputwin.f 29 Jun 2008 19:49:30 -0000 1.3 --- fcp_inputwin.f 2 Dec 2015 17:23:57 -0000 1.4 *************** *** 1,14 **** anew fcp_inputwin.f \ Game window September 20th, 2002 - 21:28 - needs struct.f \ For the use of C-like structures. needs FCP131wf32.f \ The chess engine from http://www.quirkster.com/iano/forth/FCP.html - needs multithr.f \ For threads and events - needs oglevts.f \ Defines the threads and events - needs bmpdot.f \ Header definitions for bmpio.f - needs palette.f \ Defines a palette. Needed when 256 colors are used. - needs gldefs.f \ Opengl constants. - needs bmpio.f \ Saving and loading bitmaps needs opengl.f \ Basic OpenGL binding to Win32Forth. Includes a brief explanation ! needs fcp3d.f \ OpenGL Graphis for the game needs fullscreen.f \ Switch to fullscreen or window --- 1,7 ---- anew fcp_inputwin.f \ Game window September 20th, 2002 - 21:28 needs FCP131wf32.f \ The chess engine from http://www.quirkster.com/iano/forth/FCP.html needs opengl.f \ Basic OpenGL binding to Win32Forth. Includes a brief explanation ! needs fcp3d.f \ OpenGL Graphics for the game needs fullscreen.f \ Switch to fullscreen or window *************** *** 27,31 **** menubar Openglmenu \ Customize the menu ! needs MenuFile.f \ Load the menu file needs MenuOgl.f \ Load the other menus endbar --- 20,24 ---- menubar Openglmenu \ Customize the menu ! needs MenuFileChess.f \ Load the menu file needs MenuOgl.f \ Load the other menus endbar *************** *** 38,42 **** 0 value thinking : .stop-box { \ title$ message$ -- } ( adr2 len2 adr1 len1 - ) ! [ MB_OK MB_ICONHAND or MB_TASKMODAL or ] literal msgbox drop ; : .bad-move ( adr count - ) --- 31,35 ---- 0 value thinking : .stop-box { \ title$ message$ -- } ( adr2 len2 adr1 len1 - ) ! [ MB_OK MB_ICONHAND or MB_TASKMODAL or ] literal msgbox&title drop ; : .bad-move ( adr count - ) *************** *** 147,151 **** : y/n-box ( adr2 len2 adr1 len1 - button ) ! [ MB_YESNO MB_ICONQUESTION or MB_TASKMODAL or ] literal msgbox ; : hint --- 140,144 ---- : y/n-box ( adr2 len2 adr1 len1 - button ) ! [ MB_YESNO MB_ICONQUESTION or MB_TASKMODAL or ] literal msgbox&title ; : hint --- Oglwin.f DELETED --- --- MenuFile.f DELETED --- --- MenuOgl.f DELETED --- Index: fcp3d.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Chess/fcp3d.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** fcp3d.f 29 Jun 2008 19:49:30 -0000 1.4 --- fcp3d.f 2 Dec 2015 17:23:57 -0000 1.5 *************** *** 123,130 **** : .ogl_king ( - ) GL_POLYGON .0000e .000e .400e [object ! 30 9 qobj 0.15e 0.0158e .3e gluCylinder object] GL_POLYGON .0000e .000e .5979e [object ! 30 9 qobj .0419e .0089e .4179e gluCylinder object] GL_POLYGON .0000e .0000e .9226e [object --- 123,130 ---- : .ogl_king ( - ) GL_POLYGON .0000e .000e .400e [object ! 30 9 qobj 0.15e 0.0158e .3e OldgluCylinder object] GL_POLYGON .0000e .000e .5979e [object ! 30 9 qobj .0419e .0089e .4179e OldgluCylinder object] GL_POLYGON .0000e .0000e .9226e [object *************** *** 142,153 **** GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .6823e [rot-object ! 30 9 qobj .0183e .1475e .2883e gluCylinder object] GL_POLYGON .0000e .000e .5875e [object ! 30 9 qobj .0419e .0089e .4179e gluCylinder object] GL_POLYGON 180.000e 1.0000e .0000e 0e .0000e .0000e 1.010e [rot-object ! 30 9 qobj .0983e .0158e .1420e gluCylinder object] ; --- 142,153 ---- GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .6823e [rot-object ! 30 9 qobj .0183e .1475e .2883e OldgluCylinder object] GL_POLYGON .0000e .000e .5875e [object ! 30 9 qobj .0419e .0089e .4179e OldgluCylinder object] GL_POLYGON 180.000e 1.0000e .0000e 0e .0000e .0000e 1.010e [rot-object ! 30 9 qobj .0983e .0158e .1420e OldgluCylinder object] ; *************** *** 156,163 **** GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .5968e [rot-object ! 30 9 qobj .0183e .1475e .2005e gluCylinder object] GL_POLYGON .0000e .0000e .5147e [object ! 30 9 qobj .0419e .0089e .4179e gluCylinder object] GL_POLYGON .0000e .0000e .7382e [object --- 156,163 ---- GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .5968e [rot-object ! 30 9 qobj .0183e .1475e .2005e OldgluCylinder object] GL_POLYGON .0000e .0000e .5147e [object ! 30 9 qobj .0419e .0089e .4179e OldgluCylinder object] GL_POLYGON .0000e .0000e .7382e [object *************** *** 172,176 **** GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .5968e [rot-object ! 30 9 qobj .0183e .1475e .2005e gluCylinder object] GL_QUADS -30e .000e -1.09e 0e --- 172,176 ---- GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .5968e [rot-object ! 30 9 qobj .0183e .1475e .2005e OldgluCylinder object] GL_QUADS -30e .000e -1.09e 0e *************** *** 187,195 **** GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .5968e [rot-object ! 30 9 qobj .0183e .1475e .2005e gluCylinder object] GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .8341e [rot-object ! 4 4 qobj .0515e .0397e .3836e gluCylinder object] ; --- 187,195 ---- GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .5968e [rot-object ! 30 9 qobj .0183e .1475e .2005e OldgluCylinder object] GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .8341e [rot-object ! 4 4 qobj .0515e .0397e .3836e OldgluCylinder object] ; *************** *** 198,205 **** GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .5421e [rot-object ! 30 9 qobj .0000e .2046e .2487e gluCylinder object] GL_POLYGON .0000e .0000e .3812e [object ! 30 9 qobj .0630e .0132e .2576e gluCylinder object] GL_POLYGON .0000e .0000e .6979e [object --- 198,205 ---- GL_POLYGON 180.000e 1.0000e .0000e 0e .0027e .0000e .5421e [rot-object ! 30 9 qobj .0000e .2046e .2487e OldgluCylinder object] GL_POLYGON .0000e .0000e .3812e [object ! 30 9 qobj .0630e .0132e .2576e OldgluCylinder object] GL_POLYGON .0000e .0000e .6979e [object --- OGLEVTS.F DELETED --- --- BMPDOT.F DELETED --- Index: _fcp3D.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Chess/_fcp3D.f,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** _fcp3D.f 29 Jun 2008 19:49:30 -0000 1.4 --- _fcp3D.f 2 Dec 2015 17:23:57 -0000 1.5 *************** *** 1,3 **** ! \ loader for fcp3D. Needs Win32Forth version 6.13 or better sys-warning-off --- 1,3 ---- ! \ loader for fcp3D. sys-warning-off *************** *** 5,8 **** --- 5,10 ---- synonym random-wf32 random + s" src\lib\OpenGl" "fpath+ \ For OpenGL support + needs fcp_inputwin.f *************** *** 16,20 **** r> ; - \ Needed-file aborts when the file is not found. : needed-file ( count adr - ) --- 18,21 ---- *************** *** 31,40 **** Werror.f struct.f toolset.f multithr.f oglevts.f bmpdot.f ! palette.f gldefs.f opengl.f bmpio.f fullscreen.f FCP131wf32.f fcp-book.f oglwin.f fcp3D.f fcp_inputwin.f )) start-opengl-chess ! ' .board_ogl is painting painting \s --- 32,43 ---- Werror.f struct.f toolset.f multithr.f oglevts.f bmpdot.f ! palette.f gldefs.h opengl.f bmpio.f fullscreen.f FCP131wf32.f fcp-book.f oglwin.f fcp3D.f fcp_inputwin.f )) + true to static-scene + start-opengl-chess ! ' .board_ogl is painting \s |