Results 1 to 3 of 3

Thread: OpenGL Tesselator in VB

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 1999
    Location
    España
    Posts
    45

    Question OpenGL Tesselator in VB

    I'm making an app that uses OpenGL and I need to use the tesselator object. I'm coding in VB 6.0 and, when I try my code, VB disapears and Dr. Watson apears.
    I've identified the lines that produces that, ¿Anyone know why?

    This is my code:

    Tess = gluNewTess


    ' The folowing 4 lines produce the trouble

    gluTessCallback Tess, tcbTessBegin, AddressOf glBegin
    gluTessCallback Tess, tcbTessVertex, AddressOf glVertex3dv
    gluTessCallback Tess, tcbTessEnd, AddressOf glEnd
    gluTessCallback Tess, tcbTessError, AddressOf TessError


    gluTessNormal Tess, N(0), N(1), N(2)
    gluBeginPolygon Tess
    For I = 0 To nPlaca - 1
    V(0) = Placa(0, I)
    V(1) = Placa(1, I)
    V(2) = Placa(2, I)
    gluTessVertex Tess, V(0), V(0)
    Next I
    gluEndPolygon Tess
    gluDeleteTess Tess


    Please, I need help, I'm very hurried.

  2. #2
    Zaei
    Guest
    "Tess" is an object, I assume. In that case the first line should be "Set Tess = gluNewTess". Following that, you should check "If Tess Is Nothing Then Error", blah, blah.

    Z.

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 1999
    Location
    España
    Posts
    45
    Oh no!
    Tess in VB is a long that means the pointer to the Tesselator Object.
    gluNewTess returns a Long and the other functions require this long number to pointer to the tesselator object.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width