Commit Graph

9988 Commits

Author SHA1 Message Date
Robert Osfield
b7b86ba5f4 From Stephan Huber, "attached you'll find the missing GraphicsHandleCocoa-implementation." 2009-12-10 17:52:40 +00:00
Robert Osfield
fa189316bb Updated ChangeLog and README.txt for 2.9.6 dev release 2009-12-10 12:58:05 +00:00
Robert Osfield
d196885613 Updated AUTHORS file for 2.9.6 dev release 2009-12-10 12:14:24 +00:00
Robert Osfield
138c3a4ff1 Updated Contributors list to workaround typos in ChangeLog 2009-12-10 12:13:13 +00:00
Robert Osfield
a503dc133f Updated ChangeLog 2009-12-10 11:46:44 +00:00
Robert Osfield
8dc2a86e4d Updated wrappers 2009-12-10 11:30:51 +00:00
Robert Osfield
cac4da38bf From Stephan Huber, " I am getting a warning that the class DataOutputStream has virtual
methods but no virtual d'tor, so I added the keyword virtual to the destructor."
2009-12-10 11:30:09 +00:00
Robert Osfield
69bcbcd0a3 Fixed bug in positioning of 3d text characters 2009-12-10 11:16:41 +00:00
Cedric Pinson
8d6a01b62d From Cedric Pinson, add missing file 2009-12-09 23:42:29 +00:00
Cedric Pinson
53d5b56202 From Cedric Pinson,
Add check in RigTransformSoftware if bones are null
Indent TimelineAnimationManager
Add check for NaN in UpdateCallback.cpp
Fix TimelineAnimationManager clear target (a refactore of Timeline is require for futur)
Fix Computation of bounding box for RigGeometry
2009-12-09 18:45:46 +00:00
Robert Osfield
f099dab160 Updated wrappers 2009-12-09 14:34:24 +00:00
Robert Osfield
5f61d14dc6 Fixed support for compiling VBO's 2009-12-09 13:55:10 +00:00
Robert Osfield
6e7c02b5d8 Added a Geometry::compileGLObjects() to handle compilation of VBO + EBO's. 2009-12-09 13:51:02 +00:00
Robert Osfield
268f11c522 From Ulrich Hertlein, removed email address 2009-12-09 13:13:02 +00:00
Robert Osfield
db7528386f From Ulrich Hertlein, .osg support for osgFX::Outline 2009-12-09 10:18:13 +00:00
Robert Osfield
8c7b2c097c Compile fixes for GLES 2009-12-09 09:37:19 +00:00
Robert Osfield
7cf9dacc76 From Robert Milharcic, added missing OSGFX_EXPORT 2009-12-09 09:36:08 +00:00
Robert Osfield
e0154c2d28 From Ulrich Hertlein, "attached is a stencil buffer-based constant-width outline f/x with example. I've also modified osgfxbrowser to setup the stencil buffer accordingly." 2009-12-08 17:41:44 +00:00
Robert Osfield
17b8ee1508 From Thomas Halgarth, mods for Iphone GL headers 2009-12-08 17:41:18 +00:00
Robert Osfield
65c6fdd8ca Added check for image compatibility with existing texture object, releasing the existing texture object in cases when the new image size/pixel format is not compatible. 2009-12-08 17:33:01 +00:00
Robert Osfield
248386861b From Sukender, "I experienced as some users before: I tried to rescale an image without a valid rendering context... And had problems to unserstand what the "GL_OUT_OF_MEMORY" meant! So I added a few comments for future users." 2009-12-08 17:25:45 +00:00
Robert Osfield
d54b6907b8 Fixed typo 2009-12-08 16:58:21 +00:00
Robert Osfield
6c0d321e3d From Fabien Lavignotte, "i have a problem with my application, i am currently playing with Texture2D::SubloadCallback to optimize my image data transfer, and also avoid double buffering when using a drawing thread.
There is a small bug with your change and SubloadCallback, the texture object is destroy at each call of Texture2D::apply because the modified count is never updated when using SubloadCallback.
I have made a small fix to avoid that, see attachement."

From Robert Osfield, added an if (_image.valid()) before the getModified() that Fabien added to avoid problems when no _image is assigned but an subload callback is.
2009-12-08 16:02:43 +00:00
Robert Osfield
57d0729484 Updated wrappers 2009-12-08 15:39:04 +00:00
Robert Osfield
02d0f08eb1 Added virtual declaration for a range of osg::Image method to allow easier customization. 2009-12-08 15:38:50 +00:00
Stephan Maximilian HUBER
8caf4e8c8c From Stephan Huber: updated XCode project 2009-12-08 14:40:36 +00:00
Robert Osfield
7603931eb4 Added catch for changes in image pixel format and dimensions so that the texture object is released when the image changes enough to warrant a new texture object. 2009-12-08 14:25:16 +00:00
Robert Osfield
78a31776be Re-order the setting of the VBO's 2009-12-07 16:45:33 +00:00
Robert Osfield
3a6a756d34 Converted tabs to four spaces 2009-12-07 12:35:33 +00:00
Robert Osfield
9e9b6b8843 Updated wrappers 2009-12-05 10:13:43 +00:00
Robert Osfield
b4af14433f Removed unimplemented updateGraph method 2009-12-05 10:02:04 +00:00
Robert Osfield
8c11e7be48 From Tatsuhiro Nishioka, "> The workaround/solution was to add a block of code at the end of the
> loader to un-premultiply the alpha (now in the codebase).

Applying the code brightens the semi-transparent portion, but the black edges are still there (same on both osgviewer and FlightGear).
Therefore I believe that the alpha channel is completely ignored (on png, gif, tiff, etc...). I tweaked and tweaked and finally got a workaround.

Please commit the enclosed file to fix these issues.

My workaround is a bit tricky (and some lines are even weird for me), but it resolves the black edges.
These workarounds also work on GIF, TIFF, TGA, and PSD as long as I've tested so far.

Please read this for more info on this issue:
http://macflightgear.sourceforge.net/home/development-notes/devnote-dec-02-2009
http://macflightgear.sourceforge.net/home/development-notes/devnote-dec-03-2009

I'm very happy if some of you guys find a better means of solving the black edges.

"
2009-12-04 17:25:23 +00:00
Robert Osfield
039455ef30 Converted tabs to four space 2009-12-04 17:24:27 +00:00
Robert Osfield
6773aca87a From Sukender,
"Here is our freshly baked 3DS reader/writer (named 'v0.5' to differentiate from previous one). Changes are against trunk rev. 10819.
Short changelog (from rev 10819):
- Added 3DS writer
- Sync'd with latest lib3DS
- Added options, especially "flattenMatrixTransforms" to get the "old" behaviour (else the reader correctly maps to OSG the transforms from the 3DS file).

What should be done:
- Check with pivot points, with and without "flattenMatrixTransforms" option.
- We ran tests on it, but we can never be 100% sure there is no bug. Testing from the community would of course be helpful."
2009-12-04 11:31:04 +00:00
Robert Osfield
c262112fbb From Mathieu Marache, "I replaced the Vec4 by a float and used only the x component of the shadow2DProj . This works on my apple box." 2009-12-04 09:57:08 +00:00
Robert Osfield
8080f46444 From Julen Garcia,"I've been lately working also with the ffmpeg plugin and I implemented pause(), seek() and getReferenceTime(). I think that I have solved the internal clock issues (maybe not in the most elegant way :?" 2009-12-02 18:58:45 +00:00
Robert Osfield
11abf29c14 From Farshid Lashkari, "I had to make a few small changes to some cmake files to enable the OSG_MSVC_GENERATE_PLUGINS_AND_WRAPPERS_MANIFESTS option for Visual Studio 2008." 2009-12-02 14:58:47 +00:00
Robert Osfield
b278660799 From Nico Kruithof, "Attached is a patch that makes the spherical manipulator frame rate independent. This is similar to what Lee did for the trackball manipulator a couple of months ago." 2009-12-02 14:21:13 +00:00
Robert Osfield
3c8fe13194 Quitened down debug info 2009-12-02 12:37:45 +00:00
Robert Osfield
f1009763fc Added osggpx example to demonstate how to use the XmlParser and create line models.
To use :

  osggpx myterrainmodel.ive -t mytrack.gpx
2009-12-02 12:37:22 +00:00
Robert Osfield
2be82dd8d7 Quiten down debugging message 2009-12-01 19:40:29 +00:00
Robert Osfield
4d762a81a6 Updated wrappers 2009-11-30 13:44:41 +00:00
Robert Osfield
3a71cd80fa Attempted compile fix. 2009-11-27 18:14:27 +00:00
Robert Osfield
41ba8ce585 From Christian Ehrlicher, "during profiling my program I found out that there's a lot of memory
(de)allocation going on in OverlayNode::cut().

So instead creating inner-loop variables 'distances' and 'newVertices'
every time, I moved the creation out of the loop and just do a clear() +
reserve() inside the loop. This allows std::vector<> to reuse the old
memory instead allocating new when the new size <= oldsize."
2009-11-27 16:47:38 +00:00
Robert Osfield
9b3e02f4e9 From Jason Daly, "The DDS reader test for DXT1 images with 1-bit alpha wasn't thorough enough. It performed the first check (color_0 <= color_1), but it didn't actually scan the texel block to see if the transparent color (0x03) was there. As a result, DXT1 files without any alpha were getting switched to RGBA format (instead of being left just RGB).
The attached code fixes this problem."
2009-11-27 15:48:57 +00:00
Robert Osfield
b4562b0393 From Jean-Sebastien Guay, Explanation:
Currently osg2cpp removes "\n" line endings to replace them with a textual equivalent ("\\n") in order for the string representing the shader to contain line endings in the string. But if the file that was read contained Windows line endings ("\r\n"), the resulting file looked really weird (the \r were left there and editors interpreted that as an additional newline). Also, I can imagine that if the shader file that was read had Mac line endings ("\r") then the output shader would all end up in one long line since there are no "\n"...

What I've done:

I've added a search and replace of "\r\n" to "\n", and then "\r" to "\n" (note that the order is important).

I've also changed the filename handling so that the output file will be put in the same directory as the input file in case it was specified with a path. Previous functionality is retained for files specified with the filename only.""
2009-11-27 15:39:07 +00:00
Robert Osfield
6ff21888f3 From Wang Rui, "I just successfully built the pdf plugin on Windows XP and MSVC and
fixed a small bug then:

ReaderWriterPDF.cpp, line 133, change:

std::string uri = std::string("file:") + foundFile;

to:

#if defined(WIN32) && !defined(__CYGWIN__)
           std::string uri = std::string("file:///") + foundFile;
#else
           std::string uri = std::string("file:") + foundFile;
#endif


That's because glib accepts "file:///C:\\data\\file.pdf" as URIs on
Windows, as well as "file:/home/data/file.pdf" on Unix, but
"file:C:\\data\\file.pdf" is not recognized.

Now I could read my Chinese translation of OSGQSG with osgpdf. :P"
2009-11-27 15:35:57 +00:00
Robert Osfield
36b5e59019 From Paul Martz, "This change address the following issue: an app opens a Viewer on a multidisplay system, configured to setUpViewAcrossAllDisplays, with a non-default clear mask. In this case, OSG failed to propagate the clear mask to the slave Cameras, resulting in the clear mask being ignored. To fix this issue, this revision adds a new CullSettings::VariablesMask bit, CLEAR_MASK, to explicitly control inheritance of the clear mask. This bit is set by default, which means that the clear mask now inherits by default, whereas previously it did not." 2009-11-27 15:32:43 +00:00
Robert Osfield
9ce90775c2 From Chris Denham, "I discovered what seems to be a missing call to FreeLibrary for osgDB.dll The result of this is that it prevents me from dynamically unloading my DLL (which uses OSG). This is because initialisation of the osg::Registry instance results in a call to GetModuleHandleEx (to get the filename of the DLL). This call to GetModuleHandleEx increments the module refcount, but there was no matching call to FreeLibrary for the returned handle. Unlike the old GetModuleHandle function, GetModuleHandle does (by default) increment the refcount.
I have added the missing call to FreeLibrary in osgDB::FileUtils., and now my the runtime unload of MY dll is working properly. It has also cured some related problems I was having with memory leak checks being reported.

I have attached a fix to osgDB/FileUtils.cpp based on version 2.9.5 svn revision 10374
"
2009-11-27 12:21:44 +00:00
Robert Osfield
5d6ce1a25f From Cory Riddell, "Small edit to ReaderWriterDOT.cpp. It wasn't checking the file extension
and so, if the .dot plugin was loaded, it would happily handle any file
name extension.

To reproduce the bug, first save a scene to a dot file (to load the dot
plugin), then try to write the scene to an osg file. If you look at the
osg file, you will see that it is a dot file."
2009-11-27 12:17:20 +00:00