[osg-users] Using Light without LightSource in OSG 3.4.0
Hi, I want to add light to my scene and I want the different light which have same Number can be used at the same time.Thus , I use light as a Attribute to set it to stateset. There is no problem when the model is not rotate.But when model is rotated, the light seemed rotated by the matrix.There is my source code: int main() { osg::ref_ptr root = new osg::Group; osg::ref_ptr light = new osg::Light; light->setLightNum(0); light->setPosition(osg::Vec4(0, 0, 1, 0)); light->setAmbient(osg::Vec4(0,0, 0, 1)); light->setDiffuse(osg::Vec4(0, 1, 0, 1)); light->setSpecular(osg::Vec4(1, 0, 0, 1)); auto stateSet = root->getOrCreateStateSet(); stateSet->setAttributeAndModes(light); osg::ref_ptr hints = new osg::TessellationHints; hints->setDetailRatio(0.1); osg::ref_ptr geode1 = new osg::Geode; osg::ref_ptr shape1 = new osg::ShapeDrawable(new osg::Box(osg::Vec3(0, 0, 0), 10, 10,10), hints.get()); geode1->addDrawable(shape1); osg::ref_ptr geode2 = new osg::Geode; osg::ref_ptr shape2 = new osg::ShapeDrawable(new osg::Box(osg::Vec3(20, 20, 20), 10, 10, 10), hints.get()); geode2->addDrawable(shape2); osg::ref_ptr mt = new osg::MatrixTransform; osg::Matrix mat; mat = mat.rotate(180, osg::Vec3(0, 1, 0)); mt->setMatrix(mat); mt->addChild(geode2); root->addChild(mt); root->addChild(geode1); osgViewer::Viewer myViewer; myViewer.setSceneData(root); myViewer.run(); return 0; } So,is it the light can be used without LightSource? Thank you! Chenyanlin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] Building OpenSceneGraph Windows
Hi, all. Sorry for this very long time to reply. The %PATH% Variables were the solution of my problem. OpenSceneGraph is just building at the moment with MSYS. Thank you for this Christian Schulte. Also the tutorial of kornerr was helpful for my understanding. I am very happy that OSG is building at the moment. It takes quite a while but so ;). But now I have a new question. I got this messages in my log file. Should I be concerned about those and what exactly do they mean? Espacially with the ZLIB missing, JPEG missing, PNG missing Thank you again for your support. I am really happy. Thank you! Cheers, Stefan Here comes the Log: CMake Deprecation Warning at CMakeLists.txt:36 (cmake_policy): The OLD behavior for policy CMP0008 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. CMake Deprecation Warning at CMakeLists.txt:43 (cmake_policy): The OLD behavior for policy CMP0020 will be removed from a future version of CMake. The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. The C compiler identification is GNU 6.3.0 The CXX compiler identification is GNU 6.3.0 Check for working C compiler: C:/MinGW/bin/gcc.exe Check for working C compiler: C:/MinGW/bin/gcc.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Detecting C compile features Detecting C compile features - done Check for working CXX compiler: C:/MinGW/bin/g++.exe Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Looking for pthread.h Looking for pthread.h - not found Found Threads: TRUE Found OpenGL: opengl32 Performing Test GL_HEADER_HAS_GLINT64 Performing Test GL_HEADER_HAS_GLINT64 - Failed Performing Test GL_HEADER_HAS_GLUINT64 Performing Test GL_HEADER_HAS_GLUINT64 - Failed 32 bit architecture detected Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) Could NOT find Jasper (missing: JASPER_LIBRARIES JASPER_INCLUDE_DIR JPEG_LIBRARIES) Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) Could NOT find GDAL (missing: GDAL_LIBRARY GDAL_INCLUDE_DIR) Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Could NOT find CURL (missing: CURL_LIBRARY CURL_INCLUDE_DIR) Could NOT find GStreamer (missing: GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_VERSION GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES GSTREAMER_APP_INCLUDE_DIRS GSTREAMER_APP_LIBRARIES GSTREAMER_PBUTILS_INCLUDE_DIRS GSTREAMER_PBUTILS_LIBRARIES) Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR) Could NOT find SDL (missing: SDL_LIBRARY SDL_INCLUDE_DIR) Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Found unsuitable Qt version "" from NOTFOUND Could NOT find Qt3 (missing: QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE) Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR) Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Success Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed Performing Test _OPENTHREADS_ATOMIC_USE_SUN Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Failed Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Failed Configuring done Generating done ... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74581#74581 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] New glTexStorage code is disrupting FBO initialization
Robert, Seems to be working now. Yesterday I submitted a PR to change GL_RGBA16F and GL_RGBA32F to GL_RGBA16F_ARB and GL_RGBA32F_ARB, but you only changed GL_RGBA32F. Both are undefined on Windows so I re-submitted a PR to get the Windows build building again. Thanks -- Paul Levy : Pelican Mapping On Tue, Aug 21, 2018 at 9:38 AM Trajce Nikolov NICK < trajce.nikolov.n...@gmail.com> wrote: > Hi Robert, > > I had the same issue with the FBO failing to initialize. Works now with > the master. > > On Tue, Aug 21, 2018 at 2:34 PM Robert Osfield > wrote: > >> Hi Glenn, >> >> We have had a bash at resolve this issue. Could you please try out >> OSG master or the OpenSceneGraph-3.6-TexStorage branch to see if this >> issue still exists. >> >> Cheers, >> Robert. >> ___ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > > > -- > trajce nikolov nick > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] New glTexStorage code is disrupting FBO initialization
Hi Robert, I had the same issue with the FBO failing to initialize. Works now with the master. On Tue, Aug 21, 2018 at 2:34 PM Robert Osfield wrote: > Hi Glenn, > > We have had a bash at resolve this issue. Could you please try out > OSG master or the OpenSceneGraph-3.6-TexStorage branch to see if this > issue still exists. > > Cheers, > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OpenSceneGraph-3.6-TexStorage branch created, needs community testing :-)
HI All, I have created a OpenSceneGraph-3.6-TexStorage branch to allow glTexStorage support that was just in the master branch to be ported back onto 3.6. There isn't any public API changes so it should drop in OK compile wise, runtime wise it's a different matter though. We need testing across a wide range of platforms/hardware and application usage cases to know whether this change is safe. If it all looks OK then I'll merge 3.6-TexStorage into the main 3.6 branch and then we can start working towards a 3.6.3 release in September. So please test if you can. Many thanks, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] New glTexStorage code is disrupting FBO initialization
Hi Glenn, We have had a bash at resolve this issue. Could you please try out OSG master or the OpenSceneGraph-3.6-TexStorage branch to see if this issue still exists. Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org