QuickTopic free message boards logo
Skip to Messages

TOPIC:

OpenGL

^     All messages            9-24 of 24  1-8 >>
24
tedyPerson was signed in when posted
11-22-2012
02:59 AM ET (US)
hey our friends i want to read vertex from file. and i used dev C++ and opengl package so that there is the error.1 C:\Dev-Cpp\include\c++\3.4.2\backward\fstream.h:31, from C:\Dev-Cpp\file.cpp In file included from C:/Dev-Cpp/include/c++/3.4.2/backward/fstream.h:31, from C:\Dev-Cpp\file.cpp
so how to fix it.
23
den
07-19-2010
04:19 PM ET (US)
travesti
travesti
travesti
22
Nick
07-15-2008
04:06 PM ET (US)
  Messages 21-15 deleted by author between 07-07-2008 02:22 AM and 07-20-2010 02:01 AM
14
Negar
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
13
Ed Sanville
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
12
Lucas Walter
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
11
BuZZ
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
10
Lucas Walter
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).
9
Gareth
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;
8
Lucas Walter
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
^     All messages            9-24 of 24  1-8 >>

Print | RSS Views: 6102 (Unique: 3667 ) / Subscribers: 3 | What's this?