![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

Charles - thanks for your help anyway.
Roger - I'd be interested in seeing your code if you can find it. =20
Anyone - I'd like to learn more about the details of how SwiftForth (or
any Forth)=20
works with DLLs; any recommendations for good references? (preferably
English=20
descriptions as opposed to code).=20
Christy
-----Original Message-----
From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf
Of Roger Levy
Sent: Wednesday, February 09, 2005 11:32 AM
To: sftalk_at_forth.com
Subject: [sftalk] Re: RE : Re: RE : Re: RE : Re: GLUT
Christy and Charles and everyone else out there in TV-land,
i had actually solved this shortly after posting the problem on the
forum, but i ran into some limitations that made it impractical to
continue. i don't remember exactly what those were but i think i may
hunt for the code for you, it remember animating 10,000 randomly-colored
2d polygons on the screen at 60 fps. it certainly was no Unreal
Tournament engine but it was impressive to me at the time. i'll look for
it ...
actually i think i remember that the reason i didn't follow up was that
it may have just turned out to be impossible in SwiftForth, if i didn't
get it working in that one it may have been some other Forth like
Win32Forth.
anyway i think it should be very easy to do in RetroForth, someone did a
conversion of the 'GLFW' or OpenGL Framework, that i actually plan to
try when i delve into 3d again... working with DLL's in Retro is easy
and it is possible to code callbacks in machine code, i've made a few
(it is clumsy atm and would be easier with an assembler)...
-Roger
----- Original Message -----
From: "Charles Melice" <mail_at_forthcad.com>
To: <sftalk_at_forth.com>
Sent: Wednesday, February 09, 2005 5:44 AM
Subject: [sftalk] RE : Re: RE : Re: RE : Re: GLUT
> Sorry Christy,
>
> Effectivelly, I just checked my code don't work with any display =3D=20
> callback.
>
> I don't know where is the problem.=3D20
>
> Possibly the calling program have to be a console-program.=3D20 =
Possibly
> glut callback uses _CDECL convention.
>
> Charles
>
>
> -----Message d'origine-----
> De : sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] De la=20
> part =3D de Warrender, Christina E
> Envoy=3DE9 : mercredi 9 f=3DE9vrier 2005 0:47 =3DC0 : sftalk_at_forth.com =
Objet
> : [sftalk] Re: RE : Re: RE : Re: GLUT
>
>
> Some of my problems were apparently due to using cimport: instead of
> function:=3D3D20 What's the criteria for choosing between these and =
=3D
> import:?
>
> Using your examples gets me back to where Roger was. I do get a =3D
> window=3D3D20
> (or at least its frame - the contents look like whatever was on the
> screen=3D3D20 underneath the window) but I also get an access =
violation.
>
> glutDisplayFunc expects a pointer to a function with no parameters and
=3D
> no
> return value. =3D3D20 Should this be set up the same way as Windows =
=3D
> callbacks?
>
> Christy
> =3D3D20
>
> -----Original Message-----
> From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On
Behalf =3D
> Of
> Charles Melice
> Sent: Tuesday, February 08, 2005 5:29 AM
> To: sftalk_at_forth.com
> Subject: [sftalk] RE : Re: RE : Re: GLUT
>
> \ GLUT bed test
>
> library somewhere\glut32.dll
>
> function: glutInit ( *argcp **argv -- )
> function: glutInitDisplayMode ( mode -- )
> function: glutCreateWindow ( ztitle -- glutid )
> function: glutDestroyWindow ( glutid -- )
> function: glutMainLoop ( -- )
> \ function: glutSetWindow ( glutid -- )
> function: glutDisplayFunc ( *func -- )
>
>
> : #define ( "name" "const" -- )
> >in @ >r
> bl word drop
> bl word count evaluate
> r> >in ! constant
> bl word drop ;
>
> #define GLUT_RGB 0
> #define GLUT_RGBA GLUT_RGB
> #define GLUT_INDEX 1
> #define GLUT_SINGLE 0
> #define GLUT_DOUBLE 2
> #define GLUT_ACCUM 4
> #define GLUT_ALPHA 8
> #define GLUT_DEPTH 16
> #define GLUT_STENCIL 32
>
>
> :NONAME ( -- ) ; 0 CB: DisplayCB
>
>
> here ,z" prog" here swap , constant **argv
>
> : MAIN ( -- )
> 0 locals| glutid |
>
> 1 pad ! pad **argv glutInit
>
> GLUT_RGBA=3D3D3D20
> GLUT_DOUBLE or=3D3D3D20
> GLUT_ACCUM or=3D3D3D20
> GLUT_DEPTH or
> GLUT_STENCIL or glutInitDisplayMode
> =3D3D3D20
> z" GLUT Test" glutCreateWindow to glutid
> DisplayCB glutDisplayFunc
> glutMainLoop
> glutid glutDestroyWindow
> ;
>
>
> -----Message d'origine-----
> De : sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] De la
part =3D
> =3D3D3D
> de Warrender, Christina E Envoy=3D3D3DE9 : lundi 7 f=3D3D3DE9vrier =
2005 =3D
> 17:48 =3D3D3DC0
> : sftalk_at_forth.com Objet : [sftalk] Re: RE : Re: GLUT
>
>
> Thanks for the tips. Unfortunately, I'm having even less success than
=3D
> =3D3D =3D3D3D
> Roger did originally; I get an access violation on the glutInit right
at =3D
> the
> beginning. If I try to do glutInit interactively, the problem seems
to
> happen somewhere in ?IMPORTED. =3D3D3D3D20
>
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
=3D
> For
> list command help, send subject "help" to sftalk-request_at_forth.com =3D
> Message
> archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and
bug
> reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
=3D
> For
> list command help, send subject "help" to sftalk-request_at_forth.com =3D
> Message
> archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and
bug=3D20
> reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
> ----------------------------------------------------------------------
> sftalk_at_forth.com The SwiftForth programming discussion email list
> To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
> For list command help, send subject "help" to sftalk-request_at_forth.com
> Message archives are located at http://www.forth.com/archive/sftalk
> ----------------------------------------------------------------------
> This list is a forum for SwiftForth users. For product support and
bug
> reports, please send email to support_at_forth.com
> ----------------------------------------------------------------------
>
>
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug=20
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
----------------------------------------------------------------------
sftalk_at_forth.com The SwiftForth programming discussion email list
To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com
For list command help, send subject "help" to sftalk-request_at_forth.com
Message archives are located at http://www.forth.com/archive/sftalk
----------------------------------------------------------------------
This list is a forum for SwiftForth users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Wed Feb 09 2005 - 13:07:05 PST
This archive was generated by hypermail 2.2.0 : Wed Nov 19 2008 - 03:04:24 PST