[osg-users] transfer data to shader with osg::texture

Wojciech Lewandowski w.p.lewandowski at gmail.com
Wed Oct 5 05:43:55 PDT 2016


Hi guys,

Here is the repro code. In cmake project.

Change use_data1D value in test.cpp to see the problem.

One note: I tested it with GL 3 Osg build. There may be issues I omitted if
you run it with GL1/GL2/GL3 compatibility OSG build.

Cheers,
Wojtek

2016-10-05 14:38 GMT+02:00 Wojciech Lewandowski <w.p.lewandowski at gmail.com>:

> Hi Liu,
>
> You got me interested and I created a repro of your problem. I will send
> it in followup mail (to be sure this message passes in case zip attachments
> were prohibited and message got blocked).
>
> I think you see a genuine issue.
>
> I have found that texture1D seems to be a problem. When I used texture2D
> instead it works. One extra note, though. With GL_RGBA16 no one works
> correctly. So internal format needs to be a float format (GL_RGBA16F_ARB,
> GL_RGBA32F_ARB, GL_RGB16F_ARB, GL_RGB32F_ARB).
>
> Cheers,
> Wojtek
>
> 2016-10-05 14:20 GMT+02:00 liu ming <81792534 at qq.com>:
>
>> yes,I am getting 0 and 1 in geometry shader,but my input values are :
>>
>>
>> Code:
>>  *ptr1=osg::Vec3( 0.0,0.0,0.0);
>>                         *ptr1++;
>>                         *ptr1= osg::Vec3( 40.0,0.0,0.0);
>>                         *ptr1++;
>>                         *ptr1=osg::Vec3( 20.0,0.0,20.0);
>>
>>
>>
>> ------------------
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=68869#68869
>>
>>
>>
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161005/14ec6f67/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osg_liu_ming_prob_src_cmake.7z
Type: application/octet-stream
Size: 2708 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161005/14ec6f67/attachment-0003.obj>


More information about the osg-users mailing list