Commit Graph

12266 Commits

Author SHA1 Message Date
Robert Osfield
fed4d91ecc Replaced the initialization of the strarray to use reseve instead of a initial size provided in the constructor as this was leading to a bug in output. 2013-05-28 15:18:59 +00:00
Robert Osfield
f730396f0a Fixed date typo 2013-05-28 14:40:36 +00:00
Robert Osfield
382c3322c9 From Farshid Lashkari, "I just started looking into the shader composition feature. I enabled shader composition on the osg::State object and noticed a 6x increase in draw time. I figured that the default composer might have performance issues, so I created a custom ShaderComposer that overrides "getOrCreateProgram" and does nothing. This still resulted in a performance drop.
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."
2013-05-28 14:35:44 +00:00
Robert Osfield
47f574429a From Marcin Prus and Robert Osfield, moved the key parts of the .dds plugins computeRowWidthInBytes implementation into the osg::Image::computeImageSizeInBytes(..) to
address bugs in the computation of image size.
2013-05-28 14:14:45 +00:00
Robert Osfield
d024444140 From Sukender, "Added ".dds" file deletion on writing failure." 2013-05-28 11:47:08 +00:00
Robert Osfield
492459e4dc From Sukender, "Added vertical flipping to the writer depending on the Image::getOrigin() value (= flip the image when Image::BOTTOM_LEFT). Most of the time this will not change DDS writing (= no v-flip), as it seems images are rarely "BOTTOM_LEFT". To skip this behaviour, the "ddsNoAutoFlipWrite" option was added.
I also moved a few lines of code about "dds_flip" option, and made options reading more like in other ReaderWriters."
2013-05-28 11:46:01 +00:00
Robert Osfield
53fd801088 From Diane Delallée & Sukender, "Added some support of non-modulus-4 dimensions in S3TC-DXTC images (previous implementation seem just not to handle these properly).
- 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."
2013-05-28 11:44:36 +00:00
Robert Osfield
39b9351153 From Diane Delallée and Sukender, "1. Image.cpp
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.
2013-05-28 11:25:13 +00:00
Robert Osfield
81b6c82d9a Fixed the computation of the spot light direction. 2013-05-28 10:46:47 +00:00
Robert Osfield
d7931e3024 Fixed View::setUpViewInWindow() parameter 2013-05-28 09:20:48 +00:00
Robert Osfield
aa33d213dd Added an OSG_INIT_SINGLETON_PROXY(..) to initialize the static s_GLExtensionDisableString variable 2013-05-28 08:38:09 +00:00
Robert Osfield
267802c928 Updated AUTHORS file 2013-05-27 09:10:18 +00:00
Robert Osfield
f5508d35f9 Updated AUTHORS file 2013-05-27 09:07:53 +00:00
Robert Osfield
ac77a1e224 Updated ChangeLog and AUTHORS file 2013-05-27 09:05:14 +00:00
Robert Osfield
02e4aef5cb From Martin Naylor, "I am receiving 1 build error whilst building the SVN, its in osgforest as follows:
error C2065: 'GL_RGBA32F' : undeclared identifier

Shoudlnt that be GL_RGBA32F_ARB as defined in texture header?

Attached is the easy fix :)."
2013-05-27 08:13:23 +00:00
Robert Osfield
18c37d14cd Moved quad buffer definitions into include/osg/Camera 2013-05-27 08:10:42 +00:00
Robert Osfield
29f3393275 Updated AUTHORS file 2013-05-26 10:44:11 +00:00
Robert Osfield
ab69c1f9d4 Updated ChangeLog 2013-05-26 10:27:07 +00:00
Robert Osfield
f3d21bd285 From Farshid Lashkari, " small update to TangentSpaceGenerator to support QUAD_STRIP primitive types." 2013-05-25 10:09:23 +00:00
Robert Osfield
0eb95f01d8 Resrtuctured the use of static's in the Uniform::getNameID() method to avoid problems under Android. 2013-05-24 17:16:57 +00:00
Robert Osfield
2923c8014a From Jordi Torres, "We must use JNI_FALSE instead of false in JNI code. Otherwise the examples will not compile. This patch should be applied to osgAndroidExampleGLES1/jni and osgAndroidExampleGLES2/jni. the osgNativeLib.cpp is the same. " 2013-05-24 17:06:08 +00:00
Robert Osfield
88bbcaecd2 Removed redudent code 2013-05-24 09:43:08 +00:00
Robert Osfield
fb3178106a Fixed panning bug, when using RUN_ON_DEMAND, that resulted in the camera being thrown off towards infinity.
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
2013-05-24 09:35:58 +00:00
Robert Osfield
1cd73f0238 Added repolation of the _deadparts stack which would otherwise been invalidatd by the depth sort of particles. 2013-05-23 18:29:47 +00:00
Robert Osfield
5de095cb1d From Pawel Ksiezopolski, Added example of using osg::TextureBuffer + GLSL to render forest. 2013-05-23 15:55:22 +00:00
Robert Osfield
2a32bcaca6 From David Fries, "This updates the CMakeLists.txt instructions for the commands
to make the doxygen documentation."
2013-05-23 14:14:51 +00:00
Robert Osfield
5e14865877 Refactored the idle mechanism to fix problems with the vnc thread going idle when it shouldn't have. 2013-05-23 12:29:55 +00:00
Robert Osfield
71874c2dc5 Added assigned of the InteractiveImageHandler as a cull callback to enable the interactive image to know when it's being actively used as part of rendering a frame. 2013-05-23 10:25:03 +00:00
Robert Osfield
448c93dbe9 Quitened down debug messages 2013-05-22 15:48:42 +00:00
Robert Osfield
544ef8be5a Removed debug messages 2013-05-22 13:16:44 +00:00
Robert Osfield
b72faed804 From Nico Kruithof, "For the VNC server, it seems that the wrong include path is used.
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"
2013-05-22 13:09:38 +00:00
Robert Osfield
1284a0dd40 From Pawel Ksiezopolski, first email: "This submission adds texture buffer object ( defined in GL_ARB_texture_buffer_object extension ) to the osg::Texture* family.
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."
2013-05-22 12:49:46 +00:00
Robert Osfield
7bd050e431 From Jan Ciger, "Here is a little patch to fix a bug in the InfluenceMap serialization. The names of the maps weren't quoted properly and therefore it was breaking loading of rigged models exported from e.g. Blender. Also names that contained spaces wouldn't have been parsed properly. " 2013-05-22 11:06:12 +00:00
Robert Osfield
9b77e757f2 From David Callu, "ust a simple IF ENDIF mismatch in last commit (I use git so no available SVN commit number ) :
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"
2013-05-22 10:28:07 +00:00
Robert Osfield
94fe9b5fd5 From Farshid Lashkari, "I'm working on a custom ShaderComposer and I need access to the full StateSetStack of the State object within the getOrCreateProgram() method. The problem is that "State::apply(const StateSet* dstate)" does not add the specified stateset to the stack. I'm not sure if this was intentional, but I've updated the function to push/pop the stateset.
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."
2013-05-21 17:41:07 +00:00
Robert Osfield
2daff56860 From Valeriy Dubov, fix for Android build under OSX 2013-05-21 10:22:54 +00:00
Robert Osfield
255432f76b From Alexander Sinditskiy, "I just noticed that Dragger allways handle events even when
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."
2013-05-21 09:48:16 +00:00
Robert Osfield
9f66a10aa2 Added use of SingleWindow for when only one screen is used 2013-05-21 09:44:26 +00:00
Robert Osfield
455ebbc5f1 Refactored the support for stereo and keystone RTT setup so that it can be applied to an existing Camera. 2013-05-20 19:24:34 +00:00
Robert Osfield
acb4ba8554 Added support for controlling border and override redirect to the SingleWindow View::Config 2013-05-20 14:17:43 +00:00
Robert Osfield
086ffd1672 Added a dedicated RTT texture for each of the left and right eyes when doing ANAGLYPHIC stereo to avoid issues with scene graphs containing ClearNode's such as when using in Present3D 2013-05-20 10:23:03 +00:00
Robert Osfield
482581feb0 Added support for setting the left/right cull masks 2013-05-16 15:52:29 +00:00
Robert Osfield
6926cec135 Changed the default of OSG_SPLIT_STEREO_AUTO_ADJUST_ASPECT_RATIO to OFF 2013-05-16 14:51:07 +00:00
Robert Osfield
f54f4e40ed Fixed stereo offsets of HORIZONTAL_SPLIT and VERTICAL_SPLIT stereo modes 2013-05-16 14:11:23 +00:00
Robert Osfield
6cb26321a9 Reverted back to changes before experiements with ViewConfig 2013-05-16 14:07:35 +00:00
Robert Osfield
79ec0e863d Cleaned up the WoWVxDisplay command line parsing 2013-05-16 10:28:01 +00:00
Robert Osfield
3b6c2b636a Renamed osgViewer::Config osgViewer::ViewConfig and moved it's declaration into include/osgViewer. 2013-05-16 10:11:06 +00:00
Robert Osfield
e3ed763c15 Added WoWVxDisplay view config 2013-05-16 09:08:27 +00:00
Robert Osfield
625821a91a Created a dedicated include/osgViewer/config and src/osgViewer/config directories to place all the Config classes. 2013-05-15 16:15:38 +00:00
Robert Osfield
9552567cd4 Added support for osgViewer::Config in osgViewer::Viewer command line parsing 2013-05-15 12:50:38 +00:00