Advertisement

Ball

Started by October 15, 2000 02:45 PM
19 comments, last by Dunge 24 years, 1 month ago
Hey i''m a newbie and I''m doing the NeHe tutorials...... I jsut finished the blending one.... but I have a question : how can we create a sphere and not a cube? I don''t know...... maybe it''s a simple command that we put the position of the center of the ball and how long the radius is? anyway please help me!
u can choose from those two:
gluSphere(....)- but i think this one has something to do with quadrics, wich i havnt learnt yet, i chose to focus on other stuff.

auxWireSphere(Radius); auxSolidSphere(Radius);
just type the radius as a parameter, and it will be drawn at the correct possition you r at.
u can also use-
auxWireTeapot/ auxSolidTeapot.
note that when drawing a solid primitive with those functions, u should have lighting, for it to look 3d, and not 2d. at least from my expirience.
Advertisement
Please, don''t use GLAUX. It''s dead and has been replaced with GLUT.

Nate Miller
http://nate.scuzzy.net
really?, i didnt know that, by GLUT u mean the glu functions?
but from my experiance glut is slow...
Go here for more GLUT information : http://www.opengl.org/developers/documentation/glut.html. I doubt the speed difference from GLUT to Win32 is that large. Anyways, just don''t use GLAUX, it''s a bad idea to use somthing that is deprecated.

Nate Miller
http://nate.scuzzy.net
Advertisement
GLUT doesn''t have to be slow.

The source code is provided with glut and you are more then able to port the GLUT wrapper(cause thats basicly what it is) to assembly language or C++ code written specifly for Win32. GLUT is written to use multiplatform and thats why it''s slower.

This is a future project of mine to make a OpenGL wrapper simmilar to GLUT written specifly for Win32 in pure Assembly language. I also want to write my own API that starts out software only. After that I will write a hardware driver for Nvidia cards only and see where that takes me.

Cya,

Kenny
Hey,.... I don''t know what are glut or glaux and I don''t want to know the faster one... I only want to know the best and easy way to make a ball!
Hehe, what they are saying is that you can use the GLAux library which comes with a built in functionm to draw a sphere (auxSolidSphere) but you will have to download the GLaux library which isn''t recommended as its outdated.

Another way is to us gluSphere which is included in the glu.h that most computers have. I think you can find documentation on that funtion at opengl.org or in MSDN if you have it.

Jason A.

---
I write code.
DelphiGL (members.home.com/jra101)
---I write code.DelphiGL (http://delphigl.cfxweb.net)
You can make a sphere out of quads. A simple loop using COS and SIN can draw a sphere. Or if you prefer, model a sphere using your favorite art program, and load in the file.

This topic is closed to new replies.

Advertisement