Hello Sajjadul,

Sajjadul Islam wrote:
> Hello,
> 
> I have trying to use texture in the planetory system that has been given
> in the tutorial.
> 
> And come up with  the following issue:
> 
> 1. Do i have to create separate ImagePtr for each and every object i
> wrap with texture?

you need one Image per image file you want to load, but you can apply 
the same texture/image to multiple objects.

>     I tried with only one ImagePtr and then use several read() functions
> to read different images, assign  the image to  the texture and again
> read another image with  the same pointer, but didnt work even though it
> seems to be logical to me.

Well, the image data need to be stored somewhere, so when you call read 
a second time the original data is overwritten. Assigning an image to a 
texture does not move the image data someplace else it just uses the data.

>     Then i declared each ImagePtr for each image i intend to wrap the
> object with and then it worked fine.

yes, that is the way to do it.

> I wonder why my first attempt didnt work
> Could you please explain the issue?

I hope the above explains it :)

        Regards,
                Carsten

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to