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

Re: RE : Re: RE : Re: GLUT

From: Warrender, Christina E <cewarr_at_sandia.gov>
Date: Tue, 8 Feb 2005 16:47:14 -0700

Some of my problems were apparently due to using cimport: instead of
function:=20
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=20
(or at least its frame - the contents look like whatever was on the
screen=20
underneath the window) but I also get an access violation.

glutDisplayFunc expects a pointer to a function with no parameters and
no return value. =20
Should this be set up the same way as Windows callbacks?

Christy
=20

-----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=3D20
    GLUT_DOUBLE or=3D20
    GLUT_ACCUM or=3D20
    GLUT_DEPTH or
    GLUT_STENCIL or glutInitDisplayMode
   =3D20
    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 de Warrender, Christina E
Envoy=3DE9 : lundi 7 f=3DE9vrier 2005 17:48
=3DC0 : sftalk_at_forth.com
Objet : [sftalk] Re: RE : Re: GLUT

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

----------------------------------------------------------------------
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 Tue Feb 08 2005 - 15:49:21 PST

This archive was generated by hypermail 2.2.0 : Wed Jan 07 2009 - 03:04:13 PST