eatpepsi wrote:
> Hi,
> 
> I have two problems with texturing in osg.
> 
> 1)The first problem is to create a procedural 2D texture.The setImage 
> function doesnt work for me.
> 
> I created a 2D texture array image[64][64][4];
> image->setImage(64,64,1,4,GL_RGBA,GL_UNSIGNED_BYTE,(unsigned 
> char*)checkImage,osg::Image::USE_NEW_DELETE);
> 
> I get an error because it accepts only character type of data.Can some one 
> point me to some example code or help how to use setImage functions for 2d 
> procedural textures.
> 


You are not very clear.
Thus I only can try to guess. It seems to me your problem is about  what you 
named checkimage.
According to my experience, it has to be an array (or a pointer on an array, 
don't remember) which contains what you want to store in your image.


eatpepsi wrote:
> 
> 2)The second problem is ,Is there a way to get texture coordinates of a model 
> with a given position in osg??
> 
> Thank you!
> 
> Cheers,
> Tim


 Well, it's a really surprising question. It doesn't really make sense (at 
least to me).
Do you mean with a projection or something like?


Max

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=15177#15177





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to