Commit Graph

12294 Commits

Author SHA1 Message Date
Robert Osfield
eb556797e2 From Marcin Prus, "I don't know if you seen my second reply to your information about merging my Image and dds plugin changes. I found one problem in your latest submit. In ReaderWriterDDS::ComputeImageSizeInBytes pixelFormat and pixelType are not passed into osg::Image::computeImageSizeInBytes.
It's
return osg::Image::computeImageSizeInBytes(width, height, depth, packing, slice_packing, image_packing);
but I think it should be
return osg::Image::computeImageSizeInBytes(width, height, depth, pixelFormat, pixelType, packing, slice_packing, image_packing);"
2013-06-07 10:54:55 +00:00
Robert Osfield
a6e57026b2 From Mathias Froehlich, "attached is a change to osgsharedarray to move completely to the fast geometry
path. Also the arrays are moved back to static storage since this is the data
that is actually referenced in draw. So the change moving this onto the stack
that happend somewhere before broke this."
2013-06-07 10:52:29 +00:00
Robert Osfield
d66ee2c698 Replaced OpenThreads::Mutex with a OpenThreads::ReentrantMutex to allow draw callbacks to use Renderer. 2013-06-06 08:23:37 +00:00
Robert Osfield
49cfece9d4 Reorder member variables to ensure better packing in memory. 2013-06-05 07:55:05 +00:00
Robert Osfield
4f1e6b28e8 Moved the Array::AttribDivisor into the Array::Binding enum to avoid conflicts in settings between Binding and AttribDivisor.
Removed the vertify bindings/shared arrays handling from GeometryNew
2013-06-05 07:27:35 +00:00
Robert Osfield
eb693f6a92 Updates to GeometryNew, Array and ArraDispatchers to clean up GeometryNew so that is no longer uses ArrayData. 2013-06-04 19:04:26 +00:00
Robert Osfield
cbea97009c Added s/getNormalize(), s/getPreserveDataType(), s/getAttribDivisor() and s/getBinding() to osg::Array base class in preperation for refactor of osg::Geometry and introduction of new features. 2013-06-04 14:55:57 +00:00
Robert Osfield
a70318fbd5 Removed now redundent osggeodemo 2013-06-04 14:43:19 +00:00
Robert Osfield
c0c5fc13b1 Removed geo plugin as the modelling tool it was assocaited is long defunct. 2013-06-04 13:29:44 +00:00
Robert Osfield
bab251fc59 Cleaned up BIND_PER_PRIMITIVE and array indice usage 2013-06-04 10:06:19 +00:00
Robert Osfield
caa3a06c70 Introduced GeometryNew which is a cleaned up version of Geometry that removes support for array indices.
GeometryNew is only temporary and will be renamed to Geometry on the completion of refactoring work and feedback from community.
Ported osggeometry across to use GeometryNew.
2013-06-04 09:32:59 +00:00
Robert Osfield
4cca5c1d1c Removed deprecated usage of osg::Geometry indices and BIND_PER_PRIMITIVE 2013-06-04 09:29:37 +00:00
Robert Osfield
2dc53ceabb From Aurelien Albert, Added support for texture swizzle. 2013-06-03 15:10:53 +00:00
Robert Osfield
9b67578c47 Updated version and so_version in prep for 3.1.8 developer release 2013-06-03 14:38:23 +00:00
Robert Osfield
82ecbe98da From Laurens Voerman, "Autodesk released a new version of their FBX Software Development Kit (web page http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=10775847).
The API has changed quite a bit, so lots of changes had to be made in the osg readerwriter. The preious version of the FBX SDK (2013.3) already deprecated a lot of the names and functions. The code I submit now still compiles against 2013.3 (possibly needs a #define FBX_NEW_API). Not sure if that's useful, but it might ease the transition."
2013-06-03 14:27:14 +00:00
Robert Osfield
375e7c2d57 From Laurens Voerman, "while updating dependencies I found a problem with libgif 5 from http://sourceforge.net/projects/giflib/
a change in version 5.0.0 required a call to the fuction "DGifOpen" to pass an int ref for an error code.
My fix ignores the error, just fixes the compile."
2013-06-03 14:04:02 +00:00
Robert Osfield
05a1084e5c From Sergey Polischuk, "this patch fixes light id in gl modes for osg::LightSource's readed from fbx (previously all lightsources were setting GL_LIGHT0 mode, while osg::Lights were using different id's), and enables GL_LIGHT# on root node for all lights contained in model
"
2013-06-03 14:01:13 +00:00
Robert Osfield
ae2b6669ea Added Vec*b, Vec4ub, Vec*s, Vec*i, Vec*ui serializers 2013-06-03 13:13:18 +00:00
Robert Osfield
2244f6a371 Added Vec2i, Vec2ui, Vec3i, Vec3ui, Vec4i and Vec4ui headers to CMake header list 2013-06-03 12:19:06 +00:00
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