Re: Newbie - Plotting and selecting points



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/
.



Relevant Pages

  • Re: Newbie - Plotting and selecting points
    ... I'm using VC++/MFC and I don't know how the get the bitmaps from the ... should I be using some kind of texture map to do this? ... find the point of intersection of the user's picking ray with the sphere ... Of course if you want really big markers relative to the ...
    (comp.graphics.api.opengl)
  • Re: Tiling several textures on one model
    ... sphere is centered on origin). ... 256x256 textures, based on Fuller projection. ... texture memory - there will be much more detail at the poles than near the ... I don't have the normals in correctly (as you ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: Tiling several textures on one model
    ... > sphere is centered on origin). ... Everything else kind of revolves around this map. ... > texture memory - there will be much more detail at the poles than near the ... I'm using a Mollweide projection to store the map data (it runs 30.6 ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: How do I tile a sphere ?
    ... Currently I load a rather large single texture of the earth and cover the ... I think I need to convert to a tiles approach where I divide the sphere ...
    (comp.graphics.api.opengl)
  • Re: Noob Needs Help With Texture
    ... > 2) Assigned a new Blinn material to the sphere ... > 3) For the color of the Blinn material, I chose to use the Marble texture ... > When I render it out, it seems the model is in fact turning but the texture ... to create a reference for the texture, under the Rendering menus, ...
    (comp.graphics.apps.alias)