>       Here's a snazzed up version of Ian's rework of my old example:
> 
>       Screenshot:
>       http://seriss.com/people/erco/fltk/image-texturemapped-cube.png

Cool - but the picture is different!   ;-)


>       Code:
>       http://seriss.com/people/erco/fltk/image-texturemapped-cube.cxx
> 
>       I added a lighting model and materials so that the texture
>       reacts to lighting.

Yes, that is much nicer.

>       I also simplified Ian's texture loading code a bit;
>       as it happens, Fl_Shared_Image's internal rgb format is 
> compatible
>       with opengl's glTexImage2D() call, so the x/y loop and 
> extra image
>       buffer could be removed.

Yup, I had thought about that, but decided to write it out "long hand"
to make it more like the existing code, and to make it more obvious how
the pixel data from the image was being passed to the GL texture.

Cheers,
-- 
Ian

SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to