Re: [osg-users] Please mirro187, work on your communication

2021-03-16 Thread mirr...@gmail.com
Sorry, I don't have Internet in my work environment.Unable to provide 
complete test information

在2021年3月16日星期二 UTC+8 下午5:20:25 写道:

> Do you not wonder yourself, why hardy anyone answers to you?
>
> If you put a bit more work into your messages, then this might change
> quite a bit, because currently they're hard to understand at all.
>
> Most of the time you don't add any context to your problem, e.g. what
> you're trying to achieve from a high level point of view.
>
> Also how you write your messages isn't really reader friendly. Don't
> put your whole question into the subject line and only code into the
> message itself. Put only a very short summary into the subject line
> and then interleave the code example with explaining the problem you have
> with it. Also saying what you would have expected might help.
>
> You can't expect others to put work into solving your problems if you
> put almost no effort into it explaining them.
>
> Greetings,
> Daniel
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/39c52c94-9c60-4630-9fe0-5d8c3c185b71n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How do you create the osg::Planeof PolytopeIntersector that will give you the right intersection?

2021-03-16 Thread mirr...@gmail.com
win10
// 
osg::Matrixd proj  = osg::Matrixd::identity();
proj.makePerspective(60, frustumAspectWidth/frustumAspectHeight, 
frustumNear, frustumFar);
//
const double mynear = proj(3, 2) / (proj(2, 2) - 1.0);
const double myfar = proj(3, 2) / (1.0 + proj(2, 2));
//
const double nLeft = mynear * (proj(2, 0) - 1.0) / proj(0, 0);
const double nRight = mynear * (1.0 + proj(2, 0)) / proj(0, 0);
const double nTop = mynear * (1.0 + proj(2, 1)) / proj(1, 1);
const double nBottom = mynear * (proj(2, 1) - 1.0) / proj(1, 1);
const double fLeft = myfar * (proj(2, 0) - 1.0) / proj(0, 0);
const double fRight = myfar * (1.0 + proj(2, 0)) / proj(0, 0);
const double fTop = myfar * (1.0 + proj(2, 1)) / proj(1, 1);
const double fBottom = myfar * (proj(2, 1) - 1.0) / proj(1, 1);
//
_projectPt[0] = osg::Vec3d(0.0, 0.0, 0.0);
_projectPt[1] = osg::Vec3d(nLeft, nBottom,  -mynear);
_projectPt[2] = osg::Vec3d(nRight, nBottom, -mynear);
_projectPt[3] = osg::Vec3d(nRight, nTop, -mynear);
_projectPt[4] = osg::Vec3d(nLeft, nTop,  -mynear);
_projectPt[5] = osg::Vec3d(fLeft, fBottom,  - myfar);
_projectPt[6] = osg::Vec3d(fRight, fBottom, - myfar);
_projectPt[7] = osg::Vec3d(fRight, fTop,  -myfar);
_projectPt[8] = osg::Vec3d(fLeft, fTop,  - myfar);
osg::Polytope viewFrstumPoly;
//
osg::Matrixd ViewM = _view->getCamera()->getInverseViewMatrix();
//
osg::Vec3d tempProjectPt[9];
//tempProjectPt[0] = _projectPt[0] * ViewM;
tempProjectPt[1] = _projectPt[1] * ViewM;
tempProjectPt[2] = _projectPt[2] * ViewM;
tempProjectPt[3] = _projectPt[3] * ViewM;
tempProjectPt[4] = _projectPt[4] * ViewM;
tempProjectPt[5] = _projectPt[5] * ViewM;
tempProjectPt[6] = _projectPt[6] * ViewM;
tempProjectPt[7] = _projectPt[7] * ViewM;
tempProjectPt[8] = _projectPt[8] * ViewM;
{
viewFrstumPoly.add(osg::Plane(tempProjectPt[1],tempProjectPt[5],tempProjectPt[8]));
}
{
viewFrstumPoly.add(osg::Plane(tempProjectPt[2],tempProjectPt[7],tempProjectPt[6]));
}

{
viewFrstumPoly.add(osg::Plane(tempProjectPt[3], 
tempProjectPt[4],tempProjectPt[8]));
}

{
viewFrstumPoly.add(osg::Plane(tempProjectPt[1],tempProjectPt[2],tempProjectPt[6]));
}
{
viewFrstumPoly.add(osg::Plane(tempProjectPt[5],tempProjectPt[6],tempProjectPt[7]));
}
{
viewFrstumPoly.add(osg::Plane(tempProjectPt[3],tempProjectPt[4],tempProjectPt[1]));
}
osg::ref_ptr picker = new 
osgUtil::PolytopeIntersector(osgUtil::Intersector::MODEL, poly);
picker->setPrecisionHint(osgUtil::Intersector::USE_DOUBLE_CALCULATIONS);
picker->setPrimitiveMask(osgUtil::PolytopeIntersector::POINT_PRIMITIVES);
picker->setIntersectionLimit(osgUtil::Intersector::NO_LIMIT);
//
osgUtil::IntersectionVisitor iv(picker);
_videoFusionNode->accept(iv);//group of scene 
if (picker->containsIntersections())
{
//
}

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/32729314-2d08-46c7-973c-812c6d8a2bb0n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Why are the two osg::Polytope results different when using the transform method?

2021-03-13 Thread mirr...@gmail.com
win10
//
osg::Matrixd proj = osg::Matrixd::identity();
proj.makePerspective(60, frustumAspectWidth/frustumAspectHeight, 
frustumNear, frustumFar);
//
const double mynear = proj(3, 2) / (proj(2, 2) - 1.0);
const double myfar = proj(3, 2) / (1.0 + proj(2, 2));
//
const double nLeft = mynear * (proj(2, 0) - 1.0) / proj(0, 0);
const double nRight = mynear * (1.0 + proj(2, 0)) / proj(0, 0);
const double nTop = mynear * (1.0 + proj(2, 1)) / proj(1, 1);
const double nBottom = mynear * (proj(2, 1) - 1.0) / proj(1, 1);
const double fLeft = myfar * (proj(2, 0) - 1.0) / proj(0, 0);
const double fRight = myfar * (1.0 + proj(2, 0)) / proj(0, 0);
const double fTop = myfar * (1.0 + proj(2, 1)) / proj(1, 1);
const double fBottom = myfar * (proj(2, 1) - 1.0) / proj(1, 1);
//
osg::Matrixd ViewM = _view->getCamera()->getInverseViewMatrix();
{
   osg::Polytope viewFrstumPoly;
osg::Vec3d pt[9];
pt[1] = osg::Vec3d(nLeft, nBottom,  -mynear)*ViewM ;
pt[2] = osg::Vec3d(nRight, nBottom, -mynear)*ViewM ;
pt[3] = osg::Vec3d(nRight, nTop, -mynear)*ViewM ;
viewFrstumPoly.add(osg::Plane(pt[1],pt[2],pt[3]));
}

{
 osg::Polytope viewFrstumPoly2;
 osg::Vec3d pt[9];
 pt[1] = osg::Vec3d(nLeft, nBottom,  -mynear);
 pt[2] = osg::Vec3d(nRight, nBottom, -mynear) ;
 pt[3] = osg::Vec3d(nRight, nTop, -mynear);
 viewFrstumPoly2.add(osg::Plane(pt[1],pt[2],pt[3]));
  viewFrstumPoly2 .transform(ViewM);
}


 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/605b9691-4e64-4083-8229-fe6a94203bben%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to use the Intersector: : VIEW mode when osgUtil: : PolytopeIntersector and scene node intersection

2021-03-13 Thread mirr...@gmail.com
win10

BoundingBox bb;
bb._min  = osg::vec3d(0,0,0);
bb._max = osg::vec3d(1000,1000,1000);
Polytope poly;
poly.setToBoundingBox(bb);
//
osg::ref_ptr picker = new 
osgUtil::PolytopeIntersector(osgUtil::Intersector::VIEW,poly);
picker->setPrecisionHint(osgUtil::Intersector::USE_DOUBLE_CALCULATIONS);
picker->setPrimitiveMask(osgUtil::PolytopeIntersector::POINT_PRIMITIVES);
picker->setIntersectionLimit(osgUtil::Intersector::NO_LIMIT);
//
osgUtil::IntersectionVisitor iv(picker);
_videoFusionNode->accept(iv);//group node of scene 
if (picker->containsIntersections())
{
 //Can't intersection
}

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/4938c97f-f77d-4747-8bba-502c8a0ff7c4n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why does osg::AutoTransform node disappear when the scene is first created?

2021-03-10 Thread mirr...@gmail.com
Thank you for your question and answer.I have tested Geode to add OSG 
::Geometry and this error will also occur?

在2021年3月8日星期一 UTC+8 下午5:25:41 写道:

> Hi ?
>
> There isn't any way to know what settings are provoking these errors, the 
> best thing you can do is compile a debug version of the OSG and then setup 
> into the AutoTransform traverse method to figure out what maths is being 
> invoked and when the errors are occurring.
>
> The only thing I can add is that osgText::Text has support for rotating to 
> screen and automatically scaling that for most purposes will make 
> osg::AutoTransform rendundent.  I would try to just use osgText::Text's 
> support for scaling and rotating and ditch the osg::AutoTransform. You'll 
> get better performance too.
>
> Cheers,
> Robert.
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/e9c1fb7e-608e-4451-88e7-6f6f1cfa5763n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How does OsgAnimation: : Vec3CubicBezier three p, I, o parameters work?

2021-02-24 Thread mirr...@gmail.com
win10

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/ccd5edb7-22fa-4354-97a2-7dab6826ce72n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] What does this OsgAnimation: : Vec3CubicBezier three p, I, o parameters mean?

2021-02-24 Thread mirr...@gmail.com
win10

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/77e2ae6e-4e2f-4e79-8742-641a6e4c586en%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I hide this white geometry without using the color transparency method and intersect?

2021-02-22 Thread mirr...@gmail.com
Thank you for your question and answer. The problem has been solved.I work 
in a closed environment.Cannot provide code.

I would like to ask how to solve the problem that after OSG thread 
rendering, when the UI thread display will cause thread lag.

void osgQOpenGLWidget::paintGL()

{

OpenThreads::ScopedReadLock locker(_osgMutex);

if (_isFirstFrame) {

_isFirstFrame = false;

m_renderer->getCamera()->getGraphicsContext()->setDefaultFboId(defaultFramebufferObject());

}

m_renderer->frame();

}

在2021年2月8日星期一 UTC+8 下午9:30:15 写道:

> On Mon, 8 Feb 2021 at 13:21, mirr...@gmail.com  wrote:
>
>> system win10
>>
>> //Modifying the depth test sequence doesn't seem to work
>> setRenderBinDetails(1001,"DepthSorteBin");
>>
>
> There isn't any specific advice we can provide as you've provided no 
> specific information about the problem bit of your scene graph, all we have 
> is a screen shot with a random white quad circled.  
>
> The best I can suggest is to look at your database in a modelling tool and 
> remove the offending bit of geometry/triangles.  That assumes the problem 
> is with some geometry in your scene.
>
> However, you don't provide any information that we can use so my 
> suggestion is just a random guess as to what might be wrong.  You really 
> have to try and provide a clear explanation of what is your scene graph and 
> where the problem might be in this scene graph.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/56d8068f-35a7-4aa2-bf59-c7cf6ce47f82n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to change QOpenGLWidget in OsgQt module to another thread rendering?

2021-02-20 Thread mirr...@gmail.com
win10

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/7913a4e1-cd3c-476b-8ae5-703e286471c5n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] What numerical parameters are passed when osgUtil::PolytopeIntersector is set MODEL?

2021-01-24 Thread mirr...@gmail.com
   void pick(const osgGA::GUIEventAdapter& ea, osgViewer::Viewer* viewer)
   {
   osgUtil::PolytopeIntersector* picker;
   double mx = ea.getXnormalized();
double my = ea.getYnormalized();
double w   = 0.05;
double h   = 0.05;
picker = new osgUtil::PolytopeIntersector( 
osgUtil::Intersector::MODEL, mx-w, my-h, mx+w, my+h );
}

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/ff7da331-4f51-4fd9-83e1-b3ff83227efan%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to achieve osg::Texture2D rotation 180?

2021-01-24 Thread mirr...@gmail.com
Thank you very much, but this method only works for four point texture 
coordinates  

在2021年1月19日星期二 UTC+8 下午10:32:48 写道:

> This should do a 180 rotation:
> image->flipVertical();
> image->flipHorizontal();
> Laurens.
>
>
> On Tue, Jan 19, 2021 at 1:21 PM mirr...@gmail.com  
> wrote:
>
>> win10  gtx1080  osg3.6.4 
>>
>> osg::ref_ptr image =
>> osgDB::readImageFile( "picture.bmp" );
>> osg::ref_ptr 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+...@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_source=footer>
>> .
>> ___
>> osg-users mailing list
>> osg-...@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+unsubscr...@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.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to achieve osg::Texture2D rotation 180?

2021-01-19 Thread mirr...@gmail.com
win10  gtx1080  osg3.6.4 

osg::ref_ptr image =
osgDB::readImageFile( "picture.bmp" );
osg::ref_ptr 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+unsubscr...@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.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Is there any way to osgManipulator::ScaleAxisDragger scale the X axis of the model as well as the XY axis?

2021-01-08 Thread mirr...@gmail.com
Win10  GTX3.x  osg3.6.4

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/5a959fbc-b774-4549-940f-86bb5298b2dbn%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Is there any way to scale the X axis of the model as well as the XY axis?

2021-01-08 Thread mirr...@gmail.com
sys win10   osg3.6.4  

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/ffe47d79-2f68-4268-a721-6952e6636b84n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How do I flip the texture coordinates of an Image object?

2021-01-05 Thread mirr...@gmail.com
Win10  GTX3.x  osg3.6.4
// test for read image
osg::ref_ptr texture2d = new osg::Texture2D;
osg::ref_ptr img = new osg::Image;
img=osgDB::readImageFile("C:\\Users\\Public\\Pictures\\Sample 
Pictures\\Tulips.jpg");
osg::ref_ptr img2 = new osg::Image;
img2->setImage(img->s(),img->t(),img->r(),img->getInternalTextureFormat(),img->getPixelFormat(),img->getDataType(),img->data(),img->getAllocationMode());
osgDB::writeImageFile(*img2,"img2.jpg");
osgDB::writeImageFile(*img,"abc.jpg");
texture2d->setImage(img);

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/811b3bca-144d-4b55-8301-811f15102cbdn%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How do I set NodeTrackerManipulator to rotate with the nodes?

2021-01-03 Thread mirr...@gmail.com
W10 gtx3.x OSG3.6.4

 osgGA::NodeTrackerManipulator::TrackerMode trackerMode = 
osgGA::NodeTrackerManipulator::NODE_CENTER_AND_AZIM;

  osgGA::NodeTrackerManipulator::RotationMode rotationMode = 
osgGA::NodeTrackerManipulator::TRACKBALL;


osg::ref_ptr glider = osgDB::readRefNodeFile("glider.osgt");
if (glider)
{
const osg::BoundingSphere& bs = glider->getBound();

float size = radius/bs.radius()*0.3f;
osg::MatrixTransform* positioned = new osg::MatrixTransform;
positioned->setDataVariance(osg::Object::STATIC);
positioned  ->setMatrix(osg::Matrix::translate(-bs.center())*
 osg::Matrix::scale(size,size,size)*

 osg::Matrix::rotate(osg::inDegrees(-90.0f),0.0f,0.0f,1.0f));

positioned->addChild(glider);

osg::PositionAttitudeTransform* xform = new 
osg::PositionAttitudeTransform;
xform->setUpdateCallback(new 
osg::AnimationPathCallback(animationPath,0.0,1.0));
xform->addChild(positioned);

*  osgGA::NodeTrackerManipulator* tm = new 
osgGA::NodeTrackerManipulator;*
*  tm->setTrackerMode( trackerMode );*
*  tm->setRotationMode( rotationMode );*
*  tm->setTrackNode( xform );*
*  viewer.setCameraManipulator(tm);*
 }

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/7bb98730-bb2d-4f98-ae68-4a70ef9d9c1cn%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to properly transfer texture coordinates in geometric shaders in Shader #130 version?

2020-12-12 Thread mirr...@gmail.com
sorry, the screenshot is wrong. It should be  samplerU.
I'm basically not sure how to get texture coordinates into  
Shader::FRAGMENT  in Geometric shaders.


在2020年12月10日星期四 UTC+8 下午11:13:21 写道:

> What error are you getting?
> I do see an undefined "samplerY" in there.
>
> On Wednesday, December 9, 2020 at 9:03:47 PM UTC-5 mirr...@gmail.com 
> wrote:
>
>> env is win10 osg3.6.4 GTX1660
>> [image: QQ图片20201210095944.jpg]
>>
>> osg::ref_ptr createProgram()
>> {
>> osg::Program *program = new osg::Program();
>> program->addShader(new osg::Shader(osg::Shader::VERTEX,vertSource));
>> program->addShader(new osg::Shader(osg::Shader::GEOMETRY,geomSource));
>> program->addShader(new osg::Shader(osg::Shader::FRAGMENT,fragSource));
>> program->setParameter(GL_GEOMETRY_VERTICES_OUT_EXT, 3);
>> program->setParameter(GL_GEOMETRY_INPUT_TYPE_EXT, GL_TRIANGLES);
>> program->setParameter(GL_GEOMETRY_OUTPUT_TYPE_EXT,  GL_TRIANGLES  );
>> return program;
>> }
>>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/89abc9a3-66bf-4248-8e3d-3dfd23235622n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org