Commit Graph

1443 Commits

Author SHA1 Message Date
Robert Osfield
7232a831da Added osg::FrameStamp::set/getSimulationTime().
Added setting of osg_SimulationTime and osg_DeltaSimulationTime to the uniforms set by SceneView

Added frame(double simulationTime) and advance(double simulationTime) parameters to
osgViewer::SimpleViewer, Vewer and CompositeViewer.

Updated various examples and Nodes to use SimulationTime where appropriate.
2007-01-25 12:02:51 +00:00
Robert Osfield
9e91e6410b Fixed tabbing 2007-01-23 16:32:17 +00:00
Robert Osfield
24bc488205 From Mathias Fröhlich, "Attached is a small change that makes the txf loader render the same resulting
text than an other well known txf loader. That means drawing them one on top
of the other I can only see differences due to different mipmapping ...

That is it introduces an additional gap of 0.1*height between the glyphs.
There is an additional mapping between upper and lowercase characters if one
of them is not available in the txf file.
And we have an artificial blank character that is very often missing in txf
files."
2007-01-22 09:28:31 +00:00
Robert Osfield
f5d425cd11 Fixed the output of texture files 2007-01-20 09:44:05 +00:00
Robert Osfield
ba9e355550 Added support for stencil GL_INCR_WRAP and GL_DECR_WRAP operations 2007-01-18 17:00:42 +00:00
Robert Osfield
3cb9af0dd6 From Brede Johansen, "The OpenFlight loader already have a caching mechanism for externals.
The cache works for nested externals but is cleared before the master
flight file is returned.  I implemented texture caching using the same
mechanism."
2007-01-15 10:11:23 +00:00
Robert Osfield
35ec6cee40 From Riccardo Corsi, "this should be the final version of the qt-plugin ported to windows and cleaned up to avoid crashes on exit.
Stephan and I tested it on Mac and Win.
Just a couple of notes:

    * the plugin is able to load both regular 2D images and movie stream. There is a #define QT_HANDLE_IMAGES_ALSO mechanism to indicate whether to use it for images or not. This is defined by default on Mac only, to avoid conflicts with the standard windows plugins. See comments on QTUtils.h

    * de-initialization of quicktime before exit is now left to an observer, which calls exitQuicktime() when last media loaded with the plugin is released. This prevent a crash on exit without need of any extra call external to the plugin."
2007-01-12 22:07:33 +00:00
Robert Osfield
7626169283 From Jan Ciger, Tolga Abaci, Bruno Herbelin : OpenVRML 0.14.3 based .wrl/VRML plugin 2007-01-09 14:35:59 +00:00
Robert Osfield
462803fd57 From Paul Martz, speeling fixes for Tessellator/Tessellation. 2007-01-08 21:29:49 +00:00
Robert Osfield
b9f629f0cb From Mathias Fröhlich, txf plugin for reading .txf textured texture files. 2007-01-08 12:04:04 +00:00
Robert Osfield
02bda82b55 From Paul Martz and Robert Osfield, renamed include/osgUtil/Tesselator and associated classes/references to Tessellator etc. 2007-01-08 11:23:52 +00:00
Robert Osfield
778fbc78e5 Fixed compile warning 2007-01-04 20:49:39 +00:00
Robert Osfield
7155f7d1b0 Various work on osgViewer library, including warp point and graphics window resize support 2007-01-01 18:20:10 +00:00
Robert Osfield
32821ebe4e From Roger James, "Here is the version of daeWMaterials.cpp with fixes for case insensitive path names on Windows. Nobody has complained to me about them since I posted them on the users list last week." 2006-12-19 17:40:40 +00:00
Robert Osfield
4f32039f24 From Mathias Fröhlich, "I have a small update to the 'non convex polygon detection' in the ac3d loader
that is used to tell if tesselation is required or if we will better leave a
polygon as is. It is still not perfect but catches some more cases."
2006-12-19 17:30:22 +00:00
Robert Osfield
d88b996df1 From Brede Johansen, "New option "cloneExternalReferences" for OpenFlight plugin" 2006-12-14 21:15:40 +00:00
Robert Osfield
11de6ae8ef From Gerrick Bivins, fixed newly introduced texture setup bug. 2006-12-06 21:39:09 +00:00
Robert Osfield
49cd96cd44 From Rick Pingry, "n my application I am walking through the scene graph looking for nodes of a specific name. I noticed there were times when some of the nodes were not named what I had expected. Upon reviewing the code, I noticed this was happening when there was a forward reference to a parented object.
The existing code uses a map with object ID's.  The original code only applied the name to a node for a new ID only if the node did not already exist in the map.  The problem was that there was another part of the code (when a parent was forward declared) that also created the node with the ID in the map, but it did not know its name.  I simply made sure that the name was set regardless of whether or not the node was already in the map. "
2006-12-06 14:17:55 +00:00
Robert Osfield
3cab169b0d Checked in remaining element from Brede Johansen changes for clmapToEdge reader option. 2006-12-05 20:30:46 +00:00
Robert Osfield
caa27618fc From Stephan Huber, "minor bugfixes for the quicktime-plugin" 2006-12-05 17:30:36 +00:00
Robert Osfield
2b8bcb9bb0 From Gerrick Bivins, "Changes:
--merged with fixes for texture coordinates(is this in CVS/SVN already)?
 --changed above mentioned fix output level from osg::NOTIFY to osg::DEBUG_INFO
 --added support for VRML97 ImageTextures.
 --changed pointers to ref_pointers where possible.
 --added format (method separated by "//////") for easier reading."
2006-12-05 17:27:31 +00:00
Robert Osfield
ae93f08492 From Roger James,"I have had another go at the windows specific file name handling in daeWMaterials.cpp. I think I have arrived at a temporary compromise.
I have decided to just normalise the drive letter part of file names for the time being and also ensure that names of the format x:/xxxxx are treated as absolute paths. This will cover a lot of cases.

I have raised a bug against collada which hopefully should resolve some others. However there are some pathological cases which I have commented on in the code, these will probably never work properly unless there is a significant rewrite of the daeURI functionality. Hopefully they are rare."
2006-12-05 17:10:39 +00:00
Robert Osfield
875668b84d From Stephan Huber and Riccardo Corsi, port of QuickTime plugin to Windows 2006-12-05 16:29:11 +00:00
Robert Osfield
905857acd7 Added use of typedef to help clean up the readability a little and replaced a copy list with a reference. 2006-12-05 15:41:03 +00:00
Robert Osfield
d70cf68ae6 From Sylvain Marie, "changed raw pointers to smart pointers in the dxfBlock, dxfTables and
dxfSection classes, so their members data are correctly deleted.
- changed some methods signatures to pass arguments by reference instead of
by value. The performance and memory usage are enhanced (the reader was
clogging the heap when reading some large DXF files)

The updated files have been compiled and tested with a variety of DXF files
on XP with VS2003, but the changes should not disturb any other compiler."
2006-12-05 15:31:07 +00:00
Robert Osfield
8e0bb5f6ef From Chris McGlone, "PlygonZ copy constructor: added allocation and copying of zarray" 2006-12-05 14:58:38 +00:00
Robert Osfield
289331569d From Brede Johansen, "added a new reader option to replace the texture
wrap mode CLAMP with CLAMP_TO_EDGE."
2006-12-05 14:28:07 +00:00
Robert Osfield
f2b2f00ea1 From Per Fahlberg, added support for writing 16-bit rgb images 2006-11-29 20:10:08 +00:00
Robert Osfield
345810ef22 Added support for float or double osg::Plane, and the default osg::Plane to double.
Performance tests on big models did not indicate any performance penalty in using doubles over floats,
so the move to doubles should mainly impact precision improvements for whole earth databases.

Also made improvements to osgUtil::PlaneIntersector and osgSim::ElevationSlice classes
2006-11-28 16:00:52 +00:00
Robert Osfield
ed4188cb96 Removed the now redundent dateUtils.h file. 2006-11-28 10:31:37 +00:00
Robert Osfield
68e9672765 Added missing Camera.h and removed redundent CameraNode.h 2006-11-28 09:14:46 +00:00
Robert Osfield
fd2ffeb310 Renamed osg::CameraNode to osg::Camera, cleaned up osg::View.
Added beginnings of new osgViewer::Scene,View,Viewer,CompositeViewer and GraphicsWindowProxy files.
2006-11-27 14:52:07 +00:00
Robert Osfield
60a975d05d From André Garneau, "The file submitted includes a fix to properly support DDS textures compressed under the DXT-1 format when they contain alpha information.
Under this mode, each 4x4 texel block can selectively use an alpha component or none. When alpha-enabled blocks are present, this is not reported in the DDPF_ALPHAPIXELS bit in the pixel format flags causing the reader-writer to report the file as a 3-components file (GL_COMPRESSED_RGB_S3TC_DXT1_EXT). The fix requires looking at each 4x4 texel block to detect the presence of 1-bit alpha encoding. When such a block is found, the internal & pixel formats are reported as GL_COMPRESSED_RGBA_S3TC_DXT1_EXT instead.



See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/Opaque_and_1_Bit_Alpha_Textures.asp for more information."
2006-11-27 09:23:57 +00:00
Robert Osfield
675e4a2cde From Roger James, "fixes mostly related to texture handling." 2006-11-22 21:11:46 +00:00
Robert Osfield
9c66cb4127 From Sylvan Marie, "I attached my revised dxfEntity.cpp file from the DXF plugin with the 2
following improvements:

- When all unsupported entities (SOLIDS, TEXT, ...) have been filtered out
from a block, dxfInsert::drawScene() was crashing because it assumed that
the block was not empty. It now returns silently so the other blocks can
still be imported.

- The DXF reader assumed all vertices were read first, then the face
indices. But, from the DXF "documentation" (www.autodesk.com/dxf) :
"Polyface meshes created with the PFACE command are always generated with
all the vertex coordinate entities first, followed by the face definition
entities. The code within AutoCAD that processes polyface meshes requires
this ordering. Programs that generate polyface meshes in DXF should generate
all the vertices then all the faces. However, programs that read polyface
meshes from DXF should be tolerant of odd vertex and face ordering."
So now the importer ignores the posted number of vertices and face indices,
and uses the size of the lists instead."
2006-11-22 20:47:53 +00:00
Robert Osfield
6b6bc4de10 Added missing PointSprite files 2006-11-17 14:51:48 +00:00
Robert Osfield
e45245b7d6 From Farshid Lashkari, "Attached is a patch that adds the new coordOriginMode to the .osg
reader/writer for PointSprites."
2006-11-16 17:35:12 +00:00
Robert Osfield
052d44a440 From Frashid Lashkari, added support for PointSprites to .ive 2006-11-16 16:42:11 +00:00
Robert Osfield
ee35f18acb From Mathias Froehlich, replaced assert with notify() error message. 2006-11-15 10:08:09 +00:00
Robert Osfield
43af60e19e Added note about license or file, and link to specs. 2006-11-14 19:29:49 +00:00
Robert Osfield
5d91960cb7 Removed redundent osgac3.h file. 2006-11-14 19:19:54 +00:00
Robert Osfield
2b28b472b4 From Mathias Fröhlich, fixed order of setting of texture image. 2006-11-14 19:19:15 +00:00
Robert Osfield
0c6a05392b From Mathias Froehlich, "Improovments:
- does proper edge detection with the crease angle given in the ac file
- the reader is much more verbose in case of broken files
- no more static variables
- std::stream based
- much faster, up to a factor of 50 for a polygonal test model
- if the file contains polygonal surfaces the loaded geometry is still
polygonal as long as the polygons are convex. Concave polygons are still
tesselated. Rationale: If the user needs triangular models he can throw away
that extra information with the osgUtil::Optimizer himself. But the read step
preserves as much extra information that is contained in the file as
possible. Also the polygonal models look a bit smoother than the triangular
ones.
- a huge cleanup
- the basic parsing logic from the original ac3d developer is untouched
- the writer part is untouched

The tarball contains a replacement for the src/osgPlugins/ac3d directory that
is based on the current CVS (2006-11-13).
I have tested that loader with a osgconv foo.ac /tmp/xx.ive on everyfoo. ac
file I could find (~200 from flightgear and the object database). I also run
my flightgear development with that loader -> here I see the models.
I run valgrind testcases on some selected models."
2006-11-14 16:37:07 +00:00
Robert Osfield
ac9a28051f Fixed the writeNode function so it was properly return FILE_NOT_HANDLED, fixing
a big with it writing out an empty .flt file.
2006-11-07 17:00:29 +00:00
Robert Osfield
d199fd0072 Changed debug output from NOTICE to INFO 2006-11-07 13:26:31 +00:00
Robert Osfield
d061c087fa Removed debug comment. 2006-11-07 12:08:03 +00:00
Robert Osfield
86c6a88c98 From Mathias Froehlich, workaround fix for problematic run length encoded RGB files. Robert Osfield ammend workaround to support multi-byte colour channels. 2006-11-07 12:02:37 +00:00
Robert Osfield
0f65ed9189 From Per Fahlberg, "Attached is a fix to get the proper normals on an md2 model, actually
the way it was before would sometimes lead to a crash since it was
attaching the wrong array to the geometry..."
2006-10-30 12:28:37 +00:00
Robert Osfield
f9b9efec16 From Vladimir Shabanov, "The DDS plugin didn't correctly read mipmapped A8L8 textures.
I've attached a small fix for this.

Cause: uncompressed mipmap handling was done only for RGB pixel format.

Fix: added condition for handling alpha and luminance formats too."
2006-10-30 12:23:37 +00:00
Robert Osfield
a48a4aa7d3 From Michael Henheffer, "Bug: The reader would crash when trying to load a .tif image that
contained an 8-bit color map.  The crash occured at line 545:

remap_row(currPtr, inbuf, w, red, green, blue);


Cause:  The code was trying to write past the end of the buffer while
doing this remapping.  The size of the buffer is determined based on the
value of 'format', which was 1 in this case since bitspersample is
8(indicating a 8-bit color map).  The buffer should have been created 3
times as large since that 8-bit value is indexing a 24-bit color.


Fix:  I've put in an if statement to set format to 3 if 'photometric'
indicates the tif contains a palette as the output data will always be
24-bit color data in this case."
2006-10-30 12:05:56 +00:00
Robert Osfield
0fe424996d From Andrew Lorino and Robert Osfield, Improvements to the handling of texture paths 2006-10-26 16:52:10 +00:00
Robert Osfield
648455da34 Changed the dependency list to use -losg -losgDB instead of OSG_LIBS 2006-10-23 15:29:59 +00:00
Robert Osfield
8544337aca Fixed OSX x86 endian issue in Quicktime movie plugin. 2006-10-21 21:06:27 +00:00
Robert Osfield
d445995432 From Brede Johansen, "Here's a patch discussed in the thread "OpenFlight Loader Discarding
Material" on the osg-user mailing list."
2006-10-06 13:04:48 +00:00
Robert Osfield
fecb63785f From John Aughey, "The id name of nodes are not being set in the daeReader::processNode method. The names are retained in most of the other osg::Nodes that are created. In this case, I have an external modeler creating models, and the name of component nodes are used to give that subtree different characteristics." 2006-10-03 19:55:24 +00:00
Robert Osfield
392232ec06 From Brede Johansen, "This submission adds multitexture support for detecting translucent
images used to enable alpha blending.

Mesh was syncronized with featureset from Face record."
2006-10-03 09:55:28 +00:00
Robert Osfield
e686a9a4a5 From Brede Johansen, "I think some nitpicking is required. The loop duration was added in
OpenFlight version 15.8.  With the attached changes the flasher unit
on the spinnercar and the character_anim model from the Creator
gallery behaves."
2006-10-03 09:39:03 +00:00
Robert Osfield
02783e1dfd From Paul Martz, Bug fix for sequence node direction, It examines the number of children in the Group record destructor, so that the total duration of the sequence matches the specified loopDuration field. 2006-10-02 15:09:49 +00:00
Robert Osfield
e3478069b4 From Per Fahlberg, "Attached is a fix for loading the same file multiple times with the
COLLADA plugin. dae->load will not return DAE_OK the second time a model is loaded, so a
second check for DAE_ERR_COLLECTION_ALREADY_EXISTS has been added."
2006-10-02 13:24:39 +00:00
Robert Osfield
c991e33796 From Andreas Ekstrand, "Attached is a small bug fix in the DW plugin. The texture application
matrix is read into a double matrix called mx, it was declared as 3x2,
it's now fixed to 3x3."
2006-10-02 13:07:50 +00:00
Robert Osfield
3edda73797 Added SERIALIZER to ReaderWriterDAE to make sure initialization is thread safe. 2006-10-02 11:47:55 +00:00
Robert Osfield
9dd487e6c8 From Andreas Ekstrand, "Attached is a modified ReaderWriterDAE.cpp which creates the one and
only DAE instance when it's first needed instead of in the constructor.
This fixes the problem with osgdb_dae.dll not being loaded due to
unwanted ordering of global initialization.

This fix and the previous fix of the COLLADA plugin might be unnecessary
with the latest COLLADA DOM, but since many of us will probably still
use the older version of the DOM, I guess it's better this way.
"
2006-10-02 11:38:25 +00:00
Robert Osfield
61ce7dd5ac From Brede Johansen, "I have added "billboardCenter" as a reader option to use the center of
a billboard as the pivot point."
2006-10-01 19:09:00 +00:00
Robert Osfield
f03218215d From Colin McDonald, "I have corrected a byte swapping problem in the new OpenFlight
plugin.  It was only reading floats & doubles correctly on little
endian systems, which require byte swapping, and not on big
endian systems which don't require any swapping."
2006-10-01 19:00:39 +00:00
Robert Osfield
d91e1ff4bb From Loic Dachary, renamed _mips to of_mips to prevent compile problem under MIIPS 2006-09-21 09:50:10 +00:00
Robert Osfield
f6fe0de6e5 Rationalized on the number of libs required. 2006-09-21 09:24:10 +00:00
Robert Osfield
dc57810d99 Removed use osg OSG_LIBS, changing to just -losg and -losgDB. 2006-09-21 08:56:19 +00:00
Robert Osfield
45dc4572a9 Fixed reading/writing of non C string osg::Text::String's. 2006-09-19 13:54:04 +00:00
Robert Osfield
fa791e99b8 From Per Fahlberg, "I've fixed the dae plugin so it is only using one instance of the DAE.
The crashes seen earlier are gone, it is now possible to read multiple
.dae files and converting both to and from .dae files."
2006-09-15 13:11:00 +00:00
Robert Osfield
c1a0df32b6 Made get methods const 2006-09-06 13:53:48 +00:00
Robert Osfield
5a08afeb07 From Brede Johansen, "The previous submission didn't handle Objects with transforms. The
attached file corrects this.

I also removed the multitexture macro for the Object record.  Only
Face and Mesh records are valid targets."
2006-09-06 09:46:32 +00:00
Robert Osfield
9d02b2314f From Mike Weiblen, build fixes for Windows. 2006-09-05 09:51:33 +00:00
Robert Osfield
aab03c3c6d From Brede Johansen, "I have added an optimization to the OpenFlight plugin. By default it
ignores the Object records if it's safe to do so.  The reader option
preserveObject prevents this optimization.

I have also removed the flat shading attribute set by the Object
record.  This flag is only intended for the "Calculate Shading"
operation in Creator."
2006-09-05 08:44:51 +00:00
Robert Osfield
f0277df858 Added osg::TexMat::s/getScaleByTextureRectangleSize feature that allows
one to use the osg::TexMat to automatically scale non dimensional tex coordinats to
the size of the last texture rectangle applied.
2006-09-04 12:46:49 +00:00
Robert Osfield
a93ca5a089 From Farshid Lashkari, removed debug message being written to the console. 2006-09-04 06:51:07 +00:00
Robert Osfield
8aa58c986c Changed the external file writing to use the DatabasePathList for its path rather
than the original files path.
2006-08-31 13:53:38 +00:00
Robert Osfield
c8e7a9ea40 From Roger James, improved mapping of AC3D lighting model to OSG 2006-08-28 19:07:30 +00:00
Robert Osfield
118161416f From Sebastien Grignard, fix to writing of dds files, write the source data
directly rather using a series of memcpy.
2006-08-23 15:25:43 +00:00
Robert Osfield
7b01f5a033 From Jeremy Moles, fixed typos 2006-08-23 15:11:18 +00:00
Robert Osfield
d25735b6b9 From Andrew Lorino and Mike Weiblen, COLLADA 1.4.1 ReaderWriter, kindly developed and donated by Sony Computer Entertainment Inc. US R&D. 2006-08-23 13:32:03 +00:00
Don BURNS
1fa331034c Added osgUtil::Tesselator for SHapeType Polygon to handle concave polygons. 2006-08-22 19:10:48 +00:00
Robert Osfield
8aceb4eec6 From Vaclav Bilek, "The purpose of this change is to suppress "re-reading" of osg::ProxyNodes
( in OF external references) after the OF file is loaded. The change do
conditional
execution of already existing code.

I use this for optimized preprocessing of large databases what can not
be loaded
in one pass because of memory limits."
2006-08-22 13:07:20 +00:00
Robert Osfield
a50d812d9a Fixed 64 bit support 2006-08-21 15:07:31 +00:00
Robert Osfield
7b53511251 From Paul Martz, "The gist of this change is, if the OpenFlight version of the
parent file is so old that it doesn't support Light Point palettes or Shader
palettes, then the parent file is not allowed to override those palettes in
the child."
2006-08-14 07:59:28 +00:00
Robert Osfield
c3313b99b2 Changed the texture wrap mode to repeat 2006-08-13 08:24:19 +00:00
Robert Osfield
25a91d97f0 From Chuck Sembroski, fixes for IRIX 2006-08-13 07:37:55 +00:00
Don BURNS
2bed6e60a1 Added comments to support use of Proxy in the .net plugin. 2006-08-11 17:39:10 +00:00
Don BURNS
a456538e3c Submission by Carlo Camporesi - Added Proxy support to .net loader 2006-08-11 17:34:04 +00:00
Robert Osfield
6b3fbb53f8 Added file search path to ESRI reader. 2006-08-11 13:06:36 +00:00
Robert Osfield
0c91825ee6 From Laurens Voerman, "
osgPlugins\pfb\ConvertFromPerformer.cpp

Added support for
       PFSTATE_ALPHAFUNC
       PFSTATE_ALPHAREF
Improved handling of
       PFTR_NO_OCCLUDE

I have tested this with WIN32 performer 3.1 and 3.2.2
and linux OpenGL Performer 3.1.1"

------------------------------------------------
2006-08-10 13:12:47 +00:00
Robert Osfield
7f6b5008e2 Added write ppn support, use -O ascii to select ascii ppn output, otherwise binary
is chosen.

Fixed crash when erroneous pnm files were read.

Added -O flip option.
2006-08-10 11:08:20 +00:00
Robert Osfield
5e33e13b34 Added nan dectecion and error reporting 2006-08-09 10:09:11 +00:00
Robert Osfield
bcd4aae4d5 Added TESSELATE_GEOMETRY to Optimizer pass to fix z fighting issues. 2006-08-08 16:08:06 +00:00
Robert Osfield
081b15c84d Fixed backColor implementation for LightPointAppearancePalette. 2006-08-08 11:59:53 +00:00
Robert Osfield
444f561c14 From Paul Martz, "This change causes the new OpenFlight plugin to behave as the
old plugin by returning the database origin latitude/longitude (extracted
from the header record) as userData of the top-level scene graph node."
2006-08-08 11:23:57 +00:00
Robert Osfield
553d017fd9 From Daniel Trstenjak, build fixes for Hpux 11.11, Irix 6.5, Solaris 8 and Aix 2006-08-02 10:43:26 +00:00
Robert Osfield
a0cdf7461c Added #define snprintf _snprintf for Win32 build 2006-07-27 11:22:01 +00:00
Robert Osfield
e1f4026cf5 Warning fixes 2006-07-19 15:10:50 +00:00
Robert Osfield
782d72484a Warning fix 2006-07-19 15:07:00 +00:00
Robert Osfield
377c5710fe Added extra initializes 2006-07-19 14:46:40 +00:00
Robert Osfield
a95b7fbfae Added dummy initializers to avoid warning 2006-07-19 14:30:30 +00:00
Robert Osfield
61b971ddea Fixed handling of back colour. 2006-07-19 11:25:26 +00:00
Robert Osfield
5fb3469f77 Changed code creating LightPoint on heap to use the stack. 2006-07-19 08:39:44 +00:00
Robert Osfield
f1c2694c17 Updated copyright years. 2006-07-18 15:21:48 +00:00
Robert Osfield
e016cdafb2 From Terrex, improvements to handling of layers w.r.t PolygonOffset 2006-07-17 16:36:42 +00:00
Robert Osfield
db395b18af Added getNumLayers method 2006-07-17 11:36:50 +00:00
Robert Osfield
541433c7be Added share duplicates traversal to optimizer call 2006-07-13 14:58:37 +00:00
Robert Osfield
5e9b7bef88 From Brede Johansen,
"I found some artifacts on some models and traced it back to the
external palette override feature.  There are some changes in the
layout of the external record the loader have to take into
consideration.

The other fix is to remove the OF pools from the user data of the
external ProxyNode when it is no longer needed."
2006-07-12 09:40:03 +00:00
Robert Osfield
dd6a33da49 Removed StateSet::ENCLOSE_RENDERBIN_DETAILS since it is rendendent, and
implemented the OVERRIDE_RENDERBIN_DETAILS.
2006-07-11 21:53:57 +00:00
Robert Osfield
49dea3b589 Tweak for VS6.0 build 2006-07-06 20:43:23 +00:00
Robert Osfield
1c1fce8266 Fixed scoping for for loop varaible for VS6.0 build. 2006-07-06 15:47:59 +00:00
Robert Osfield
ee1b6a5dd6 Tweaks to try and fix VS6.0 problems. 2006-07-06 15:00:51 +00:00
Robert Osfield
6665e2a38a Tweaked for loop variaible definition. 2006-07-06 14:43:30 +00:00
Robert Osfield
c72530d2fd Added setting of name from the .obj goup name and object names. 2006-07-06 11:40:41 +00:00
Robert Osfield
f693fa6d2d Removed redundent debug message. 2006-07-06 11:33:07 +00:00
Robert Osfield
fd7ee0cf21 Add "hack" fix for black materials being exported from Maya. 2006-07-06 11:30:20 +00:00
Robert Osfield
5622e0d202 From Brede Johansen, "Changed ">" to ">=" when testing for version 16.1 or later." 2006-07-05 20:56:37 +00:00
Robert Osfield
9ae10af995 Fixed warnings 2006-07-05 09:52:03 +00:00
Robert Osfield
a0050bc8db From Markus Trenkwalder, "Mingws gcc includes a file called types.h which in turn defines
_TYPES_H_.  types.h in the directx plugin defines the same include
guard.  I've renamed the guard name in this file to _DX_TYPES_H_.  Now
the plugin compile in mingw too."
2006-07-05 08:59:23 +00:00
Robert Osfield
7c1926118a From Brede Johansen, renaned FLT_preserveFace to preserveFace 2006-07-05 08:55:23 +00:00
Robert Osfield
6c6c131452 From Paul Martz,
"Previously, the new OpenFlight plugin only allowed ext ref models to use
their own palettes. With this change, parent models can override child model
palettes with the parent palettes.

These changes are made against very current CVS (just updated about 1/2 hour
ago, eliminated conflicts, and retested before this posting).

To regurgitate what I did:

A new class, ParentPools (public osg::Referenced), is created when an ext
ref record is parsed, and it is populated with any parent model pools that
should override the child model pools (according to bits in the ext ref
record). The ParentPools object is then set as UserData on the ProxyNode
corresponding to the ext ref.

When the ReadExternalsVisitor hits the ProxyNode, it takes its UserData and
sets it as UserData in the Options parameter to the osgDB::ReadNode call,
which then read the ext ref model. In the course of parsing the Options
string, ReaderWriterFLT also looks at the Options UserData and sets the
parent pools in the Document class accordingly.

When palette records are encountered while loading a file, they are ignored
if the corresponding pool was set by the parent.

Thanks to Brede for consulting with me on the implementation.
"
2006-07-04 19:54:29 +00:00
Robert Osfield
c8aec2a07d Fixed warnings. 2006-07-04 11:24:36 +00:00
Robert Osfield
0170689c9d Warning fix. 2006-07-04 10:55:58 +00:00
Robert Osfield
eff37b0fdf Warning fix 2006-07-04 10:52:16 +00:00
Robert Osfield
62ecea541d From Ulrich Hertlein, updates to DirectX loader 2006-07-04 09:13:15 +00:00
Robert Osfield
5e9076ec10 From Brede Johansen, set the default value of texture wrap mode to REPEAT to fix problem
with database without .attr files.
2006-07-03 20:28:26 +00:00
Robert Osfield
e4dea2b8c4 Fixed a couple of warnings. 2006-07-03 16:31:30 +00:00
Robert Osfield
70391108fd Fixed orientation and lighting of model. 2006-07-03 16:21:57 +00:00
Robert Osfield
07ac167fa8 Added merge geodes and geometries optimizer call 2006-07-03 10:47:16 +00:00
Robert Osfield
c90e35038a From Eric Sokolowski, "Added the ability to read and write images directly in the ive plugin,
through the osgDB::readImageFile and osgDB::writeImageFile functions.
This is useful for storing compressed textures on disk for rapid playback
for animations."
2006-07-03 09:26:12 +00:00
Robert Osfield
e7d04408d3 From Michael Platings, added support for blend seperates to .ive and .osg 2006-07-03 09:22:11 +00:00
Robert Osfield
4ce0d8af64 From David Callu, compile fix for gcc 4.1 2006-06-29 19:38:07 +00:00
Robert Osfield
a6fbb7a044 Changed _WIN32 to _MSC_VER 2006-06-29 10:17:19 +00:00
Robert Osfield
459f147da7 From Eric Wing, updates to QuickTime plugin 2006-06-29 10:06:27 +00:00
Robert Osfield
e12c6b7902 Form Brede Johansen, move from istrstream to istringstream.
From Robert Osfield, remapped Paul Martz's changes to Pools.h and PaletteRecords.cpp w.r.t texturePatternIndex being a in16, and converted a char* string to a std::string.
2006-06-29 09:34:41 +00:00
Robert Osfield
e0258f23b3 Changed unsinged int to GLuint for OSX compile fix. 2006-06-29 08:08:39 +00:00
Robert Osfield
17e51e73c4 Changed unsigned int to GLuint for OSX build. 2006-06-28 20:38:32 +00:00
Robert Osfield
4dff461b1c Change internal variables across to being GLuint. 2006-06-28 14:36:28 +00:00
Robert Osfield
5acd4f3be1 From Martin Naylor, build fix for windows. 2006-06-28 07:17:56 +00:00
Robert Osfield
95d29db7c5 Removed old #include <vector.h> entries. 2006-06-28 07:14:39 +00:00
Robert Osfield
261f4a3b1c From Terrex and Andrew Sampsom and Don Tidrow and Robert Osfield,
email comments from Andew Sampson,

"I've contacted Terrex, and obtained the 2.2 version
of their trpage library.  The library included a
fork of OSG 0.9.8's txp plugin, modified to load 2.1+
txp DBs.

I've done the work of incorporating the changes made
to OSG's txp plugin since 0.9.8 into Terrex's fork.
The forked version is now up-to-date with the changes
made to OSG 0.9.9 and 1.0.

Terrex made a lot of changes (especially differences
in whitespace), so the diff between the forked version

and OSG 1.0's txp plugin is yucky.  I did my best, but

keep in mind that this is the result of a 4-way merge
(kinda... terrex-0.9.8, stock-0.9.8, stock-0.9.9,
stock-1.0).

I really want to see this forked version merged back
into the main OSG branch.  The new features offered by

this version of the plugin (2.1+ support, variable
LOD support, bug fixes) are worth the trouble."

--

Don Tidrow then took this code and added his work.

--

Robert Osfield then fixed all the warnings that abound in the trpage code base.
2006-06-27 10:07:42 +00:00
Robert Osfield
240fc9ebee Replaced ref_ptr<>:take with ref_ptr<>:release, and added handling of removeal
of ref_ptr<> operator >.
2006-06-26 20:45:51 +00:00
Robert Osfield
a39516c297 Changed GLunit usage to unsigned int. 2006-06-26 10:57:17 +00:00
Robert Osfield
c46560e478 From Andreas Ekstrand, fix for Windows 2006-06-26 10:39:38 +00:00
Robert Osfield
3b499341ed From Philipp Siemoleit,
There are some group codes (i.e. "62") which are interpreted as
    dxfDataType::SHORT. That's right because the dxf-specification defines
    "16 bit integer" as the type for the corresponding value.
    But readerBase::readGroup() calls readValue(std::ifstream&, unsigned
    short). I changed readValue(std::ifstream&, unsigned short) to
    readValue(std::ifstream&, short). I found no group code at the dxf-specs
    which needs a "16 bit unsigned integer" value. So the
    readValue(std::ifstream&, unsigned short) function is obsolete - right?
2006-06-26 09:30:16 +00:00
Robert Osfield
2e2684c05a From Paul Martz, added support to textured light points into osgSim and OpenFlight loader, as part of the OpenFlight v16.0 spec. 2006-06-08 14:32:02 +00:00
Robert Osfield
e1c77dfe2a Minor tweaks of ints to unsigned ints 2006-05-16 21:20:36 +00:00
Robert Osfield
90fc234cf1 From Mike Weiblen, support for new Uniform arrays.
From Robert Osfield, refactor of above with original code to ensure backwards compatibility.
2006-05-16 21:00:15 +00:00
Robert Osfield
bf065ed3a4 From Mike Weiblen, support GLSL uniform arrays. A couple of tweaks and fixes from Robert Osfield. 2006-05-15 15:46:08 +00:00
Robert Osfield
d42a8fd269 From Paul Martz, "This change is based on current CVS. (Note both Brede and I have submitted
changes to this plugin that aren't in current CVS yet -- this change is
based on current CVS, not our changed files.)

This changes how shader palette records are parsed to support GLSL per the
OpenFlight 16.1 spec. Existing functionality for 16.0 files is preserved.

The change to Document.h simply adds an enum for VERSION_16_1."
2006-05-15 13:22:59 +00:00