OpenGL Quadrics pointer ???
BlitzMax Forums/OpenGL Module/OpenGL Quadrics pointer ???
| ||
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) |
| ||
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 |
| ||
Extron, you're fast! thanks. |
| ||
See Nehe tutorial here. ;) http://www.blitzbasic.com/Community/posts.php?topic=41689 |
| ||
actually already downloaded that (obviously did not get to go through it) nice work, I look forward to going through it. |
| ||
And i correct something, no need "int ptr" in gluSphere function because quadratic is a pointer. :) |