Commit Graph

12175 Commits

Author SHA1 Message Date
Robert Osfield
4697b3c68b From Art Tevs, int and uint Vec classes 2013-06-03 11:38:20 +00:00
Robert Osfield
efe52842fa From Aurelien Albert, "This submission is made against trunk version and add the loading of "glVertexAttribDivisor" extension." 2013-06-03 09:19:46 +00:00
Robert Osfield
56dc8fee01 From Laurens Voerman, "I made some changes to the top level CMakeLists.txt that might be usefull to other visualstudio users.
1> Disable project grouping for VCExpress users:  the version I proposed previously in
     Re: [osg-submissions] Cmake patch to support folders in IDE (29 Feb 2012)

2> Remove FIND_PACKAGE(OpenAL): not used in any project

3> add /wd4250 for Visual Studio 2012:
     suppress the errors caused by a microsoft fix for a bugfix.
     ref: "Warning messages VS2012..." on osg-users (30 May 2012)
"
2013-05-31 10:28:39 +00:00
Robert Osfield
9921c77136 From Ulrich Hertlein, "attached is a patch that fixes another clang++ compiler warning when returning
std::vector::size() as 'unsigned int'.
"
2013-05-31 10:23:49 +00:00
Robert Osfield
b6579c5c4a From Wang Rui, "The osgdb_nvtt plugin needs to be updated to work with the latest NVTT library, which changes the interface slightly (adding a new pure virtual method endImage()). I've modified the source file and attached it here." 2013-05-30 09:07:46 +00:00
Robert Osfield
ae4d87a3be Renamed PanoramicSphericalDisplay.cpp to fix a typo 2013-05-28 19:16:59 +00:00
Robert Osfield
6cb9115170 Updated ChangeLog and Contributors list 2013-05-28 16:39:48 +00:00
Robert Osfield
3722f46aff From Farshid Lashkari, "The logic for handling opacity maps in the 3ds reader seems to be incorrect. It checks whether the diffuse texture contains transparency, instead of the opacity texture. If the diffuse does not contain an alpha channel it outputs the warning:
The plugin does not support images without alpha channel for opacity

This seems to indicate that the check for alpha should be against the opacity map. I've attached the updated file.

"
2013-05-28 15:43:12 +00:00
Robert Osfield
4b223c770b From Michael Bach Jensen and Robert Osfield, "As discussed (http://forum.openscenegraph.org/viewtopic.php?t=12027) here is my submission :-)
The following change to State.cpp fixes the case where textures in a stateset along with a compute shader program did not make those textures available to the shader, since it got evaluated before the texture bind(s)."

Note from Robert, Michael only change State::apply(StateSet*) so I also applied the same reversal in apply of texutre modes/state into the State::apply() method for consistency.
2013-05-28 15:40:28 +00:00
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