Compare commits
75 Commits
OpenSceneG
...
OpenSceneG
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd53f89f6a | ||
|
|
abbf13d7bf | ||
|
|
431c34024c | ||
|
|
ba50def217 | ||
|
|
7592acf224 | ||
|
|
62f5a4d3bc | ||
|
|
0c345e76d4 | ||
|
|
d4ec341573 | ||
|
|
371778e0e7 | ||
|
|
ca58e0db21 | ||
|
|
a6e017dc3c | ||
|
|
e843836292 | ||
|
|
e7447a46be | ||
|
|
ec23bf1b1c | ||
|
|
285240fd2d | ||
|
|
bf5cad7a0c | ||
|
|
c81ba225c9 | ||
|
|
79967399fe | ||
|
|
adced1b3dc | ||
|
|
0e64a4773a | ||
|
|
f86dbaed74 | ||
|
|
6612b98ddb | ||
|
|
67ef3fd2c5 | ||
|
|
4ae4b9fdf5 | ||
|
|
e1c5969b0e | ||
|
|
029c114c4c | ||
|
|
bc7f1cf5ac | ||
|
|
34c458f075 | ||
|
|
7e84617d24 | ||
|
|
aab533c046 | ||
|
|
b2e40572e5 | ||
|
|
f175cad6d8 | ||
|
|
2d2b13361b | ||
|
|
aa7b0becf7 | ||
|
|
4f3e2c2e82 | ||
|
|
ebee4b6721 | ||
|
|
e383ef95bc | ||
|
|
2741c38c0d | ||
|
|
a15b93432a | ||
|
|
3d4ff7ae02 | ||
|
|
cc3f8eba8b | ||
|
|
5802844f52 | ||
|
|
98c3d362e5 | ||
|
|
9c6f1ac45a | ||
|
|
3e340bb23d | ||
|
|
1bbcc0ea44 | ||
|
|
b3f1204c64 | ||
|
|
df731d8244 | ||
|
|
29857b3b19 | ||
|
|
b608c191c1 | ||
|
|
d3d0c28f61 | ||
|
|
c78d065d51 | ||
|
|
171bc9da21 | ||
|
|
2bb480759f | ||
|
|
4ff8df73bc | ||
|
|
8631eaaf40 | ||
|
|
ed2aa7c90f | ||
|
|
8cd7d36982 | ||
|
|
d843de261e | ||
|
|
c60cff5eb6 | ||
|
|
18726b72ea | ||
|
|
04e10363bb | ||
|
|
ee4d49c398 | ||
|
|
a6774396bd | ||
|
|
c37b478ed6 | ||
|
|
339026a0f2 | ||
|
|
e68110f303 | ||
|
|
1490271272 | ||
|
|
8faa9d3f63 | ||
|
|
8297d8f0cb | ||
|
|
439c3a866b | ||
|
|
8954964c32 | ||
|
|
7e75fa6a66 | ||
|
|
ced46026e5 | ||
|
|
36ba62e69a |
49
AUTHORS.txt
49
AUTHORS.txt
@@ -1,6 +1,6 @@
|
||||
OpenSceneGraph Library 2.8.0
|
||||
OpenSceneGraph Library 2.8.1
|
||||
|
||||
365 Contributors:
|
||||
372 Contributors:
|
||||
|
||||
Firstname Surname
|
||||
-----------------
|
||||
@@ -31,39 +31,40 @@ Colin McDonald
|
||||
Andy Skinner
|
||||
Roger James
|
||||
Pavel Moloshtan
|
||||
Mattias Helsing
|
||||
Tom Jolley
|
||||
Jeremy Moles
|
||||
Jason Beverage
|
||||
Norman Vine
|
||||
Mattias Helsing
|
||||
Cedric Pinson
|
||||
Art Tevs
|
||||
Alberto Farre
|
||||
Roland Smeenk
|
||||
Michael Platings
|
||||
Andr<EFBFBD> Garneau
|
||||
Ruben Lopez
|
||||
Roland Smeenk
|
||||
Randall Hopper
|
||||
Michael Platings
|
||||
Adrian Egli
|
||||
Olaf Flebbe
|
||||
Jason Daly
|
||||
J.P. Delport
|
||||
Adrian Egli
|
||||
Olaf Flebbe
|
||||
Mathieu Marache
|
||||
Gideon May
|
||||
Don Tidrow
|
||||
Sherman Wilcox
|
||||
Romano Jos<6F> Magacho da Silva
|
||||
Per Fahlberg
|
||||
Michael Gronager
|
||||
Mathieu Marache
|
||||
Joakim Simonsson
|
||||
David Spilling
|
||||
Daniel Sj<53>lie
|
||||
Chris Hanson
|
||||
Alberto Luaces
|
||||
Philip Lowman
|
||||
Melchior Franz
|
||||
Chris Denham
|
||||
Melchior Franz
|
||||
Serge Lages
|
||||
Lionel Lagarde
|
||||
Joran Jessurun
|
||||
Frederic Marmond
|
||||
David Fries
|
||||
@@ -76,21 +77,21 @@ Stephane Lamoliatte
|
||||
Sondra Iverson
|
||||
Rune Schmidt Jensen
|
||||
Rainer Oder
|
||||
Neil Groves
|
||||
Mike Connell
|
||||
Martin Aumueller
|
||||
Mario Valle
|
||||
Gordon Tomlinson
|
||||
Gino van den Bergen
|
||||
Carlo Camporesi
|
||||
Ben Discoe
|
||||
Andreas Ekstrand
|
||||
Thibault Genessay
|
||||
Sukender
|
||||
Sasa Bistrovic
|
||||
Neil Groves
|
||||
Martin Naylor
|
||||
Martin Aumueller
|
||||
Markus Trenkwalder
|
||||
Loic Dachary
|
||||
Lionel Lagarde
|
||||
Joseph Steel
|
||||
John Shue
|
||||
Jan Peciva
|
||||
@@ -98,7 +99,6 @@ Jan Ciger
|
||||
Glenn Waldron
|
||||
Brad Colbert
|
||||
Vivek Rajan
|
||||
Thibault Genessay
|
||||
Sean Spicer
|
||||
Ravi Mathur
|
||||
Peter Hrenka
|
||||
@@ -168,6 +168,7 @@ Wang Rui
|
||||
Tugkan Calapoglu
|
||||
Tim Daoust
|
||||
Terrex
|
||||
Tanguy Fautr<74>
|
||||
Sylvain Marie
|
||||
Steve Lunsford
|
||||
Stephane Simon
|
||||
@@ -178,6 +179,8 @@ Sebastian Messerschmidt
|
||||
Ralf Kern
|
||||
Pierre Haritchabalet
|
||||
Perry Miller
|
||||
Paul Obermeier
|
||||
Neil Hughes
|
||||
Nathan Monteleone
|
||||
Morn<EFBFBD> Pistorius
|
||||
Michael Henheffer
|
||||
@@ -185,6 +188,7 @@ Michael Guerrero
|
||||
Maya Leonard
|
||||
Max Bandazian
|
||||
Mathew May
|
||||
Martin Spott
|
||||
Martijn Kragtwijk
|
||||
Kevin Moiule
|
||||
Keith Steffen
|
||||
@@ -200,6 +204,7 @@ Gustavo Wagner
|
||||
Guillaume Chouvenc
|
||||
Gerrick Bivins
|
||||
George Tarantilis
|
||||
Frederic Bouvier
|
||||
Ferdi Smit
|
||||
Ewe Woessner
|
||||
Erik den Dekker
|
||||
@@ -230,7 +235,6 @@ Tino Schwarze
|
||||
Thomas Weidner
|
||||
Thom Carlo
|
||||
Tery Welsh
|
||||
Tanguy Fautr<74>
|
||||
Steven Thomas
|
||||
Simon Hammett
|
||||
Sid Byce
|
||||
@@ -238,6 +242,8 @@ Shuxing Xiao
|
||||
Shane Arnott
|
||||
Sebastien Kuntz
|
||||
Ruth Lang
|
||||
Ruben Smelik
|
||||
Ross Anderson
|
||||
Ronny Krueger
|
||||
Robert Swain
|
||||
Rob Bloemkool
|
||||
@@ -253,8 +259,8 @@ Qing Shen
|
||||
Piotr Rak
|
||||
Philipp Siemoleit
|
||||
Philipp M<>chler
|
||||
Petr Salinger
|
||||
Paul Palumbo
|
||||
Paul Obermeier
|
||||
Paul Fredrikson
|
||||
Patrick Hartling
|
||||
Parag Chaudhur
|
||||
@@ -263,7 +269,6 @@ Panagiotis Koutsourakis
|
||||
Orhun Birsoy
|
||||
Ole-Morten Duesund
|
||||
Nicolas Brodu
|
||||
Neil Hughes
|
||||
Nathan Cournia
|
||||
Morten Haukness
|
||||
Mirko Viviani
|
||||
@@ -281,13 +286,11 @@ Matt Burke
|
||||
Mathia Walker
|
||||
Mason Menninger
|
||||
Martins Innus
|
||||
Martin Spott
|
||||
Martin Amueller
|
||||
Mario Guimaraes
|
||||
Marin Lavery
|
||||
Marco Lehmann
|
||||
Marcin Prus
|
||||
Maceij Krol
|
||||
Maciej Krol
|
||||
Lukas Diduch
|
||||
Louis Hamilton
|
||||
Lilin Xiong
|
||||
@@ -295,6 +298,7 @@ Lewis Harmon
|
||||
Lars Nilson
|
||||
Kyle Centers
|
||||
Kristopher Bixler
|
||||
Konstantin Sinitsyn
|
||||
Karsten Weiss
|
||||
Karl Heijdenberg
|
||||
Jutta Sauer
|
||||
@@ -306,24 +310,27 @@ John Donovan
|
||||
John Davis
|
||||
John Argentieri
|
||||
Joan Abadie
|
||||
Jeoen den Dekker
|
||||
Jeroen den Dekker
|
||||
Jean-Christophe Lombardo
|
||||
Jay Zuckerman
|
||||
Jason Howlett
|
||||
Jason Ballenger
|
||||
J.E. Hoffmann
|
||||
Humar Carmona
|
||||
Henrique Bucher
|
||||
Hautio Jari
|
||||
Guillaume Millet
|
||||
Graeme Harkness
|
||||
Glen Waldron
|
||||
Gian Lorenzetto
|
||||
George Papagiannakis
|
||||
Galen Faidley
|
||||
Frederic Bouvier
|
||||
Frank Warmerdam
|
||||
Frank Midgley
|
||||
Frank Lindeman
|
||||
Frank Lichtenheld
|
||||
Ferdinand Cornelissen
|
||||
Fajran Iman
|
||||
Fabien Dachicourt
|
||||
Emmanuel Roche
|
||||
Edmond Gheury
|
||||
|
||||
@@ -28,7 +28,7 @@ PROJECT(OpenSceneGraph)
|
||||
|
||||
SET(OPENSCENEGRAPH_MAJOR_VERSION 2)
|
||||
SET(OPENSCENEGRAPH_MINOR_VERSION 8)
|
||||
SET(OPENSCENEGRAPH_PATCH_VERSION 0)
|
||||
SET(OPENSCENEGRAPH_PATCH_VERSION 1)
|
||||
SET(OPENSCENEGRAPH_SOVERSION 55)
|
||||
|
||||
# set to 0 when not a release candidate, non zero means that any generated
|
||||
@@ -131,7 +131,7 @@ IF (OSG_MAINTAINER)
|
||||
|
||||
ADD_CUSTOM_TARGET(ChangeLog
|
||||
COMMAND ${SVNCOMMAND} update
|
||||
COMMAND ${GENERATELOGS}
|
||||
COMMAND ${GENERATELOGS} ${SVNSOURCEDIR}
|
||||
)
|
||||
|
||||
ENDIF(OSG_MAINTAINER)
|
||||
|
||||
@@ -55,12 +55,13 @@ ENDMACRO(FIND_DEPENDENCY DEPNAME INCLUDEFILE LIBRARY_NAMES SEARCHPATHLIST DEBUGS
|
||||
|
||||
MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
|
||||
FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D")
|
||||
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype234;freetype234MT;freetype235" ${OSG_3RDPARTY_BIN} "_D")
|
||||
FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype234;freetype234MT;freetype235;freetype237" ${OSG_3RDPARTY_BIN} "_D")
|
||||
IF(FREETYPE_FOUND)
|
||||
#forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
|
||||
SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
|
||||
SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
|
||||
SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
||||
SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "" FORCE)
|
||||
MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
|
||||
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
ENDIF(FREETYPE_FOUND)
|
||||
FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib" ${OSG_3RDPARTY_BIN} "D")
|
||||
FIND_DEPENDENCY(JPEG jpeglib.h libjpeg ${OSG_3RDPARTY_BIN} "D")
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
# require i386 so this is for the future
|
||||
IF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
|
||||
SET(SYSTEM_ARCH "i386")
|
||||
ELSE("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
|
||||
ELSE()
|
||||
SET(SYSTEM_ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
||||
ENDIF("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686")
|
||||
ENDIF()
|
||||
|
||||
# set a default system name - use CMake setting (Linux|Windows|...)
|
||||
SET(SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
||||
@@ -26,30 +26,34 @@ SET(SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
||||
IF(MSVC)
|
||||
IF(CMAKE_CL_64)
|
||||
SET(SYSTEM_NAME "win64")
|
||||
ELSE(CMAKE_CL_64)
|
||||
ELSE()
|
||||
SET(SYSTEM_NAME "win32")
|
||||
ENDIF(CMAKE_CL_64)
|
||||
ENDIF(MSVC)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
# Guess the compiler (is this desired for other platforms than windows?)
|
||||
IF(NOT DEFINED OSG_CPACK_COMPILER)
|
||||
INCLUDE(OsgDetermineCompiler)
|
||||
ENDIF(NOT DEFINED OSG_CPACK_COMPILER)
|
||||
ENDIF()
|
||||
|
||||
# expose the compiler setting to the user
|
||||
SET(OSG_CPACK_COMPILER "${OSG_COMPILER}" CACHE STRING "This ia short string (vc90, vc80sp1, gcc-4.3, ...) describing your compiler. The string is used for creating package filenames")
|
||||
|
||||
IF(OSG_CPACK_COMPILER)
|
||||
SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH}-${OSG_CPACK_COMPILER})
|
||||
ELSE(OSG_CPACK_COMPILER)
|
||||
ELSE()
|
||||
SET(OSG_CPACK_SYSTEM_SPEC_STRING ${SYSTEM_NAME}-${SYSTEM_ARCH})
|
||||
ENDIF(OSG_CPACK_COMPILER)
|
||||
ENDIF()
|
||||
|
||||
|
||||
## variables that apply to all packages
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${OPENSCENEGRAPH_VERSION}")
|
||||
|
||||
# these goes for all platforms. Setting these stops the CPack.cmake script from generating options about other package compression formats (.z .tz, etc.)
|
||||
SET(CPACK_GENERATOR "TGZ")
|
||||
IF(WIN32)
|
||||
SET(CPACK_GENERATOR "ZIP")
|
||||
ELSE()
|
||||
SET(CPACK_GENERATOR "TGZ")
|
||||
ENDIF()
|
||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
|
||||
|
||||
@@ -57,15 +61,15 @@ SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
IF(MSVC_IDE)
|
||||
SET(OSG_CPACK_CONFIGURATION "$(OutDir)")
|
||||
SET(PACKAGE_TARGET_PREFIX "Package ")
|
||||
ELSE(MSVC_IDE)
|
||||
ELSE()
|
||||
# on un*x an empty CMAKE_BUILD_TYPE means release
|
||||
IF(CMAKE_BUILD_TYPE)
|
||||
SET(OSG_CPACK_CONFIGURATION ${CMAKE_BUILD_TYPE})
|
||||
ELSE(CMAKE_BUILD_TYPE)
|
||||
ELSE()
|
||||
SET(OSG_CPACK_CONFIGURATION "Release")
|
||||
ENDIF(CMAKE_BUILD_TYPE)
|
||||
ENDIF()
|
||||
SET(PACKAGE_TARGET_PREFIX "package_")
|
||||
ENDIF(MSVC_IDE)
|
||||
ENDIF()
|
||||
|
||||
# Get all defined components
|
||||
GET_CMAKE_PROPERTY(CPACK_COMPONENTS_ALL COMPONENTS)
|
||||
@@ -74,7 +78,7 @@ IF(NOT CPACK_COMPONENTS_ALL)
|
||||
# I set it manually to be the packages that can always be packaged
|
||||
MESSAGE("When building packages please consider using cmake version 2.6.1 or above")
|
||||
SET(CPACK_COMPONENTS_ALL libopenscenegraph libopenthreads openscenegraph libopenscenegraph-dev libopenthreads-dev)
|
||||
ENDIF(NOT CPACK_COMPONENTS_ALL)
|
||||
ENDIF()
|
||||
|
||||
# Create a target that will be used to generate all packages defined below
|
||||
SET(PACKAGE_ALL_TARGETNAME "${PACKAGE_TARGET_PREFIX}ALL")
|
||||
@@ -86,12 +90,12 @@ MACRO(GENERATE_PACKAGING_TARGET package_name)
|
||||
# the doc packages don't need a system-arch specification
|
||||
IF(${package} MATCHES -doc)
|
||||
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION})
|
||||
ELSE(${package} MATCHES -doc)
|
||||
ELSE()
|
||||
SET(OSG_PACKAGE_FILE_NAME ${package_name}-${OPENSCENEGRAPH_VERSION}-${OSG_CPACK_SYSTEM_SPEC_STRING}-${OSG_CPACK_CONFIGURATION})
|
||||
IF(NOT DYNAMIC_OPENSCENEGRAPH)
|
||||
SET(OSG_PACKAGE_FILE_NAME ${OSG_PACKAGE_FILE_NAME}-static)
|
||||
ENDIF(NOT DYNAMIC_OPENSCENEGRAPH)
|
||||
ENDIF(${package} MATCHES -doc)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
CONFIGURE_FILE("${OpenSceneGraph_SOURCE_DIR}/CMakeModules/OsgCPackConfig.cmake.in" "${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake" IMMEDIATE)
|
||||
|
||||
@@ -100,25 +104,32 @@ MACRO(GENERATE_PACKAGING_TARGET package_name)
|
||||
# This is naive and will probably need fixing eventually
|
||||
IF(MSVC)
|
||||
SET(MOVE_COMMAND "move")
|
||||
ELSE(MSVC)
|
||||
ELSE()
|
||||
SET(MOVE_COMMAND "mv")
|
||||
ENDIF(MSVC)
|
||||
ENDIF()
|
||||
|
||||
# Set in and out archive filenames. Windows = zip, others = tar.gz
|
||||
IF(WIN32)
|
||||
SET(ARCHIVE_EXT "zip")
|
||||
ELSE()
|
||||
SET(ARCHIVE_EXT "tar.gz")
|
||||
ENDIF()
|
||||
|
||||
# Create a target that creates the current package
|
||||
# and rename the package to give it proper filename
|
||||
ADD_CUSTOM_TARGET(${PACKAGE_TARGETNAME})
|
||||
ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_TARGETNAME}
|
||||
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
||||
COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.tar.gz" "${OSG_PACKAGE_FILE_NAME}.tar.gz"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.tar.gz -> ${OSG_PACKAGE_FILE_NAME}.tar.gz"
|
||||
COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}" "${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT} -> ${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
|
||||
COMMENT "Run CPack packaging for ${package_name}..."
|
||||
)
|
||||
# Add the exact same custom command to the all package generating target.
|
||||
# I can't use add_dependencies to do this because it would allow parallell building of packages so am going brute here
|
||||
ADD_CUSTOM_COMMAND(TARGET ${PACKAGE_ALL_TARGETNAME}
|
||||
COMMAND ${CMAKE_CPACK_COMMAND} -C ${OSG_CPACK_CONFIGURATION} --config ${OpenSceneGraph_BINARY_DIR}/CPackConfig-${package_name}.cmake
|
||||
COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.tar.gz" "${OSG_PACKAGE_FILE_NAME}.tar.gz"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.tar.gz -> ${OSG_PACKAGE_FILE_NAME}.tar.gz"
|
||||
COMMAND "${MOVE_COMMAND}" "${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}" "${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "renamed ${CPACK_PACKAGE_FILE_NAME}.${ARCHIVE_EXT} -> ${OSG_PACKAGE_FILE_NAME}.${ARCHIVE_EXT}"
|
||||
)
|
||||
ENDMACRO(GENERATE_PACKAGING_TARGET)
|
||||
|
||||
@@ -130,4 +141,4 @@ GENERATE_PACKAGING_TARGET(openscenegraph-all)
|
||||
FOREACH(package ${CPACK_COMPONENTS_ALL})
|
||||
SET(OSG_CPACK_COMPONENT ${package})
|
||||
GENERATE_PACKAGING_TARGET(${package})
|
||||
ENDFOREACH(package ${CPACK_COMPONENTS_ALL})
|
||||
ENDFOREACH()
|
||||
|
||||
718
ChangeLog
718
ChangeLog
@@ -1,3 +1,721 @@
|
||||
2009-05-19 16:05 robert
|
||||
|
||||
* CMakeLists.txt, NEWS.txt, README.txt: Updated dates and reset
|
||||
release candidate back to 0 for final 2.8.1 release
|
||||
|
||||
2009-05-18 16:02 robert
|
||||
|
||||
* AUTHORS.txt, CMakeLists.txt, ChangeLog, NEWS.txt, README.txt:
|
||||
Updated ChangeLog, NEWS, README and AUTHORS files for rc5.
|
||||
|
||||
2009-05-18 15:49 robert
|
||||
|
||||
* src/osgUtil/RenderStage.cpp: Merged changed from svn/trunk,
|
||||
improving the reliability of the clear of the stencil and depth
|
||||
buffer.
|
||||
|
||||
2009-05-18 14:53 robert
|
||||
|
||||
* include/osg, include/osg/BoundingSphere, include/osg/ImageUtils,
|
||||
include/osg/Vec2b, include/osg/Vec3b, include/osg/Vec4b,
|
||||
include/osg/Vec4ub, src/osgWrappers/osg/Vec2b.cpp,
|
||||
src/osgWrappers/osg/Vec3b.cpp, src/osgWrappers/osg/Vec4b.cpp,
|
||||
src/osgWrappers/osg/Vec4ub.cpp: From Paul Obermeier, "Please find
|
||||
enclosed some changed OSG header files.
|
||||
The changes are more or less just beautifications
|
||||
(when looked at them from the C++ view), but make
|
||||
wrapping OSG with SWIG easier.
|
||||
I have tested the changes with both 2.8.1-rc4 and the
|
||||
current head and would appreciate to incorporate the
|
||||
changes in both branches.
|
||||
|
||||
Here is a description of the changes:
|
||||
|
||||
osg/BoundingSphere:
|
||||
Use the following typedef (like used in BoundingBox)
|
||||
typedef typename VT::value_type value_type;
|
||||
instead of
|
||||
typedef typename vec_type::value_type value_type;
|
||||
|
||||
SWIG reports errors on the latter construct.
|
||||
Also makes it consistent with BoundingBox.
|
||||
|
||||
|
||||
osg/Vec4ub:
|
||||
Consistent use of "value_type" throughout the file.
|
||||
|
||||
|
||||
osg/Vec?b:
|
||||
Consistent use of "value_type" throughout the files.
|
||||
|
||||
Also changed
|
||||
typedef char value_type;
|
||||
to
|
||||
typedef signed char value_type;
|
||||
|
||||
In the case of a simple "char", SWIG assumes a string.
|
||||
Using "signed char" instead of "char" does not change
|
||||
the behaviour of the class."
|
||||
|
||||
2009-05-18 12:56 robert
|
||||
|
||||
* src/osgTerrain, src/osgTerrain/Layer.cpp: From Ross Anderson,
|
||||
"Symptom: The computation of TerrainTiles containing only image
|
||||
layers (no elevation layer) is incorrect. The resulting bounding
|
||||
sphere will always have a radius of zero.
|
||||
|
||||
The fix is to remove the call to bs.expandBy(v) and compute the
|
||||
radius directly. I believe this call was intended to be
|
||||
bs.expandRadiusBy(v), but it is superfluous when the radius is
|
||||
computed directly.
|
||||
"
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 10229:10230
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgTerrain
|
||||
|
||||
2009-05-15 15:13 robert
|
||||
|
||||
* src/osgPlugins/curl, src/osgPlugins/curl/ReaderWriterCURL.cpp:
|
||||
Merged from svn/trunk libcurl version checks to enable build
|
||||
against older versions of libcurl.
|
||||
|
||||
svn merge -r 10221:10222
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/curl/
|
||||
|
||||
2009-05-15 12:37 robert
|
||||
|
||||
* src/OpenThreads/pthreads, src/OpenThreads/pthreads/PThread.c++:
|
||||
Removed redundent errno and version string declaration
|
||||
|
||||
2009-05-15 09:25 robert
|
||||
|
||||
* ChangeLog, NEWS.txt, README.txt: Updated ChangeLog and dates for
|
||||
2.8.0-rc4
|
||||
|
||||
2009-05-14 17:26 robert
|
||||
|
||||
* NEWS.txt, README.txt: Updated dates
|
||||
|
||||
2009-05-14 17:25 robert
|
||||
|
||||
* AUTHORS.txt, ChangeLog: Updated ChangeLog and AUTHOR file
|
||||
|
||||
2009-05-14 17:18 robert
|
||||
|
||||
* applications/osgversion/CMakeLists.txt,
|
||||
applications/osgversion/Contributors.cpp,
|
||||
applications/osgversion/osgversion.cpp: Moved the Contributors
|
||||
generation code out into a separate source file that is only
|
||||
compiled when OSG_MAINTAINER is enable via ccamke. This has been
|
||||
done to prevent build issues on some machines with compilers that
|
||||
chose a different local to the one that the contributors names
|
||||
are encoded.
|
||||
|
||||
2009-05-13 08:35 robert
|
||||
|
||||
* src/OpenThreads/win32, src/OpenThreads/win32/Win32Thread.cpp:
|
||||
From Thibault Genessay, "On Windows, when a process tries to
|
||||
spawn one too many thread,
|
||||
_beginthreadex() fails but OpenThreads still waits on the startup
|
||||
Block before returning to the caller of
|
||||
OpenThreads::Thread::start().
|
||||
This causes a deadlock. The return value of _beginthreadex() is
|
||||
actually checked, but after the call to
|
||||
OpenThreads::Block::block() so
|
||||
it is basically useless.
|
||||
|
||||
Attached is a fix to move the check for the return value of
|
||||
_beginthreadex() before the call to block(), so that start() can
|
||||
return to the caller with a non-zero error code. This solves the
|
||||
problem for me."
|
||||
|
||||
Merged from svn trunk using:
|
||||
|
||||
svn merge -r 10190:10191
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/OpenThreads/win32
|
||||
|
||||
2009-05-12 11:15 robert
|
||||
|
||||
* ChangeLog, NEWS.txt, README.txt: Updated ChangeLog and
|
||||
NEWS/READER for release candidate
|
||||
|
||||
2009-05-12 11:12 robert
|
||||
|
||||
* src/osgWrappers/osgUtil/IntersectVisitor.cpp: Updated wrappers
|
||||
|
||||
2009-05-12 10:49 robert
|
||||
|
||||
* src/osgWidget, src/osgWidget/WindowManager.cpp: From Fajran Iman
|
||||
Rusadi, fixed to handling of widget indices in insert and remove
|
||||
methods. Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 10181:10182
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgWidget
|
||||
|
||||
2009-05-08 12:38 robert
|
||||
|
||||
* src/osgViewer/GraphicsWindowWin32.cpp: Added initializer for
|
||||
_mouseCursor
|
||||
|
||||
2009-05-08 07:49 robert
|
||||
|
||||
* src/osgViewer/GraphicsWindowWin32.cpp: From Neil Groves, fixed
|
||||
unitialized variable
|
||||
|
||||
2009-05-07 15:59 robert
|
||||
|
||||
* CMakeLists.txt: Updated release candidate to 4.
|
||||
|
||||
2009-05-07 15:14 robert
|
||||
|
||||
* src/osgViewer/GraphicsWindowWin32.cpp: From Frederic Bouvier,
|
||||
workaround of setCursor problems under Windows.
|
||||
|
||||
2009-05-07 14:58 robert
|
||||
|
||||
* src/osg/GraphicsContext.cpp: Fixed ABSOLUTE_RF slave camera
|
||||
resize policy, merged from svn trunk using:
|
||||
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/
|
||||
|
||||
2009-05-07 13:24 robert
|
||||
|
||||
* src/osgDB, src/osgDB/CMakeLists.txt, src/osgDB/DatabasePager.cpp,
|
||||
src/osgDB/Registry.cpp: From Stephan Huber, "while debugging a
|
||||
problem in finding plugins on OS X I discovered, that
|
||||
the conditional directives for setting the prepend-string in
|
||||
createLibraryNameForExtension were not in effect, because of the
|
||||
mixture
|
||||
of different #ifdef styles.
|
||||
|
||||
I removed the conditional part for __APPLE__ completely to be
|
||||
more
|
||||
standard-conform with other platforms (plugins should be located
|
||||
in
|
||||
osgPlugins-X.X.X/). Because of the wrong syntax of the
|
||||
conditional
|
||||
compile the old code was not used anyway -- so no functional
|
||||
change.
|
||||
"
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 10149:10150
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgDB
|
||||
|
||||
2009-05-07 13:18 robert
|
||||
|
||||
* src/osgViewer, src/osgViewer/GraphicsWindowWin32.cpp: From Chris
|
||||
Denham, fix for swapBuffers warning when window is minimized
|
||||
under Windows.
|
||||
|
||||
|
||||
svn merge -r 10146:10147
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgViewer/
|
||||
|
||||
2009-05-07 09:47 robert
|
||||
|
||||
* src/osgPlugins/pdf, src/osgPlugins/pdf/CMakeLists.txt: Fixed name
|
||||
of POPPLER_LIBRARY_DIRS, merged from svn trunk using svn merge -r
|
||||
10143:10144
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/pdf
|
||||
|
||||
2009-05-05 12:56 robert
|
||||
|
||||
* src/osgPlugins/osgVolume,
|
||||
src/osgPlugins/osgVolume/ImageLayer.cpp,
|
||||
src/osgPlugins/osgVolume/RayTracedTechnique.cpp: Merged from
|
||||
svn/trunk support for searching for imagery in path relative to
|
||||
the .osg file being loaded. Merged using:
|
||||
|
||||
svn merge -r 10100:10137
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/osgVolume
|
||||
|
||||
2009-05-05 12:54 robert
|
||||
|
||||
* src/osgVolume, src/osgVolume/FixedFunctionTechnique.cpp,
|
||||
src/osgVolume/RayTracedTechnique.cpp,
|
||||
src/osgVolume/Shaders/volume_iso_frag.cpp,
|
||||
src/osgVolume/VolumeTile.cpp: Merged improvements to osgVolume
|
||||
from svn/trunk using :
|
||||
|
||||
svn merge -r 10100:10137
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgVolume
|
||||
|
||||
2009-04-24 17:52 robert
|
||||
|
||||
* include/osgUtil/IntersectVisitor: Changed doxygen docs to
|
||||
indicate deprecated status with suggestion of IntersectionVisitor
|
||||
instead.
|
||||
|
||||
2009-04-24 10:56 robert
|
||||
|
||||
* src/osgPlugins/mdl, src/osgPlugins/mdl/VTXReader.cpp: From Jason
|
||||
Daly, "Currently, the .mdl plugin loads vertices in the native
|
||||
DirectX order, which is the reverse of OpenGL order. This means
|
||||
that the back faces are currently rendered as front faces, and
|
||||
vice versa.
|
||||
|
||||
This fix reverses the vertex order and sets up proper OpenGL
|
||||
facing. I didn't notice this problem until I started using the
|
||||
plug-in in my own code (osgviewer seems to not enable backface
|
||||
culling)."
|
||||
|
||||
merged from svn/trunk using:
|
||||
|
||||
svn merge -r 10092:10093
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/mdl/
|
||||
|
||||
2009-04-23 15:11 robert
|
||||
|
||||
* NEWS.txt: Fixed typo
|
||||
|
||||
2009-04-23 13:46 robert
|
||||
|
||||
* AUTHORS.txt, ChangeLog, NEWS.txt, README.txt: Update ChnageLog,
|
||||
dates and authors for 2.8.1-rc3
|
||||
|
||||
2009-04-23 13:27 robert
|
||||
|
||||
* CMakeLists.txt: Updated release candidate number
|
||||
|
||||
2009-04-23 11:08 robert
|
||||
|
||||
* src/osgPlugins/OpenFlight,
|
||||
src/osgPlugins/OpenFlight/Document.cpp,
|
||||
src/osgPlugins/OpenFlight/Document.h,
|
||||
src/osgPlugins/OpenFlight/GeometryRecords.cpp: Fix to handling of
|
||||
subsurface layers so that more appropriate PolygonOffset values
|
||||
are chosen. Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 10083:10084
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/
|
||||
|
||||
2009-04-23 11:07 robert
|
||||
|
||||
* src/osg/PolygonOffset.cpp: Merged from svn trunk using:
|
||||
|
||||
svn merge -r 10082:10083
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osg/PolygonOffset.cpp
|
||||
|
||||
2009-04-22 13:54 robert
|
||||
|
||||
* applications/osgversion/osgversion.cpp: Fixed typo.
|
||||
|
||||
2009-04-22 13:09 robert
|
||||
|
||||
* src/osgPlugins/dae/daeWriter.h: From Bob Kuehne, "fix for failing
|
||||
collada builds on osx due to not being able to stringstreamify
|
||||
osg::Vec3 without io_utils included."
|
||||
|
||||
2009-04-22 10:56 robert
|
||||
|
||||
* examples, examples/osgcluster/broadcaster.cpp,
|
||||
examples/osgmanipulator/osgmanipulator.cpp,
|
||||
examples/osgscreencapture/osgscreencapture.cpp: From Paul Martz,
|
||||
"Looks like the people who created these two examples were a bit
|
||||
careless with cut and paste."
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 10063:10064
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/examples/
|
||||
|
||||
2009-04-22 10:49 robert
|
||||
|
||||
* src/osg/Image.cpp: From Eric Sokolowsky, "src/osg/Image.cpp is
|
||||
missing the GL_RGBA8 image type when calculating the number of
|
||||
components in an image. It is added here."
|
||||
|
||||
Merged from svn trunk using:
|
||||
|
||||
svn merge -r 10061:10062
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osg/Image.cpp
|
||||
|
||||
2009-04-21 10:20 robert
|
||||
|
||||
* src/osgDB/DatabasePager.cpp: Fix for handling case of no graphics
|
||||
contexts being registered.
|
||||
|
||||
Merged from svn/trunk using:
|
||||
svn merge -r 10053:10054
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgDB/DatabasePager.cpp
|
||||
|
||||
2009-04-12 18:58 robert
|
||||
|
||||
* CMakeLists.txt, NEWS.txt, README.txt: Updated dates for 2.8.1-rc2
|
||||
|
||||
2009-04-12 18:53 robert
|
||||
|
||||
* CMakeLists.txt, ChangeLog,
|
||||
applications/osgversion/osgversion.cpp: Updated CMakeLists.txt
|
||||
ChangeLog generator so that it tracks the current branch or
|
||||
svn/trunk to prevent branches generating logs for svn/trunk.
|
||||
|
||||
Updated osgversion's authors mapping.
|
||||
|
||||
Updated ChangeLog.
|
||||
|
||||
2009-04-12 10:29 robert
|
||||
|
||||
* src/osg/GraphicsThread.cpp: Added release from svn/trunk to
|
||||
enable osgCompute.
|
||||
|
||||
2009-04-10 21:25 robert
|
||||
|
||||
* NEWS.txt: Updated NEWS for 2.8.1-rc1
|
||||
|
||||
2009-04-10 14:35 robert
|
||||
|
||||
* README.txt: UPdated date
|
||||
|
||||
2009-04-10 12:56 robert
|
||||
|
||||
* AUTHORS.txt, ChangeLog: Update ChangeLog and AUTHORS.txt file for
|
||||
2.8.1-rc1
|
||||
|
||||
2009-04-10 12:54 robert
|
||||
|
||||
* applications/osgversion/osgversion.cpp: Merged changes from
|
||||
svn/trunk
|
||||
|
||||
2009-04-10 10:58 robert
|
||||
|
||||
* CMakeLists.txt, include/osg/Version: Updater version numbers to
|
||||
2.8.1-rc1
|
||||
|
||||
2009-04-10 09:43 robert
|
||||
|
||||
* LICENSE.txt: From J.P. Delport, spelling and grammer fixes
|
||||
|
||||
2009-04-09 15:56 robert
|
||||
|
||||
* CMakeModules/OsgCPack.cmake: From Mattias Helsing, "
|
||||
* Use the CPack ZIP generator on windows (WIN32)
|
||||
* Reformatted according to Philip Lowman's recent submissions"
|
||||
|
||||
2009-04-08 10:50 robert
|
||||
|
||||
* src/osgUtil/Optimizer.cpp: From Glen Waldron, "Attached is a
|
||||
patch for osgUtil::Optimizer. If you run the
|
||||
SpatializeGroupsVisitor on a scene graph containing Geodes,
|
||||
StateSets attached to Geodes can be lost.
|
||||
|
||||
The problem is in SpatializeGroupsVisitor::divide(osg::Geode*,
|
||||
unsigned int) where the code creates a new Group and divides up
|
||||
the input Geode into one Geode per Drawable.
|
||||
|
||||
I fixed the problem by assigning the Geode's stateset to the new
|
||||
parent group.
|
||||
|
||||
To replicate the bug, see attached osg/dds files:
|
||||
|
||||
osgviewer b.osg -- model renders correctly
|
||||
set OSG_OPTIMIZER="SPATIALIZE_GROUPS"
|
||||
osgviewer b.osg -- textures are missing."
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9986:9987
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgUtil/Optimizer.cpp
|
||||
|
||||
2009-04-06 12:29 robert
|
||||
|
||||
* src/osgTerrain/GeometryTechnique.cpp: Added disabling of
|
||||
mipmapping for non power of two textures
|
||||
|
||||
2009-04-06 11:27 robert
|
||||
|
||||
* src/osgTerrain/GeometryTechnique.cpp: Merged from svn/trunk
|
||||
disabling of use of display lists and a extra check against NULL
|
||||
to prevent a crash when NULL colour layers are assigned
|
||||
|
||||
2009-04-03 11:29 robert
|
||||
|
||||
* src/osg/Drawable.cpp: Merged fix in svn/trunk that avoids the
|
||||
building of display lists when VBO's are compiled.
|
||||
|
||||
2009-03-26 10:25 robert
|
||||
|
||||
* src/osg/Texture.cpp: Merged fixes to the texture compression
|
||||
settings from svn/trunk that don't change the
|
||||
requested compression type when the pixel type is not a direct
|
||||
match.
|
||||
|
||||
2009-03-23 16:26 robert
|
||||
|
||||
* src/osgPlugins/dae/daeRGeometry.cpp,
|
||||
src/osgPlugins/dae/daeRMaterials.cpp,
|
||||
src/osgPlugins/dae/daeReader.h: From Michael Platings, fixed
|
||||
memory leak
|
||||
|
||||
2009-03-12 17:57 robert
|
||||
|
||||
* src/osgDB/CMakeLists.txt: From Frank Midgley, "I tried running
|
||||
osgconv --formats yesterday on OS X and got no results. Turns out
|
||||
the changes discussed in the "osgDB::listAllAvailablePlugins
|
||||
win32 fix" thread back in Sep '08 broke this. The
|
||||
OSG_PLUGIN_EXTENSION macro is being defined in
|
||||
src/osgDB/CMakeLists.txt from CMAKE_SHARED_LIBRARY_SUFFIX which
|
||||
is "dylib" on OS X. The problem is that all of the plug-ins are
|
||||
setup in OsgMacroUtils.cmake with:
|
||||
|
||||
ADD_LIBRARY(${TARGET_TARGETNAME} MODULE ${TARGET_SRC}
|
||||
${TARGET_H})
|
||||
|
||||
which gives them .so extensions. Since ".so" != ".dylib"
|
||||
osgDB::listAllAvailablePlugins finds no plug-ins. I believe the
|
||||
correct solution is to use CMAKE_SHARED_MODULE_SUFFIX instead.
|
||||
This builds and runs correctly on OS X but I have not tested on
|
||||
other platforms.
|
||||
|
||||
Attached is an updated src/osgDB/CMakeLists.txt based on rev
|
||||
9915. The change is at line 108. To validate: build and then run
|
||||
bin/osgconv --formats. You should get many screenfuls of plug-in
|
||||
features, extensions and options."
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9921:9922
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgDB/CMakeLists.txt
|
||||
|
||||
2009-03-12 17:51 robert
|
||||
|
||||
* src/osgUtil/Optimizer.cpp: From Konstantin Sinitsyn, "At this
|
||||
moment, I just introducing to OSG. When I reviewing optimizer
|
||||
code, I find a mistake in
|
||||
Optimizer::RemoveLoadedProxyNodesVisitor, as it seems. This
|
||||
optimizer removes proxy nodes that fully loaded and in some cases
|
||||
attach their childs to parrents directly (without creating of
|
||||
group). I dont understand how this works, because if proxy node
|
||||
doesn't have any attributes such as name, description, node mask
|
||||
and any callbacks, then new group does not created to hold proxy
|
||||
node childs. And code below trying to attach their children to
|
||||
all parents but seems like only first child beeing attached to
|
||||
all parents correctly."
|
||||
|
||||
Merged from svn/trunk using:
|
||||
svn merge -r 9919:9920
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgUtil/Optimizer.cpp
|
||||
|
||||
2009-03-11 13:31 robert
|
||||
|
||||
* src/osgPlugins/3ds/ReaderWriter3DS.cpp: From Neil Hughes, changed
|
||||
the handling of opacity maps so that when they are used blending
|
||||
in enabled. Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9905:9906
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/3ds/ReaderWriter3DS.cpp
|
||||
|
||||
2009-03-11 12:42 robert
|
||||
|
||||
* src/osgUtil/Optimizer.cpp: From Lionel Lagarde, "the attachment
|
||||
contains a correction of the Optimizer::MergeGeometryVisitor.
|
||||
When 2 geometries are merged, the primitive sets of the second
|
||||
geometry
|
||||
are copied to the first geometry.
|
||||
|
||||
The primitive sets were copied with a std::insert into the first
|
||||
geometry
|
||||
primitive set vector. It doesn't work when the geometry is using
|
||||
VBOs (because
|
||||
the element buffer object of the primitive set is not updated).
|
||||
|
||||
The correction replaces
|
||||
|
||||
lhs.getPrimitiveSetList().insert(
|
||||
lhs.getPrimitiveSetList().end(),
|
||||
rhs.getPrimitiveSetList().begin(),
|
||||
rhs.getPrimitiveSetList().end() );
|
||||
|
||||
by
|
||||
for( primItr=rhs.getPrimitiveSetList().begin();
|
||||
primItr!=rhs.getPrimitiveSetList().end();
|
||||
++primItr )
|
||||
{
|
||||
lhs.addPrimitiveSet(primItr->get());
|
||||
}
|
||||
"
|
||||
|
||||
2009-03-11 12:02 robert
|
||||
|
||||
* src/osg/Geometry.cpp: Fix to crash due to indices being present
|
||||
witout any associated arrays. Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9899:9900
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osg/Geometry.cpp
|
||||
|
||||
2009-03-11 11:03 robert
|
||||
|
||||
* src/osg/Drawable.cpp, src/osg/ImageUtils.cpp, src/osg/Node.cpp:
|
||||
From Lionel Lagarde, "The copy constructor of the nodes and the
|
||||
drawables do :
|
||||
|
||||
Node::Node(Node &node, copyop) :
|
||||
_stateSet(copyop(node.getStateSet()),
|
||||
|
||||
It doesn't call the setStateSet method of osg::Node (or
|
||||
osg::Drawable). So the parent
|
||||
list of the state set is not updated with the new node
|
||||
(drawable)."
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9896:9897
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osg/Drawable.cpp
|
||||
svn merge -r 9896:9897
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osg/Node.cpp
|
||||
|
||||
2009-03-10 11:56 robert
|
||||
|
||||
* include/osg/GLU, include/osg/Math: From Martin Spott, fixes for
|
||||
IBM AIX build. Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9881:9882
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/include/osg/
|
||||
|
||||
2009-03-02 10:51 robert
|
||||
|
||||
* src/OpenThreads/win32, src/OpenThreads/win32/Win32Thread.cpp,
|
||||
src/OpenThreads/win32/Win32ThreadPrivateData.h: From Mathias
|
||||
Froehlich, "An other one:
|
||||
The TLS Varialbe is accessed before it is initialized.
|
||||
Attached is a change to rev 9791."
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9831:9832
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/OpenThreads/win32
|
||||
|
||||
2009-03-02 09:59 robert
|
||||
|
||||
* examples/osgcluster/broadcaster.cpp: From Petr Salinger, build
|
||||
fix for GNU/kFreeBSD.
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9827:9828
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/examples/osgcluster/broadcaster.cpp
|
||||
|
||||
2009-02-27 11:14 robert
|
||||
|
||||
* src/osgViewer/GraphicsWindowWin32.cpp: From Roland Smeenk,
|
||||
"Attached is a small bug fix for the redundant messages that are
|
||||
created in OSG applications on windows.
|
||||
GraphicsWindowWin32::setCursor is called every frame from the
|
||||
WM_NCHITTEST message. This will result in a call to
|
||||
::SetCursor(_currentCursor) every frame, which again causes a
|
||||
WM_MOUSEMOVE to occur. The fix exits
|
||||
GraphicsWindowWin32::setCursor if the requested cursor already is
|
||||
the current cursor.
|
||||
|
||||
"
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9823:9824
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowWin32.cpp
|
||||
|
||||
2009-02-27 10:50 robert
|
||||
|
||||
* src/osgUtil/RenderStage.cpp: From Atr Tevs, fixes to FBO
|
||||
blitting. Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9821:9822
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgUtil/RenderStage.cpp
|
||||
|
||||
2009-02-26 22:10 robert
|
||||
|
||||
* CMakeModules/Find3rdPartyDependencies.cmake: From Mattias
|
||||
Helsing, "
|
||||
In file
|
||||
"/home/robert/OpenSceneGraph/CMakeModules//Find3rdPartyDependencies.cmake":
|
||||
------------------------------
|
||||
64: SET(FREETYPE_INCLUDE_DIRS
|
||||
"${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
|
||||
"
|
||||
|
||||
2009-02-20 17:28 robert
|
||||
|
||||
* applications/osgarchive/osgarchive.cpp: From Mathieu Marache, "I
|
||||
was trying to use the archive output of osgdem without success
|
||||
when
|
||||
I eventually found out that it was now disabled (the mailing list
|
||||
archive tells me it is because of multithreaded write issues with
|
||||
vpn). I then decided to use osgarchive to make it myself from the
|
||||
generated output. However if one of the insert parameters is a
|
||||
directory, it won't be able to find them. The attached versions
|
||||
corrects this"
|
||||
|
||||
2009-02-20 11:41 robert
|
||||
|
||||
* src/osgPlugins/dxf, src/osgPlugins/dxf/dxfEntity.cpp: From Humar
|
||||
Carmona, "When reading a DXF file, the reader breaks at a debug
|
||||
assertion at vector (it breaks on release version). Inspecting
|
||||
the code show that the cause could be in dxfEntity.cpp.
|
||||
|
||||
It seems that the problem is an offending "short" used in a for
|
||||
loop, where it should be "int" or "long". It causes an index out
|
||||
of range error. "
|
||||
|
||||
Merged from svn trunk using:
|
||||
svn merge -r 9803:9804
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/dxf/dxfEntity.cpp
|
||||
|
||||
2009-02-19 17:40 robert
|
||||
|
||||
* src/osgPlugins/hdr/hdrloader.cpp: Fixed bug in checking of return
|
||||
values. Fix merged in from svn/trunk using:
|
||||
|
||||
svn merge -r 9800:9801
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osgPlugins/hdr/hdrloader.cpp
|
||||
|
||||
2009-02-19 16:36 robert
|
||||
|
||||
* src/osg/State.cpp: From Tanguy Fautre, This fixes the OSG crashes
|
||||
reported by
|
||||
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-February/023499.html
|
||||
|
||||
It's a one line change against OSG 2.8.0 (see line 196). I've
|
||||
already tested the change, and confirmed it\u2019s fixing the
|
||||
crashes described above."
|
||||
|
||||
merged from svn trunk using:
|
||||
|
||||
svn merge -r 9797:9798
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osg/State.cpp
|
||||
|
||||
2009-02-19 16:00 robert
|
||||
|
||||
* src/osg/PrimitiveSet.cpp: From Ruben Smelik, "I've found a
|
||||
(copy-paste?) error in PrimitiveSet.cpp regarding instanced
|
||||
drawing. For DrawElementsUInt and DrawElementsUShort the type
|
||||
argument of glDrawElementsInstanced was set as GL_BYTE instead of
|
||||
GL_UNSIGNED_INT and GL_UNSIGNED_SHORT. I've attached the fixed
|
||||
source file (based on the current SVN head version)."
|
||||
|
||||
Merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9795:9796
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk/src/osg/
|
||||
|
||||
2009-02-19 15:38 robert
|
||||
|
||||
* src/OpenThreads/CMakeLists.txt: merged from svn/trunk using:
|
||||
|
||||
svn merge -r 9793:9794
|
||||
http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk
|
||||
|
||||
2009-02-19 13:44 robert
|
||||
|
||||
* NEWS.txt: Fixed number of contributors
|
||||
|
||||
2009-02-12 14:46 robert
|
||||
|
||||
* ChangeLog: Updated ChangeLog for 2.8.0
|
||||
|
||||
2009-02-12 14:35 robert
|
||||
|
||||
* examples/osgviewerQT/QOSGWidget.cpp: Compiled fix
|
||||
|
||||
@@ -13,8 +13,9 @@
|
||||
under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0
|
||||
or later.
|
||||
|
||||
Notes: the OSGPL is based on the LGPL, with the 4 exceptions laid in the wxWindows
|
||||
section below. The LGPL in the final section of this license.
|
||||
Notes: the OSGPL is based on the LGPL, with the 4 exceptions laid
|
||||
out in the wxWindows section below. The LGPL is contained in the
|
||||
final section of this license.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -187,7 +188,7 @@ modification follow. Pay close attention to the difference between a
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
|
||||
30
NEWS.txt
30
NEWS.txt
@@ -1,14 +1,34 @@
|
||||
OSG News
|
||||
========
|
||||
|
||||
= !OpenSceneGraph 2.8 release adds osgAnimation and osgVolume libraries, DICOM support, LispSM shadowing and much more. =
|
||||
= !OpenSceneGraph 2.8.1 release - bug fix release =
|
||||
|
||||
PERTHSHIRE, Scotland - 12th February 2009 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.8, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.8 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.8 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||
PERTHSHIRE, Scotland - 19th May 2009 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.8.1, the industry's leading open-source scene graph technology, designed to accelerate application development and improve 3D graphics performance. !OpenSceneGraph 2.8 written entirely in Standard C++ and built upon OpenGL, offers developers working in the visual simulation, game development, virtual reality, scientific visualization and modeling markets - a real-time visualization tool which eclipses commercial scene graph toolkits in functionality, stability and performance. !OpenSceneGraph 2.8 runs on all Microsoft Windows platforms, Apple OS/X, GNU/Linux, IRIX, Solaris, HP-UX, AIX and FreeBSD operating systems.
|
||||
|
||||
=== Open-source development delivers industry-leading features and performance ===
|
||||
The !OpenSceneGraph 2.8 release is the culmination of 10 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||
The !OpenSceneGraph 2.8.1 release is the culmination of 10 years of work by the lead developers and the open-source community that has grown up around the project. The real-time graphics industry and academia embraced it from the very beginning, deploying it in real-world applications, and actively participating in its development, testing and refinement. The end result is a high-quality library with a feature set relevant to application developers' needs.
|
||||
|
||||
=== Updates include: ===
|
||||
=== Updates between 2.8.1 and 2.8.0 releases include: ===
|
||||
|
||||
* Build fixes under FreeBSD and IBM AIX, and RedHat Enterprise Linux.
|
||||
* Improved compatibility with SWIG wrapper building
|
||||
* Crash fixes in osg::State, osg::Geometry and osgWidget.
|
||||
* Bug fixes to :
|
||||
* draw instanced support
|
||||
* Optimizer - MergeGeometryVisitor, RemoveLoadedProxyNodesVisitor and SpatializeGroupsVistor
|
||||
* hdr image loader
|
||||
* handling of opacity maps in 3ds loader
|
||||
* dxf loader
|
||||
* frame buffer object
|
||||
* cursor/event handling in windows
|
||||
* windows threading
|
||||
* memory leak in Collada loader
|
||||
* fixes to display lists/vbo creation that prevent crash under ATI drivers
|
||||
* subface PolygonOffset setting in OpenFlight
|
||||
* osgconv --formats under OSX
|
||||
* osgTerrain::Layer bounding volume calculation.
|
||||
|
||||
=== Updates between 2.8 and 2.6 include: ===
|
||||
|
||||
* New osgVolume library for volume rendering, with support for:
|
||||
* High quality GPU based Ray tracing
|
||||
@@ -57,7 +77,7 @@ The !OpenSceneGraph Quick Start Guide is now available in Chinese as well as Eng
|
||||
=== Community support and contributions ===
|
||||
The diverse and growing community of over 2000 developers is centred around the public osg-users mailing list, where members discuss how best to use !OpenSceneGraph, provide mutual support, and coordinate development of new features and bug fixes. Members of this community come from many different countries with backgrounds ranging from some of the world's largest aerospace companies, game companies, and visual simulation specialists to university researchers, students and hobbyists.
|
||||
|
||||
The !OpenSceneGraph project owes a great deal to the community for its development and support, in particular we wish to thank the [http://www.openscenegraph.org/projects/osg/wiki/Support/Contributors/TwoPointEight 364 individuals] from around the world that have directly contributed to the development and refinement of the !OpenSceneGraph code base.
|
||||
The !OpenSceneGraph project owes a great deal to the community for its development and support, in particular we wish to thank the [http://www.openscenegraph.org/projects/osg/wiki/Support/Contributors/TwoPointEight 365 individuals] from around the world that have directly contributed to the development and refinement of the !OpenSceneGraph code base.
|
||||
|
||||
----
|
||||
|
||||
|
||||
@@ -12,10 +12,9 @@ subscribe to our public mailing list:
|
||||
http://www.openscenegraph.org/projects/osg/wiki/MailingLists
|
||||
|
||||
|
||||
|
||||
Robert Osfield.
|
||||
Project Lead.
|
||||
12th February 2009.
|
||||
19th May 2009.
|
||||
|
||||
--
|
||||
|
||||
|
||||
@@ -79,7 +79,12 @@ int main( int argc, char **argv )
|
||||
else if (fileType==osgDB::DIRECTORY)
|
||||
{
|
||||
osgDB::DirectoryContents directory = osgDB::getDirectoryContents(arguments[pos]);
|
||||
files.insert(files.end(),directory.begin(),directory.end());
|
||||
osgDB::DirectoryContents::iterator it = directory.begin();
|
||||
while( it != directory.end())
|
||||
{
|
||||
files.push_back(filePath + "/" + (*it));
|
||||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
SET(TARGET_SRC osgversion.cpp )
|
||||
|
||||
IF (OSG_MAINTAINER)
|
||||
SET(TARGET_SRC ${TARGET_SRC} Contributors.cpp )
|
||||
ADD_DEFINITIONS("-DBUILD_CONTRIBUTORS")
|
||||
ENDIF()
|
||||
|
||||
SET(TARGET_COMMON_LIBRARIES
|
||||
OpenThreads
|
||||
osg
|
||||
|
||||
836
applications/osgversion/Contributors.cpp
Normal file
836
applications/osgversion/Contributors.cpp
Normal file
@@ -0,0 +1,836 @@
|
||||
// The majority of the application is dedicated to building the
|
||||
// current contribitors list by parsing the ChangeLog, it just takes
|
||||
// one line in the main itself to report the version number.
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
#include <OpenThreads/Version>
|
||||
|
||||
#include <osg/Notify>
|
||||
#include <osg/Version>
|
||||
#include <osg/ArgumentParser>
|
||||
#include <osg/ApplicationUsage>
|
||||
|
||||
#include <osg/Matrix>
|
||||
#include <osg/Plane>
|
||||
#include <osg/BoundingBox>
|
||||
#include <osg/BoundingSphere>
|
||||
|
||||
#include <osgDB/fstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma setlocale("C")
|
||||
#endif
|
||||
|
||||
typedef pair<string, string> NamePair;
|
||||
typedef map<NamePair, unsigned int> NameMap;
|
||||
typedef vector<string> Words;
|
||||
|
||||
NamePair EmptyNamePair;
|
||||
NamePair NameRobertOsfield("Robert", "Osfield");
|
||||
NamePair NameDonBurns ("Don", "Burns");
|
||||
|
||||
|
||||
const char* validNames[] =
|
||||
{
|
||||
"de",
|
||||
"den",
|
||||
"van"
|
||||
};
|
||||
|
||||
const char* invalidNames[] =
|
||||
{
|
||||
"Added",
|
||||
"AnimationPath",
|
||||
"AnimationPathCallback",
|
||||
"AnimationPathManipulator",
|
||||
"ArgumentParser",
|
||||
"AttrData",
|
||||
"AutoTransform",
|
||||
"AutoTransform.",
|
||||
"Azimuth",
|
||||
"BlenColour(Vec4",
|
||||
"Camera",
|
||||
"CameraBarrierCallback",
|
||||
"CameraNode",
|
||||
"Canvas",
|
||||
"CluserCullingCallback",
|
||||
"ClusterCullingCallback",
|
||||
"CoordinateSystem",
|
||||
"CoordinateSystemNode",
|
||||
"CoordinateSystemNode&",
|
||||
"CopyOp",
|
||||
"Copyright",
|
||||
"Core",
|
||||
"Creator",
|
||||
"CullCallbacks",
|
||||
"CullingSettngs",
|
||||
"CullVisitor",
|
||||
"CullVistor",
|
||||
"Cygwin",
|
||||
"DatabasePager",
|
||||
"DataSet",
|
||||
"DataVariance",
|
||||
"DeleteHandler",
|
||||
"DisplaySettings",
|
||||
"Drawable",
|
||||
"DrawElementsUByte",
|
||||
"Endian",
|
||||
"Escape",
|
||||
"EventQueue",
|
||||
"Face",
|
||||
"Files",
|
||||
"Fixed",
|
||||
"Fixes",
|
||||
"FluidProgram",
|
||||
"FontImplementation",
|
||||
"FrameStats",
|
||||
"Framstamp",
|
||||
"FreeBSD",
|
||||
"Geode",
|
||||
"GeoemtryTechnique",
|
||||
"GeometryTechnique",
|
||||
"GeoSet",
|
||||
"GraphicsContext",
|
||||
"GraphicsContextImplementation",
|
||||
"GraphicsThread",
|
||||
"GraphicsWindowX11",
|
||||
"Group",
|
||||
"Image",
|
||||
"ImageOptions",
|
||||
"Images",
|
||||
"Images/SolarSystem",
|
||||
"ImageStream",
|
||||
"Improved",
|
||||
"IndexBlock",
|
||||
"IndexFaceSets",
|
||||
"IntersectVisitor",
|
||||
"Inventor",
|
||||
"KdTree",
|
||||
"KeyboardMouse",
|
||||
"KeyboardMouseCallback",
|
||||
"LightModel",
|
||||
"LightPointNode",
|
||||
"LineSegment",
|
||||
"LineStipple",
|
||||
"Logos",
|
||||
"LongIDRecord",
|
||||
"Make",
|
||||
"Makefile",
|
||||
"Material",
|
||||
"Matrix",
|
||||
"Matrix*",
|
||||
"MatrixManipulator",
|
||||
"MatrixTransform",
|
||||
"MemoryManager",
|
||||
"MergeGeometryVisitor",
|
||||
"MeshRecord",
|
||||
"Mode",
|
||||
"Mr",
|
||||
"Multigen",
|
||||
"New",
|
||||
"NewCullVisitor",
|
||||
"NodeVisitor",
|
||||
"Object",
|
||||
"OpenDX",
|
||||
"OpenSceneGraph",
|
||||
"OpenSceneGraph-2",
|
||||
"OpenSceneGraph-osgWidget-dev",
|
||||
"OpenThreads",
|
||||
"OperationThread",
|
||||
"Optimizer",
|
||||
"OrientationConverter",
|
||||
"Osfields",
|
||||
"Ouput",
|
||||
"Output",
|
||||
"OveralyNode",
|
||||
"PagedLOD",
|
||||
"PageLOD",
|
||||
"Paging",
|
||||
"ParentList",
|
||||
"Performer",
|
||||
"PickHandler",
|
||||
"PixelDataBufferObject",
|
||||
"PolygonStipple",
|
||||
"PolytopeVisitor",
|
||||
"PrimitiveIndexFunctor",
|
||||
"Prodcuer",
|
||||
"Producer",
|
||||
"ProducerEventCallback",
|
||||
"Program",
|
||||
"Proxy",
|
||||
"ProxyNode",
|
||||
"Quake3",
|
||||
"Quicktime",
|
||||
"ReaderWriters",
|
||||
"ReentrantMutex",
|
||||
"Referenced",
|
||||
"ReferenceFrame",
|
||||
"Removed",
|
||||
"RemoveLoadedProxyNodes",
|
||||
"RenderStage",
|
||||
"RenderTargetFallback",
|
||||
"RenderToTextureStage",
|
||||
"SceneGraphBuilder",
|
||||
"SceneView",
|
||||
"Sequence",
|
||||
"Shape",
|
||||
"SimpleViewer",
|
||||
"SimpleViewer",
|
||||
"SmokeTrailEffect",
|
||||
"Source",
|
||||
"SpotExponent",
|
||||
"State",
|
||||
"StateAttribute",
|
||||
"Stats",
|
||||
"StatsVisitor",
|
||||
"Studio",
|
||||
"Support",
|
||||
"Switch",
|
||||
"TechniqueEventHandler",
|
||||
"TerraPage",
|
||||
"TessellationHints",
|
||||
"TestManipulator",
|
||||
"TestSupportCallback",
|
||||
"TexEnv",
|
||||
"TexMat(Matrix",
|
||||
"Texture",
|
||||
"Texture2DArray",
|
||||
"Texture3D",
|
||||
"TextureCubeMap",
|
||||
"TextureObjectManager",
|
||||
"TextureRectangle",
|
||||
"TextureRectangle(Image*",
|
||||
"TextureType",
|
||||
"Texuture",
|
||||
"TriStripVisitor",
|
||||
"TrPageViewer",
|
||||
"Uniform",
|
||||
"UseFarLineSegments",
|
||||
"UserData",
|
||||
"Valve",
|
||||
"Vec*",
|
||||
"Vec2d",
|
||||
"Vec3d",
|
||||
"Vec4ub",
|
||||
"Version",
|
||||
"VertexData",
|
||||
"View",
|
||||
"Viewer",
|
||||
"ViewPoint",
|
||||
"Viewport",
|
||||
"Viewport",
|
||||
"Visual",
|
||||
"VisualStudio",
|
||||
"WindowData",
|
||||
"Windows",
|
||||
"X",
|
||||
"Xcode",
|
||||
"Y"
|
||||
};
|
||||
|
||||
|
||||
struct TypoCorrection
|
||||
{
|
||||
const char* original;
|
||||
const char* corrected;
|
||||
};
|
||||
|
||||
TypoCorrection typoCorrections[] =
|
||||
{
|
||||
{"Aderian", "Adrian"},
|
||||
{"Adndre", "Andre"},
|
||||
{"Adrain", "Adrian"},
|
||||
{"Amueller", "Aumueller"},
|
||||
{"Andew", "Andrew"},
|
||||
{"André", "Andr<EFBFBD>"},
|
||||
{"Antione", "Antoine"},
|
||||
{"Antonoine", "Antoine"},
|
||||
{"Atr", "Art"},
|
||||
{"Baverage", "Beverage"},
|
||||
{"Bistroviae", "Bistrovic"},
|
||||
{"Callue", "Callu"},
|
||||
{"Christaiansen", "Christiansen"},
|
||||
{"Cobin", "Corbin"},
|
||||
{"Comporesi", "Camporesi"},
|
||||
{"Connel", "Connell"},
|
||||
{"Cullu", "Callu"},
|
||||
{"Daneil", "Daniel"},
|
||||
{"Daust", "Daoust"},
|
||||
{"Daved", "David"},
|
||||
{"Drederic", "Frederic"},
|
||||
{"Eileman", "Eilemann"},
|
||||
{"Elgi", "Egli"},
|
||||
{"Fabian", "Fabien"},
|
||||
{"Fautre", "Fautr<EFBFBD>"},
|
||||
{"Frashid", "Farshid"},
|
||||
{"Fred", "Frederic"},
|
||||
{"Fredrick", "Frederic"},
|
||||
{"Fredric", "Frederic"},
|
||||
{"Froechlich", "Fr<EFBFBD>hlich"},
|
||||
{"Froehilch", "Fr<EFBFBD>hlich"},
|
||||
{"Froehlich", "Fr<EFBFBD>hlich"},
|
||||
{"Froelich", "Fr<EFBFBD>hlich"},
|
||||
{"Froenlich", "Fr<EFBFBD>hlich"},
|
||||
{"Fröhlich", "Fr<EFBFBD>hlich"},
|
||||
{"Fruciel", "Frauciel"},
|
||||
{"García", "Garcea"},
|
||||
{"Garrat", "Garrett"},
|
||||
{"Garret", "Garrett"},
|
||||
{"Geof", "Geoff"},
|
||||
{"Giatan", "Gaitan"},
|
||||
{"Gronenger", "Gronager"},
|
||||
{"Gronger", "Gronager"},
|
||||
{"Haritchablaet", "Haritchabalet"},
|
||||
{"Hebelin", "Herbelin"},
|
||||
{"Heirtlein", "Hertlein"},
|
||||
{"Heirtlein", "Hertlein"},
|
||||
{"Hertleinm", "Hertlein"},
|
||||
{"Hertlien", "Hertlein"},
|
||||
{"Hi", "He"},
|
||||
{"Hooper", "Hopper"},
|
||||
{"Inverson", "Iverson"},
|
||||
{"Iversion", "Iverson"},
|
||||
{"Jean-Sebastein", "Jean-Sebastien"},
|
||||
{"Jean-Sebastian", "Jean-Sebastien"},
|
||||
{"Jean-Sebastirn", "Jean-Sebastien"},
|
||||
{"Jea-Sebastien", "Jean-Sebastien"},
|
||||
{"Johhansen", "Johansen"},
|
||||
{"Johnansen", "Johansen"},
|
||||
{"Johnasen", "Johansen"},
|
||||
{"Jolly", "Jolley"},
|
||||
{"Jose", "Jos<EFBFBD>"},
|
||||
{"José", "Jos<EFBFBD>"},
|
||||
{"Joson", "Jason"},
|
||||
{"J", "Jos<EFBFBD>"},
|
||||
{"Keuhne", "Kuehne"},
|
||||
{"Kheune", "Kuehne"},
|
||||
{"Lagrade", "Lagarde"},
|
||||
{"Larshkari", "Lashkari"},
|
||||
{"Lashakari", "Lashkari"},
|
||||
{"Lashari", "Lashkari"},
|
||||
{"Lasharki", "Lashkari"},
|
||||
{"Laskari", "Lashkari"},
|
||||
{"Leandowski", "Lewandowski"},
|
||||
{"Lawandowski", "Lewandowski"},
|
||||
{"Lucas", "Luaces"},
|
||||
{"Lugi", "Luigi"},
|
||||
{"Lweandowski", "Lewandowski"},
|
||||
{"Maceij", "Maciej"},
|
||||
{"Machler", "M<EFBFBD>chler"},
|
||||
{"Macro", "Marco"},
|
||||
{"Maechler", "M<EFBFBD>chler"},
|
||||
{"Mahai", "Mihai"},
|
||||
{"Mammond", "Marmond"},
|
||||
{"March", "Marco"},
|
||||
{"Martsz", "Martz"},
|
||||
{"Marz", "Martz"},
|
||||
{"Matz", "Martz"},
|
||||
{"Melchoir", "Melchior"},
|
||||
{"Mellis", "Melis"},
|
||||
{"Messerschimdt", "Messerschmidt"},
|
||||
{"Micheal", "Michael"},
|
||||
{"Mihair", "Mihai"},
|
||||
{"Molishtan", "Moloshtan"},
|
||||
{"Molishtan", "Moloshtan"},
|
||||
{"Moloshton", "Moloshtan"},
|
||||
{"Morné", "Morn<EFBFBD>"},
|
||||
{"Morne", "Morn<EFBFBD>"},
|
||||
{"Moule", "Moiule"},
|
||||
{"Narache", "Marache"},
|
||||
{"Nicklov", "Nikolov"},
|
||||
{"Nickolov", "Nikolov"},
|
||||
{"Olad", "Olaf"},
|
||||
{"Olar", "Olaf"},
|
||||
{"Oritz", "Ortiz"},
|
||||
{"Osfeld", "Osfield"},
|
||||
{"Osfied", "Osfield"},
|
||||
{"Pail", "Paul"},
|
||||
{"Rajce", "Trajce"},
|
||||
{"Randal", "Randall"},
|
||||
{"Robet", "Robert"},
|
||||
{"Rodger", "Roger"},
|
||||
{"Rolad", "Roland"},
|
||||
{"Rucard", "Richard"},
|
||||
{"Sekender", "Sukender"},
|
||||
{"Sewel", "Sewell"},
|
||||
{"Simmonson", "Simonsson"},
|
||||
{"Simmonsson", "Simonsson"},
|
||||
{"Sjolie", "Sj<EFBFBD>lie"},
|
||||
{"Sjölie", "Sj<EFBFBD>lie"},
|
||||
{"Skinnder", "Skinner"},
|
||||
{"Sokolosky", "Sokolowsky"},
|
||||
{"Sokolowky", "Sokolowsky"},
|
||||
{"Sokolowki", "Sokolowsky"},
|
||||
{"Sokolowski", "Sokolowsky"},
|
||||
{"Sokolsky", "Sokolowsky"},
|
||||
{"Sokolwsky", "Sokolowsky"},
|
||||
{"Sonda", "Sondra"},
|
||||
{"Stansilav", "Stanislav"},
|
||||
{"Stefan", "Stephan"},
|
||||
{"Stell", "Steel"},
|
||||
{"Sylvan", "Sylvain"},
|
||||
{"Takeahei", "Takahei"},
|
||||
{"Takehei", "Takahei"},
|
||||
{"Tarantilils", "Tarantilis"},
|
||||
{"Trastenjak", "Trstenjak"},
|
||||
{"Urlich", "Ulrich"},
|
||||
{"Vines", "Vine"},
|
||||
{"Waldrom", "Waldron"},
|
||||
{"Wedner", "Weidner"},
|
||||
{"Weidemann", "Wiedemann"},
|
||||
{"Wieblen", "Weiblen"},
|
||||
{"Woesnner", "Woessner"},
|
||||
{"Wojchiech", "Wojciech"},
|
||||
{"Wojiech", "Wojciech"},
|
||||
{"Xennon", "Hanson"},
|
||||
{"Yefrei", "Yefei"},
|
||||
{"Yfei", "Yefei"}
|
||||
};
|
||||
|
||||
|
||||
struct NameCorrection
|
||||
{
|
||||
const char* originalFirst;
|
||||
const char* originalSecond;
|
||||
const char* correctedFirst;
|
||||
const char* correctedSecond;
|
||||
};
|
||||
|
||||
NameCorrection nameCorrections[] =
|
||||
{
|
||||
{"Marc", "Sciabica",
|
||||
"Mark", "Sciabica"},
|
||||
{"Jean", "Sebastien",
|
||||
"Jean-Sebastien", "Guay"},
|
||||
{"Michale", "Platings",
|
||||
"Michael", "Platings"},
|
||||
{"Mick", "",
|
||||
"Maik", "Keller"},
|
||||
{"Gary", "Quin",
|
||||
"Gary", "Quinn"},
|
||||
{"BjornHein", "",
|
||||
"Bj<EFBFBD>rn", "Hein"},
|
||||
{"Bjorn", "Hein",
|
||||
"Bj<EFBFBD>rn", "Hein"},
|
||||
{"Erik", "van",
|
||||
"Erik", "den Dekker"},
|
||||
{"Erik", "den",
|
||||
"Erik", "den Dekker"},
|
||||
{"Jeoen", "den",
|
||||
"Jeroen", "den Dekker"},
|
||||
{"John", "Vidar",
|
||||
"John", "Vidar Larring"},
|
||||
{"John", "Vida",
|
||||
"John", "Vidar Larring"},
|
||||
{"Sebastien", "Messerschmidt",
|
||||
"Sebastian", "Messerschmidt"},
|
||||
{"Mattias", "Fr<EFBFBD>hlich",
|
||||
"Mathias", "Fr<EFBFBD>hlich"},
|
||||
{"Mathias", "Helsing",
|
||||
"Mattias", "Helsing"},
|
||||
{"Jose", "Delport",
|
||||
"J.P.", "Delport"},
|
||||
{"Jos<EFBFBD>", "Delport",
|
||||
"J.P.", "Delport"},
|
||||
{"Franz", "Melchior",
|
||||
"Melchior", "Franz"},
|
||||
{"Glen", "Waldon",
|
||||
"Glenn", "Waldron"},
|
||||
{"Ralf", "Karn",
|
||||
"Ralf", "Kern"},
|
||||
{"Donny", "Cipperly",
|
||||
"Donald", "Cipperly"},
|
||||
{"Gino", "van",
|
||||
"Gino", "van den Bergen"},
|
||||
{"Radu", "Mihai",
|
||||
"Mihai", "Radu"},
|
||||
{"Art", "Trevs",
|
||||
"Art", "Tevs"},
|
||||
{"Tim", "More",
|
||||
"Tim", "Moore"},
|
||||
{"Andre", "Garneau",
|
||||
"Andr<EFBFBD>", "Garneau"},
|
||||
{"Eric", "Hammil",
|
||||
"Chris", "Hanson"},
|
||||
{"Paul", "de",
|
||||
"Paul", "de Repentigny"},
|
||||
{"Raymond", "de",
|
||||
"Raymond", "de Vries"},
|
||||
{"Nick", "",
|
||||
"Trajce", "Nikolov"},
|
||||
{"Daniel", "",
|
||||
"Daniel", "Sj<EFBFBD>lie"},
|
||||
{"Julia", "Ortiz",
|
||||
"Julian", "Ortiz"},
|
||||
{"Rune", "Schmidt",
|
||||
"Rune", "Schmidt Jensen"},
|
||||
{"Romano", "Jos<EFBFBD>",
|
||||
"Romano", "Jos<EFBFBD> Magacho da Silva"},
|
||||
{"Rommano", "Silva",
|
||||
"Romano", "Jos<EFBFBD> Magacho da Silva"},
|
||||
{"Leandro", "Motta",
|
||||
"Leandro", "Motta Barros"},
|
||||
{"A", "Botorabi",
|
||||
"Ali", "Botorabi"},
|
||||
{"Waltice", "",
|
||||
"Walter", "J. Altice"},
|
||||
{"Drew", "",
|
||||
"Drew", "Whitehouse"},
|
||||
{"Douglas", "A",
|
||||
"Douglas", "A. Pouk"},
|
||||
{"Colin", "MacDonald",
|
||||
"Colin", "McDonald"},
|
||||
{"Nikolov", "Trajce",
|
||||
"Trajce", "Nikolov"},
|
||||
{"Frauciel", "Luc",
|
||||
"Luc", "Frauciel"},
|
||||
};
|
||||
|
||||
|
||||
bool validName(const string& first)
|
||||
{
|
||||
// Check for valid names
|
||||
for (unsigned int i = 0; i < sizeof(validNames) / sizeof(char*); ++i)
|
||||
{
|
||||
if (first == validNames[i])
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (first.empty()) return false;
|
||||
|
||||
if (first[0] < 'A' || first[0] > 'Z') return false;
|
||||
|
||||
if (first.size() >= 2 && (first[1] < 'a' || first[1] > 'z') && (first[1] != '.') && (first[1] != ',')) return false;
|
||||
|
||||
// Check for invalid names
|
||||
for (unsigned int i = 0; i < sizeof(invalidNames) / sizeof(char*); ++i)
|
||||
{
|
||||
if (first == invalidNames[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Default to a valid name
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
string typoCorrection(const string& name)
|
||||
{
|
||||
// Loop over all known typo corrections
|
||||
for (unsigned int i = 0; i < sizeof(typoCorrections) / sizeof(TypoCorrection); ++i)
|
||||
{
|
||||
// If a typo is found
|
||||
if (name == typoCorrections[i].original)
|
||||
{
|
||||
// Return the correction
|
||||
return typoCorrections[i].corrected;
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
void nameCorrection(NamePair& name)
|
||||
{
|
||||
// Loop over all known name corrections
|
||||
for (unsigned int i = 0; i < sizeof(nameCorrections) / sizeof(NameCorrection); ++i)
|
||||
{
|
||||
// If a matching name is found
|
||||
if (name.first == nameCorrections[i].originalFirst &&
|
||||
name.second == nameCorrections[i].originalSecond)
|
||||
{
|
||||
// Return the correction
|
||||
name.first = nameCorrections[i].correctedFirst;
|
||||
name.second = nameCorrections[i].correctedSecond;
|
||||
|
||||
// Early out, since we don't want corrections of corrections
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void lastValidCharacter(const string& name, unsigned int& pos, char c)
|
||||
{
|
||||
for (unsigned int i = 0; i < pos; ++i)
|
||||
{
|
||||
if (name[i] == c)
|
||||
{
|
||||
pos = i;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void lastValidCharacter(const string& name, unsigned int& last)
|
||||
{
|
||||
lastValidCharacter(name, last, '.');
|
||||
lastValidCharacter(name, last, ',');
|
||||
lastValidCharacter(name, last, '\'');
|
||||
lastValidCharacter(name, last, '/');
|
||||
lastValidCharacter(name, last, '\\');
|
||||
lastValidCharacter(name, last, ':');
|
||||
lastValidCharacter(name, last, ';');
|
||||
lastValidCharacter(name, last, ')');
|
||||
}
|
||||
|
||||
|
||||
NamePair createName(const string& first, const string& second)
|
||||
{
|
||||
if (first.empty()) return EmptyNamePair;
|
||||
|
||||
// cout << "first = " << first << " second = " << second << endl;
|
||||
|
||||
unsigned int last = first.size();
|
||||
lastValidCharacter(first, last);
|
||||
|
||||
if (last == 0) return EmptyNamePair;
|
||||
|
||||
string name;
|
||||
|
||||
name.append(first.begin(), first.begin() + last);
|
||||
|
||||
if (!validName(name)) return EmptyNamePair;
|
||||
|
||||
name = typoCorrection(name);
|
||||
|
||||
if (second.empty() ||
|
||||
!validName(second))
|
||||
{
|
||||
// filter any single or two letter words as unlike to be names.
|
||||
if (name.size() <= 2) return EmptyNamePair;
|
||||
|
||||
return NamePair(name, "");
|
||||
}
|
||||
|
||||
last = second.size();
|
||||
|
||||
lastValidCharacter(second, last);
|
||||
|
||||
if (last > 0)
|
||||
{
|
||||
string surname(second.begin(), second.begin() + last);
|
||||
|
||||
if (validName(surname))
|
||||
{
|
||||
surname = typoCorrection(surname);
|
||||
return NamePair(name, surname);
|
||||
}
|
||||
}
|
||||
|
||||
// filter any single or two letter words as unlike to be names.
|
||||
if (name.size() <= 2) return EmptyNamePair;
|
||||
|
||||
return NamePair(name, "");
|
||||
}
|
||||
|
||||
|
||||
bool submissionsSequence(const Words& words, unsigned int& i)
|
||||
{
|
||||
if (i + 1 >= words.size()) return false;
|
||||
|
||||
if (words[i] == "From" ||
|
||||
words[i] == "from" ||
|
||||
words[i] == "From:" ||
|
||||
words[i] == "from:" ||
|
||||
words[i] == "Merged" ||
|
||||
words[i] == "Integrated") return true;
|
||||
|
||||
if (i + 2 >= words.size()) return false;
|
||||
|
||||
if (words[i] == "submitted" && words[i + 1] == "by")
|
||||
{
|
||||
i += 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (words[i] == "Folded" && words[i + 1] == "in")
|
||||
{
|
||||
i += 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (words[i] == "Rolled" && words[i + 1] == "in")
|
||||
{
|
||||
i += 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (words[i] == "Checked" && words[i + 1] == "in")
|
||||
{
|
||||
i += 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (i + 3 >= words.size()) return false;
|
||||
|
||||
if (words[i] == "sent" && words[i + 1] == "in" && words[i + 2] == "by")
|
||||
{
|
||||
i += 2;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void readContributors(NameMap& names, const string& file)
|
||||
{
|
||||
osgDB::ifstream fin(file.c_str());
|
||||
|
||||
Words words;
|
||||
while(fin)
|
||||
{
|
||||
string keyword;
|
||||
fin >> keyword;
|
||||
words.push_back(keyword);
|
||||
}
|
||||
|
||||
string blank_string;
|
||||
|
||||
for(unsigned int i = 0; i < words.size(); ++i)
|
||||
{
|
||||
if (submissionsSequence(words, i))
|
||||
{
|
||||
if (i + 2 < words.size() && validName(words[i + 1]))
|
||||
{
|
||||
NamePair name = createName(words[i + 1], words[i + 2]);
|
||||
nameCorrection(name);
|
||||
if (!name.first.empty()) ++names[name];
|
||||
i += 2;
|
||||
}
|
||||
else if (i + 1 < words.size() && validName(words[i + 1]))
|
||||
{
|
||||
NamePair name = createName(words[i + 1], blank_string);
|
||||
nameCorrection(name);
|
||||
if (!name.first.empty()) ++names[name];
|
||||
i += 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (words[i] == "robert")
|
||||
{
|
||||
++names[NameRobertOsfield];
|
||||
}
|
||||
else if (words[i] == "don")
|
||||
{
|
||||
++names[NameDonBurns];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// reassign fisrt name entries to their full names entries
|
||||
if (names.size() > 1)
|
||||
{
|
||||
for (NameMap::iterator itr = names.begin(); itr != names.end(); )
|
||||
{
|
||||
if (itr->first.second.empty())
|
||||
{
|
||||
NameMap::iterator next_itr = itr;
|
||||
++next_itr;
|
||||
|
||||
if (next_itr != names.end() && itr->first.first == next_itr->first.first)
|
||||
{
|
||||
next_itr->second += itr->second;
|
||||
names.erase(itr);
|
||||
itr = next_itr;
|
||||
}
|
||||
else
|
||||
{
|
||||
++itr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
++itr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// remove the double entries from Robert's contributions
|
||||
if (names.size() > 1)
|
||||
{
|
||||
for (NameMap::iterator itr = names.begin(); itr != names.end(); ++itr)
|
||||
{
|
||||
if (itr->first != NameRobertOsfield && itr->first != NameDonBurns)
|
||||
{
|
||||
names[NameRobertOsfield] -= itr->second;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void buildContributors(NameMap& names)
|
||||
{
|
||||
// top five contributors
|
||||
++names[NamePair("Robert", "Osfield")];
|
||||
++names[NamePair("Don", "Burns")];
|
||||
++names[NamePair("Marco", "Jez")];
|
||||
++names[NamePair("Mike", "Weiblen")];
|
||||
++names[NamePair("Geoff", "Michel")];
|
||||
++names[NamePair("Ben", "van Basten")];
|
||||
|
||||
// contributors that don't appear in the ChangeLog due to their contributions
|
||||
// being before CVS started for the OSG, or before the name logging began.
|
||||
++names[NamePair("Karsten", "Weiss")];
|
||||
++names[NamePair("Graeme", "Harkness")];
|
||||
++names[NamePair("Axel", "Volley")];
|
||||
++names[NamePair("Nikolaus", "Hanekamp")];
|
||||
++names[NamePair("Kristopher", "Bixler")];
|
||||
++names[NamePair("Tanguy", "Fautr<EFBFBD>")];
|
||||
++names[NamePair("J.E.", "Hoffmann")];
|
||||
}
|
||||
|
||||
|
||||
void printContributors(const std::string& changeLog, bool printNumEntries)
|
||||
{
|
||||
NameMap names;
|
||||
buildContributors(names);
|
||||
if (!changeLog.empty())
|
||||
{
|
||||
readContributors(names, changeLog);
|
||||
}
|
||||
|
||||
typedef multimap<unsigned int, NamePair> SortedNameMap;
|
||||
|
||||
SortedNameMap sortedNames;
|
||||
for (NameMap::iterator itr = names.begin(); itr != names.end(); ++itr)
|
||||
{
|
||||
sortedNames.insert(SortedNameMap::value_type(itr->second, itr->first));
|
||||
}
|
||||
|
||||
cout << names.size() << " Contributors:" << endl << endl;
|
||||
|
||||
if (printNumEntries)
|
||||
{
|
||||
cout << "Entries Firstname Surname" << endl;
|
||||
cout << "-------------------------" << endl;
|
||||
for (SortedNameMap::reverse_iterator sitr = sortedNames.rbegin(); sitr != sortedNames.rend(); ++sitr)
|
||||
{
|
||||
cout << sitr->first << "\t" << sitr->second.first << " " << sitr->second.second << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Firstname Surname" << endl;
|
||||
cout << "-----------------" << endl;
|
||||
for (SortedNameMap::reverse_iterator sitr = sortedNames.rbegin(); sitr != sortedNames.rend(); ++sitr)
|
||||
{
|
||||
cout << sitr->second.first << " " << sitr->second.second << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@
|
||||
#if defined(__linux)
|
||||
#include <unistd.h>
|
||||
#include <linux/sockios.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
#include <unistd.h>
|
||||
#include <sys/sockio.h>
|
||||
#elif defined(__sgi)
|
||||
|
||||
@@ -351,7 +351,6 @@ int main( int argc, char **argv )
|
||||
|
||||
// set up the usage document, in case we need to print out how to use this program.
|
||||
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
||||
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
|
||||
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--image <filename>","Load an image and render it on a quad");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--dem <filename>","Load an image/DEM and render it on a HeightField");
|
||||
|
||||
@@ -604,7 +604,6 @@ int main(int argc, char** argv)
|
||||
osg::ArgumentParser arguments(&argc,argv);
|
||||
|
||||
arguments.getApplicationUsage()->setApplicationName(arguments.getApplicationName());
|
||||
arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" is the standard OpenSceneGraph example which loads and visualises 3d models.");
|
||||
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
||||
|
||||
osgViewer::Viewer viewer(arguments);
|
||||
|
||||
@@ -35,7 +35,7 @@ class BoundingSphereImpl
|
||||
{
|
||||
public:
|
||||
typedef VT vec_type;
|
||||
typedef typename vec_type::value_type value_type;
|
||||
typedef typename VT::value_type value_type;
|
||||
|
||||
vec_type _center;
|
||||
value_type _radius;
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
#include <osg/GL>
|
||||
|
||||
#if defined(__APPLE__) || defined (_AIX)
|
||||
#if defined(__APPLE__) || \
|
||||
(defined (_AIX) && !defined (_AIX51))
|
||||
#include <OpenGL/glu.h>
|
||||
#else
|
||||
#include <GL/glu.h>
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
#include <float.h>
|
||||
#endif
|
||||
|
||||
#if defined (sun) || defined (__APPLE__)
|
||||
#if defined (sun) || \
|
||||
defined (__APPLE__) || \
|
||||
(defined (_AIX) && defined (__GNUC__))
|
||||
|
||||
#include <float.h>
|
||||
|
||||
@@ -93,7 +95,8 @@
|
||||
|
||||
#if defined (sun) || \
|
||||
defined (__hpux) || \
|
||||
defined (APPLE_PRE_10_2)
|
||||
defined (APPLE_PRE_10_2) || \
|
||||
(defined (_AIX) && defined (__GNUC__))
|
||||
|
||||
#ifndef floorf
|
||||
inline float floorf(float value) { return static_cast<float>(floor(value)); }
|
||||
|
||||
@@ -29,7 +29,7 @@ class Vec2b
|
||||
// Methods are defined here so that they are implicitly inlined
|
||||
|
||||
/** Type of Vec class.*/
|
||||
typedef char value_type;
|
||||
typedef signed char value_type;
|
||||
|
||||
/** Number of vector components. */
|
||||
enum { num_components = 2 };
|
||||
@@ -39,7 +39,7 @@ class Vec2b
|
||||
|
||||
Vec2b() { _v[0]=0; _v[1]=0; }
|
||||
|
||||
Vec2b(char r, char g)
|
||||
Vec2b(value_type r, value_type g)
|
||||
{
|
||||
_v[0]=r; _v[1]=g;
|
||||
}
|
||||
@@ -94,8 +94,8 @@ class Vec2b
|
||||
/** Unary multiply by scalar. */
|
||||
inline Vec2b& operator *= (float rhs)
|
||||
{
|
||||
_v[0]=(char)((float)_v[0]*rhs);
|
||||
_v[1]=(char)((float)_v[1]*rhs);
|
||||
_v[0]=(value_type)((float)_v[0]*rhs);
|
||||
_v[1]=(value_type)((float)_v[1]*rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class Vec3b
|
||||
public:
|
||||
|
||||
/** Type of Vec class.*/
|
||||
typedef char value_type;
|
||||
typedef signed char value_type;
|
||||
|
||||
/** Number of vector components. */
|
||||
enum { num_components = 3 };
|
||||
@@ -94,9 +94,9 @@ class Vec3b
|
||||
/** Unary multiply by scalar. */
|
||||
inline Vec3b& operator *= (float rhs)
|
||||
{
|
||||
_v[0]=(char)((float)_v[0]*rhs);
|
||||
_v[1]=(char)((float)_v[1]*rhs);
|
||||
_v[2]=(char)((float)_v[2]*rhs);
|
||||
_v[0]=(value_type)((float)_v[0]*rhs);
|
||||
_v[1]=(value_type)((float)_v[1]*rhs);
|
||||
_v[2]=(value_type)((float)_v[2]*rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class Vec4b
|
||||
public:
|
||||
|
||||
/** Type of Vec class.*/
|
||||
typedef char value_type;
|
||||
typedef signed char value_type;
|
||||
|
||||
/** Number of vector components. */
|
||||
enum { num_components = 4 };
|
||||
@@ -101,10 +101,10 @@ class Vec4b
|
||||
/** Unary multiply by scalar. */
|
||||
inline Vec4b& operator *= (float rhs)
|
||||
{
|
||||
_v[0]=(char)((float)_v[0]*rhs);
|
||||
_v[1]=(char)((float)_v[1]*rhs);
|
||||
_v[2]=(char)((float)_v[2]*rhs);
|
||||
_v[3]=(char)((float)_v[3]*rhs);
|
||||
_v[0]=(value_type)((float)_v[0]*rhs);
|
||||
_v[1]=(value_type)((float)_v[1]*rhs);
|
||||
_v[2]=(value_type)((float)_v[2]*rhs);
|
||||
_v[3]=(value_type)((float)_v[3]*rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,26 +62,26 @@ class Vec4ub
|
||||
else return (_v[3]<v._v[3]);
|
||||
}
|
||||
|
||||
inline unsigned char* ptr() { return _v; }
|
||||
inline const unsigned char* ptr() const { return _v; }
|
||||
inline value_type* ptr() { return _v; }
|
||||
inline const value_type* ptr() const { return _v; }
|
||||
|
||||
inline void set(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
|
||||
inline void set(value_type r, value_type g, value_type b, value_type a)
|
||||
{
|
||||
_v[0]=r; _v[1]=g; _v[2]=b; _v[3]=a;
|
||||
}
|
||||
|
||||
inline unsigned char& operator [] (unsigned int i) { return _v[i]; }
|
||||
inline unsigned char operator [] (unsigned int i) const { return _v[i]; }
|
||||
inline value_type& operator [] (unsigned int i) { return _v[i]; }
|
||||
inline value_type operator [] (unsigned int i) const { return _v[i]; }
|
||||
|
||||
inline unsigned char& r() { return _v[0]; }
|
||||
inline unsigned char& g() { return _v[1]; }
|
||||
inline unsigned char& b() { return _v[2]; }
|
||||
inline unsigned char& a() { return _v[3]; }
|
||||
inline value_type& r() { return _v[0]; }
|
||||
inline value_type& g() { return _v[1]; }
|
||||
inline value_type& b() { return _v[2]; }
|
||||
inline value_type& a() { return _v[3]; }
|
||||
|
||||
inline unsigned char r() const { return _v[0]; }
|
||||
inline unsigned char g() const { return _v[1]; }
|
||||
inline unsigned char b() const { return _v[2]; }
|
||||
inline unsigned char a() const { return _v[3]; }
|
||||
inline value_type r() const { return _v[0]; }
|
||||
inline value_type g() const { return _v[1]; }
|
||||
inline value_type b() const { return _v[2]; }
|
||||
inline value_type a() const { return _v[3]; }
|
||||
|
||||
/** Multiply by scalar. */
|
||||
inline Vec4ub operator * (float rhs) const
|
||||
@@ -94,10 +94,10 @@ class Vec4ub
|
||||
/** Unary multiply by scalar. */
|
||||
inline Vec4ub& operator *= (float rhs)
|
||||
{
|
||||
_v[0]=(unsigned char)((float)_v[0]*rhs);
|
||||
_v[1]=(unsigned char)((float)_v[1]*rhs);
|
||||
_v[2]=(unsigned char)((float)_v[2]*rhs);
|
||||
_v[3]=(unsigned char)((float)_v[3]*rhs);
|
||||
_v[0]=(value_type)((float)_v[0]*rhs);
|
||||
_v[1]=(value_type)((float)_v[1]*rhs);
|
||||
_v[2]=(value_type)((float)_v[2]*rhs);
|
||||
_v[3]=(value_type)((float)_v[3]*rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ extern "C" {
|
||||
|
||||
#define OPENSCENEGRAPH_MAJOR_VERSION 2
|
||||
#define OPENSCENEGRAPH_MINOR_VERSION 8
|
||||
#define OPENSCENEGRAPH_PATCH_VERSION 0
|
||||
#define OPENSCENEGRAPH_PATCH_VERSION 1
|
||||
#define OPENSCENEGRAPH_SOVERSION 55
|
||||
|
||||
/**
|
||||
|
||||
@@ -31,12 +31,7 @@ namespace osgUtil {
|
||||
|
||||
class OSGUTIL_EXPORT Hit
|
||||
{
|
||||
/** Describes a point in space produced by an intersection of a line with a scene.
|
||||
* A Hit is always on a surface as rendered by the Open Scene Graph scene (usually
|
||||
* a triangle or other primitive, but a special hit handler could return a
|
||||
* different value perhaps: a sphere shape might return a Hit on the true sphere
|
||||
* rather than the approximate tessellated sphere rendered.
|
||||
*/
|
||||
/** Deprecated */
|
||||
public:
|
||||
|
||||
Hit();
|
||||
@@ -94,7 +89,7 @@ class OSGUTIL_EXPORT Hit
|
||||
};
|
||||
|
||||
|
||||
/** Basic visitor for ray based collisions of a scene.*/
|
||||
/** Deprecated - use IntersectionVisitor instead.*/
|
||||
class OSGUTIL_EXPORT IntersectVisitor : public osg::NodeVisitor
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -94,4 +94,4 @@ CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/pkgconfig/openthreads.pc.in
|
||||
@ONLY
|
||||
)
|
||||
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openthreads.pc DESTINATION lib${LIB_POSTFIX}/pkgconfig)
|
||||
INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openthreads.pc DESTINATION lib${LIB_POSTFIX}/pkgconfig COMPONENT libopenthreads-dev)
|
||||
|
||||
@@ -50,9 +50,6 @@
|
||||
|
||||
using namespace OpenThreads;
|
||||
|
||||
extern int errno;
|
||||
const char *OPENTHREAD_VERSION_STRING = "OpenThreads v1.2preAlpha, Posix Threads (Public Implementation)";
|
||||
|
||||
#ifdef DEBUG
|
||||
# define DPRINTF(arg) printf arg
|
||||
#else
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace OpenThreads {
|
||||
|
||||
if (thread->_prvData==0) return 0;
|
||||
|
||||
TlsSetValue(Win32ThreadPrivateData::TLS.ID ,data);
|
||||
TlsSetValue(Win32ThreadPrivateData::TLS.getId(), data);
|
||||
//---------------------------------------------------------------------
|
||||
// Set the proper scheduling priorities
|
||||
//
|
||||
@@ -127,6 +127,7 @@ namespace OpenThreads {
|
||||
// abnormal termination but must be caught in win32 anyway
|
||||
}
|
||||
|
||||
TlsSetValue(Win32ThreadPrivateData::TLS.getId(), 0);
|
||||
pd->isRunning = false;
|
||||
|
||||
return 0;
|
||||
@@ -207,7 +208,7 @@ namespace OpenThreads {
|
||||
|
||||
Thread* Thread::CurrentThread()
|
||||
{
|
||||
return (Thread* )TlsGetValue(Win32ThreadPrivateData::TLS.ID);
|
||||
return (Thread* )TlsGetValue(Win32ThreadPrivateData::TLS.getId());
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -344,13 +345,13 @@ int Thread::start() {
|
||||
|
||||
pd->uniqueId = (int)ID;
|
||||
|
||||
// wait till the thread has actually started.
|
||||
pd->threadStartedBlock.block();
|
||||
|
||||
if(!pd->tid) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// wait till the thread has actually started.
|
||||
pd->threadStartedBlock.block();
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
@@ -69,12 +69,20 @@ public:
|
||||
HandleHolder cancelEvent;
|
||||
|
||||
struct TlsHolder{ // thread local storage slot
|
||||
DWORD ID;
|
||||
TlsHolder(): ID(TlsAlloc()){
|
||||
DWORD getId()
|
||||
{
|
||||
static bool initialized = false;
|
||||
if (!initialized) {
|
||||
ID = TlsAlloc();
|
||||
initialized = true;
|
||||
}
|
||||
return ID;
|
||||
}
|
||||
~TlsHolder(){
|
||||
TlsFree(ID);
|
||||
}
|
||||
private:
|
||||
DWORD ID;
|
||||
};
|
||||
|
||||
static TlsHolder TLS;
|
||||
|
||||
@@ -223,7 +223,6 @@ Drawable::Drawable()
|
||||
Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop):
|
||||
Object(drawable,copyop),
|
||||
_parents(), // leave empty as parentList is managed by Geode
|
||||
_stateset(copyop(drawable._stateset.get())),
|
||||
_initialBound(drawable._initialBound),
|
||||
_computeBoundCallback(drawable._computeBoundCallback),
|
||||
_boundingBox(drawable._boundingBox),
|
||||
@@ -240,6 +239,7 @@ Drawable::Drawable(const Drawable& drawable,const CopyOp& copyop):
|
||||
_cullCallback(drawable._cullCallback),
|
||||
_drawCallback(drawable._drawCallback)
|
||||
{
|
||||
setStateSet(copyop(drawable._stateset.get()));
|
||||
}
|
||||
|
||||
Drawable::~Drawable()
|
||||
@@ -443,6 +443,17 @@ void Drawable::dirtyBound()
|
||||
|
||||
void Drawable::compileGLObjects(RenderInfo& renderInfo) const
|
||||
{
|
||||
bool useVertexArrays = _supportsVertexBufferObjects && _useVertexBufferObjects && renderInfo.getState()->isVertexBufferObjectSupported();
|
||||
if (useVertexArrays)
|
||||
{
|
||||
if (_drawCallback.valid())
|
||||
_drawCallback->drawImplementation(renderInfo,this);
|
||||
else
|
||||
drawImplementation(renderInfo);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_useDisplayList) return;
|
||||
|
||||
// get the contextID (user defined ID of 0 upwards) for the
|
||||
|
||||
@@ -3084,7 +3084,7 @@ void Geometry::copyToAndOptimize(Geometry& target)
|
||||
if (!copyToSelf) target.getPrimitiveSetList() = getPrimitiveSetList();
|
||||
|
||||
// copy over attribute arrays.
|
||||
if (getVertexIndices())
|
||||
if (getVertexIndices() && getVertexArray())
|
||||
{
|
||||
ExpandIndexedArray eia(*(getVertexIndices()),target.getVertexArray());
|
||||
getVertexArray()->accept(eia);
|
||||
@@ -3098,7 +3098,7 @@ void Geometry::copyToAndOptimize(Geometry& target)
|
||||
}
|
||||
|
||||
target.setNormalBinding(getNormalBinding());
|
||||
if (getNormalIndices())
|
||||
if (getNormalIndices() && getNormalArray())
|
||||
{
|
||||
ExpandIndexedArray eia(*(getNormalIndices()),target.getNormalArray());
|
||||
getNormalArray()->accept(eia);
|
||||
@@ -3112,7 +3112,7 @@ void Geometry::copyToAndOptimize(Geometry& target)
|
||||
}
|
||||
|
||||
target.setColorBinding(getColorBinding());
|
||||
if (getColorIndices())
|
||||
if (getColorIndices() && getColorArray())
|
||||
{
|
||||
ExpandIndexedArray eia(*(getColorIndices()),target.getColorArray());
|
||||
getColorArray()->accept(eia);
|
||||
@@ -3126,7 +3126,7 @@ void Geometry::copyToAndOptimize(Geometry& target)
|
||||
}
|
||||
|
||||
target.setSecondaryColorBinding(getSecondaryColorBinding());
|
||||
if (getSecondaryColorIndices())
|
||||
if (getSecondaryColorIndices() && getSecondaryColorArray())
|
||||
{
|
||||
ExpandIndexedArray eia(*(getSecondaryColorIndices()),target.getSecondaryColorArray());
|
||||
getSecondaryColorArray()->accept(eia);
|
||||
@@ -3140,7 +3140,7 @@ void Geometry::copyToAndOptimize(Geometry& target)
|
||||
}
|
||||
|
||||
target.setFogCoordBinding(getFogCoordBinding());
|
||||
if (getFogCoordIndices())
|
||||
if (getFogCoordIndices() && getFogCoordArray())
|
||||
{
|
||||
ExpandIndexedArray eia(*(getFogCoordIndices()),target.getFogCoordArray());
|
||||
getFogCoordArray()->accept(eia);
|
||||
@@ -3155,9 +3155,10 @@ void Geometry::copyToAndOptimize(Geometry& target)
|
||||
|
||||
for(unsigned int ti=0;ti<getNumTexCoordArrays();++ti)
|
||||
{
|
||||
if (getTexCoordIndices(ti))
|
||||
if (getTexCoordIndices(ti) && getTexCoordArray(ti))
|
||||
{
|
||||
ExpandIndexedArray eia(*(getTexCoordIndices(ti)),target.getTexCoordArray(ti));
|
||||
|
||||
getTexCoordArray(ti)->accept(eia);
|
||||
|
||||
target.setTexCoordArray(ti,eia._targetArray);
|
||||
|
||||
@@ -818,14 +818,26 @@ void GraphicsContext::resizedImplementation(int x, int y, int width, int height)
|
||||
{
|
||||
osg::View* view = camera->getView();
|
||||
osg::View::Slave* slave = view ? view->findSlaveForCamera(camera) : 0;
|
||||
|
||||
if (slave && camera->getReferenceFrame()==osg::Transform::RELATIVE_RF)
|
||||
|
||||
if (slave)
|
||||
{
|
||||
switch(view->getCamera()->getProjectionResizePolicy())
|
||||
if (camera->getReferenceFrame()==osg::Transform::RELATIVE_RF)
|
||||
{
|
||||
case(osg::Camera::HORIZONTAL): slave->_projectionOffset *= osg::Matrix::scale(1.0/aspectRatioChange,1.0,1.0); break;
|
||||
case(osg::Camera::VERTICAL): slave->_projectionOffset *= osg::Matrix::scale(1.0, aspectRatioChange,1.0); break;
|
||||
default: break;
|
||||
switch(view->getCamera()->getProjectionResizePolicy())
|
||||
{
|
||||
case(osg::Camera::HORIZONTAL): slave->_projectionOffset *= osg::Matrix::scale(1.0/aspectRatioChange,1.0,1.0); break;
|
||||
case(osg::Camera::VERTICAL): slave->_projectionOffset *= osg::Matrix::scale(1.0, aspectRatioChange,1.0); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch(camera->getProjectionResizePolicy())
|
||||
{
|
||||
case(osg::Camera::HORIZONTAL): camera->getProjectionMatrix() *= osg::Matrix::scale(1.0/aspectRatioChange,1.0,1.0); break;
|
||||
case(osg::Camera::VERTICAL): camera->getProjectionMatrix() *= osg::Matrix::scale(1.0, aspectRatioChange,1.0); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -839,10 +851,10 @@ void GraphicsContext::resizedImplementation(int x, int y, int width, int height)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
_traits->x = x;
|
||||
_traits->y = y;
|
||||
_traits->width = width;
|
||||
|
||||
@@ -37,6 +37,9 @@ void GraphicsThread::run()
|
||||
|
||||
OperationThread::run();
|
||||
|
||||
// release operations before the thread stops working.
|
||||
_operationQueue->releaseAllOperations();
|
||||
|
||||
if (graphicsContext)
|
||||
{
|
||||
graphicsContext->releaseContext();
|
||||
|
||||
@@ -319,6 +319,7 @@ unsigned int Image::computeNumComponents(GLenum pixelFormat)
|
||||
case(GL_RGBA32F_ARB): return 4;
|
||||
case(GL_RGBA): return 4;
|
||||
case(GL_BGRA): return 4;
|
||||
case(GL_RGBA8): return 4;
|
||||
case(GL_LUMINANCE): return 1;
|
||||
case(GL_LUMINANCE4): return 1;
|
||||
case(GL_LUMINANCE8): return 1;
|
||||
|
||||
@@ -82,9 +82,9 @@ Node::Node(const Node& node,const CopyOp& copyop):
|
||||
_numChildrenWithCullingDisabled(0), // assume no children yet.
|
||||
_numChildrenWithOccluderNodes(0),
|
||||
_nodeMask(node._nodeMask),
|
||||
_descriptions(node._descriptions),
|
||||
_stateset(copyop(node._stateset.get()))
|
||||
_descriptions(node._descriptions)
|
||||
{
|
||||
setStateSet(copyop(node._stateset.get()));
|
||||
}
|
||||
|
||||
Node::~Node()
|
||||
|
||||
@@ -55,6 +55,7 @@ void PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver()
|
||||
s_MultiplerSet = true;
|
||||
// osg::notify(osg::NOTICE)<<"PolygonOffset::setFactorAndUnitMultipliersUsingBestGuessForDriver()"<<std::endl;
|
||||
|
||||
#if 0
|
||||
const GLubyte* renderer = glGetString(GL_RENDERER);
|
||||
if (renderer)
|
||||
{
|
||||
@@ -67,6 +68,7 @@ void PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver()
|
||||
osg::notify(osg::INFO)<<"PolygonOffset::setFactorAndUnitsMultipliersUsingBestGuessForDriver() apply ATI workaround."<<std::endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -180,18 +180,18 @@ void DrawElementsUShort::draw(State& state, bool useVertexBufferObjects) const
|
||||
state.bindElementBufferObject(ebo);
|
||||
if (ebo)
|
||||
{
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_BYTE, getElementBufferObjectOffset(), _numInstances);
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_SHORT, getElementBufferObjectOffset(), _numInstances);
|
||||
else glDrawElements(_mode, size(), GL_UNSIGNED_SHORT, getElementBufferObjectOffset());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_BYTE, &front(), _numInstances);
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_SHORT, &front(), _numInstances);
|
||||
else glDrawElements(_mode, size(), GL_UNSIGNED_SHORT, &front());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_BYTE, &front(), _numInstances);
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_SHORT, &front(), _numInstances);
|
||||
else glDrawElements(_mode, size(), GL_UNSIGNED_SHORT, &front());
|
||||
}
|
||||
}
|
||||
@@ -230,18 +230,18 @@ void DrawElementsUInt::draw(State& state, bool useVertexBufferObjects) const
|
||||
state.bindElementBufferObject(ebo);
|
||||
if (ebo)
|
||||
{
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_BYTE, getElementBufferObjectOffset(), _numInstances);
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_INT, getElementBufferObjectOffset(), _numInstances);
|
||||
else glDrawElements(_mode, size(), GL_UNSIGNED_INT, getElementBufferObjectOffset());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_BYTE, &front(), _numInstances);
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_INT, &front(), _numInstances);
|
||||
else glDrawElements(_mode, size(), GL_UNSIGNED_INT, &front());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_BYTE, &front(), _numInstances);
|
||||
if (_numInstances>=1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_INT, &front(), _numInstances);
|
||||
else glDrawElements(_mode, size(), GL_UNSIGNED_INT, &front());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,6 +193,7 @@ void State::reset()
|
||||
++apitr)
|
||||
{
|
||||
(*apitr)->resetAppliedUniforms();
|
||||
(*apitr)->removeObserver(this);
|
||||
}
|
||||
|
||||
_appliedProgramObjectSet.clear();
|
||||
|
||||
@@ -603,7 +603,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
|
||||
switch(image.getPixelFormat())
|
||||
{
|
||||
case(3):
|
||||
case(GL_RGB): internalFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; break;
|
||||
case(GL_RGB): internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break;
|
||||
case(4):
|
||||
case(GL_RGBA): internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break;
|
||||
default: internalFormat = image.getInternalTextureFormat(); break;
|
||||
@@ -618,7 +618,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
|
||||
switch(image.getPixelFormat())
|
||||
{
|
||||
case(3):
|
||||
case(GL_RGB): internalFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; break;
|
||||
case(GL_RGB): internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break;
|
||||
case(4):
|
||||
case(GL_RGBA): internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break;
|
||||
default: internalFormat = image.getInternalTextureFormat(); break;
|
||||
|
||||
@@ -95,7 +95,7 @@ IF(OPENVRML_FOUND)
|
||||
ENDIF(OPENVRML_FOUND)
|
||||
|
||||
|
||||
ADD_DEFINITIONS(-DOSG_PLUGIN_EXTENSION=${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
ADD_DEFINITIONS(-DOSG_PLUGIN_EXTENSION=${CMAKE_SHARED_MODULE_SUFFIX})
|
||||
|
||||
LINK_INTERNAL(${LIB_NAME}
|
||||
osg
|
||||
|
||||
@@ -111,7 +111,7 @@ RefPtrAdapter<FuncObj> refPtrAdapt(const FuncObj& func)
|
||||
class DatabasePager::FindCompileableGLObjectsVisitor : public osg::NodeVisitor
|
||||
{
|
||||
public:
|
||||
FindCompileableGLObjectsVisitor(DatabasePager::DataToCompile& dataToCompile,
|
||||
FindCompileableGLObjectsVisitor(DatabasePager::DataToCompile* dataToCompile,
|
||||
bool changeAutoUnRef, bool valueAutoUnRef,
|
||||
bool changeAnisotropy, float valueAnisotropy,
|
||||
DatabasePager::DrawablePolicy drawablePolicy,
|
||||
@@ -127,36 +127,34 @@ public:
|
||||
{
|
||||
_kdTreeBuilder = osgDB::Registry::instance()->getKdTreeBuilder()->clone();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
META_NodeVisitor("osgDB","FindCompileableGLObjectsVisitor")
|
||||
|
||||
|
||||
virtual void apply(osg::Node& node)
|
||||
{
|
||||
apply(node.getStateSet());
|
||||
|
||||
traverse(node);
|
||||
}
|
||||
|
||||
|
||||
virtual void apply(osg::Geode& geode)
|
||||
{
|
||||
apply(geode.getStateSet());
|
||||
|
||||
|
||||
for(unsigned int i=0;i<geode.getNumDrawables();++i)
|
||||
{
|
||||
apply(geode.getDrawable(i));
|
||||
}
|
||||
|
||||
traverse(geode);
|
||||
|
||||
|
||||
if (_kdTreeBuilder.valid())
|
||||
{
|
||||
geode.accept(*_kdTreeBuilder);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
inline void apply(osg::StateSet* stateset)
|
||||
{
|
||||
if (stateset)
|
||||
@@ -181,7 +179,7 @@ public:
|
||||
if (_changeAnisotropy)
|
||||
texture->setMaxAnisotropy(_valueAnisotropy);
|
||||
}
|
||||
|
||||
|
||||
if (!_pager->isCompiled(texture))
|
||||
{
|
||||
compileStateSet = true;
|
||||
@@ -197,23 +195,23 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
if (compileStateSet)
|
||||
if (compileStateSet && _dataToCompile)
|
||||
{
|
||||
_dataToCompile.first.insert(stateset);
|
||||
_dataToCompile->first.insert(stateset);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline void apply(osg::Drawable* drawable)
|
||||
{
|
||||
if (_drawableSet.count(drawable))
|
||||
return;
|
||||
|
||||
_drawableSet.insert(drawable);
|
||||
|
||||
|
||||
apply(drawable->getStateSet());
|
||||
|
||||
|
||||
switch(_drawablePolicy)
|
||||
{
|
||||
case DatabasePager::DO_NOT_MODIFY_DRAWABLE_SETTINGS:
|
||||
@@ -240,14 +238,14 @@ public:
|
||||
//
|
||||
// XXX This "compiles" VBOs too, but compilation doesn't do
|
||||
// anything for VBOs, does it?
|
||||
if (drawable->getUseDisplayList() && !_pager->isCompiled(drawable))
|
||||
if (_dataToCompile && drawable->getUseDisplayList() && !_pager->isCompiled(drawable))
|
||||
{
|
||||
// osg::notify(osg::NOTICE)<<" Found compilable drawable"<<std::endl;
|
||||
_dataToCompile.second.push_back(drawable);
|
||||
_dataToCompile->second.push_back(drawable);
|
||||
}
|
||||
}
|
||||
|
||||
DatabasePager::DataToCompile& _dataToCompile;
|
||||
DatabasePager::DataToCompile* _dataToCompile;
|
||||
bool _changeAutoUnRef;
|
||||
bool _valueAutoUnRef;
|
||||
bool _changeAnisotropy;
|
||||
@@ -595,8 +593,12 @@ void DatabasePager::DatabaseThread::run()
|
||||
// merged with the main scene graph and large computeBound() isn't incurred.
|
||||
ActiveGraphicsContexts::iterator itr = _pager->_activeGraphicsContexts.begin();
|
||||
|
||||
DataToCompile& dtc = databaseRequest->_dataToCompileMap[*itr];
|
||||
++itr;
|
||||
DataToCompile* dtc = 0;
|
||||
if (itr != _pager->_activeGraphicsContexts.end())
|
||||
{
|
||||
dtc = &(databaseRequest->_dataToCompileMap[*itr]);
|
||||
++itr;
|
||||
}
|
||||
|
||||
// find all the compileable rendering objects
|
||||
DatabasePager::FindCompileableGLObjectsVisitor frov(dtc,
|
||||
@@ -619,7 +621,7 @@ void DatabasePager::DatabaseThread::run()
|
||||
if (_pager->_doPreCompile &&
|
||||
!_pager->_activeGraphicsContexts.empty())
|
||||
{
|
||||
if (!dtc.first.empty() || !dtc.second.empty())
|
||||
if (!dtc->first.empty() || !dtc->second.empty())
|
||||
{
|
||||
loadedObjectsNeedToBeCompiled = true;
|
||||
|
||||
@@ -628,7 +630,7 @@ void DatabasePager::DatabaseThread::run()
|
||||
itr != _pager->_activeGraphicsContexts.end();
|
||||
++itr)
|
||||
{
|
||||
databaseRequest->_dataToCompileMap[*itr] = dtc;
|
||||
databaseRequest->_dataToCompileMap[*itr] = *dtc;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -644,7 +646,7 @@ void DatabasePager::DatabaseThread::run()
|
||||
++itr;
|
||||
|
||||
// find all the compileable rendering objects
|
||||
DatabasePager::FindCompileableGLObjectsVisitor frov(dtc,
|
||||
DatabasePager::FindCompileableGLObjectsVisitor frov(&dtc,
|
||||
_pager->_changeAutoUnRef, _pager->_valueAutoUnRef,
|
||||
_pager->_changeAnisotropy, _pager->_valueAnisotropy,
|
||||
_pager->_drawablePolicy,
|
||||
@@ -1493,7 +1495,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
META_NodeVisitor("osgDB","FindCompileableGLObjectsVisitor")
|
||||
META_NodeVisitor("osgDB","MarkPagedLODsVisitor")
|
||||
|
||||
virtual void apply(osg::PagedLOD& plod)
|
||||
{
|
||||
|
||||
@@ -640,13 +640,8 @@ std::string Registry::createLibraryNameForExtension(const std::string& ext)
|
||||
ExtensionAliasMap::iterator itr=_extAliasMap.find(lowercase_ext);
|
||||
if (itr!=_extAliasMap.end() && ext != itr->second) return createLibraryNameForExtension(itr->second);
|
||||
|
||||
#ifdef OSG_JAVA_BUILD
|
||||
#if defined(OSG_JAVA_BUILD)
|
||||
static std::string prepend = std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/java");
|
||||
#elseif defined(__APPLE__)
|
||||
// OSX is rather a mess in FileUtils.cpp w.r.t its appendPlatformSpecificLibraryFilePaths implementation
|
||||
// as it hardwires the plugin name to PlugIns. This *needs* fixing to use the naming convention as all
|
||||
// other platforms.
|
||||
static std::string prepend = "";
|
||||
#else
|
||||
static std::string prepend = std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/");
|
||||
#endif
|
||||
|
||||
@@ -821,7 +821,7 @@ osg::StateSet* ReaderWriter3DS::ReaderObject::createStateSet(Lib3dsMaterial *mat
|
||||
// stateset->setTextureAttribute(0,texenv);
|
||||
}
|
||||
|
||||
if (transparency>0.0f || textureTransparancy)
|
||||
if (transparency>0.0f || textureTransparancy || mat->opacity_map.flags!=0)
|
||||
{
|
||||
stateset->setMode(GL_BLEND,osg::StateAttribute::ON);
|
||||
stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
|
||||
|
||||
@@ -45,6 +45,7 @@ Document::Document() :
|
||||
_lightPointAnimationPoolParent(false),
|
||||
_shaderPoolParent(false)
|
||||
{
|
||||
_subsurfaceDepth = new osg::Depth(osg::Depth::LESS, 0.0, 1.0,false);
|
||||
}
|
||||
|
||||
Document::~Document()
|
||||
@@ -110,6 +111,22 @@ osg::Node* Document::getInstanceDefinition(int no)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Document::setSubSurfacePolygonOffset(int level, osg::PolygonOffset* po)
|
||||
{
|
||||
_subsurfacePolygonOffsets[level] = po;
|
||||
}
|
||||
|
||||
osg::PolygonOffset* Document::getSubSurfacePolygonOffset(int level)
|
||||
{
|
||||
osg::notify(osg::DEBUG_INFO)<<"Document::getSubSurfacePolygonOffset("<<level<<")"<<std::endl;
|
||||
osg::ref_ptr<osg::PolygonOffset>& po = _subsurfacePolygonOffsets[level];
|
||||
if (!po)
|
||||
{
|
||||
po = new osg::PolygonOffset(-1.0f*float(level), -1.0f);
|
||||
}
|
||||
return po.get();
|
||||
}
|
||||
|
||||
double flt::unitsToMeters(CoordUnits unit)
|
||||
{
|
||||
switch (unit)
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <osg/Notify>
|
||||
#include <osg/Transform>
|
||||
#include <osg/Geometry>
|
||||
#include <osg/PolygonOffset>
|
||||
#include <osg/Depth>
|
||||
#include <osgDB/ReaderWriter>
|
||||
|
||||
#include "Types.h"
|
||||
@@ -166,6 +168,12 @@ class Document
|
||||
ShaderPool* getOrCreateShaderPool();
|
||||
bool getShaderPoolParent() const { return _shaderPoolParent; }
|
||||
|
||||
void setSubSurfacePolygonOffset(int level, osg::PolygonOffset* po);
|
||||
osg::PolygonOffset* getSubSurfacePolygonOffset(int level);
|
||||
|
||||
void setSubSurfaceDepth(osg::Depth* depth) { _subsurfaceDepth = depth; }
|
||||
osg::Depth* getSubSurfaceDepth() { return _subsurfaceDepth.get(); }
|
||||
|
||||
|
||||
// Options
|
||||
void setReplaceClampWithClampToEdge(bool flag) { _replaceClampWithClampToEdge = flag; }
|
||||
@@ -184,7 +192,7 @@ class Document
|
||||
bool getDoUnitsConversion() const { return _doUnitsConversion; }
|
||||
void setDesiredUnits(CoordUnits units ) { _desiredUnits=units; }
|
||||
CoordUnits getDesiredUnits() const { return _desiredUnits; }
|
||||
|
||||
|
||||
void setKeepExternalReferences( bool flag) { _keepExternalReferences=flag; }
|
||||
bool getKeepExternalReferences() const { return _keepExternalReferences; }
|
||||
|
||||
@@ -225,6 +233,11 @@ class Document
|
||||
osg::ref_ptr<LightPointAppearancePool> _lightPointAppearancePool;
|
||||
osg::ref_ptr<LightPointAnimationPool> _lightPointAnimationPool;
|
||||
osg::ref_ptr<ShaderPool> _shaderPool;
|
||||
|
||||
typedef std::map<int, osg::ref_ptr<osg::PolygonOffset> > SubSurfacePolygonOffsets;
|
||||
SubSurfacePolygonOffsets _subsurfacePolygonOffsets;
|
||||
osg::ref_ptr<osg::Depth> _subsurfaceDepth;
|
||||
|
||||
bool _colorPoolParent;
|
||||
bool _texturePoolParent;
|
||||
bool _materialPoolParent;
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#include <osg/Geometry>
|
||||
#include <osg/Texture2D>
|
||||
#include <osg/CullFace>
|
||||
#include <osg/PolygonOffset>
|
||||
#include <osg/Depth>
|
||||
#include <osg/BlendFunc>
|
||||
#include <osgUtil/TransformAttributeFunctor>
|
||||
#include "Registry.h"
|
||||
@@ -383,28 +381,12 @@ protected:
|
||||
// Subface
|
||||
if (document.subfaceLevel() > 0)
|
||||
{
|
||||
static osg::ref_ptr<osg::PolygonOffset> polygonOffset = new osg::PolygonOffset(-10.0f, -40.0f);
|
||||
stateset->setAttributeAndModes(polygonOffset.get(), osg::StateAttribute::ON);
|
||||
|
||||
static osg::ref_ptr<osg::Depth> depth = new osg::Depth(osg::Depth::LESS, 0.0, 1.0,false);
|
||||
stateset->setAttribute(depth.get());
|
||||
stateset->setAttributeAndModes(document.getSubSurfacePolygonOffset(document.subfaceLevel()), osg::StateAttribute::ON);
|
||||
stateset->setAttribute(document.getSubSurfaceDepth());
|
||||
|
||||
stateset->setRenderBinDetails(document.subfaceLevel(),"RenderBin");
|
||||
}
|
||||
|
||||
#if 0
|
||||
// note from Robert Osfield, this "optimization" breaks multi-textured datasets that mix single texture
|
||||
// and mulit-texture geometries as the Multitexture parsing can come after the below code, and accidentally
|
||||
// polute the non multi-texture geometries StateSet.
|
||||
|
||||
// A simple share stateset optimization.
|
||||
static osg::ref_ptr<osg::StateSet> lastStateset;
|
||||
if (lastStateset.valid() && (stateset->compare(*lastStateset,false)==0))
|
||||
stateset = lastStateset;
|
||||
else
|
||||
lastStateset = stateset;
|
||||
#endif
|
||||
|
||||
_geode->setStateSet(stateset.get());
|
||||
|
||||
// Add to parent.
|
||||
@@ -952,28 +934,12 @@ protected:
|
||||
// Subface
|
||||
if (document.subfaceLevel() > 0)
|
||||
{
|
||||
static osg::ref_ptr<osg::PolygonOffset> polygonOffset = new osg::PolygonOffset(-10.0f, -40.0f);
|
||||
stateset->setAttributeAndModes(polygonOffset.get(), osg::StateAttribute::ON);
|
||||
|
||||
static osg::ref_ptr<osg::Depth> depth = new osg::Depth(osg::Depth::LESS, 0.0, 1.0,false);
|
||||
stateset->setAttribute(depth.get());
|
||||
stateset->setAttributeAndModes(document.getSubSurfacePolygonOffset(document.subfaceLevel()), osg::StateAttribute::ON);
|
||||
stateset->setAttribute(document.getSubSurfaceDepth());
|
||||
|
||||
stateset->setRenderBinDetails(document.subfaceLevel(),"RenderBin");
|
||||
}
|
||||
|
||||
#if 0
|
||||
// note from Robert Osfield, this "optimization" breaks multi-textured datasets that mix single texture
|
||||
// and mulit-texture geometries as the Multitexture parsing can come after the below code, and accidentally
|
||||
// polute the non multi-texture geometries StateSet.
|
||||
|
||||
// A simple share stateset optimization.
|
||||
static osg::ref_ptr<osg::StateSet> lastStateset;
|
||||
if (lastStateset.valid() && (stateset->compare(*lastStateset,false)==0))
|
||||
stateset = lastStateset;
|
||||
else
|
||||
lastStateset = stateset;
|
||||
#endif
|
||||
|
||||
_geode->setStateSet(stateset.get());
|
||||
|
||||
// Add to parent.
|
||||
|
||||
@@ -123,11 +123,14 @@ osgDB::ReaderWriter::ReadResult EasyCurl::read(const std::string& proxyAddress,
|
||||
// use for https.
|
||||
// curl_easy_setopt(_curl, CURLOPT_KEYPASSWD, password.c_str());
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a07
|
||||
if (details->httpAuthentication != _previousHttpAuthentication)
|
||||
{
|
||||
curl_easy_setopt(_curl, CURLOPT_HTTPAUTH, details->httpAuthentication);
|
||||
_previousHttpAuthentication = details->httpAuthentication;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -136,13 +139,15 @@ osgDB::ReaderWriter::ReadResult EasyCurl::read(const std::string& proxyAddress,
|
||||
curl_easy_setopt(_curl, CURLOPT_USERPWD, 0);
|
||||
_previousPassword.clear();
|
||||
}
|
||||
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a07
|
||||
// need to reset if previously set.
|
||||
if (_previousHttpAuthentication!=0)
|
||||
{
|
||||
curl_easy_setopt(_curl, CURLOPT_HTTPAUTH, 0);
|
||||
_previousHttpAuthentication = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
curl_easy_setopt(_curl, CURLOPT_URL, fileName.c_str());
|
||||
@@ -154,6 +159,8 @@ osgDB::ReaderWriter::ReadResult EasyCurl::read(const std::string& proxyAddress,
|
||||
|
||||
if (res==0)
|
||||
{
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a07
|
||||
long code;
|
||||
if(!proxyAddress.empty())
|
||||
{
|
||||
@@ -191,13 +198,19 @@ osgDB::ReaderWriter::ReadResult EasyCurl::read(const std::string& proxyAddress,
|
||||
|
||||
return rr;
|
||||
}
|
||||
#endif
|
||||
|
||||
return osgDB::ReaderWriter::ReadResult::FILE_LOADED;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Error: libcurl read error, file="<<fileName<<" error = "<<curl_easy_strerror(res)<<std::endl;
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x070c00
|
||||
osg::notify(osg::NOTICE)<<"Error: libcurl read error, file="<<fileName<<" error = "<<curl_easy_strerror(res)<<std::endl;
|
||||
#else
|
||||
osg::notify(osg::NOTICE)<<"Error: libcurl read error, file="<<fileName<<" error no = "<<res<<std::endl;
|
||||
#endif
|
||||
return osgDB::ReaderWriter::ReadResult::FILE_NOT_HANDLED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ osg::Geode* daeReader::processInstanceGeometry( domInstance_geometry *ig )
|
||||
domGeometryGeodeMap::iterator iter = geometryMap.find( geom );
|
||||
if ( iter != geometryMap.end() )
|
||||
{
|
||||
cachedGeode = iter->second;
|
||||
cachedGeode = iter->second.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -119,7 +119,7 @@ osg::Geode* daeReader::processInstanceController( domInstance_controller *ictrl
|
||||
domGeometryGeodeMap::iterator iter = geometryMap.find( geom );
|
||||
if ( iter != geometryMap.end() )
|
||||
{
|
||||
cachedGeode = iter->second;
|
||||
cachedGeode = iter->second.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ void daeReader::processBindMaterial( domBind_material *bm, domGeometry *geom, os
|
||||
if ( iter != materialMap.end() )
|
||||
{
|
||||
// Reuse material
|
||||
ss = iter->second;
|
||||
ss = iter->second.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -232,9 +232,9 @@ protected:
|
||||
domInstance_effect *currentInstance_effect;
|
||||
domEffect *currentEffect;
|
||||
|
||||
typedef std::map< domGeometry*, osg::Geode*> domGeometryGeodeMap;
|
||||
typedef std::map< domMaterial*, osg::StateSet*> domMaterialStateSetMap;
|
||||
typedef std::map< std::string, osg::StateSet*> MaterialStateSetMap;
|
||||
typedef std::map< domGeometry*, osg::ref_ptr<osg::Geode> > domGeometryGeodeMap;
|
||||
typedef std::map< domMaterial*, osg::ref_ptr<osg::StateSet> > domMaterialStateSetMap;
|
||||
typedef std::map< std::string, osg::ref_ptr<osg::StateSet> > MaterialStateSetMap;
|
||||
|
||||
/// Maps geometry to a Geode
|
||||
domGeometryGeodeMap geometryMap;
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <map>
|
||||
#include <stack>
|
||||
|
||||
#include <osg/io_utils>
|
||||
#include <osg/Node>
|
||||
#include <osg/Geode>
|
||||
#include <osg/Geometry>
|
||||
|
||||
@@ -597,7 +597,7 @@ dxfPolyline::drawScene(scene* sc)
|
||||
// is there a flag 1 or 32 for 64?
|
||||
} else {
|
||||
// simple polyline?
|
||||
for (short i = _vertices.size()-1; i >= 0; i--)
|
||||
for (int i = _vertices.size()-1; i >= 0; i--)
|
||||
vlist.push_back(_vertices[i]->getVertex());
|
||||
if (_flag & 1) {
|
||||
// std::cout << "line loop " << _vertices.size() << std::endl;
|
||||
|
||||
@@ -60,7 +60,7 @@ bool HDRLoader::isHDRFile(const char *_fileName)
|
||||
|
||||
fclose(file);
|
||||
|
||||
if (numRead<10) return false;
|
||||
if (numRead<1) return false;
|
||||
|
||||
if (memcmp(str, "#?RADIANCE", 10) && memcmp(str, "#?RGBE", 6))
|
||||
return false;
|
||||
@@ -80,7 +80,7 @@ bool HDRLoader::load(const char *_fileName, const bool _rawRGBE, HDRLoaderResult
|
||||
|
||||
size_t numRead = fread(str, 10, 1, file);
|
||||
|
||||
if (numRead<10)
|
||||
if (numRead<1)
|
||||
{
|
||||
fclose(file);
|
||||
return false;
|
||||
@@ -90,7 +90,7 @@ bool HDRLoader::load(const char *_fileName, const bool _rawRGBE, HDRLoaderResult
|
||||
{
|
||||
fseek(file, 0, SEEK_SET);
|
||||
numRead = fread(str, 6, 1, file);
|
||||
if (numRead<6 || memcmp(str, "#?RGBE", 6))
|
||||
if (numRead<1 || memcmp(str, "#?RGBE", 6))
|
||||
{
|
||||
fclose(file);
|
||||
return false;
|
||||
|
||||
@@ -328,6 +328,7 @@ ref_ptr<PrimitiveSet> VTXReader::processStrip(unsigned short * indexArray,
|
||||
int offset)
|
||||
{
|
||||
VTXStrip strip;
|
||||
DrawElementsUShort * drawElements;
|
||||
ref_ptr<PrimitiveSet> primSet;
|
||||
unsigned short * start;
|
||||
unsigned short * end;
|
||||
@@ -348,13 +349,17 @@ ref_ptr<PrimitiveSet> VTXReader::processStrip(unsigned short * indexArray,
|
||||
|
||||
// Create the primitive set (based on the flag)
|
||||
if (strip.strip_flags & STRIP_IS_TRI_LIST)
|
||||
primSet =
|
||||
drawElements =
|
||||
new DrawElementsUShort(PrimitiveSet::TRIANGLES, start, end);
|
||||
else
|
||||
primSet =
|
||||
drawElements =
|
||||
new DrawElementsUShort(PrimitiveSet::TRIANGLE_STRIP, start, end);
|
||||
|
||||
// Flip the indices to get the front faces correct
|
||||
std::reverse(drawElements->begin(), drawElements->end());
|
||||
|
||||
// Return the primitive set
|
||||
primSet = drawElements;
|
||||
return primSet;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ bool ImageLayer_readLocalData(osg::Object& obj, osgDB::Input &fr)
|
||||
osgDB::FileType fileType = osgDB::fileType(filename);
|
||||
if (fileType == osgDB::FILE_NOT_FOUND)
|
||||
{
|
||||
filename = osgDB::findDataFile(filename);
|
||||
filename = osgDB::findDataFile(filename, fr.getOptions());
|
||||
fileType = osgDB::fileType(filename);
|
||||
}
|
||||
|
||||
@@ -71,10 +71,10 @@ bool ImageLayer_readLocalData(osg::Object& obj, osgDB::Input &fr)
|
||||
image = osgDB::readRefImageFile( filename );
|
||||
}
|
||||
|
||||
osg::notify(osg::INFO)<<"osgVolume::ImageLayer image read: "<<filename<<" pixelFormat "<<std::hex<<image->getPixelFormat()<<" textureFormat "<<image->getInternalTextureFormat()<<" dataType "<<image->getDataType()<<std::dec<<std::endl;
|
||||
|
||||
if (image.valid())
|
||||
{
|
||||
osg::notify(osg::INFO)<<"osgVolume::ImageLayer image read: "<<filename<<" pixelFormat "<<std::hex<<image->getPixelFormat()<<" textureFormat "<<image->getInternalTextureFormat()<<" dataType "<<image->getDataType()<<std::dec<<std::endl;
|
||||
layer.setImage(image.get());
|
||||
layer.rescaleToZeroToOneRange();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
SET(TARGET_SRC ReaderWriterPDF.cpp )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CAIRO_INCLUDE_DIRS} ${POPPLER_INCLUDE_DIRS} )
|
||||
LINK_DIRECTORIES(${CAIRO_LIBRARY_DIRS} ${POPPLER_LIB_DIRS})
|
||||
LINK_DIRECTORIES(${CAIRO_LIBRARY_DIRS} ${POPPLER_LIBRARY_DIRS})
|
||||
SET(TARGET_EXTERNAL_LIBRARIES ${CAIRO_LIBRARIES} ${POPPLER_LIBRARIES} )
|
||||
|
||||
SET(TARGET_ADDED_LIBRARIES osgWidget)
|
||||
|
||||
@@ -664,7 +664,7 @@ void GeometryTechnique::generateGeometry(Locator* masterLocator, const osg::Vec3
|
||||
}
|
||||
|
||||
|
||||
//geometry->setUseDisplayList(false);
|
||||
geometry->setUseDisplayList(false);
|
||||
geometry->setUseVertexBufferObjects(true);
|
||||
|
||||
|
||||
@@ -702,7 +702,7 @@ void GeometryTechnique::applyColorLayers()
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
colorLayer = switchLayer->getLayer(switchLayer->getActiveLayer());
|
||||
if (!colorLayer) continue;
|
||||
}
|
||||
@@ -726,10 +726,21 @@ void GeometryTechnique::applyColorLayers()
|
||||
|
||||
texture2D->setFilter(osg::Texture::MIN_FILTER, colorLayer->getMinFilter());
|
||||
texture2D->setFilter(osg::Texture::MAG_FILTER, colorLayer->getMagFilter());
|
||||
|
||||
|
||||
texture2D->setWrap(osg::Texture::WRAP_S,osg::Texture::CLAMP_TO_EDGE);
|
||||
texture2D->setWrap(osg::Texture::WRAP_T,osg::Texture::CLAMP_TO_EDGE);
|
||||
|
||||
bool mipMapping = !(texture2D->getFilter(osg::Texture::MIN_FILTER)==osg::Texture::LINEAR || texture2D->getFilter(osg::Texture::MIN_FILTER)==osg::Texture::NEAREST);
|
||||
bool s_NotPowerOfTwo = image->s()==0 || (image->s() & (image->s() - 1));
|
||||
bool t_NotPowerOfTwo = image->t()==0 || (image->t() & (image->t() - 1));
|
||||
|
||||
if (mipMapping && (s_NotPowerOfTwo || t_NotPowerOfTwo))
|
||||
{
|
||||
osg::notify(osg::INFO)<<"Disabling mipmapping for non power of two tile size("<<image->s()<<", "<<image->t()<<")"<<std::endl;
|
||||
texture2D->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
|
||||
}
|
||||
|
||||
|
||||
layerToTextureMap[colorLayer] = texture2D;
|
||||
|
||||
// osg::notify(osg::NOTICE)<<"Creating new ImageLayer texture "<<layerNum<<" image->s()="<<image->s()<<" image->t()="<<image->t()<<std::endl;
|
||||
@@ -772,7 +783,7 @@ void GeometryTechnique::applyTransparency()
|
||||
bool containsTransparency = false;
|
||||
for(unsigned int i=0; i<_terrainTile->getNumColorLayers(); ++i)
|
||||
{
|
||||
osg::Image* image = _terrainTile->getColorLayer(i)->getImage();
|
||||
osg::Image* image = (_terrainTile->getColorLayer(i)!=0) ? _terrainTile->getColorLayer(i)->getImage() : 0;
|
||||
if (image)
|
||||
{
|
||||
containsTransparency = image->isImageTranslucent();
|
||||
|
||||
@@ -117,8 +117,6 @@ osg::BoundingSphere Layer::computeBound(bool treatAsElevationLayer) const
|
||||
|
||||
if (getLocator()->convertLocalToModel(osg::Vec3d(0.0,0.0,0.0), v))
|
||||
{
|
||||
bs.expandBy(v);
|
||||
|
||||
bs.radius() = (bs.center() - v).length();
|
||||
}
|
||||
|
||||
|
||||
@@ -1494,14 +1494,15 @@ void Optimizer::RemoveLoadedProxyNodesVisitor::removeRedundantNodes()
|
||||
// take a copy of parents list since subsequent removes will modify the original one.
|
||||
osg::Node::ParentList parents = group->getParents();
|
||||
|
||||
for(unsigned int i=0;i<group->getNumChildren();++i)
|
||||
for(osg::Node::ParentList::iterator pitr=parents.begin();
|
||||
pitr!=parents.end();
|
||||
++pitr)
|
||||
{
|
||||
osg::Node* child = group->getChild(i);
|
||||
for(osg::Node::ParentList::iterator pitr=parents.begin();
|
||||
pitr!=parents.end();
|
||||
++pitr)
|
||||
(*pitr)->removeChild(group.get());
|
||||
for(unsigned int i=0;i<group->getNumChildren();++i)
|
||||
{
|
||||
(*pitr)->replaceChild(group.get(),child);
|
||||
osg::Node* child = group->getChild(i);
|
||||
(*pitr)->addChild(child);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2415,11 +2416,11 @@ bool Optimizer::MergeGeometryVisitor::mergeGeometry(osg::Geometry& lhs,osg::Geom
|
||||
|
||||
|
||||
// shift the indices of the incoming primitives to account for the pre existing geometry.
|
||||
for(osg::Geometry::PrimitiveSetList::iterator primItr=rhs.getPrimitiveSetList().begin();
|
||||
primItr!=rhs.getPrimitiveSetList().end();
|
||||
++primItr)
|
||||
osg::Geometry::PrimitiveSetList::iterator primItr;
|
||||
for(primItr=rhs.getPrimitiveSetList().begin(); primItr!=rhs.getPrimitiveSetList().end(); ++primItr)
|
||||
{
|
||||
osg::PrimitiveSet* primitive = primItr->get();
|
||||
|
||||
switch(primitive->getType())
|
||||
{
|
||||
case(osg::PrimitiveSet::DrawElementsUBytePrimitiveType):
|
||||
@@ -2486,12 +2487,12 @@ bool Optimizer::MergeGeometryVisitor::mergeGeometry(osg::Geometry& lhs,osg::Geom
|
||||
primitive->offsetIndices(base);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
lhs.getPrimitiveSetList().insert(lhs.getPrimitiveSetList().end(),
|
||||
rhs.getPrimitiveSetList().begin(),rhs.getPrimitiveSetList().end());
|
||||
for(primItr=rhs.getPrimitiveSetList().begin(); primItr!=rhs.getPrimitiveSetList().end(); ++primItr)
|
||||
{
|
||||
lhs.addPrimitiveSet(primItr->get());
|
||||
}
|
||||
|
||||
lhs.dirtyBound();
|
||||
lhs.dirtyDisplayList();
|
||||
@@ -2791,6 +2792,8 @@ bool Optimizer::SpatializeGroupsVisitor::divide(osg::Geode* geode, unsigned int
|
||||
}
|
||||
|
||||
osg::ref_ptr<osg::Group> group = new osg::Group;
|
||||
group->setName(geode->getName());
|
||||
group->setStateSet(geode->getStateSet());
|
||||
for(i=0; i<geode->getNumDrawables(); ++i)
|
||||
{
|
||||
osg::Geode* newGeode = new osg::Geode;
|
||||
|
||||
@@ -391,8 +391,14 @@ void RenderStage::runCameraSetUp(osg::RenderInfo& renderInfo)
|
||||
case Camera::PACKED_DEPTH_STENCIL_BUFFER:
|
||||
internalFormat = GL_DEPTH_STENCIL_EXT;
|
||||
break;
|
||||
|
||||
// all other buffers are color buffers
|
||||
default:
|
||||
internalFormat = GL_RGBA;
|
||||
// setup the internal format based on attached texture if such exists, otherwise just default format
|
||||
if (attachment._texture)
|
||||
internalFormat = attachment._texture->getInternalFormat();
|
||||
else
|
||||
internalFormat = GL_RGBA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -887,6 +893,7 @@ void RenderStage::drawInner(osg::RenderInfo& renderInfo,RenderLeaf*& previous, b
|
||||
}
|
||||
|
||||
// Bind the resolve framebuffer to blit into.
|
||||
_fbo->apply(state, FrameBufferObject::READ_FRAMEBUFFER);
|
||||
_resolveFbo->apply(state, FrameBufferObject::DRAW_FRAMEBUFFER);
|
||||
|
||||
// Blit to the resolve framebuffer.
|
||||
@@ -1195,17 +1202,12 @@ void RenderStage::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& pr
|
||||
// set up the back buffer.
|
||||
state.applyAttribute(_viewport.get());
|
||||
|
||||
#define USE_SISSOR_TEST
|
||||
#ifdef USE_SISSOR_TEST
|
||||
glScissor( static_cast<int>(_viewport->x()),
|
||||
static_cast<int>(_viewport->y()),
|
||||
static_cast<int>(_viewport->width()),
|
||||
static_cast<int>(_viewport->height()) );
|
||||
//cout << " clearing "<<this<< " "<<_viewport->x()<<","<< _viewport->y()<<","<< _viewport->width()<<","<< _viewport->height()<<std::endl;
|
||||
|
||||
glEnable( GL_SCISSOR_TEST );
|
||||
#endif
|
||||
|
||||
state.applyMode( GL_SCISSOR_TEST, true );
|
||||
|
||||
// glEnable( GL_DEPTH_TEST );
|
||||
|
||||
@@ -1214,21 +1216,33 @@ void RenderStage::drawImplementation(osg::RenderInfo& renderInfo,RenderLeaf*& pr
|
||||
else glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
|
||||
|
||||
if (_clearMask & GL_COLOR_BUFFER_BIT)
|
||||
{
|
||||
glClearColor( _clearColor[0], _clearColor[1], _clearColor[2], _clearColor[3]);
|
||||
}
|
||||
|
||||
if (_clearMask & GL_DEPTH_BUFFER_BIT)
|
||||
{
|
||||
glClearDepth( _clearDepth);
|
||||
glDepthMask ( GL_TRUE );
|
||||
state.haveAppliedAttribute( osg::StateAttribute::DEPTH );
|
||||
}
|
||||
|
||||
if (_clearMask & GL_STENCIL_BUFFER_BIT)
|
||||
{
|
||||
glClearStencil( _clearStencil);
|
||||
glStencilMask ( GL_TRUE );
|
||||
state.haveAppliedAttribute( osg::StateAttribute::STENCIL );
|
||||
}
|
||||
|
||||
if (_clearMask & GL_ACCUM_BUFFER_BIT)
|
||||
{
|
||||
glClearAccum( _clearAccum[0], _clearAccum[1], _clearAccum[2], _clearAccum[3]);
|
||||
}
|
||||
|
||||
|
||||
glClear( _clearMask );
|
||||
|
||||
#ifdef USE_SISSOR_TEST
|
||||
#ifdef USE_SCISSOR_TEST
|
||||
glDisable( GL_SCISSOR_TEST );
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1029,6 +1029,7 @@ GraphicsWindowWin32::GraphicsWindowWin32( osg::GraphicsContext::Traits* traits )
|
||||
_closeWindow(false),
|
||||
_destroyWindow(false),
|
||||
_destroying(false),
|
||||
_mouseCursor(InheritCursor),
|
||||
_appMouseCursor(LeftArrowCursor),
|
||||
_applyWorkaroundForMultimonitorMultithreadNVidiaWin32Issues( false )
|
||||
{
|
||||
@@ -1782,7 +1783,7 @@ void GraphicsWindowWin32::closeImplementation()
|
||||
void GraphicsWindowWin32::swapBuffersImplementation()
|
||||
{
|
||||
if (!_realized) return;
|
||||
if (!::SwapBuffers(_hdc))
|
||||
if (!::SwapBuffers(_hdc) && ::GetLastError() != 0)
|
||||
{
|
||||
reportErrorForScreen("GraphicsWindowWin32::swapBuffersImplementation() - Unable to swap display buffers", _traits->screenNum, ::GetLastError());
|
||||
}
|
||||
@@ -1935,25 +1936,28 @@ void GraphicsWindowWin32::useCursor( bool cursorOn )
|
||||
|
||||
void GraphicsWindowWin32::setCursor( MouseCursor mouseCursor )
|
||||
{
|
||||
if (mouseCursor != LeftRightCursor &&
|
||||
mouseCursor != UpDownCursor &&
|
||||
mouseCursor != TopLeftCorner &&
|
||||
mouseCursor != TopRightCorner &&
|
||||
mouseCursor != BottomLeftCorner &&
|
||||
mouseCursor != BottomRightCorner)
|
||||
if (_mouseCursor != mouseCursor)
|
||||
{
|
||||
_appMouseCursor = mouseCursor;
|
||||
if (mouseCursor != LeftRightCursor &&
|
||||
mouseCursor != UpDownCursor &&
|
||||
mouseCursor != TopLeftCorner &&
|
||||
mouseCursor != TopRightCorner &&
|
||||
mouseCursor != BottomLeftCorner &&
|
||||
mouseCursor != BottomRightCorner)
|
||||
{
|
||||
_appMouseCursor = mouseCursor;
|
||||
}
|
||||
|
||||
_mouseCursor = mouseCursor;
|
||||
HCURSOR newCursor = getOrCreateCursor( mouseCursor);
|
||||
if (newCursor == _currentCursor) return;
|
||||
|
||||
_currentCursor = newCursor;
|
||||
_traits->useCursor = (_currentCursor != NULL);
|
||||
|
||||
if (_mouseCursor != InheritCursor)
|
||||
::SetCursor(_currentCursor);
|
||||
}
|
||||
|
||||
_mouseCursor = mouseCursor;
|
||||
HCURSOR newCursor = getOrCreateCursor( mouseCursor);
|
||||
if (newCursor == _currentCursor) return;
|
||||
|
||||
_currentCursor = newCursor;
|
||||
_traits->useCursor = (_currentCursor != NULL);
|
||||
|
||||
if (_mouseCursor != InheritCursor)
|
||||
::SetCursor(_currentCursor);
|
||||
}
|
||||
|
||||
HCURSOR GraphicsWindowWin32::getOrCreateCursor(MouseCursor mouseCursor)
|
||||
@@ -2364,7 +2368,7 @@ LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, UINT uMsg, W
|
||||
break;
|
||||
default:
|
||||
if (_traits->useCursor && _appMouseCursor != InheritCursor)
|
||||
setCursor(LeftArrowCursor);
|
||||
setCursor(_appMouseCursor);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -98,9 +98,25 @@ osg::Node* createCube(const osg::Vec3& center, float size, unsigned int numSlice
|
||||
|
||||
void FixedFunctionTechnique::init()
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init()"<<std::endl;
|
||||
osg::notify(osg::INFO)<<"FixedFunctionTechnique::init()"<<std::endl;
|
||||
|
||||
if (!_volumeTile) return;
|
||||
if (!_volumeTile)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no volume tile assigned."<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_volumeTile->getLayer()==0)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no layer assigend to volume tile."<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_volumeTile->getLayer()->getImage()==0)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"FixedFunctionTechnique::init(), error no image assigned to layer."<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
float alphaFuncValue = 0.1;
|
||||
|
||||
|
||||
@@ -51,21 +51,38 @@ enum ShadingModel
|
||||
|
||||
void RayTracedTechnique::init()
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"RayTracedTechnique::init()"<<std::endl;
|
||||
|
||||
if (!_volumeTile) return;
|
||||
|
||||
osg::notify(osg::INFO)<<"RayTracedTechnique::init()"<<std::endl;
|
||||
|
||||
if (!_volumeTile)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no volume tile assigned."<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_volumeTile->getLayer()==0)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no layer assigend to volume tile."<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_volumeTile->getLayer()->getImage()==0)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"RayTracedTechnique::init(), error no image assigned to layer."<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
ShadingModel shadingModel = Isosurface;
|
||||
float alphaFuncValue = 0.1;
|
||||
|
||||
|
||||
_geode = new osg::Geode;
|
||||
|
||||
|
||||
osg::Image* image_3d = 0;
|
||||
osg::TransferFunction1D* tf = 0;
|
||||
osgVolume::Locator* masterLocator = _volumeTile->getLocator();
|
||||
|
||||
image_3d = _volumeTile->getLayer()->getImage();
|
||||
|
||||
|
||||
|
||||
CollectPropertiesVisitor cpv;
|
||||
if (_volumeTile->getLayer()->getProperty())
|
||||
{
|
||||
@@ -113,7 +130,7 @@ void RayTracedTechnique::init()
|
||||
}
|
||||
|
||||
|
||||
osg::notify(osg::NOTICE)<<"Matrix = "<<matrix<<std::endl;
|
||||
osg::notify(osg::INFO)<<"RayTracedTechnique::init() : matrix = "<<matrix<<std::endl;
|
||||
|
||||
osg::Texture::InternalFormatMode internalFormatMode = osg::Texture::USE_IMAGE_DATA_FORMAT;
|
||||
|
||||
@@ -173,8 +190,12 @@ void RayTracedTechnique::init()
|
||||
}
|
||||
|
||||
|
||||
bool enableBlending = false;
|
||||
|
||||
if (shadingModel==MaximumIntensityProjection)
|
||||
{
|
||||
enableBlending = true;
|
||||
|
||||
if (tf)
|
||||
{
|
||||
osg::Texture1D* texture1D = new osg::Texture1D;
|
||||
@@ -259,6 +280,8 @@ void RayTracedTechnique::init()
|
||||
}
|
||||
else if (shadingModel==Light)
|
||||
{
|
||||
enableBlending = true;
|
||||
|
||||
if (tf)
|
||||
{
|
||||
osg::Texture1D* texture1D = new osg::Texture1D;
|
||||
@@ -301,10 +324,12 @@ void RayTracedTechnique::init()
|
||||
}
|
||||
else
|
||||
{
|
||||
enableBlending = true;
|
||||
|
||||
if (tf)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Setting up TF path"<<std::endl;
|
||||
|
||||
osg::notify(osg::INFO)<<"Setting up TF path"<<std::endl;
|
||||
|
||||
osg::Texture1D* texture1D = new osg::Texture1D;
|
||||
texture1D->setImage(tf->getImage());
|
||||
texture1D->setResizeNonPowerOfTwoHint(false);
|
||||
@@ -329,7 +354,7 @@ void RayTracedTechnique::init()
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
|
||||
osg::Shader* fragmentShader = osgDB::readShaderFile(osg::Shader::FRAGMENT, "shaders/volume.frag");
|
||||
if (fragmentShader)
|
||||
@@ -362,6 +387,13 @@ void RayTracedTechnique::init()
|
||||
stateset->addUniform(new osg::Uniform("AlphaFuncValue",alphaFuncValue));
|
||||
|
||||
|
||||
if (enableBlending)
|
||||
{
|
||||
stateset->setMode(GL_BLEND, osg::StateAttribute::ON);
|
||||
stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
|
||||
}
|
||||
|
||||
|
||||
stateset->setMode(GL_CULL_FACE, osg::StateAttribute::ON);
|
||||
|
||||
osg::TexGen* texgen = new osg::TexGen;
|
||||
|
||||
@@ -108,8 +108,9 @@ char volume_iso_frag[] = "uniform sampler3D baseTexture;\n"
|
||||
" color.y = lightScale;\n"
|
||||
" color.z = lightScale;\n"
|
||||
" }\n"
|
||||
" \n"
|
||||
" if (color.w>1.0) color.w = 1.0; \n"
|
||||
"\n"
|
||||
" color.a = 1.0;\n"
|
||||
"\n"
|
||||
" gl_FragColor = color;\n"
|
||||
" \n"
|
||||
" return;\n"
|
||||
@@ -124,4 +125,5 @@ char volume_iso_frag[] = "uniform sampler3D baseTexture;\n"
|
||||
"\n"
|
||||
" // we didn't find an intersection so just discard fragment\n"
|
||||
" discard;\n"
|
||||
"}\n";
|
||||
"}\n"
|
||||
"\n";
|
||||
|
||||
@@ -232,6 +232,11 @@ void WindowManager::childInserted(unsigned int i) {
|
||||
|
||||
if(!window) return;
|
||||
|
||||
// Update Window's index
|
||||
for(Iterator w = begin(); w != end(); w++) {
|
||||
if(w->get()->_index >= i) w->get()->_index++;
|
||||
}
|
||||
|
||||
_objects.push_back(window);
|
||||
|
||||
window->_index = i;
|
||||
@@ -261,6 +266,12 @@ void WindowManager::childRemoved(unsigned int start, unsigned int numChildren) {
|
||||
window->unmanaged(this);
|
||||
}
|
||||
}
|
||||
|
||||
// Update Window's index
|
||||
for(Iterator w = begin(); w != end(); w++) {
|
||||
if(w->get()->_index >= start) w->get()->_index -= numChildren;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// This method performs intersection testing at the given XY coords, and returns true if
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <osg/io_utils>
|
||||
|
||||
TYPE_NAME_ALIAS(char, osg::Vec2b::value_type)
|
||||
TYPE_NAME_ALIAS(signed char, osg::Vec2b::value_type)
|
||||
|
||||
BEGIN_VALUE_REFLECTOR(osg::Vec2b)
|
||||
I_ReaderWriter(osgIntrospection::StdReaderWriter<reflected_type>); // user-defined
|
||||
@@ -31,8 +31,8 @@ BEGIN_VALUE_REFLECTOR(osg::Vec2b)
|
||||
I_Constructor0(____Vec2b,
|
||||
"",
|
||||
"");
|
||||
I_Constructor2(IN, char, r, IN, char, g,
|
||||
____Vec2b__char__char,
|
||||
I_Constructor2(IN, osg::Vec2b::value_type, r, IN, osg::Vec2b::value_type, g,
|
||||
____Vec2b__value_type__value_type,
|
||||
"",
|
||||
"");
|
||||
I_Method0(osg::Vec2b::value_type *, ptr,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <osg/io_utils>
|
||||
|
||||
TYPE_NAME_ALIAS(char, osg::Vec3b::value_type)
|
||||
TYPE_NAME_ALIAS(signed char, osg::Vec3b::value_type)
|
||||
|
||||
BEGIN_VALUE_REFLECTOR(osg::Vec3b)
|
||||
I_ReaderWriter(osgIntrospection::StdReaderWriter<reflected_type>); // user-defined
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <osg/io_utils>
|
||||
|
||||
TYPE_NAME_ALIAS(char, osg::Vec4b::value_type)
|
||||
TYPE_NAME_ALIAS(signed char, osg::Vec4b::value_type)
|
||||
|
||||
BEGIN_VALUE_REFLECTOR(osg::Vec4b)
|
||||
I_ReaderWriter(osgIntrospection::StdReaderWriter<reflected_type>); // user-defined
|
||||
|
||||
@@ -35,59 +35,59 @@ BEGIN_VALUE_REFLECTOR(osg::Vec4ub)
|
||||
____Vec4ub__value_type__value_type__value_type__value_type,
|
||||
"",
|
||||
"");
|
||||
I_Method0(unsigned char *, ptr,
|
||||
I_Method0(osg::Vec4ub::value_type *, ptr,
|
||||
Properties::NON_VIRTUAL,
|
||||
__unsigned_char_P1__ptr,
|
||||
__value_type_P1__ptr,
|
||||
"",
|
||||
"");
|
||||
I_Method0(const unsigned char *, ptr,
|
||||
I_Method0(const osg::Vec4ub::value_type *, ptr,
|
||||
Properties::NON_VIRTUAL,
|
||||
__C5_unsigned_char_P1__ptr,
|
||||
__C5_value_type_P1__ptr,
|
||||
"",
|
||||
"");
|
||||
I_Method4(void, set, IN, unsigned char, r, IN, unsigned char, g, IN, unsigned char, b, IN, unsigned char, a,
|
||||
I_Method4(void, set, IN, osg::Vec4ub::value_type, r, IN, osg::Vec4ub::value_type, g, IN, osg::Vec4ub::value_type, b, IN, osg::Vec4ub::value_type, a,
|
||||
Properties::NON_VIRTUAL,
|
||||
__void__set__unsigned_char__unsigned_char__unsigned_char__unsigned_char,
|
||||
__void__set__value_type__value_type__value_type__value_type,
|
||||
"",
|
||||
"");
|
||||
I_Method0(unsigned char &, r,
|
||||
I_Method0(osg::Vec4ub::value_type &, r,
|
||||
Properties::NON_VIRTUAL,
|
||||
__unsigned_char_R1__r,
|
||||
__value_type_R1__r,
|
||||
"",
|
||||
"");
|
||||
I_Method0(unsigned char &, g,
|
||||
I_Method0(osg::Vec4ub::value_type &, g,
|
||||
Properties::NON_VIRTUAL,
|
||||
__unsigned_char_R1__g,
|
||||
__value_type_R1__g,
|
||||
"",
|
||||
"");
|
||||
I_Method0(unsigned char &, b,
|
||||
I_Method0(osg::Vec4ub::value_type &, b,
|
||||
Properties::NON_VIRTUAL,
|
||||
__unsigned_char_R1__b,
|
||||
__value_type_R1__b,
|
||||
"",
|
||||
"");
|
||||
I_Method0(unsigned char &, a,
|
||||
I_Method0(osg::Vec4ub::value_type &, a,
|
||||
Properties::NON_VIRTUAL,
|
||||
__unsigned_char_R1__a,
|
||||
__value_type_R1__a,
|
||||
"",
|
||||
"");
|
||||
I_Method0(unsigned char, r,
|
||||
I_Method0(osg::Vec4ub::value_type, r,
|
||||
Properties::NON_VIRTUAL,
|
||||
__unsigned_char__r,
|
||||
__value_type__r,
|
||||
"",
|
||||
"");
|
||||
I_Method0(unsigned char, g,
|
||||
I_Method0(osg::Vec4ub::value_type, g,
|
||||
Properties::NON_VIRTUAL,
|
||||
__unsigned_char__g,
|
||||
__value_type__g,
|
||||
"",
|
||||
"");
|
||||
I_Method0(unsigned char, b,
|
||||
I_Method0(osg::Vec4ub::value_type, b,
|
||||
Properties::NON_VIRTUAL,
|
||||
__unsigned_char__b,
|
||||
__value_type__b,
|
||||
"",
|
||||
"");
|
||||
I_Method0(unsigned char, a,
|
||||
I_Method0(osg::Vec4ub::value_type, a,
|
||||
Properties::NON_VIRTUAL,
|
||||
__unsigned_char__a,
|
||||
__value_type__a,
|
||||
"",
|
||||
"");
|
||||
END_REFLECTOR
|
||||
|
||||
@@ -40,8 +40,8 @@ TYPE_NAME_ALIAS(std::vector< int >, osgUtil::Hit::VecIndexList)
|
||||
BEGIN_VALUE_REFLECTOR(osgUtil::Hit)
|
||||
I_DeclaringFile("osgUtil/IntersectVisitor");
|
||||
I_Constructor0(____Hit,
|
||||
"Describes a point in space produced by an intersection of a line with a scene. ",
|
||||
"A Hit is always on a surface as rendered by the Open Scene Graph scene (usually a triangle or other primitive, but a special hit handler could return a different value perhaps: a sphere shape might return a Hit on the true sphere rather than the approximate tessellated sphere rendered. ");
|
||||
"Deprecated. ",
|
||||
"");
|
||||
I_Constructor1(IN, const osgUtil::Hit &, hit,
|
||||
Properties::NON_EXPLICIT,
|
||||
____Hit__C5_Hit_R1,
|
||||
|
||||
Reference in New Issue
Block a user