Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / 3D Theory & Graphics / Vertex data by gluSphere Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
Balazs Szoradi

May 10, 2005, 04:32 AM


Does anyone know how to get the vertex data of gluquadric objects (gluSphere, gluCylinder etc)? Would be nice if I could generate my objects with glu, then render with D3D.


Balazs Szoradi

May 10, 2005, 09:55 AM



Erik Faye-Lund

May 11, 2005, 04:25 AM

[edit] oh, i noticed your own reply with solution after i wrote the reply, sorry! [/edit]

as d3dx has similar functionality, i'd go for that. if you really really HAVE to use glu (not that i can see any valid reason), you'd have to do something like implementing glBegin() with friends in your program, i guess.


May 11, 2005, 04:31 AM

And to continue answering a question you yourself have posted a much nicer alternative solution to, you would simply pry out the generated vertex and possibly texture data using glFeedbackBuffer and glRenderMode(GL_FEEDBACK). Lots of fun.

Balazs Szoradi

May 12, 2005, 08:41 AM

Im writing 64k intro and would like to get the object generators for free. Unfortunately d3dx is not in a dll yet, so that is why Im thinking of glu.

Thanks I will try that. Setting the proj and transf matrices to identity hopefully leaves the vertexdata unchanged.


Erik Faye-Lund

May 12, 2005, 09:57 AM

Balazs: well, the latest sdk comes with d3dx as a dll. breakpoint allowed the usage of d3dx_24.dll in the compos. i myself use gluTess-stuff in my d3d 64k-system, but not gluSphere. i'm suspecting that the glue-code that would be required to extract the vertex-data (and also to weld the vertices so you get an un-exploded mesh) will take up more code than just generating it yourself. for a 64k, a sphere-generator does really not take up a lot of space. in our intro, nemesis, we spent approx 300 bytes on the sphere generator. and that's a damn naive and unoptimized one also ;)


May 12, 2005, 10:15 AM

[completely offtopic]I just love all these (ex-)demoscene guys here on flipcode. Can you believe I just slengpunged Erik after ojuicing his nick?

This thread contains 7 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.