Re: converting "object position" to "view position" in (py)opengl
You can have dynamic text on a billboard ... just update the texture
when you need to. How are you currently rendering text?
Why not use GLU? It's almost sure to be there if GL is. GLUT isn't on
the other hand ...
You could reimplement the glProject function in Python, but
billboarding would be easiest.
On Wed, Jul 1, 2009 at 1:19 AM, Astan Chee<astan.chee@...> wrote:
> Also, I'm trying not to use glu or glut functions.
> Forrest Voight wrote:
> Why does the cross-section matter?
> Just display it at the object's center...
> On Wed, Jul 1, 2009 at 1:01 AM, Astan Chee<astan.chee@...> wrote:
> Yes, this is what I'm trying to do but how do I calculate cross-section of
> the object at a given distance?
> Thanks again
> Tyler Laing wrote:
> Hmm, I'm not 100% familiar with 3d programming, but wouldn't the best way be
> to find the cross-section of the object at some distance from the camera,
> which would be a 2d shape, and then you can center the text on that shape?
> On Tue, Jun 30, 2009 at 9:26 PM, Astan Chee <astan.chee@...> wrote:
> Im relatively new to opengl and I'm not familiat with its jargon but what
> I have is objects in a 3D world in various positions and a camera that can
> "move" around. What I'm trying to do is if the distance between object and
> camera is close enough, display some information on the screen on the
> I know how to calculate distance and I know how to print/display text in
> opengl (I'm using glOrtho and glRasterPos2i to map out the characters one at
> a time).
> Anyway, what I'm having problems with is how do I calculate where to
> display these information on the screen so that it overlaps the object
> (assuming I know the distance and the angle of the camera and the object
> relative to the camera). Does this make sense? I've attached an image that I
> photoshopped to look like what I'm trying to do.
> Thanks for any help
> Visit my blog at http://oddco.ca/zeroth/zblog