Hi Marcus,

> > I use a TextureGrabForeground to do some multipass
> > rendering. I need to access the texture coordinates
> > of the valid rect of the texture, depending on extensions
> > like GL_ARB_texture_non_power_of_two supported by the
> > target machine. Methods like getTexCoords are not exposed
> > by the interface... So how do I access the texture
> > cords? (Note that the coordinates might change during
> > runtime depending on the current size of the viewport
> > (resizing, etc))
> 
> It is possible to get the pixel-size of the viewport (see
> getPixelWidth()/getPixelHeight() in osg::Viewport) so you should be able
> to use that to compute your actual texcoords.
> 
> Does this help?

Yes, I guess that's what I thought I had to do. But I must
know how tex coords are calculated inside TextureGrabForeground,
so I guess I'll have to take a look at the code.

> mvh
> /Marcus
> 
> P.S. Note that if you are using NPOT then I believe the texture
> coordinates are normalized (0,0 - 1,1). This is not the case with
> TEXTURE_RECTANGLE, which is an older extension and uses unnormalized
> coordinates. I don't know which applies in your case.


On most machines the coords 1,1 are just working fine, but
I encountered this damn intel chip which does not support
this kind of extension. And I don't want to know wwhat happens
on chips/drivers supporting only TEXTURE_RECTANGLE...

Anyway, I think it would be useful to expose this 
texture coordinates in the TextureGrabForeground 
class interface.

Regards,

  Toni



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to