Hi J.P.

J.P. Delport wrote:
> 
> I like the multiple coord idea. It seems that the only place where the 
> textured quad is created is in createTexturedQuadDrawable and that is 
> only called from init() in the various units. Do you propose I add the 
> extra tex coordinates in this function? Is it OK if I access mInputTex 
> in createTexturedQuadDrawable to get the input rect size?
> 

Yes, it is the only one place, where the quad is created. The right place would 
be to add the multiple texture coordinates there. Yes, accesing mInputTex (or 
directly through getInputTextureMap() method) should be fine there. However 
make sure that you do this after Unit::init() call or actually after 
Unit::setupInputsFromParents() call. This is because the mInputTex is first 
correctly setted up just right after those calls.


> 
> Is it necessary to create coords per input texture, or would it be OK to 
> always just generate two sets: one for normalised range and one for 
> rects? This assumes that all input rectangles to a unit has the same size?
> 

No, I would create coords for every input texture, even if they are just the 
same in all cases. This would allow us to introduce later maybe some kind of 
TextureCoordinatesMatrix, which can be used to change the uv-coordinates of the 
screen sized quad for different input units. Not sure how one can use it, but 
why not (maybe for some special effects) ;)

cheers,
art

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





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

Reply via email to