QuickTopic (SM) free message boards QuickTopic (SM) free message boards
Skip to Messages
  Sign In to access your topic list  |New Topic |My Topics|Profile
Upgrade to Pro   Customize, show pictures, add an intro, and more:   QuickTopic Pro...and check out QuickThreadSM
Topic: OpenGL
Views: 4473, Unique: 2790 
Subscribers: 2
What's
this?
Printer-Friendly Page
Subscribe to get & post, or stop messages by email Subscribe
All messages    << 14-22  13-13 of 22  1-12 >>
About these ads
Who | When
Messagessort recent-bottom   
Post a new message
 
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
RSS link What's this?
All messages    << 14-22  13-13 of 22  1-12 >>
QuickTopicSM message boards
Over 200,000 topics served
Learn more Frequently asked questions  Acknowledgements
What they're saying about QuickTopic
 Questions, comments, or suggestions? Contact Us
Read our use policy before beginning. We value your privacy; please read our privacy statement.
Copyright ©1999-2008 Internicity Inc. All rights reserved.