I looked into the "State::applyShaderComposition" method and noticed that it will print debug information to the osg::INFO stream. I commented that line out and the performance drop was gone.
I'm not sure if the printing was accidentally left in or is meant to be enabled. I've modified the function to only call the print function if INFO logging is enabled. I've attached the change."
- Added missing packing value on S3TC images. Images are coded with 4x4 blocs, whatever the image size. So there is an horizontal packing of 4 pixels (2 bytes in DXT1, 4 bytes in DXT2-5).
- Added crash guard against writing corrupted S3TC images.
Notes:
- What is missing is a support of "lines packing" in osg::Image (see code comments).
- S3TC-DXTC vertical flipping crashes (access violation) with some unusual dimensions (see code). I could not implement missing cases, so I added guards to avoid crashing."
Failure to perform a vertical flip on S3TC-DXTC now simply leaves the original image instead of corrupting it.
Image.cpp was sometimes performing a "normal" (= for uncompressed images) vertical flip on S3TC-DXTC images, producing weird results.
Actually, code was trying a "DXTC vertical flip" and relied on the result to call a "normal vertical flip". But when the "DXTC v-flip" encounters an error, this is is not necessarily because the image is not S3TC (ex: unhandled image dimensions)!
So now the code simply does "if dxtc, then flip_dxtc; else flip_normal;".
Note from Robert Osfield, moved the isDXT function into the dxt_tool file and namespace.
The solution for to refactor the way that events are checked so I add a bool return type to checkEvents() method across osgViewer::GraphcisWindow, osgGA::Devive and osgViewer::Viewer/CompositeViewer classes
Instead of
INCLUDE_DIRECTORIES(${LIBVNCCLIENT_INCLUDE_DIR})
the CMake variable
INCLUDE_DIRECTORIES(${LIBVNCSERVER_INCLUDE_DIR})
should be used.
Attached is a fix for src/osgPlugins/vnc/CMakeLists.txt"
TextureBuffer objects may use osg::Texture::bindToImageUnit(), so GLSL shaders are able to use not only texelFetch() function , but also functions defined in GL_ARB_shader_image_load_store extension : imageLoad(), imageStore(), imageAtomicAdd() etc."
second email: "After a while I found that osg::Texture::applyTexParameters() used with TextureBuffer may cause some OpenGL errors ( applying texture filters and wraps to TextureBuffer makes no sense ) so I fixed it."
CMake Warning (dev) in CMakeLists.txt:
A logical block opening on the line
/home/ledocc/work/perso/osg_Workspace/osg/CMakeLists.txt:823 (IF)
closes on the line
/home/ledocc/work/perso/osg_Workspace/osg/CMakeLists.txt:893 (ENDIF)
with mis-matching arguments.
I remove ENDIF argument, it is no longer needed by cmake"
I hope the change seems reasonable. I searched the entire code base for code that accesses the StateSetStack, and noticed RenderBin and RenderStage use it. However, I don't think that code would ever be called from within the State::apply() function, so I'm fairly confident the change should be safe."
handle(const PointerInfo&, const osgGA::GUIEventAdapter&, osgGA::GUIActionAdapter&)
returns false.I think it is not correct...i think handled should be changed only when it is really handled."