Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

TheMatrixXXX

spheres without glu

This topic is 5852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

can you tell me how to generate sphere vertices? i want an array with vertices so i can edit the mesh like in 3ds max, so i can´t use the glu tools. thx --=[[TheMatrixXXX]]=--

Share this post


Link to post
Share on other sites
Advertisement
thx for your answers
i used the skydome tut to create a sphere but when i render it with GL_TRIANLGE_STRIP ogl fills the triangles white
is there a way to disable this to get the wireframe mode?

thx
--=[[TheMatrixXXX]]=--

thx to invective for the create link, its very useful

Share this post


Link to post
Share on other sites
glPolygonMode(GL_LINE);

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
This is a very cool piece of code, I adapted from the source that invective pointed to here and I am very pleased with the results, however...

How do I generate texture mapping coordinates from this calculated sphere? Any ideas...

I am using the code from source3.c as my basis. I am rendering the sphere by using GL_TRIANGLES mode and rendering as follows:


      
glBegin( GL_TRIANGLES );
for (i=0; i<NumFacets; i++)
{
glVertex3f( Facets[i].p1.x * Size, Facets[i].p1.y * Size, Facets[i].p1.z * Size );
glVertex3f( Facets[i].p2.x * Size, Facets[i].p2.y * Size, Facets[i].p2.z * Size );
glVertex3f( Facets[i].p3.x * Size, Facets[i].p3.y * Size, Facets[i].p3.z * Size );
}
glEnd();


Which appears to be correct, as the sphere shows up very nicely, but I can't seem to figure out the proper way to generate my texture mapping coordinates.


[edited by - oeginc on June 12, 2002 6:22:58 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!