Announcement

Collapse
No announcement yet.

OPENGL - GLUT Header File Released for PB/DLL6

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OPENGL - GLUT Header File Released for PB/DLL6

    GLUT Header File Released for PB/DLL6

    We have decided to pre-release the OpenGL Utility Toolkit Header.
    http://www.sublevel6.f2s.com/


  • #2
    Ok. Good work

    Regard
    V.Shulakov

    ------------------
    Spherical Panorama Inc. Virtual Reality for: Real Estate, Tourism Advertisment.

    Comment


    • #3
      All good,but one moment.
      glutInit ????

      In GLUT.INC
      '===========================
      DECLARE SUB glutInit LIB "glut32.dll" ALIAS "glutInit" (argcp AS LONG, argv AS ASCIIZ)
      '============== DON'T WORK !!! - SISTEM ERROR 4


      argv must be as string:

      DECLARE SUB glutInit LIB "glut32.dll" ALIAS "glutInit" (argcp AS LONG, argv AS STRING)

      This is good work.

      Regard
      V.Shulakov


      ------------------
      Spherical Panorama Inc. Virtual Reality for: Real Estate, Tourism Advertisment.

      Comment


      • #4
        Hi Vladimir!

        At the moment, we can't get glutInit to work no matter how we declare it.

        From glut.h...
        extern void APIENTRY glutInit(int *argcp, char **argv);

        (And we all know char is ASCIIZ...)

        Should be
        DECLARE SUB glutInit LIB "glut32.dll" ALIAS "glutInit" (argcp AS LONG, argv AS ASCIIZ)
        or
        DECLARE SUB glutInit LIB "glut32.dll" ALIAS "glutInit" (argcp AS LONG, argv AS ASCIIZ PTR)

        so...
        glutInit TALLY(@lpCmdLine, " "), @lpCmdLine
        Would be the correct way to call it

        But it keeps crashing
        GLUTEG caused an invalid page fault in module MSVCRT.DLL at 014f:780264b5.

        We are looking into it...


        [This message has been edited by Andreas_Allerdahl (edited March 15, 2000).]

        Comment


        • #5
          Might be looking for an array of asciiz pointers?

          DIM argv(5) AS DWORD
          argv(0) = VARPTR(Firstsz)
          argv(1) = VARPTR(Secondsz)
          ..
          ..
          glutInit TALLY(@lpCmdLine, " "), VARPTR(argv(0))


          ------------------

          Comment


          • #6
            char **argv

            I thought that this means a pointer to a pointer to an ASCIIZ string... ie, two layers of indirection. In PB, you do multiple layers of indirection like this:

            'Psuedocode:
            DIM a AS ASCIIZ
            DIM b AS ASCIIZ PTR
            DIM c AS ASCIIZ PTR
            b = VARPTR(a)
            c = VARPTR(b)
            MSGBOX a & $CRLF & @b & $CRLF @@c



            ------------------
            Lance
            PowerBASIC Support
            mailto:[email protected][email protected]</A>
            Lance
            mailto:[email protected]

            Comment


            • #7
              You are correct - about rule,but practice show different...

              try this example

              glutinit 1,"t"

              DECLARE SUB glutInit LIB "glut32.dll" ALIAS "glutInit" (argcp AS LONG, argv AS asciiz)

              and try
              glutinit 1,"t"

              DECLARE SUB glutInit LIB "glut32.dll" ALIAS "glutInit" (argcp AS LONG, argv AS string)

              Single program is worked without initglut.

              You can try translate code C to PB
              examle- =ATLANTIS.C= 1994, Silicon Graphics, Inc.

              Regard
              V.Shulakov



              ------------------
              Spherical Panorama Inc. Virtual Reality for: Real Estate, Tourism Advertisment.

              Comment


              • #8
                Guys --
                That "string" works confirms Lance's idea. (pointer to pointer of ASCIIZ).
                What means address of STRING in PB ?
                This is an address of pointer, which shows, where located
                string data (ASCIIZ).
                Pls, test
                Code:
                #Compile Exe
                #Register None
                #Dim All
                #Include "win32api.INC"
                Function PbMain
                   Dim s(1 : 2) As String, i As Integer, ss As Dword
                   s$(1) = "abc": s$(2) = "cde"
                   For i = 1 To 2
                      ss = CvDwd(Peek$(VarPtr(s$(i)), 4))
                      MsgBox Hex$(ss) + "/" + Hex$(StrPtr(s$(i))) + "/" + _
                          Peek$(ss, 3) + "/" + Str$(Peek(ss + 3))
                   Next
                End Function
                [This message has been edited by Semen Matusovski (edited March 14, 2000).]

                Comment


                • #9
                  char **argv

                  I thought that this means a pointer to a pointer to an ASCIIZ string...
                  It does

                  Hmm... I'll take a look at this later tonight.
                  Thanks for your help


                  ------------------

                  http://www.sublevel6.f2s.com/

                  Comment

                  Working...
                  X