Re: RE : Re: RE : Re: RE : Re: GLUT

From: Roger Levy <trip_n_save_at_hotmail.com>
Date: Wed, 9 Feb 2005 13:32:00 -0500

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 =
> callback.
>
> I don't know where is the problem.=20
>
> Possibly the calling program have to be a console-program.=20
> Possibly glut callback uses _CDECL convention.
>
> Charles
>
>
> -----Message d'origine-----
> De : sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] De la part =
> de
> Warrender, Christina E
> Envoy=E9 : mercredi 9 f=E9vrier 2005 0:47
> =C0 : 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:=3D20 What's the criteria for choosing between these and =
> import:?
>
> Using your examples gets me back to where Roger was. I do get a =
> window=3D20
> (or at least its frame - the contents look like whatever was on the
> screen=3D20 underneath the window) but I also get an access violation.
>
> glutDisplayFunc expects a pointer to a function with no parameters and =
> no
> return value. =3D20 Should this be set up the same way as Windows =
> callbacks?
>
> Christy
> =3D20
>
> -----Original Message-----
> From: sftalk-bounce_at_forth.com [mailto:sftalk-bounce_at_forth.com] On Behalf =
> 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=3D3D20
> GLUT_DOUBLE or=3D3D20
> GLUT_ACCUM or=3D3D20
> GLUT_DEPTH or
> GLUT_STENCIL or glutInitDisplayMode
> =3D3D20
> 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 =
> =3D3D
> de Warrender, Christina E Envoy=3D3DE9 : lundi 7 f=3D3DE9vrier 2005 =
> 17:48 =3D3DC0
> : sftalk_at_forth.com Objet : [sftalk] Re: RE : Re: GLUT
>
>
> Thanks for the tips. Unfortunately, I'm having even less success than =
> =3D =3D3D
> Roger did originally; I get an access violation on the glutInit right at =
> the
> beginning. If I try to do glutInit interactively, the problem seems to
> happen somewhere in ?IMPORTED. =3D3D3D20
>
>
> ----------------------------------------------------------------------
> 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
> ----------------------------------------------------------------------
>
>
----------------------------------------------------------------------
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 - 10:35:47 PST


Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!

This archive was generated 08-Feb-2012. Archive updated nightly.