| Who | When |
Messages | |
|
|
|
| Nash
|
7
|
 |
|
10-03-2003 04:16 AM ET (US)
|
|
Is the a way I can color a cone after drawing it with glutSolidCone(...)?
I can only draw it with one color. What I want is color different sections of it.
|
| Lucas Walter
|
8
|
 |
|
10-03-2003 12:00 PM ET (US)
|
|
Nash,
I don't think you can specify colors inside a glu or glut primitive, since you always have to specify the color right before an individual vertex. If you don't want to make your own primitives from scratch, you should be able to find the glut source code somewhere and take the glutsolidcone code and modify it for colors for your program.
-lucasw
|
| Gareth
|
9
|
 |
|
01-22-2004 09:22 AM ET (US)
|
|
I'm trying to rotate the camera about the cue ball in my 3d pool game. do u have any suggestions on how i update the camera position for the eye cordinates.. at the monent i'm using theta = theta - 0.05f; eyeX = 0.1f*((float)cos(theta)); eyeZ = 10.0f*((float)sin(theta)) + 2.5f;
|
| Lucas Walter
|
10
|
 |
|
01-22-2004 12:28 PM ET (US)
|
|
> I'm trying to rotate the camera about the cue ball in my 3d pool > game. do u have any suggestions on how i update the camera > position for the eye cordinates.. at the monent i'm using theta > = theta - 0.05f; > eyeX = > 0.1f*((float)cos(theta)); > eyeZ = > 10.0f*((float)sin(theta)) + 2.5f;
Up = (0,1,0) & eyeY = 0, correct? But the formula you have seems wrong: Eye is what you are looking at, so that should be the x,y,z of the cue ball, while center is where the camera is. If you were moving the camera along x & z (up and down and left and right on the table) while making eye the cue ball, the camera will move but always be looking straight at the cue ball.
To rotate in a perfect circle around the cue ball, centerX = cueballX -r*cos(theta), centerY = cueballY, centerZ = cueballZ - r*sin(theta), where r is how far the camera should be from the cue ball. Eye =(cueballX,cueballY,cueballZ) Up = (0,1,0).
|
| BuZZ
|
11
|
 |
|
11-02-2004 08:32 AM ET (US)
|
|
Hi there
I have been set a task that requires me to draw a grid using c to create some open gl graphics. i have never used opengl before and despite studying countless examples on the net i still cant get my head around what i need to do! The grid needs to have 2 cells across, 3 cells down. Any help would be much appreciated.
my mail is plumpdeejay at yahoo dot co dot uk.
Thanks
|
| Lucas Walter
|
12
|
 |
|
11-02-2004 01:36 PM ET (US)
|
|
> Hi there > > I have been set a task that requires me to draw a grid using c > to create some open gl graphics. i have never used opengl before > and despite studying countless examples on the net i still cant > get my head around what i need to do! > The grid needs to have 2 cells across, 3 cells down. > Any help would be much appreciated. > > my mail is plumpdeejay at yahoo dot co dot uk. > > Thanks You'll be using glVertexf() and glBegin(GL_LINE_STRIP) inside a few for loops (one for the one set of parallel lines and another to make the perpendicular set). I learned on NEHE's tutorials, goto http://nehe.gamedev.net and use their base code on the platform of your choice. -Luke
|
| Ed Sanville
|
13
|
 |
|
08-31-2005 03:16 PM ET (US)
|
|
Hi guys, I'm wondering if you could help me with an OpenGL programming dilemma I have.
I'm rendering a molecule using openGL, and each atom is a sphere centered around an (x, y, z) point. I want to add some text, slightly offset from the center of each sphere by a constant amount, say 20 pixels in the x and y directions. I'm using GLUT to draw the text, that's no problem. Problem is that I need to use glRasterPos3f() to set the raster position for the text drawing operation in 3d space, rather than 2d screen coordinates. This is good for getting the position of the centers of the atoms, but bad for offsetting the text by a constant amount in screen coordinates. My question is: is there an openGL or utility function, that will return the actual (x, y) screen coordinates of a position in 3D space, using the current transformation and projection matrices?
Thanks, Ed Sanville
|
| Negar
|
14
|
 |
|
05-04-2006 01:33 PM ET (US)
|
|
Hi I need to some how move a text in a circular motion according to the movement of my planet. we are told to use glRasterPos3f(x,y, z); glutBitmapCharacter(
But my problem is how can i move the text
|
| Alyson Freya
|
15
|
 |
|
07-19-2006 04:25 PM ET (US)
|
|
|
| |
Messages 16-21 deleted by topic administrator between 07-07-2008 02:22 AM and 07-24-2006 02:02 AM |
| Nick
|
22
|
 |
|
07-15-2008 04:06 PM ET (US)
|
|
|