programming tools for Windows applications development
  Home  |   SwiftForth Archive  |   SwiftX Archive  |

RE : Re: RE : Re: GLUT

From: Charles Melice <mail_at_forthcad.com>
Date: Tue, 8 Feb 2005 13:29:01 +0100

\ 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=20
    GLUT_DOUBLE or=20
    GLUT_ACCUM or=20
    GLUT_DEPTH or
    GLUT_STENCIL or glutInitDisplayMode
   =20
    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 =
de
Warrender, Christina E
Envoy=E9 : lundi 7 f=E9vrier 2005 17:48
=C0 : sftalk_at_forth.com
Objet : [sftalk] Re: RE : Re: GLUT

Thanks for the tips. Unfortunately, I'm having even less success than =
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. =3D20

----------------------------------------------------------------------
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 Tue Feb 08 2005 - 04:30:32 PST

This archive was generated by hypermail 2.2.0 : Wed Nov 19 2008 - 03:04:24 PST