|
-
Aug 23rd, 2001, 03:10 AM
#1
Thread Starter
Member
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.
-
Aug 23rd, 2001, 12:20 PM
#2
"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.
-
Aug 24th, 2001, 12:40 AM
#3
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|