Re: Newbie - Plotting and selecting points
- From: John Tsiombikas <nuclear@xxxxxxxxxxxx>
- Date: Sat, 20 Oct 2007 10:47:33 +0000 (UTC)
On 2007-10-19, dm <dmatsum2000@xxxxxxxxx> wrote:
I am drawing a sphere using gluSphere and I want to plot "markers" on
the sphere. These markers are different bitmap shapes depending on
the users selection.
My questions are:
I'm using VC++/MFC and I don't know how the get the bitmaps from the
resource editor into an OpenGL call and I'm not sure which call to use
to draw the bitmaps.
Also, should I be using some kind of texture map to do this?
Yes, you should be using some kind of a texture map. However texture
maps are just images, given to OpenGL with the glTexImage2D call (after
creating a texture object ideally).
Your first part of the question is off topic here. You need to get the
pixels of your images somehow, and pass them to glTexImage2D, but you'll
need to ask in a VC++/MFC newsgroup on how to do that from VC's resource
editor. glTexImage2D just deals with arrays of pixels.
I want the user to be able to select a bitmap marker with the mouse to
view it's coordinates. Is it possible to do this?
Of course it is. The simplest way I can think of right now, would be to
find the point of intersection of the user's picking ray with the sphere
and add a quad with your marker texture at that location on the surface
of the sphere. Of course if you want really big markers relative to the
sphere, this would look ugly.
--
John Tsiombikas (Nuclear / Mindlapse)
http://nuclear.sdf-eu.org/
.
- Follow-Ups:
- Re: Newbie - Plotting and selecting points
- From: jbwest
- Re: Newbie - Plotting and selecting points
- References:
- Prev by Date: Re: Newbie - Plotting and selecting points
- Next by Date: Re: glDrawPixels bug?
- Previous by thread: Re: Newbie - Plotting and selecting points
- Next by thread: Re: Newbie - Plotting and selecting points
- Index(es):
Relevant Pages
|