> Hey again,
>
> I'm now trying to texture map images onto some surfaces in my Fl_Gl_Window. 
> Erco's code shows how to apply texture maps but I can't see how to load them 
> from images. I've been trying to use OpenGL tutorials and Fl_BMP_Image but 
> I'm not having any success.
>
> Any help would again be very much appreciated,
>
> Eoin

WildMagic, which is totally brilliant, make these things easy. Here is a snip 
relevant to textures from the Billboard demo that comes with the distribution:

Texture* pkTexture = WM3_NEW Texture(Image::Load(
    System::GetPath("../../Data/Wmif/","Horizontal.wmif")));
pkTexture->CoordU = Texture::WM_REPEAT;
pkTexture->CoordV = Texture::WM_REPEAT;
Effect* pkEffect = WM3_NEW TextureEffect(pkTexture,kSM.GetUVs());
pkGround->SetEffect(pkEffect);
m_spkScene->AttachChild(pkGround);

WildMagic does it all for you. Of course, you would have to use a Wm3 render 
context inside an Fl_Window. I made a post about how I did that in the OpenGL 
forum but it doesn't seem to have generated much interest.

Best wishes,

Nicholas
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to