[osg-users] How to achieve osg::Texture2D rotation 180?
mirr...@gmail.com
mirro187 at gmail.com
Sun Jan 24 23:38:59 PST 2021
Thank you very much, but this method only works for four point texture
coordinates
在2021年1月19日星期二 UTC+8 下午10:32:48<l.vo... at rug.nl> 写道:
> This should do a 180 rotation:
> image->flipVertical();
> image->flipHorizontal();
> Laurens.
>
>
> On Tue, Jan 19, 2021 at 1:21 PM mirr... at gmail.com <mirr... at gmail.com>
> wrote:
>
>> win10 gtx1080 osg3.6.4
>>
>> osg::ref_ptr<osg::Image> image =
>> osgDB::readImageFile( "picture.bmp" );
>> osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D;
>> texture->setImage( image.get() );
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "OpenSceneGraph Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to osg-users+... at googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/osg-users/5e38a08c-cf0a-4250-b5a3-61fd88eb7a06n%40googlegroups.com
>> <https://groups.google.com/d/msgid/osg-users/5e38a08c-cf0a-4250-b5a3-61fd88eb7a06n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> _______________________________________________
>> osg-users mailing list
>> osg-... at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/094180cb-cee3-4e1b-915f-a5b931009bd9n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20210124/b2515044/attachment.html>
More information about the osg-users
mailing list