OpenGL Quadrics pointer ???

BlitzMax Forums/OpenGL Module/OpenGL Quadrics pointer ???

bradford6(Posted 2005) [#1]
This is the inaugural question on the new OpenGL forum (woohoo) hopefully it is not too obscure or confusing :)

I am having some trouble with OpenGL type conversions (maybe?)

it seems that glunewquadric returns an integer:

quadric = gluNewQuadric()



yet the quadric needs a byte pointer.

gluSphere(Qudric Ptr,radius,stacks,slices)


Extron(Posted 2005) [#2]
Global quadratic:Int Ptr	' Storage For Our Quadratic Objects


quadratic=Int Ptr gluNewQuadric()	' Create A Pointer To The Quadric Object (Return 0 If No Memory)
gluQuadricNormals(quadratic, GLU_SMOOTH)	' Create Smooth Normals
gluQuadricTexture(quadratic, GL_TRUE)		' Create Texture Coords

gluSphere(Int Ptr quadratic,1.3,32,32)	' Draw A Sphere With A Radius Of 1.3 And 32 Longitude And 32 Latitude Segments



bradford6(Posted 2005) [#3]
Extron,
you're fast!
thanks.


Extron(Posted 2005) [#4]
See Nehe tutorial here. ;)

http://www.blitzbasic.com/Community/posts.php?topic=41689


bradford6(Posted 2005) [#5]
actually already downloaded that (obviously did not get to go through it)

nice work, I look forward to going through it.


Extron(Posted 2005) [#6]
And i correct something, no need "int ptr" in gluSphere function because quadratic is a pointer. :)