Compare commits
204 Commits
OpenSceneG
...
OpenSceneG
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d1a844fb1 | ||
|
|
5c7990156d | ||
|
|
7269f71c47 | ||
|
|
32fb841e58 | ||
|
|
ace1188557 | ||
|
|
817780e67c | ||
|
|
7ed9ef7db0 | ||
|
|
12d20ee257 | ||
|
|
2bed6a2dca | ||
|
|
315e749cce | ||
|
|
0b5d743411 | ||
|
|
0029d8fc46 | ||
|
|
a5d6c1a6a3 | ||
|
|
65f85fee6d | ||
|
|
df14b9980a | ||
|
|
7ba85b16db | ||
|
|
bda1350be4 | ||
|
|
31f2e7902f | ||
|
|
e89336a306 | ||
|
|
9a8abe7fee | ||
|
|
01b27a9fb2 | ||
|
|
21f735d653 | ||
|
|
4dfa7485c1 | ||
|
|
7bbc1c419b | ||
|
|
ab029febbd | ||
|
|
d5d19ac1a4 | ||
|
|
44da3958c3 | ||
|
|
26e3f00882 | ||
|
|
fb6e1d4d9f | ||
|
|
e4fa4f9119 | ||
|
|
a9c1dd1a4a | ||
|
|
102e5c2439 | ||
|
|
264746a5c2 | ||
|
|
dfa3c9a2c9 | ||
|
|
b795e65a39 | ||
|
|
b1dbb9e96b | ||
|
|
4f6add4c14 | ||
|
|
edb1eede40 | ||
|
|
9cccbcd7b7 | ||
|
|
1bf529b391 | ||
|
|
83b84eb2f4 | ||
|
|
90325a5895 | ||
|
|
c2bc684eb2 | ||
|
|
5b439806ce | ||
|
|
5574c50607 | ||
|
|
31cb807db3 | ||
|
|
3326c26a60 | ||
|
|
8d70cc0b0f | ||
|
|
3558d1d010 | ||
|
|
be47c9f44a | ||
|
|
6dab8c3380 | ||
|
|
bbc8e7b58c | ||
|
|
9d8c98395e | ||
|
|
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 | ||
|
|
721505f7c9 | ||
|
|
e4eb3896dd | ||
|
|
98df276818 | ||
|
|
c3bad2bd04 | ||
|
|
e4ad3d311d | ||
|
|
fc05e7d8b1 | ||
|
|
d58a21ca5f | ||
|
|
03e08d7918 | ||
|
|
6ce7cc9d6a | ||
|
|
2646423be7 | ||
|
|
625ea05d3f | ||
|
|
f963397726 | ||
|
|
7c97bab944 | ||
|
|
89052bec27 | ||
|
|
99120af181 | ||
|
|
166f949592 | ||
|
|
145d93073c | ||
|
|
db00cb1613 | ||
|
|
1420393b00 | ||
|
|
440445aa8b | ||
|
|
07bccafd05 | ||
|
|
6df979f8c8 | ||
|
|
aef27c4387 | ||
|
|
d3061ac0f7 | ||
|
|
4adc16bcdd | ||
|
|
6a051be85a | ||
|
|
cbb9881003 | ||
|
|
be40ac8aad | ||
|
|
919a1e5286 | ||
|
|
85acee5dcc | ||
|
|
77326d2c17 | ||
|
|
ea3b08526d | ||
|
|
437377b5d5 | ||
|
|
c7f2e570ed | ||
|
|
b9540fc9f1 | ||
|
|
fa8de3058f | ||
|
|
1194f8941c | ||
|
|
1a922f0f28 | ||
|
|
ce1d7c0c90 | ||
|
|
3c50ac6f04 | ||
|
|
b783a7468e | ||
|
|
4e2c17ee02 | ||
|
|
578a910ad0 | ||
|
|
e0f4fb0952 | ||
|
|
6ad6bf8b5a | ||
|
|
0b702d27de | ||
|
|
d3f2c6e505 | ||
|
|
12d62940bc | ||
|
|
ffcece130a | ||
|
|
e2d7743a80 | ||
|
|
6298312cf0 | ||
|
|
1a3a801857 | ||
|
|
5ee4a99de0 | ||
|
|
9097925163 | ||
|
|
f29ddb0e05 | ||
|
|
96cd49d43a | ||
|
|
cd666f61e8 | ||
|
|
1224e0883a | ||
|
|
fde95d5ccf | ||
|
|
d0e12bd379 | ||
|
|
9acbe3e44f | ||
|
|
eb9b99b5ec | ||
|
|
42f06bf81a | ||
|
|
76dd3698ce | ||
|
|
a571574a1c | ||
|
|
223c603a8c | ||
|
|
91716f6e06 | ||
|
|
b8345534c5 | ||
|
|
33cba8392a | ||
|
|
2ab6a762c8 | ||
|
|
cc68950e7a | ||
|
|
59c1483fb9 | ||
|
|
cb37bf2446 | ||
|
|
3a34e2869b | ||
|
|
849333d43e | ||
|
|
a15813c4a7 | ||
|
|
a606fd688c |
87
AUTHORS.txt
87
AUTHORS.txt
@@ -1,6 +1,6 @@
|
||||
OpenSceneGraph Library 2.8.0
|
||||
OpenSceneGraph Library 2.8.2
|
||||
|
||||
364 Contributors:
|
||||
373 Contributors:
|
||||
|
||||
Firstname Surname
|
||||
-----------------
|
||||
@@ -9,9 +9,9 @@ Don Burns
|
||||
Marco Jez
|
||||
Paul Martz
|
||||
Mike Weiblen
|
||||
Mathias Fr<46>hlich
|
||||
Eric Wing
|
||||
Stephan Huber
|
||||
Mathias Fr<46>hlich
|
||||
Brede Johansen
|
||||
Geoff Michel
|
||||
Farshid Lashkari
|
||||
@@ -26,67 +26,70 @@ Luigi Calori
|
||||
Trajce Nikolov
|
||||
Mike Wittman
|
||||
Wojciech Lewandowski
|
||||
Paul Melis
|
||||
Colin McDonald
|
||||
Andy Skinner
|
||||
Roger James
|
||||
Pavel Moloshtan
|
||||
Mattias Helsing
|
||||
Tom Jolley
|
||||
Jeremy Moles
|
||||
Paul Melis
|
||||
Norman Vine
|
||||
Mattias Helsing
|
||||
Jason Beverage
|
||||
Norman Vine
|
||||
Cedric Pinson
|
||||
Art Tevs
|
||||
Alberto Farre
|
||||
Roland Smeenk
|
||||
Michael Platings
|
||||
Andr<EFBFBD> Garneau
|
||||
Ruben Lopez
|
||||
Randall Hopper
|
||||
Michael Platings
|
||||
Cedric Pinson
|
||||
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
|
||||
Roland Smeenk
|
||||
Per Fahlberg
|
||||
Michael Gronager
|
||||
Mathieu Marache
|
||||
Joakim Simonsson
|
||||
David Spilling
|
||||
Daniel Sj<53>lie
|
||||
Chris Hanson
|
||||
Philip Lowman
|
||||
Alberto Luaces
|
||||
Melchior Franz
|
||||
Philip Lowman
|
||||
Chris Denham
|
||||
Melchior Franz
|
||||
Lionel Lagarde
|
||||
David Fries
|
||||
Bryan Thrall
|
||||
Terry Welsh
|
||||
Serge Lages
|
||||
Joran Jessurun
|
||||
Frederic Marmond
|
||||
David Fries
|
||||
Boris Bralo
|
||||
Yefei He
|
||||
Tim Moore
|
||||
Terry Welsh
|
||||
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
|
||||
Bryan Thrall
|
||||
Ben Discoe
|
||||
Andreas Ekstrand
|
||||
Thibault Genessay
|
||||
Sukender
|
||||
Sasa Bistrovic
|
||||
Neil Groves
|
||||
Martin Naylor
|
||||
Martin Aumueller
|
||||
Markus Trenkwalder
|
||||
Loic Dachary
|
||||
Joseph Steel
|
||||
@@ -96,7 +99,6 @@ Jan Ciger
|
||||
Glenn Waldron
|
||||
Brad Colbert
|
||||
Vivek Rajan
|
||||
Thibault Genessay
|
||||
Sean Spicer
|
||||
Ravi Mathur
|
||||
Peter Hrenka
|
||||
@@ -105,7 +107,6 @@ Neil Salter
|
||||
Mihai Radu
|
||||
Michael Hartman
|
||||
Luc Frauciel
|
||||
Lionel Lagarde
|
||||
Laurens Voerman
|
||||
David Guthrie
|
||||
Corbin Holtz
|
||||
@@ -114,11 +115,12 @@ Blasius Czink
|
||||
Toshiyuki Takahei
|
||||
Thom DeCarlo
|
||||
Tatsuhiro Nishioka
|
||||
Sukender
|
||||
Simon Julier
|
||||
Sebastien Grignard
|
||||
Romano Magacho
|
||||
Richard Schmidt
|
||||
Riccardo Corsi
|
||||
Ralf Habacker
|
||||
Paul de Repentigny
|
||||
Liang Aibin
|
||||
Leandro Motta Barros
|
||||
@@ -134,10 +136,9 @@ Uwe Woessner
|
||||
Tony Horrobin
|
||||
Sohey Yamamoto
|
||||
Rudolf Wiedemann
|
||||
Riccardo Corsi
|
||||
Ralf Habacker
|
||||
Rafa Gaitan
|
||||
Phil Atkin
|
||||
Miguel Escriva
|
||||
Mattias Linde
|
||||
Maria Ten
|
||||
Ken Sewell
|
||||
@@ -145,9 +146,11 @@ Julian Ortiz
|
||||
Jeremy Bell
|
||||
Jaromir Vitek
|
||||
James French
|
||||
Gary Quinn
|
||||
Garrett Potts
|
||||
Gabor Dorka
|
||||
Fabio Mierlo
|
||||
Fabien Lavignotte
|
||||
Doug McCorkle
|
||||
Donn Mielcarek
|
||||
Donald Cipperly
|
||||
@@ -165,6 +168,7 @@ Wang Rui
|
||||
Tugkan Calapoglu
|
||||
Tim Daoust
|
||||
Terrex
|
||||
Tanguy Fautr<74>
|
||||
Sylvain Marie
|
||||
Steve Lunsford
|
||||
Stephane Simon
|
||||
@@ -172,16 +176,22 @@ Stephan Eilemann
|
||||
Stanislav Blinov
|
||||
Sergey Leontyev
|
||||
Sebastian Messerschmidt
|
||||
Rene Molenaar
|
||||
Ralf Kern
|
||||
Pierre Haritchabalet
|
||||
Perry Miller
|
||||
Paul Obermeier
|
||||
Neil Hughes
|
||||
Nathan Monteleone
|
||||
Miguel Escriva
|
||||
Morn<EFBFBD> Pistorius
|
||||
Michael Henheffer
|
||||
Michael Guerrero
|
||||
Maya Leonard
|
||||
Max Bandazian
|
||||
Mathew May
|
||||
Martin Spott
|
||||
Martijn Kragtwijk
|
||||
Konstantin Sinitsyn
|
||||
Kevin Moiule
|
||||
Keith Steffen
|
||||
Katharina Plugge
|
||||
@@ -196,9 +206,11 @@ Gustavo Wagner
|
||||
Guillaume Chouvenc
|
||||
Gerrick Bivins
|
||||
George Tarantilis
|
||||
Frederic Bouvier
|
||||
Ferdi Smit
|
||||
Ewe Woessner
|
||||
Erik den Dekker
|
||||
Emmanuel Roche
|
||||
Edgar Ellis
|
||||
Don Leich
|
||||
David Ergo
|
||||
@@ -225,8 +237,6 @@ Tomas Hnilica
|
||||
Tino Schwarze
|
||||
Thomas Weidner
|
||||
Thom Carlo
|
||||
Tery Welsh
|
||||
Tanguy Fautr<74>
|
||||
Steven Thomas
|
||||
Simon Hammett
|
||||
Sid Byce
|
||||
@@ -234,13 +244,14 @@ Shuxing Xiao
|
||||
Shane Arnott
|
||||
Sebastien Kuntz
|
||||
Ruth Lang
|
||||
Ruben Smelik
|
||||
Ross Anderson
|
||||
Ronny Krueger
|
||||
Robert Swain
|
||||
Rob Bloemkool
|
||||
Rick Pingry
|
||||
Rick Appleton
|
||||
Ricard Schmidt
|
||||
Rene Molenaar
|
||||
Reinhard Sainitzer
|
||||
Rein Kadijk
|
||||
Raymond de Vries
|
||||
@@ -249,9 +260,10 @@ Qing Shen
|
||||
Piotr Rak
|
||||
Philipp Siemoleit
|
||||
Philipp M<>chler
|
||||
Petr Salinger
|
||||
Paul Palumbo
|
||||
Paul Obermeier
|
||||
Paul Fredrikson
|
||||
Paul Fotheringham
|
||||
Patrick Hartling
|
||||
Parag Chaudhur
|
||||
Panagiotis Papadakos
|
||||
@@ -259,10 +271,8 @@ Panagiotis Koutsourakis
|
||||
Orhun Birsoy
|
||||
Ole-Morten Duesund
|
||||
Nicolas Brodu
|
||||
Neil Hughes
|
||||
Nathan Cournia
|
||||
Morten Haukness
|
||||
Morn<EFBFBD> Pistorius
|
||||
Mirko Viviani
|
||||
Mikkel Gjøl
|
||||
Mike Garrity
|
||||
@@ -278,13 +288,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
|
||||
@@ -303,28 +311,28 @@ 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
|
||||
Gary Quinn
|
||||
Galen Faidley
|
||||
Frederic Bouvier
|
||||
Frank Warmerdam
|
||||
Frank Midgley
|
||||
Frank Lindeman
|
||||
Frank Lichtenheld
|
||||
Ferdinand Cornelissen
|
||||
Fabien Lavignotte
|
||||
Fajran Iman
|
||||
Fabien Dachicourt
|
||||
Emmanuel Roche
|
||||
Edmond Gheury
|
||||
Ed Ralston
|
||||
Duvan Cope
|
||||
@@ -338,6 +346,7 @@ Danny Valente
|
||||
Daniel Stien
|
||||
Dan Minor
|
||||
Cyril Brulebois
|
||||
Cory Riddell
|
||||
Clay Fowler
|
||||
Chuck Sembroski
|
||||
Chuck Seberion
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
|
||||
|
||||
IF(WIN32)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
|
||||
ELSE(WIN32)
|
||||
@@ -28,12 +30,12 @@ PROJECT(OpenSceneGraph)
|
||||
|
||||
SET(OPENSCENEGRAPH_MAJOR_VERSION 2)
|
||||
SET(OPENSCENEGRAPH_MINOR_VERSION 8)
|
||||
SET(OPENSCENEGRAPH_PATCH_VERSION 0)
|
||||
SET(OPENSCENEGRAPH_PATCH_VERSION 2)
|
||||
SET(OPENSCENEGRAPH_SOVERSION 55)
|
||||
|
||||
# set to 0 when not a release candidate, non zero means that any generated
|
||||
# svn tags will be treated as release candidates of given number
|
||||
SET(OPENSCENEGRAPH_RELEASE_CANDIDATE 1)
|
||||
SET(OPENSCENEGRAPH_RELEASE_CANDIDATE 0)
|
||||
|
||||
SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})
|
||||
|
||||
@@ -81,8 +83,9 @@ ENDIF(CMAKE_SYSTEM MATCHES IRIX)
|
||||
OPTION(OSG_MAINTAINER "Enable OpenSceneGraph maintainer build methods, such as making svn branches, tags, updating ChangeLog." OFF)
|
||||
IF (OSG_MAINTAINER)
|
||||
|
||||
SET(OPENSCENEGRAPH_SVN "trunk")
|
||||
#SET(OPENSCENEGRAPH_SVN "branches")
|
||||
#SET(OPENSCENEGRAPH_SVN "trunk")
|
||||
SET(OPENSCENEGRAPH_SVN "branches")
|
||||
|
||||
SET(OPENSCENEGRAPH_BRANCH OpenSceneGraph-${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION})
|
||||
|
||||
#
|
||||
@@ -96,7 +99,7 @@ IF (OSG_MAINTAINER)
|
||||
IF (OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
||||
SET(SVNSOURCEDIR ${SVNTRUNKDIR})
|
||||
ELSE (OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
||||
SET(SVNSOURCEDIR ${SVNBRANCH_DIR}/${OPENSCENEGRAPH_BRANCH})
|
||||
SET(SVNSOURCEDIR ${SVNBRANCHDIR}/${OPENSCENEGRAPH_BRANCH})
|
||||
ENDIF(OPENSCENEGRAPH_SVN STREQUAL "trunk")
|
||||
|
||||
|
||||
@@ -130,7 +133,7 @@ IF (OSG_MAINTAINER)
|
||||
|
||||
ADD_CUSTOM_TARGET(ChangeLog
|
||||
COMMAND ${SVNCOMMAND} update
|
||||
COMMAND ${GENERATELOGS}
|
||||
COMMAND ${GENERATELOGS} ${SVNSOURCEDIR}
|
||||
)
|
||||
|
||||
ENDIF(OSG_MAINTAINER)
|
||||
@@ -292,13 +295,12 @@ FIND_PACKAGE(Inventor)
|
||||
FIND_PACKAGE(Jasper)
|
||||
FIND_PACKAGE(OpenEXR)
|
||||
FIND_PACKAGE(COLLADA)
|
||||
FIND_PACKAGE(ZLIB)
|
||||
FIND_PACKAGE(Xine)
|
||||
FIND_PACKAGE(OpenVRML)
|
||||
FIND_PACKAGE(Performer)
|
||||
FIND_PACKAGE(ZLIB)
|
||||
FIND_PACKAGE(GDAL)
|
||||
FIND_PACKAGE(CURL)
|
||||
FIND_PACKAGE(ZLIB)
|
||||
FIND_PACKAGE(ITK)
|
||||
FIND_PACKAGE(LibVNCServer)
|
||||
FIND_PACKAGE(OurDCMTK)
|
||||
@@ -547,14 +549,9 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# errors instead of warnings for certain issues, including superfluous
|
||||
# semicolons and commas, and the use of long long. -fpermissive seems
|
||||
# to be the workaround.
|
||||
SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wformat=2 -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive)
|
||||
SET(OSG_AGGRESSIVE_WARNING_FLAGS -Wall -Wparentheses -Wno-long-long -Wno-import -pedantic -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wunused -fpermissive)
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
|
||||
# disable the "warning: format not a string literal and no format arguments" emited from std library ostream support
|
||||
SET(OSG_AGGRESSIVE_WARNING_FLAGS ${OSG_AGGRESSIVE_WARNING_FLAGS} -Wformat=0)
|
||||
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
# Previous included -Wformat=2 in OSG_AGGRESSIVE_WARNING_FLAGS but had to remove it due to standard library errors
|
||||
|
||||
|
||||
ELSE(CMAKE_COMPILER_IS_GNUCXX)
|
||||
@@ -575,7 +572,14 @@ ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# This part is for the CMake menu option to toggle the warnings on/off.
|
||||
# This will only be made available if we set values for OSG_AGGRESSIVE_WARNING_FLAGS.
|
||||
IF(OSG_AGGRESSIVE_WARNING_FLAGS)
|
||||
OPTION(OSG_USE_AGGRESSIVE_WARNINGS "Enable to activate aggressive warnings" ON)
|
||||
|
||||
IF (APPLE)
|
||||
SET(DEFAULT_USE_AGGRESSIVE_WARNINGS OFF)
|
||||
ELSE(APPLE)
|
||||
SET(DEFAULT_USE_AGGRESSIVE_WARNINGS ON)
|
||||
ENDIF(APPLE)
|
||||
|
||||
OPTION(OSG_USE_AGGRESSIVE_WARNINGS "Enable to activate aggressive warnings" ${DEFAULT_USE_AGGRESSIVE_WARNINGS})
|
||||
MARK_AS_ADVANCED(OSG_USE_AGGRESSIVE_WARNINGS)
|
||||
|
||||
IF(OSG_USE_AGGRESSIVE_WARNINGS)
|
||||
|
||||
@@ -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,7 +13,10 @@
|
||||
#
|
||||
# Created by Robert Osfield.
|
||||
|
||||
SET(COLLADA_DOM_ROOT "$ENV{COLLADA_DIR}/dom" CACHE PATH "Location of Collada DOM directory")
|
||||
|
||||
FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
||||
${COLLADA_DOM_ROOT}/include
|
||||
$ENV{COLLADA_DIR}/include
|
||||
$ENV{COLLADA_DIR}
|
||||
$ENV{OSGDIR}/include
|
||||
@@ -36,6 +39,7 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h
|
||||
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
|
||||
NAMES collada_dom collada14dom libcollada14dom21
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/build/vc8-1.4
|
||||
$ENV{COLLADA_DIR}/build/vc8-1.4
|
||||
$ENV{COLLADA_DIR}/lib
|
||||
$ENV{COLLADA_DIR}/lib-dbg
|
||||
@@ -60,6 +64,7 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY
|
||||
FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
|
||||
NAMES collada_dom-d collada14dom-d libcollada14dom21-d
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/build/vc8-1.4-d
|
||||
$ENV{COLLADA_DIR}/build/vc8-1.4-d
|
||||
$ENV{COLLADA_DIR}/lib
|
||||
$ENV{COLLADA_DIR}/lib-dbg
|
||||
@@ -81,9 +86,10 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COLLADA_STATIC_LIBRARY
|
||||
NAMES collada_dom-s collada14dom-s libcollada14dom21-s
|
||||
FIND_LIBRARY(COLLADA_STATIC_LIBRARY
|
||||
NAMES libcollada14dom21-s
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/build/vc8-1.4
|
||||
$ENV{COLLADA_DIR}/build/vc8-1.4
|
||||
$ENV{COLLADA_DIR}/lib
|
||||
$ENV{COLLADA_DIR}/lib-dbg
|
||||
@@ -108,6 +114,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY
|
||||
FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
||||
NAMES collada_dom-sd collada14dom-sd libcollada14dom21-sd
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/build/vc8-1.4-d
|
||||
$ENV{COLLADA_DIR}/build/vc8-1.4-d
|
||||
$ENV{COLLADA_DIR}/lib
|
||||
$ENV{COLLADA_DIR}/lib-dbg
|
||||
@@ -129,6 +136,138 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
IF(COLLADA_STATIC_LIBRARY)
|
||||
|
||||
# find extra libraries that the static linking requires
|
||||
|
||||
FIND_PACKAGE(LibXml2)
|
||||
IF (LIBXML2_FOUND)
|
||||
SET(COLLADA_LIBXML_LIBRARY ${LIBXML2_LIBRARIES})
|
||||
ELSE(LIBXML2_FOUND)
|
||||
IF(WIN32)
|
||||
FIND_LIBRARY(COLLADA_LIBXML_LIBRARY
|
||||
NAMES libxml2
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
||||
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
||||
)
|
||||
ENDIF(WIN32)
|
||||
ENDIF(LIBXML2_FOUND)
|
||||
|
||||
FIND_PACKAGE(ZLIB)
|
||||
IF (ZLIB_FOUND)
|
||||
SET(COLLADA_ZLIB_LIBRARY ${ZLIB_LIBRARY})
|
||||
ELSE(ZLIB_FOUND)
|
||||
IF(WIN32)
|
||||
FIND_LIBRARY(COLLADA_ZLIB_LIBRARY
|
||||
NAMES zlib
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/libxml2/win32/lib
|
||||
${COLLADA_DOM_ROOT}/external-libs/libxml2/mingw/lib
|
||||
)
|
||||
ENDIF(WIN32)
|
||||
ENDIF(ZLIB_FOUND)
|
||||
|
||||
IF(WIN32)
|
||||
|
||||
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY
|
||||
NAMES pcrecpp
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COLLADA_PCRECPP_LIBRARY_DEBUG
|
||||
NAMES pcrecpp-d
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COLLADA_PCRE_LIBRARY
|
||||
NAMES pcre
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COLLADA_PCRE_LIBRARY_DEBUG
|
||||
NAMES pcre-d
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc8
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/vc9
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mac
|
||||
${COLLADA_DOM_ROOT}/external-libs/pcre/lib/mingw
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY
|
||||
NAMES minizip
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
||||
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COLLADA_MINIZIP_LIBRARY_DEBUG
|
||||
NAMES minizip-d
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/minizip/win32/lib
|
||||
${COLLADA_DOM_ROOT}/external-libs/minizip/mac
|
||||
)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
ENDIF(COLLADA_STATIC_LIBRARY)
|
||||
|
||||
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
||||
|
||||
IF(WIN32)
|
||||
|
||||
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY
|
||||
NAMES libboost_filesystem
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG
|
||||
NAMES libboost_filesystem-d
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY
|
||||
NAMES libboost_system
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||
)
|
||||
|
||||
FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG
|
||||
NAMES libboost_system-d
|
||||
PATHS
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc8
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/vc9
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw
|
||||
)
|
||||
|
||||
FIND_PATH(COLLADA_BOOST_INCLUDE_DIR boost/filesystem/convenience.hpp
|
||||
${COLLADA_DOM_ROOT}/external-libs/boost
|
||||
)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
ENDIF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
||||
|
||||
SET(COLLADA_FOUND "NO")
|
||||
IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY)
|
||||
IF (COLLADA_INCLUDE_DIR)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# Modified by Robert Osfied to enable support for install placements of DCMTK 3.5.4 versions onwards
|
||||
|
||||
FIND_PATH( DCMTK_ROOT_INCLUDE_DIR dcmtk/config/osconfig.h
|
||||
${DCMTK_DIR}/config/include
|
||||
${DCMTK_DIR}/config/include
|
||||
${DCMTK_DIR}/include
|
||||
/usr/local/include/
|
||||
/usr/include/
|
||||
@@ -23,7 +23,8 @@ FIND_PATH( DCMTK_ROOT_INCLUDE_DIR dcmtk/config/osconfig.h
|
||||
)
|
||||
|
||||
FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
|
||||
${DCMTK_DIR}/config/include
|
||||
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/config
|
||||
${DCMTK_DIR}/config/include
|
||||
${DCMTK_DIR}/include
|
||||
/usr/local/include/dcmtk/config
|
||||
/usr/include/dcmtk/config
|
||||
@@ -31,7 +32,8 @@ FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
|
||||
)
|
||||
|
||||
FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
|
||||
${DCMTK_DIR}/ofstd/include
|
||||
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/ofstd
|
||||
${DCMTK_DIR}/ofstd/include
|
||||
${DCMTK_DIR}/include/ofstd
|
||||
/usr/local/include/dcmtk/ofstd
|
||||
/usr/include/dcmtk/ofstd
|
||||
@@ -54,6 +56,7 @@ FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
|
||||
|
||||
|
||||
FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
|
||||
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmdata
|
||||
${DCMTK_DIR}/dcmdata/include
|
||||
${DCMTK_DIR}/include/dcmdata
|
||||
/usr/local/include/dcmtk/dcmdata
|
||||
@@ -77,6 +80,7 @@ FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
|
||||
|
||||
|
||||
FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
|
||||
${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmimgle
|
||||
${DCMTK_DIR}/dcmimgle/include
|
||||
${DCMTK_DIR}/include/dcmimgle
|
||||
/usr/local/include/dcmtk/dcmimgle
|
||||
@@ -98,7 +102,7 @@ FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
|
||||
/usr/local/dicom/lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
|
||||
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
|
||||
${DCMTK_DIR}/imagectn/libsrc/Release
|
||||
${DCMTK_DIR}/imagectn/libsrc/
|
||||
${DCMTK_DIR}/imagectn/libsrc/Debug
|
||||
@@ -109,7 +113,7 @@ FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
|
||||
/usr/local/dicom/lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
|
||||
FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
|
||||
${DCMTK_DIR}/dcmnet/libsrc/Release
|
||||
${DCMTK_DIR}/dcmnet/libsrc/Debug
|
||||
${DCMTK_DIR}/dcmnet/libsrc/
|
||||
@@ -121,8 +125,8 @@ FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
|
||||
)
|
||||
|
||||
|
||||
IF( DCMTK_config_INCLUDE_DIR
|
||||
AND DCMTK_ofstd_INCLUDE_DIR
|
||||
IF( DCMTK_config_INCLUDE_DIR
|
||||
AND DCMTK_ofstd_INCLUDE_DIR
|
||||
AND DCMTK_ofstd_LIBRARY
|
||||
AND DCMTK_dcmdata_INCLUDE_DIR
|
||||
AND DCMTK_dcmdata_LIBRARY
|
||||
@@ -162,8 +166,8 @@ IF( DCMTK_config_INCLUDE_DIR
|
||||
SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
|
||||
ENDIF( WIN32 )
|
||||
|
||||
ENDIF( DCMTK_config_INCLUDE_DIR
|
||||
AND DCMTK_ofstd_INCLUDE_DIR
|
||||
ENDIF( DCMTK_config_INCLUDE_DIR
|
||||
AND DCMTK_ofstd_INCLUDE_DIR
|
||||
AND DCMTK_ofstd_LIBRARY
|
||||
AND DCMTK_dcmdata_INCLUDE_DIR
|
||||
AND DCMTK_dcmdata_LIBRARY
|
||||
|
||||
@@ -1,15 +1,31 @@
|
||||
# Locate gdal
|
||||
# Locate XUL
|
||||
# This module defines
|
||||
# XUL_LIBRARIES
|
||||
# XUL_FOUND, if false, do not try to link to gdal
|
||||
# XUL_FOUND, if false, do not try to link to gdal
|
||||
# XUL_INCLUDE_DIR, where to find the headers
|
||||
#
|
||||
# $XUL_DIR is an environment variable that would
|
||||
# correspond to the ./configure --prefix=$XUL_DIR
|
||||
#
|
||||
# Created by Robert Osfield.
|
||||
# Created by Robert Osfield.
|
||||
|
||||
FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
|
||||
#use pkg-config to find various modues
|
||||
INCLUDE(FindPkgConfig OPTIONAL)
|
||||
|
||||
IF(PKG_CONFIG_FOUND)
|
||||
|
||||
INCLUDE(FindPkgConfig)
|
||||
|
||||
pkg_check_modules(XULRUNNER_XPCOM xulrunner-xpcom<=1.8.9)
|
||||
pkg_check_modules(XULRUNNER_JS xulrunner-js)
|
||||
pkg_check_modules(XULRUNNER_NSPR xulrunner-nspr)
|
||||
pkg_check_modules(XULRUNNER_NSS xulrunner-nss)
|
||||
|
||||
ENDIF(PKG_CONFIG_FOUND)
|
||||
|
||||
# Added check to make sure that nsIBaseWindow.h is available, as it's not a standard part the of 1.8.x SDK
|
||||
FIND_PATH(NSIBASEWINDOW_INCLUDE_DIR widget/nsIBaseWindow.h
|
||||
PATHS ${XULRUNNER_XPCOM_INCLUDE_DIRS}
|
||||
$ENV{OSG_DIR}/include/xulrunner
|
||||
$ENV{OSG_DIR}/include
|
||||
$ENV{OSG_DIR}/xulrunner
|
||||
@@ -17,7 +33,39 @@ FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
|
||||
$ENV{OSGDIR}/include/xulrunner
|
||||
$ENV{OSGDIR}/include
|
||||
$ENV{OSGDIR}/xulrunner
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}/include/xulrunner
|
||||
$ENV{OSG_ROOT}/include
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local/include/xulrunner
|
||||
/usr/local/include
|
||||
/usr/include/xulrunner
|
||||
/usr/include
|
||||
/sw/include/xulrunner # Fink
|
||||
/sw/include # Fink
|
||||
/opt/local/include/xulrunner # DarwinPorts
|
||||
/opt/local/include # DarwinPorts
|
||||
/opt/csw/include/xulrunner # Blastwave
|
||||
/opt/csw/include # Blastwave
|
||||
/opt/include/xulrunner
|
||||
/opt/include
|
||||
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include/xulrunner
|
||||
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
|
||||
/usr/freeware/include/xulrunner
|
||||
/usr/freeware/include
|
||||
)
|
||||
|
||||
FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
|
||||
PATHS ${XULRUNNER_XPCOM_INCLUDE_DIRS}
|
||||
$ENV{OSG_DIR}/include/xulrunner
|
||||
$ENV{OSG_DIR}/include
|
||||
$ENV{OSG_DIR}/xulrunner
|
||||
$ENV{OSG_DIR}
|
||||
$ENV{OSGDIR}/include/xulrunner
|
||||
$ENV{OSGDIR}/include
|
||||
$ENV{OSGDIR}/xulrunner
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}/include/xulrunner
|
||||
$ENV{OSG_ROOT}/include
|
||||
~/Library/Frameworks
|
||||
@@ -41,6 +89,7 @@ FIND_PATH(XUL_INCLUDE_DIR nsEmbedAPI.h
|
||||
)
|
||||
|
||||
FIND_PATH(NSPR_INCLUDE_DIR prtypes.h
|
||||
PATHS ${XULRUNNER_NSPR_INCLUDE_DIRS}
|
||||
$ENV{OSG_DIR}/include/nspr
|
||||
$ENV{OSG_DIR}/include
|
||||
$ENV{OSG_DIR}/nspr
|
||||
@@ -48,7 +97,7 @@ FIND_PATH(NSPR_INCLUDE_DIR prtypes.h
|
||||
$ENV{OSGDIR}/include/nspr
|
||||
$ENV{OSGDIR}/include
|
||||
$ENV{OSGDIR}/nspr
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}/include/nspr
|
||||
$ENV{OSG_ROOT}/include
|
||||
~/Library/Frameworks
|
||||
@@ -72,6 +121,7 @@ FIND_PATH(NSPR_INCLUDE_DIR prtypes.h
|
||||
)
|
||||
|
||||
FIND_PATH(MOZJS_INCLUDE_DIR jsapi.h
|
||||
PATHS ${XULRUNNER_JS_INCLUDE_DIRS}
|
||||
$ENV{OSG_DIR}/include/mozjs
|
||||
$ENV{OSG_DIR}/include
|
||||
$ENV{OSG_DIR}/mozjs
|
||||
@@ -79,7 +129,7 @@ FIND_PATH(MOZJS_INCLUDE_DIR jsapi.h
|
||||
$ENV{OSGDIR}/include/mozjs
|
||||
$ENV{OSGDIR}/include
|
||||
$ENV{OSGDIR}/mozjs
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSGDIR}
|
||||
$ENV{OSG_ROOT}/include/mozjs
|
||||
$ENV{OSG_ROOT}/include
|
||||
~/Library/Frameworks
|
||||
@@ -102,7 +152,7 @@ FIND_PATH(MOZJS_INCLUDE_DIR jsapi.h
|
||||
/usr/freeware/include
|
||||
)
|
||||
|
||||
FIND_PATH(XUL_DIR
|
||||
FIND_PATH(XUL_DIR
|
||||
NAMES components/appshell.xpt
|
||||
PATHS
|
||||
$ENV{OSG_DIR}/lib
|
||||
@@ -129,10 +179,13 @@ FIND_PATH(XUL_DIR
|
||||
/usr/freeware/lib64
|
||||
)
|
||||
|
||||
|
||||
MACRO(FIND_XUL_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
||||
|
||||
FIND_LIBRARY(${MYLIBRARY}
|
||||
PATHS ${XULRUNNER_XPCOM_LIBRARY_DIRS}
|
||||
PATHS ${XULRUNNER_JS_LIBRARY_DIRS}
|
||||
PATHS ${XULRUNNER_NSPR_LIBRARY_DIRS}
|
||||
PATHS ${XULRUNNER_NSS_LIBRARY_DIRS}
|
||||
NAMES ${MYLIBRARYNAME}
|
||||
PATHS
|
||||
$ENV{OSG_DIR}/lib
|
||||
@@ -170,13 +223,13 @@ FIND_XUL_LIBRARY(XUL_NSS_LIBRARY nss3)
|
||||
|
||||
|
||||
SET(XUL_FOUND "NO")
|
||||
IF(XUL_LIBRARY AND XUL_INCLUDE_DIR)
|
||||
IF(XUL_LIBRARY AND XUL_INCLUDE_DIR AND NSIBASEWINDOW_INCLUDE_DIR)
|
||||
|
||||
SET(XUL_FOUND "YES")
|
||||
SET(XUL_LIBRARIES ${XUL_LIBRARY} ${XUL_MOZJS_LIBRARY} ${XUL_XPCOM_LIBRARY} ${XUL_PLUGIN_LIBRARY} ${XUL_NSS_LIBRARY})
|
||||
SET(XUL_INCLUDE_DIRS ${XUL_INCLUDE_DIR} ${NSPR_INCLUDE_DIR} ${MOZJS_INCLUDE_DIR})
|
||||
|
||||
ENDIF(XUL_LIBRARY AND XUL_INCLUDE_DIR)
|
||||
ENDIF(XUL_LIBRARY AND XUL_INCLUDE_DIR AND NSIBASEWINDOW_INCLUDE_DIR)
|
||||
|
||||
# MESSAGE("XUL_INCLUDE_DIR " ${XUL_INCLUDE_DIR})
|
||||
# MESSAGE("XUL_LIBRARIES " ${XUL_LIBRARIES})
|
||||
|
||||
@@ -29,7 +29,7 @@ FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ZLIB_LIBRARY
|
||||
NAMES z libz
|
||||
NAMES z libz zlib
|
||||
PATHS
|
||||
$ENV{ZLIB_DIR}/lib
|
||||
$ENV{ZLIB_DIR}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -8,6 +8,6 @@ set(CTEST_PROJECT_NAME "OpenSceneGraph")
|
||||
set(CTEST_NIGHTLY_START_TIME "00:00:00 CET")
|
||||
|
||||
set(CTEST_DROP_METHOD "http")
|
||||
set(CTEST_DROP_SITE "www.cdash.org")
|
||||
set(CTEST_DROP_LOCATION "/CDashPublic/submit.php?project=OpenSceneGraph")
|
||||
set(CTEST_DROP_SITE "cdash.openscenegraph.org")
|
||||
set(CTEST_DROP_LOCATION "/submit.php?project=OpenSceneGraph")
|
||||
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||
|
||||
@@ -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
|
||||
|
||||
178
NEWS.txt
178
NEWS.txt
@@ -1,52 +1,190 @@
|
||||
OSG News
|
||||
========
|
||||
|
||||
= !OpenSceneGraph 2.8 release adds osgAnimation and osgVolume libraries, DICOM support, LispSM shadowing and much more. =
|
||||
= !OpenSceneGraph 2.8.2 release - bug fix release =
|
||||
|
||||
PERTHSHIRE, Scotland - 4th 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 - 28th July 2009 - !OpenSceneGraph Professional Services announces the release of !OpenSceneGraph 2.8.2, 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.2 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.2 and 2.8.1 releases include: ===
|
||||
|
||||
* Build fixes for:
|
||||
* !RedHat Enterprise Linux
|
||||
* Building of dicom plugin with ITK under Linux
|
||||
* Crash fixes to:
|
||||
* crash during window destruction under Windows when using closing a MFC based !GraphicsWindow
|
||||
* deadlock under Windows due threading issues with atomic operations in Win32 Barrier implementation
|
||||
* !OpenFlight plugin crashed due to not handling spaces at the end of option strings
|
||||
* !OpenFlight plugin crashed when exported scene graphs contain no TexEnv objects
|
||||
* osganimationtimeline crashed when example model was not found
|
||||
* Bug fixes to :
|
||||
* vertical anchor in osgWidget::Widow was inverted
|
||||
* bsp an mdl plugins to better handling transparency and lighting
|
||||
* computation of sector range in osgSim::!LightPoint
|
||||
* extension checking of FBO packed stencil support
|
||||
* position of tabs at corners of manipulators
|
||||
* threading bug in .osg plugin that occurred during multi-threaded initialization
|
||||
* alignment of Text what setting alignment after assign text string
|
||||
* loading of compressed texture arrays
|
||||
* texture generate mipmap for non power of two textures
|
||||
* regression in X11 key symbol remapping, improved support for Russian keyboards
|
||||
* regression of !StencilMask setting in !RenderStage
|
||||
* small memory leak in X11 usage
|
||||
* Transform::computeBound() double !BoundingSphere support
|
||||
* Resize handling when master and slave Cameras share the same !GraphicsContext
|
||||
* Handling of locale in plugins and env var parsing so it always follows the '.' decimal place convention regardless of the desktop/application locale.
|
||||
|
||||
=== 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
|
||||
* Transfer functions
|
||||
* Per pixel lighting
|
||||
* Iso surface rendering
|
||||
* Maximum Intensity rendering
|
||||
* non power of two 3d texture and 3d texture compression
|
||||
* DICOM loader for reading dicom medical data
|
||||
* Maximum Intensity Projection rendering
|
||||
* Non-power-of-two 3D textures, and 3D texture compression
|
||||
* DICOM loading for reading dicom medical data
|
||||
* New osgAnimation library for character and scene animation.
|
||||
* New plugin for reading Biovision hierarchical files (.BVH) to generate character motion animations.
|
||||
* New osgShadow support for Light Space Perspective Shadow Maps (LispSM).
|
||||
* Three new scene graph widgets for placing traditional 2D capability into fully interactive 3D scenes:
|
||||
* PDF widget support (based on libPoppler)
|
||||
* VNC client widget support (based on libVNCServer)
|
||||
* Internet browser client widget support (based on Gecko/UBrowser)
|
||||
* PDF widget (based on libPoppler)
|
||||
* VNC client widget (based on libVNCServer)
|
||||
* Internet browser client widget (based on Gecko/UBrowser)
|
||||
* New plugins for loading Half-Life 2 maps and models.
|
||||
* New plugin for loaded exr, high dynamic range imagery
|
||||
* Improvements to !DatabasePager tailored for low latency paging.
|
||||
* New plugin for loading EXR, high dynamic range imagery
|
||||
* Improvements to !DatabasePager, tailored for low latency paging.
|
||||
* Improved runtime stats collection and on screen reporting.
|
||||
* Performance improvements through optimization of matrix operations.
|
||||
* Support for the OpenGL draw instanced extension.
|
||||
* Support for the OpenGL "draw instanced" extension.
|
||||
* Support for zlib compressed native .ive and .gz files
|
||||
* Improvements to COLLADA support.
|
||||
* Build reporting using CDash
|
||||
* New packing support using CPack
|
||||
* New packaging support using CPack
|
||||
* A wide range of build and bug fixes
|
||||
|
||||
=== Downloads and Licensing ===
|
||||
!OpenSceneGraph is open-source, so full source code is provided, and can be copied, modified and used free of charge for commercial and non-commercial use. Access to the source allows end users greater flexibility in how they develop, debug and deploy their applications. They gain productivity and freedom by being able to leverage the tool chain in accordance with their own release cycles. Downloads of binaries and source can be found in the [http://www.openscenegraph.org/projects/osg/wiki/Downloads Downloads] section of the openscenegraph.org website.
|
||||
|
||||
!OpenSceneGraph is released under the [http://www.openscenegraph.org/projects/osg/wiki/Legal OpenSceneGraph Public License], which is based on the Lesser GNU Public License (LGPL), permitting the software to be used free of charge across the full spectrum of commercial and open-source applications. Furthermore, it allows both static and dynamic linking of the !OpenSceneGraph libraries without restricting the licensing of the user's software.
|
||||
|
||||
=== !OpenSceneGraph Books now available ===
|
||||
|
||||
The !OpenSceneGraph Quick Start Guide is now available in Chinese as well as English, and alongside the Reference Manual, books can be found at [http://www.osgbooks.com OsgBooks].
|
||||
|
||||
=== Professional support and services ===
|
||||
!OpenSceneGraph project is backed up with professional services by [http://www.openscenegraph.com OpenSceneGraph Professional Services], based in Scotland, and [http://www.skew-matrix.com Skew-Matrix] and [http://www.blue-newt.com Blue-Newt Software] both based in the USA, and a range of [wiki:Community/Contractors Contractors] from around the world. Services available include:
|
||||
|
||||
* Confidential Professional Support
|
||||
* Bespoke development
|
||||
* Consultancy
|
||||
* Training
|
||||
|
||||
=== 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 365 individuals] from around the world that have directly contributed to the development and refinement of the !OpenSceneGraph code base.
|
||||
|
||||
----
|
||||
|
||||
About !OpenSceneGraph: [[BR]]
|
||||
The !OpenSceneGraph Project was founded in September 1999 by Don Burns and Robert Osfield.
|
||||
Further information, screenshots, downloads, documentation, and support links can be found on the !OpenSceneGraph project website http://www.openscenegraph.org.
|
||||
|
||||
About !OpenSceneGraph Professional Services:[[BR]]
|
||||
!OpenSceneGraph Professional Services, founded by project lead Robert Osfield in April 2001, is based in Callander, Perhshire, Scotland, and provides professional services on top of !OpenSceneGraph. Further information about the services it provides can be found at http://www.openscenegraph.com.
|
||||
|
||||
----------------------------------------------------------------------------------------
|
||||
|
||||
= !OpenSceneGraph 2.8.1 release - bug fix release =
|
||||
|
||||
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.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 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
|
||||
* Transfer functions
|
||||
* Per pixel lighting
|
||||
* Iso surface rendering
|
||||
* Maximum Intensity Projection rendering
|
||||
* Non-power-of-two 3D textures, and 3D texture compression
|
||||
* DICOM loading for reading dicom medical data
|
||||
* New osgAnimation library for character and scene animation.
|
||||
* New plugin for reading Biovision hierarchical files (.BVH) to generate character motion animations.
|
||||
* New osgShadow support for Light Space Perspective Shadow Maps (LispSM).
|
||||
* Three new scene graph widgets for placing traditional 2D capability into fully interactive 3D scenes:
|
||||
* PDF widget (based on libPoppler)
|
||||
* VNC client widget (based on libVNCServer)
|
||||
* Internet browser client widget (based on Gecko/UBrowser)
|
||||
* New plugins for loading Half-Life 2 maps and models.
|
||||
* New plugin for loading EXR, high dynamic range imagery
|
||||
* Improvements to !DatabasePager, tailored for low latency paging.
|
||||
* Improved runtime stats collection and on screen reporting.
|
||||
* Performance improvements through optimization of matrix operations.
|
||||
* Support for the OpenGL "draw instanced" extension.
|
||||
* Support for zlib compressed native .ive and .gz files
|
||||
* Improvements to COLLADA support.
|
||||
* Build reporting using CDash
|
||||
* New packaging support using CPack
|
||||
* A wide range of build and bug fixes
|
||||
|
||||
=== Downloads and Licensing ===
|
||||
!OpenSceneGraph is open-source so full source code is provided, and can be copied, modified and used free of charge for commercial and non-commercial use. Access to the source allows end users greater flexibility in how they develop, debug and deploy their applications. They gain productivity and freedom by being able to leverage the tool chain in accordance with their own release cycles. Downloads of binaries and source can be found in the [http://www.openscenegraph.org/projects/osg/wiki/Downloads Downloads] section of the openscenegraph.org website.
|
||||
!OpenSceneGraph is open-source, so full source code is provided, and can be copied, modified and used free of charge for commercial and non-commercial use. Access to the source allows end users greater flexibility in how they develop, debug and deploy their applications. They gain productivity and freedom by being able to leverage the tool chain in accordance with their own release cycles. Downloads of binaries and source can be found in the [http://www.openscenegraph.org/projects/osg/wiki/Downloads Downloads] section of the openscenegraph.org website.
|
||||
|
||||
!OpenSceneGraph is released under the [http://www.openscenegraph.org/projects/osg/wiki/Legal OpenSceneGraph Public License], which is based on the Lesser GNU Public License (LGPL), permitting the software to be used free of charge across the full spectrum of commercial and open-source applications. Furthermore, it allows both static and dynamic linking of the !OpenSceneGraph libraries without restricting the licensing of the user's software.
|
||||
|
||||
=== !OpenSceneGraph Books now available ===
|
||||
|
||||
The !OpenSceneGraph Quick Start Guide is now available in Chinese as well as English, and alongside the Reference Manual books can be found at [http://www.osgbooks.com OsgBooks].
|
||||
The !OpenSceneGraph Quick Start Guide is now available in Chinese as well as English, and alongside the Reference Manual, books can be found at [http://www.osgbooks.com OsgBooks].
|
||||
|
||||
=== Professional support and services ===
|
||||
!OpenSceneGraph project is backed up with professional services by [http://openscenegraph.com OpenSceneGraph Professional Services], based in Scotland, and [http://www.skew-matrix.com Skew-Matrix] and [http://www.blue-newt.com Blue-Newt Software] both based in the USA, and a range of [wiki:Community/Contractors Contractors] from around the world. Services available include:
|
||||
!OpenSceneGraph project is backed up with professional services by [http://www.openscenegraph.com OpenSceneGraph Professional Services], based in Scotland, and [http://www.skew-matrix.com Skew-Matrix] and [http://www.blue-newt.com Blue-Newt Software] both based in the USA, and a range of [wiki:Community/Contractors Contractors] from around the world. Services available include:
|
||||
|
||||
* Confidential Professional Support
|
||||
* Bespoke development
|
||||
@@ -56,12 +194,12 @@ 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.
|
||||
|
||||
----
|
||||
|
||||
About !OpenSceneGraph:[[BR]]
|
||||
!OpenSceneGraph Project was founded in September 1999 by Don Burns and Robert Osfield.
|
||||
About !OpenSceneGraph: [[BR]]
|
||||
The !OpenSceneGraph Project was founded in September 1999 by Don Burns and Robert Osfield.
|
||||
Further information, screenshots, downloads, documentation, and support links can be found on the !OpenSceneGraph project website http://www.openscenegraph.org.
|
||||
|
||||
About !OpenSceneGraph Professional Services:[[BR]]
|
||||
|
||||
@@ -5,8 +5,8 @@ REM trees.
|
||||
REM mew 2004-07-16
|
||||
|
||||
cd ..\..
|
||||
set PATH=%CD%\OpenThreads\bin\win32;%CD%\OpenSceneGraph\bin\win32;%CD%\3rdParty\bin;%PATH%
|
||||
set OSG_FILE_PATH=%CD%\OpenSceneGraph-Data;%CD%\OpenSceneGraph-Data\Images;%CD%\OpenSceneGraph-Data\fonts;%OSG_FILE_PATH%
|
||||
set PATH=%CD%\OpenThreads\bin\win32;%CD%\bin;%CD%\3rdParty\bin;%PATH%
|
||||
set OSG_FILE_PATH=%CD%\OpenSceneGraph-Data;%OSG_FILE_PATH%
|
||||
|
||||
REM uncomment one of these for your desired notify level...
|
||||
rem set OSG_NOTIFY_LEVEL=ALWAYS
|
||||
|
||||
@@ -12,10 +12,9 @@ subscribe to our public mailing list:
|
||||
http://www.openscenegraph.org/projects/osg/wiki/MailingLists
|
||||
|
||||
|
||||
|
||||
Robert Osfield.
|
||||
Project Lead.
|
||||
4th Februaru 2009.
|
||||
28th July 2009.
|
||||
|
||||
--
|
||||
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
#define _OPENTHREADS_CONFIG
|
||||
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
#define _OPENTHREADS_ATOMIC_USE_MUTEX
|
||||
|
||||
#if defined(MAC_OS_X_VERSION_10_5)
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
#define _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC
|
||||
#undef _OPENTHREADS_ATOMIC_USE_MUTEX
|
||||
#endif
|
||||
#endif
|
||||
/* #undef _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS */
|
||||
|
||||
@@ -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(OSG_MAINTAINER)
|
||||
|
||||
SET(TARGET_COMMON_LIBRARIES
|
||||
OpenThreads
|
||||
osg
|
||||
|
||||
838
applications/osgversion/Contributors.cpp
Normal file
838
applications/osgversion/Contributors.cpp
Normal file
@@ -0,0 +1,838 @@
|
||||
// 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"},
|
||||
{"Largade", "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"},
|
||||
{"Tery", "Terry"},
|
||||
{"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
@@ -83,7 +83,7 @@ FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
QUIET = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
|
||||
@@ -348,7 +348,7 @@ SHOW_USED_FILES = YES
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
QUIET = NO
|
||||
QUIET = YES
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||
|
||||
@@ -73,7 +73,7 @@ FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
QUIET = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
|
||||
@@ -74,7 +74,7 @@ LAYOUT_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
QUIET = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
|
||||
@@ -74,7 +74,7 @@ LAYOUT_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
QUIET = YES
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
|
||||
@@ -89,7 +89,7 @@ int main( int argc, char **argv )
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout<<"Error: could not found file '"<<filename<<"'"<<std::endl;
|
||||
std::cout<<"Error: could not find file '"<<filename<<"'"<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -252,9 +252,6 @@ int main (int argc, char* argv[])
|
||||
|
||||
initVertexMap(root.get(), right0.get(), right1.get(), geom, src.get());
|
||||
|
||||
geom->buildVertexSet();
|
||||
geom->buildTransformer(skelroot.get());
|
||||
|
||||
// let's run !
|
||||
viewer.setSceneData( scene );
|
||||
viewer.realize();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* -*-c++-*-
|
||||
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
|
||||
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
@@ -157,22 +157,26 @@ struct ExampleTimelineUsage : public osgGA::GUIEventHandler
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
std::cerr << "This example workd only with osgAnimation/nathan.osg" << std::endl;
|
||||
std::cerr << "This example works only with nathan.osg" << std::endl;
|
||||
|
||||
osg::ArgumentParser psr(&argc, argv);
|
||||
|
||||
osgViewer::Viewer viewer(psr);
|
||||
|
||||
std::string file = "osgAnimation/nathan.osg";
|
||||
std::string file = "nathan.osg";
|
||||
if(argc >= 2)
|
||||
file = psr[1];
|
||||
|
||||
// replace the manager
|
||||
osg::Group* root = dynamic_cast<osg::Group*>(osgDB::readNodeFile(file));
|
||||
if (!root) {
|
||||
osg::notify(osg::FATAL) << "can't read file " << file << std::endl;
|
||||
return 1;
|
||||
}
|
||||
osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback());
|
||||
if(!animationManager)
|
||||
{
|
||||
std::cerr << "Did not found AnimationManagerBase updateCallback needed to animate elements" << std::endl;
|
||||
osg::notify(osg::FATAL) << "Did not find AnimationManagerBase updateCallback needed to animate elements" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ void AnimtkKeyEventHandler::printUsage() const
|
||||
std::cout << (char) _actionKeys.find(Help)->second << " for Help" << std::endl;
|
||||
std::cout << (char) _actionKeys.find(List)->second << " for List" << std::endl;
|
||||
std::cout << (char) _actionKeys.find(Play)->second << " for Play" << std::endl;
|
||||
std::cout << (char) _actionKeys.find(Next)->second << " for selext Next item" << std::endl;
|
||||
std::cout << (char) _actionKeys.find(Prev)->second << " for selext Previous item" << std::endl;
|
||||
std::cout << (char) _actionKeys.find(Next)->second << " for select Next item" << std::endl;
|
||||
std::cout << (char) _actionKeys.find(Prev)->second << " for select Previous item" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -164,7 +164,7 @@ void Broadcaster::setHost( const char *hostname )
|
||||
struct hostent *h;
|
||||
if( (h = gethostbyname( hostname )) == 0L )
|
||||
{
|
||||
fprintf( stderr, "Broadcaster::setHost() - Cannot resolv an address for \"%s\".\n", hostname );
|
||||
fprintf( stderr, "Broadcaster::setHost() - Cannot resolve an address for \"%s\".\n", hostname );
|
||||
_address = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -413,7 +413,7 @@ void CameraPacket::readEventQueue(osgViewer::Viewer& viewer)
|
||||
|
||||
void CameraPacket::writeEventQueue(osgViewer::Viewer& viewer)
|
||||
{
|
||||
osg::notify(osg::INFO)<<"recieved events = "<<_events.size()<<std::endl;
|
||||
osg::notify(osg::INFO)<<"received events = "<<_events.size()<<std::endl;
|
||||
|
||||
viewer.getEventQueue()->appendEvents(_events);
|
||||
}
|
||||
@@ -437,7 +437,7 @@ int main( int argc, char **argv )
|
||||
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("-m","Set viewer to MASTER mode, sending view via packets.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("-s","Set viewer to SLAVE mode, reciving view via packets.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("-s","Set viewer to SLAVE mode, receiving view via packets.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("-n <int>","Socket number to transmit packets");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("-f <float>","Field of view of camera");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("-o <float>","Offset angle of camera");
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <osgUtil/Optimizer>
|
||||
#include <osgDB/ReadFile>
|
||||
|
||||
@@ -134,14 +136,15 @@ int main( int argc, char **argv )
|
||||
// read the scene from the list of file specified commandline args.
|
||||
osg::ref_ptr<osg::Node> scene = osgDB::readNodeFiles(arguments);
|
||||
|
||||
if (!scene) return 1;
|
||||
if (!scene)
|
||||
{
|
||||
std::cout << argv[0] << ": requires filename argument." << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// construct the viewer.
|
||||
osgViewer::CompositeViewer viewer(arguments);
|
||||
|
||||
|
||||
|
||||
|
||||
if (arguments.read("-1"))
|
||||
{
|
||||
{
|
||||
@@ -300,3 +303,4 @@ int main( int argc, char **argv )
|
||||
// run the viewer's main frame loop
|
||||
return viewer.run();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ void textInfo(osgText::Text* text)
|
||||
const osgText::Text::TextureGlyphQuadMap& tgqm = text->getTextureGlyphQuadMap();
|
||||
|
||||
const osgText::Text::TextureGlyphQuadMap::const_iterator tgqmi = tgqm.begin();
|
||||
|
||||
|
||||
const osgText::Text::GlyphQuads& gq = tgqmi->second;
|
||||
|
||||
osgText::String& s = text->getText();
|
||||
@@ -59,7 +59,7 @@ osg::Camera* createOrthoCamera(double width, double height)
|
||||
camera->setViewMatrix(osg::Matrix::identity());
|
||||
camera->setClearMask(GL_DEPTH_BUFFER_BIT);
|
||||
camera->setRenderOrder(osg::Camera::POST_RENDER);
|
||||
|
||||
|
||||
return camera;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ int main(int argc, char** argv)
|
||||
// Make sure we have the minimum args...
|
||||
if(argc <= 2)
|
||||
{
|
||||
osg::notify(osg::FATAL) << "usage: " << args[0] << " FONTFILE [sizes...]" << std::endl;
|
||||
osg::notify(osg::FATAL) << "usage: " << args[0] << " fontfile size1 [size2 ...]" << std::endl;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ int main(int argc, char** argv)
|
||||
viewer.addEventHandler(new osgViewer::WindowSizeHandler());
|
||||
|
||||
osg::Group* group = new osg::Group();
|
||||
osg::Camera* camera = createOrthoCamera(1280.0f, 1024.0f);
|
||||
osg::Camera* camera = createOrthoCamera(1280.0f, 1024.0f);
|
||||
|
||||
// Create the list of desired sizes.
|
||||
Sizes sizes;
|
||||
@@ -138,3 +138,4 @@ int main(int argc, char** argv)
|
||||
|
||||
return viewer.run();
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ int main( int argc, char **argv )
|
||||
osg::Node* rootnode = osgDB::readNodeFiles(arguments);
|
||||
if (!rootnode)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Please specify and geo model filename on the command line."<<std::endl;
|
||||
osg::notify(osg::NOTICE)<<"Please specify a geo model filename on the command line."<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -194,6 +194,8 @@ class Xample
|
||||
{
|
||||
return app;
|
||||
}
|
||||
private:
|
||||
Xample() {}
|
||||
}; // end class Xample
|
||||
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -81,7 +81,7 @@ class ContextTest : public MemoryTest
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cerr<<"Error: Unable to create graphis context, problem with running osgViewer-"<<osgViewerGetVersion()<<", cannot create windows/pbuffers."<<std::endl;
|
||||
std::cerr<<"Error: Unable to create graphics context, problem with running osgViewer-"<<osgViewerGetVersion()<<", cannot create windows/pbuffers."<<std::endl;
|
||||
|
||||
if (_pbuffer) throw "Failed to create PixelBuffer";
|
||||
else throw "Failed to create GraphicsWindow";
|
||||
@@ -406,7 +406,7 @@ int main( int argc, char **argv )
|
||||
{
|
||||
if (glMemoryTests.empty())
|
||||
{
|
||||
std::cout<<"Not tests specified, please specify test using the command line options below."<<std::endl<<std::endl;
|
||||
std::cout<<"No tests specified, please specify test using the command line options below."<<std::endl<<std::endl;
|
||||
|
||||
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
|
||||
return 1;
|
||||
|
||||
@@ -44,14 +44,14 @@ class MovieEventHandler : public osgGA::GUIEventHandler
|
||||
public:
|
||||
|
||||
MovieEventHandler():_playToggle(true),_trackMouse(false) {}
|
||||
|
||||
|
||||
void setMouseTracking(bool track) { _trackMouse = track; }
|
||||
bool getMouseTracking() const { return _trackMouse; }
|
||||
|
||||
|
||||
void set(osg::Node* node);
|
||||
|
||||
virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor* nv);
|
||||
|
||||
|
||||
virtual void getUsage(osg::ApplicationUsage& usage) const;
|
||||
|
||||
typedef std::vector< osg::observer_ptr<osg::ImageStream> > ImageStreamList;
|
||||
@@ -65,7 +65,7 @@ protected:
|
||||
public:
|
||||
FindImageStreamsVisitor(ImageStreamList& imageStreamList):
|
||||
_imageStreamList(imageStreamList) {}
|
||||
|
||||
|
||||
virtual void apply(osg::Geode& geode)
|
||||
{
|
||||
apply(geode.getStateSet());
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
{
|
||||
apply(geode.getDrawable(i)->getStateSet());
|
||||
}
|
||||
|
||||
|
||||
traverse(geode);
|
||||
}
|
||||
|
||||
@@ -83,11 +83,11 @@ protected:
|
||||
apply(node.getStateSet());
|
||||
traverse(node);
|
||||
}
|
||||
|
||||
|
||||
inline void apply(osg::StateSet* stateset)
|
||||
{
|
||||
if (!stateset) return;
|
||||
|
||||
|
||||
osg::StateAttribute* attr = stateset->getTextureAttribute(0,osg::StateAttribute::TEXTURE);
|
||||
if (attr)
|
||||
{
|
||||
@@ -98,19 +98,19 @@ protected:
|
||||
if (textureRec) apply(dynamic_cast<osg::ImageStream*>(textureRec->getImage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline void apply(osg::ImageStream* imagestream)
|
||||
{
|
||||
if (imagestream)
|
||||
{
|
||||
_imageStreamList.push_back(imagestream);
|
||||
_imageStreamList.push_back(imagestream);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ImageStreamList& _imageStreamList;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
FindImageStreamsVisitor& operator = (const FindImageStreamsVisitor&) { return *this; }
|
||||
|
||||
};
|
||||
@@ -119,7 +119,7 @@ protected:
|
||||
bool _playToggle;
|
||||
bool _trackMouse;
|
||||
ImageStreamList _imageStreamList;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -150,11 +150,11 @@ bool MovieEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
||||
bool foundIntersection = view==0 ? false :
|
||||
(nv==0 ? view->computeIntersections(ea.getX(), ea.getY(), intersections) :
|
||||
view->computeIntersections(ea.getX(), ea.getY(), nv->getNodePath(), intersections));
|
||||
|
||||
|
||||
if (foundIntersection)
|
||||
{
|
||||
|
||||
// use the nearest intersection
|
||||
// use the nearest intersection
|
||||
const osgUtil::LineSegmentIntersector::Intersection& intersection = *(intersections.begin());
|
||||
osg::Drawable* drawable = intersection.drawable.get();
|
||||
osg::Geometry* geometry = drawable ? drawable->asGeometry() : 0;
|
||||
@@ -179,7 +179,7 @@ bool MovieEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction
|
||||
osg::Vec2Array* texcoords_Vec2Array = dynamic_cast<osg::Vec2Array*>(texcoords);
|
||||
if (texcoords_Vec2Array)
|
||||
{
|
||||
// we have tex coord array so now we can compute the final tex coord at the point of intersection.
|
||||
// we have tex coord array so now we can compute the final tex coord at the point of intersection.
|
||||
osg::Vec2 tc1 = (*texcoords_Vec2Array)[i1];
|
||||
osg::Vec2 tc2 = (*texcoords_Vec2Array)[i2];
|
||||
osg::Vec2 tc3 = (*texcoords_Vec2Array)[i3];
|
||||
@@ -279,7 +279,7 @@ osg::Geometry* myCreateTexturedQuadGeometry(const osg::Vec3& pos,float width,flo
|
||||
{
|
||||
bool flip = image->getOrigin()==osg::Image::TOP_LEFT;
|
||||
if (option_flip) flip = !flip;
|
||||
|
||||
|
||||
if (useTextureRectangle)
|
||||
{
|
||||
osg::Geometry* pictureQuad = osg::createTexturedQuadGeometry(pos,
|
||||
@@ -290,12 +290,12 @@ osg::Geometry* myCreateTexturedQuadGeometry(const osg::Vec3& pos,float width,flo
|
||||
osg::TextureRectangle* texture = new osg::TextureRectangle(image);
|
||||
texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
|
||||
texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
|
||||
|
||||
|
||||
|
||||
|
||||
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
||||
texture,
|
||||
osg::StateAttribute::ON);
|
||||
|
||||
|
||||
return pictureQuad;
|
||||
}
|
||||
else
|
||||
@@ -304,14 +304,14 @@ osg::Geometry* myCreateTexturedQuadGeometry(const osg::Vec3& pos,float width,flo
|
||||
osg::Vec3(width,0.0f,0.0f),
|
||||
xyPlane ? osg::Vec3(0.0f,height,0.0f) : osg::Vec3(0.0f,0.0f,height),
|
||||
0.0f, flip ? 1.0f : 0.0f , 1.0f, flip ? 0.0f : 1.0f);
|
||||
|
||||
|
||||
osg::Texture2D* texture = new osg::Texture2D(image);
|
||||
texture->setResizeNonPowerOfTwoHint(false);
|
||||
texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR);
|
||||
texture->setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_EDGE);
|
||||
texture->setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_EDGE);
|
||||
|
||||
|
||||
|
||||
|
||||
pictureQuad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
|
||||
texture,
|
||||
osg::StateAttribute::ON);
|
||||
@@ -324,7 +324,7 @@ int main(int argc, char** argv)
|
||||
{
|
||||
// use an ArgumentParser object to manage the program arguments.
|
||||
osg::ArgumentParser arguments(&argc,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()+" example demonstrates the use of ImageStream for rendering movies as textures.");
|
||||
@@ -334,20 +334,23 @@ int main(int argc, char** argv)
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--shader","Use shaders to post process the video.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--interactive","Use camera manipulator to allow movement around movie.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--flip","Flip the movie so top becomes bottom.");
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--devices","Print the Video input capability via QuickTime and exit.");
|
||||
|
||||
#endif
|
||||
|
||||
bool useTextureRectangle = true;
|
||||
bool useShader = false;
|
||||
|
||||
// construct the viewer.
|
||||
osgViewer::Viewer viewer(arguments);
|
||||
|
||||
|
||||
if (arguments.argc()<=1)
|
||||
{
|
||||
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
// if user requests devices video capability.
|
||||
if (arguments.read("-devices") || arguments.read("--devices"))
|
||||
{
|
||||
@@ -355,12 +358,13 @@ int main(int argc, char** argv)
|
||||
osgDB::readImageFile("devices.live");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
while (arguments.read("--texture2D")) useTextureRectangle=false;
|
||||
while (arguments.read("--shader")) useShader=true;
|
||||
|
||||
bool mouseTracking = false;
|
||||
while (arguments.read("--mouse")) mouseTracking=true;
|
||||
while (arguments.read("--mouse")) mouseTracking=true;
|
||||
|
||||
|
||||
// if user request help write it out to cout.
|
||||
@@ -419,9 +423,9 @@ int main(int argc, char** argv)
|
||||
osg::Vec3 pos(0.0f,0.0f,0.0f);
|
||||
osg::Vec3 topleft = pos;
|
||||
osg::Vec3 bottomright = pos;
|
||||
|
||||
|
||||
bool xyPlane = fullscreen;
|
||||
|
||||
|
||||
for(int i=1;i<arguments.argc();++i)
|
||||
{
|
||||
if (arguments.isString(i))
|
||||
@@ -433,9 +437,9 @@ int main(int argc, char** argv)
|
||||
if (image)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"image->s()"<<image->s()<<" image-t()="<<image->t()<<std::endl;
|
||||
|
||||
|
||||
geode->addDrawable(myCreateTexturedQuadGeometry(pos,image->s(),image->t(),image, useTextureRectangle, xyPlane, flip));
|
||||
|
||||
|
||||
bottomright = pos + osg::Vec3(static_cast<float>(image->s()),static_cast<float>(image->t()),0.0f);
|
||||
|
||||
if (xyPlane) pos.y() += image->t()*1.05f;
|
||||
@@ -444,10 +448,10 @@ int main(int argc, char** argv)
|
||||
else
|
||||
{
|
||||
std::cout<<"Unable to read file "<<arguments[i]<<std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// set the scene to render
|
||||
viewer.setSceneData(geode.get());
|
||||
|
||||
@@ -496,3 +500,4 @@ int main(int argc, char** argv)
|
||||
return viewer.run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ int main( int argc, char **argv )
|
||||
|
||||
if (!rootnode)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Please specify and model filename on the command line."<<std::endl;
|
||||
osg::notify(osg::NOTICE)<<"Please specify a model filename on the command line."<<std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
|
||||
if (_total > _limit)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -311,7 +311,7 @@ OcclusionQueryVisitor::apply( osg::Group& group )
|
||||
// A least one OQN was added below the current node.
|
||||
// Don't add one here to avoid hierarchical nesting.
|
||||
return;
|
||||
|
||||
|
||||
// There are no OQNs below this group. If the vertex
|
||||
// count exceeds the threshold, add an OQN here.
|
||||
addOQN( group );
|
||||
@@ -395,7 +395,7 @@ EnableQueryVisitor::apply( osg::OcclusionQueryNode& oqn )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
void
|
||||
DebugDisplayVisitor::apply( osg::OcclusionQueryNode& oqn )
|
||||
{
|
||||
oqn.setDebugDisplay( _debug );
|
||||
@@ -489,9 +489,9 @@ StatisticsVisitor::getNumPassed() const
|
||||
// KetHandler --
|
||||
// Allow user to do interesting things with an
|
||||
// OcclusionQueryNode-enabled scene graph at run time.
|
||||
class KeyHandler : public osgGA::GUIEventHandler
|
||||
class KeyHandler : public osgGA::GUIEventHandler
|
||||
{
|
||||
public:
|
||||
public:
|
||||
KeyHandler( osg::Node& node )
|
||||
: _node( node ),
|
||||
_enable( true ),
|
||||
@@ -563,7 +563,7 @@ createBox()
|
||||
osg::ref_ptr<osg::Geode> box = new osg::Geode;
|
||||
|
||||
osg::StateSet* state = box->getOrCreateStateSet();
|
||||
osg::PolygonMode* pm = new osg::PolygonMode(
|
||||
osg::PolygonMode* pm = new osg::PolygonMode(
|
||||
osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::FILL );
|
||||
state->setAttributeAndModes( pm,
|
||||
osg::StateAttribute::ON | osg::StateAttribute::PROTECTED );
|
||||
@@ -630,6 +630,7 @@ createBox()
|
||||
// * Force glBegin/glEnd slow path
|
||||
// * Lots of vertices and color data per vertex
|
||||
// * No vertex sharing
|
||||
// * Draw the triangles as wireframe
|
||||
osg::ref_ptr<osg::Node>
|
||||
createRandomTriangles( unsigned int num )
|
||||
{
|
||||
@@ -655,7 +656,7 @@ createRandomTriangles( unsigned int num )
|
||||
|
||||
unsigned int i;
|
||||
srand( 0 );
|
||||
#define RAND_NEG1_TO_1 ( ((rand()%20)-10)*.1 )
|
||||
#define RAND_NEG1_TO_1 ( ((rand()%20)-10)*.1 )
|
||||
for (i=0; i<num; i++)
|
||||
{
|
||||
osg::Vec3& v0 = (*v)[ i*3+0 ];
|
||||
@@ -672,7 +673,7 @@ createRandomTriangles( unsigned int num )
|
||||
geom->setColorBinding( osg::Geometry::BIND_PER_PRIMITIVE );
|
||||
c->resize( num );
|
||||
|
||||
#define RAND_0_TO_1 ( (rand()%10)*.1 )
|
||||
#define RAND_0_TO_1 ( (rand()%10)*.1 )
|
||||
for (i=0; i<num; i++)
|
||||
{
|
||||
osg::Vec4& c0 = (*c)[ i ];
|
||||
@@ -731,12 +732,12 @@ int main(int argc, char** argv)
|
||||
arguments.writeErrorMessages(std::cout);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
osgViewer::Viewer viewer( arguments );
|
||||
|
||||
// add the state manipulator
|
||||
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
||||
|
||||
|
||||
// add the stats handler
|
||||
viewer.addEventHandler(new osgViewer::StatsHandler);
|
||||
|
||||
@@ -791,3 +792,4 @@ int main(int argc, char** argv)
|
||||
|
||||
return viewer.run();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -600,6 +600,9 @@ int main(int argc, char** argv)
|
||||
|
||||
if (arguments.read("--sv"))
|
||||
{
|
||||
// sv isn't yet thread safe
|
||||
viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded);
|
||||
|
||||
// hint to tell viewer to request stencil buffer when setting up windows
|
||||
osg::DisplaySettings::instance()->setMinimumNumStencilBits(8);
|
||||
|
||||
@@ -622,6 +625,9 @@ int main(int argc, char** argv)
|
||||
}
|
||||
else if (arguments.read("--pssm"))
|
||||
{
|
||||
// pssm isn't yet thread safe
|
||||
viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded);
|
||||
|
||||
int mapcount = 3;
|
||||
while (arguments.read("--mapcount", mapcount));
|
||||
osg::ref_ptr<osgShadow::ParallelSplitShadowMap> pssm = new osgShadow::ParallelSplitShadowMap(NULL,mapcount);
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
// Simple example using GLUT to create an OpenGL window and OSG for rendering.
|
||||
// Derived from osgGLUTsimple.cpp and osgkeyboardmouse.cpp
|
||||
|
||||
#include <osg/Config>
|
||||
|
||||
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
||||
// disable warning "glutCreateMenu_ATEXIT_HACK' : unreferenced local function has been removed"
|
||||
#pragma warning( disable : 4505 )
|
||||
@@ -29,6 +31,7 @@
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include <GLUT/glut.h>
|
||||
#else
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <osg/Config>
|
||||
|
||||
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
||||
// disable warning "'QtConcurrent::BlockSizeManager' : assignment operator could not be generated"
|
||||
#pragma warning( disable : 4512 )
|
||||
#endif
|
||||
|
||||
#if USE_QT4
|
||||
|
||||
#include <QtCore/QString>
|
||||
@@ -89,6 +96,10 @@ class QOSGWidget : public QWidget
|
||||
void init();
|
||||
void createContext();
|
||||
|
||||
// The GraphincsWindowWin32 implementation already takes care of message handling.
|
||||
// We don't want to relay these on Windows, it will just cause duplicate messages
|
||||
// with further problems downstream (i.e. not being able to throw the trackball
|
||||
#ifndef WIN32
|
||||
virtual void mouseDoubleClickEvent ( QMouseEvent * event );
|
||||
virtual void closeEvent( QCloseEvent * event );
|
||||
virtual void destroyEvent( bool destroyWindow = true, bool destroySubWindows = true);
|
||||
@@ -98,7 +109,7 @@ class QOSGWidget : public QWidget
|
||||
virtual void mousePressEvent( QMouseEvent* event );
|
||||
virtual void mouseReleaseEvent( QMouseEvent* event );
|
||||
virtual void mouseMoveEvent( QMouseEvent* event );
|
||||
|
||||
#endif
|
||||
osg::ref_ptr<osgViewer::GraphicsWindow> _gw;
|
||||
bool _overrideTraits;
|
||||
};
|
||||
@@ -181,6 +192,8 @@ void QOSGWidget::createContext()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
void QOSGWidget::destroyEvent(bool destroyWindow, bool destroySubWindows)
|
||||
{
|
||||
_gw->getEventQueue()->closeWindow();
|
||||
@@ -268,7 +281,7 @@ void QOSGWidget::mouseMoveEvent( QMouseEvent* event )
|
||||
{
|
||||
_gw->getEventQueue()->mouseMotion(event->x(), event->y());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -300,30 +313,99 @@ class ViewerQOSG : public osgViewer::Viewer, public QOSGWidget
|
||||
};
|
||||
|
||||
|
||||
|
||||
class CompositeViewerQOSG : public osgViewer::CompositeViewer, public QOSGWidget
|
||||
{
|
||||
public:
|
||||
|
||||
CompositeViewerQOSG(QWidget * parent = 0, const char * name = 0, WindowFlags f = 0):
|
||||
QOSGWidget( parent, name, f )
|
||||
CompositeViewerQOSG(QWidget * parent = 0, const char * name = 0, WindowFlags f = 0)
|
||||
: QOSGWidget( parent, name, f )
|
||||
{
|
||||
setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);
|
||||
setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);
|
||||
|
||||
connect(&_timer, SIGNAL(timeout()), this, SLOT(repaint()));
|
||||
connect(&_timer, SIGNAL(timeout()), this, SLOT(repaint()));
|
||||
|
||||
// The app would hang on exit when using start(1). Behaves better with 10
|
||||
// like the non-composite viewer. Was this just a typo?
|
||||
_timer.start(10);
|
||||
// The composite viewer needs at least one view to work
|
||||
// Create a dummy view with a zero sized viewport and no
|
||||
// scene to keep the viewer alive.
|
||||
osgViewer::View * pView = new osgViewer::View;
|
||||
pView->getCamera()->setGraphicsContext( getGraphicsWindow() );
|
||||
pView->getCamera()->setViewport( 0, 0, 0, 0 );
|
||||
addView( pView );
|
||||
|
||||
// Clear the viewer of removed views
|
||||
getGraphicsWindow()->setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||
getGraphicsWindow()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
|
||||
|
||||
// The app would hang on exit when using start(1). Behaves better with 10
|
||||
// like the non-composite viewer. Was this just a typo?
|
||||
_timer.start(10);
|
||||
}
|
||||
|
||||
|
||||
virtual void paintEvent( QPaintEvent * event ) { frame(); }
|
||||
|
||||
protected:
|
||||
void keyPressEvent( QKeyEvent* event )
|
||||
{
|
||||
if ( event->text() == "a" )
|
||||
{
|
||||
AddView( _scene.get() );
|
||||
}
|
||||
|
||||
if ( event->text() == "r" )
|
||||
{
|
||||
RemoveView();
|
||||
}
|
||||
|
||||
QOSGWidget::keyPressEvent( event );
|
||||
}
|
||||
|
||||
|
||||
void AddView( osg::Node * scene );
|
||||
void RemoveView();
|
||||
void Tile();
|
||||
|
||||
osg::ref_ptr< osg::Node > _scene;
|
||||
|
||||
protected:
|
||||
QTimer _timer;
|
||||
};
|
||||
|
||||
void CompositeViewerQOSG::Tile()
|
||||
{
|
||||
int n = getNumViews() - 1; // -1 to account for dummy view
|
||||
|
||||
for ( int i = 0; i < n; ++i )
|
||||
{
|
||||
osgViewer::View * view = getView(i+1); // +1 to account for dummy view
|
||||
view->getCamera()->setViewport( new osg::Viewport( 0, i*height()/n , width(), height()/n ) );
|
||||
view->getCamera()->setProjectionMatrixAsPerspective( 30.0f, double( width() ) / double( height()/n ), 1.0f, 10000.0f );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CompositeViewerQOSG::AddView( osg::Node * scene )
|
||||
{
|
||||
osgViewer::View* view = new osgViewer::View;
|
||||
addView(view);
|
||||
|
||||
view->setSceneData( scene );
|
||||
view->setCameraManipulator(new osgGA::TrackballManipulator);
|
||||
|
||||
// add the state manipulator
|
||||
osg::ref_ptr<osgGA::StateSetManipulator> statesetManipulator = new osgGA::StateSetManipulator;
|
||||
statesetManipulator->setStateSet(view->getCamera()->getOrCreateStateSet());
|
||||
|
||||
view->getCamera()->setGraphicsContext( getGraphicsWindow() );
|
||||
view->getCamera()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
|
||||
Tile();
|
||||
}
|
||||
|
||||
void CompositeViewerQOSG::RemoveView()
|
||||
{
|
||||
if ( getNumViews() > 1 )
|
||||
{
|
||||
removeView( getView( getNumViews() - 1 ) );
|
||||
}
|
||||
Tile();
|
||||
}
|
||||
|
||||
|
||||
#if USE_QT4
|
||||
@@ -403,7 +485,7 @@ int mainQOSGWidget(QApplication& a, osg::ArgumentParser& arguments)
|
||||
{
|
||||
osg::ref_ptr<CompositeViewerQOSG> viewerWindow(new CompositeViewerQOSG);
|
||||
|
||||
viewerWindow->setGeometry(0,0,640,480);
|
||||
viewerWindow->setGeometry(50,50,640,480);
|
||||
// Open the ViewerQOSG window at 30/30 instead of 0/0. In some instances,
|
||||
// the window may otherwise lack any window decoration.
|
||||
// viewerWindow->setGeometry(30,30,640,480);
|
||||
@@ -417,6 +499,7 @@ int mainQOSGWidget(QApplication& a, osg::ArgumentParser& arguments)
|
||||
view1->getCamera()->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(width)/static_cast<double>(height/2), 1.0, 1000.0);
|
||||
view1->getCamera()->setViewport(new osg::Viewport(0,0,width,height/2));
|
||||
view1->setSceneData(loadedModel.get());
|
||||
view1->getCamera()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
|
||||
|
||||
setupManipulatorAndHandler(*view1, arguments);
|
||||
|
||||
@@ -429,12 +512,15 @@ int mainQOSGWidget(QApplication& a, osg::ArgumentParser& arguments)
|
||||
view2->getCamera()->setProjectionMatrixAsPerspective(30.0f, static_cast<double>(width)/static_cast<double>(height/2), 1.0, 1000.0);
|
||||
view2->getCamera()->setViewport(new osg::Viewport(0,height/2,width,height/2));
|
||||
view2->setSceneData(loadedModel.get());
|
||||
view2->getCamera()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
|
||||
|
||||
setupManipulatorAndHandler(*view2, arguments);
|
||||
|
||||
viewerWindow->addView(view2);
|
||||
}
|
||||
|
||||
viewerWindow->_scene = loadedModel.get();
|
||||
viewerWindow->Tile();
|
||||
viewerWindow->show();
|
||||
|
||||
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
|
||||
|
||||
@@ -808,6 +808,8 @@ int main( int argc, char **argv )
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--no-rescale","Disable the rescaling of the pixel data to 0.0 to 1.0 range");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--rescale","Enable the rescale of the pixel data to 0.0 to 1.0 range (default).");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--shift-min-to-zero","Shift the pixel data so min value is 0.0.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--sequence-length <num>","Set the length of time that a sequence of images with run for.");
|
||||
arguments.getApplicationUsage()->addCommandLineOption("--sd <num>","Short hand for --sequence-length");
|
||||
// arguments.getApplicationUsage()->addCommandLineOption("--raw <sizeX> <sizeY> <sizeZ> <numberBytesPerComponent> <numberOfComponents> <endian> <filename>","read a raw image data");
|
||||
|
||||
// construct the viewer.
|
||||
@@ -888,16 +890,11 @@ int main( int argc, char **argv )
|
||||
|
||||
while (arguments.read("--light")) shadingModel = Light;
|
||||
|
||||
float xSize=1.0f, ySize=1.0f, zSize=1.0f;
|
||||
float xSize=0.0f, ySize=0.0f, zSize=0.0f;
|
||||
while (arguments.read("--xSize",xSize)) {}
|
||||
while (arguments.read("--ySize",ySize)) {}
|
||||
while (arguments.read("--zSize",zSize)) {}
|
||||
|
||||
float xMultiplier=1.0f, yMultiplier=1.0f, zMultiplier=1.0f;
|
||||
while (arguments.read("--xMultiplier",xMultiplier)) {}
|
||||
while (arguments.read("--yMultiplier",yMultiplier)) {}
|
||||
while (arguments.read("--zMultiplier",zMultiplier)) {}
|
||||
|
||||
osg::ref_ptr<TestSupportOperation> testSupportOperation = new TestSupportOperation;
|
||||
viewer.setRealizeOperation(testSupportOperation.get());
|
||||
|
||||
@@ -960,6 +957,10 @@ int main( int argc, char **argv )
|
||||
while(arguments.read("--gpu-tf")) { gpuTransferFunction = true; }
|
||||
while(arguments.read("--cpu-tf")) { gpuTransferFunction = false; }
|
||||
|
||||
double sequenceLength = 10.0;
|
||||
while(arguments.read("--sequence-duration", sequenceLength) ||
|
||||
arguments.read("--sd", sequenceLength)) {}
|
||||
|
||||
typedef std::list< osg::ref_ptr<osg::Image> > Images;
|
||||
Images images;
|
||||
|
||||
@@ -1117,16 +1118,16 @@ int main( int argc, char **argv )
|
||||
|
||||
|
||||
Images::iterator sizeItr = images.begin();
|
||||
xSize = (*sizeItr)->s();
|
||||
ySize = (*sizeItr)->t();
|
||||
zSize = (*sizeItr)->r();
|
||||
int image_s = (*sizeItr)->s();
|
||||
int image_t = (*sizeItr)->t();
|
||||
int image_r = (*sizeItr)->r();
|
||||
++sizeItr;
|
||||
|
||||
for(;sizeItr != images.end(); ++sizeItr)
|
||||
{
|
||||
if ((*sizeItr)->s() != xSize ||
|
||||
(*sizeItr)->t() != ySize ||
|
||||
(*sizeItr)->r() != zSize)
|
||||
if ((*sizeItr)->s() != image_s ||
|
||||
(*sizeItr)->t() != image_t ||
|
||||
(*sizeItr)->r() != image_r)
|
||||
{
|
||||
std::cout<<"Images in sequence are not of the same dimensions."<<std::endl;
|
||||
return 1;
|
||||
@@ -1134,7 +1135,19 @@ int main( int argc, char **argv )
|
||||
}
|
||||
|
||||
|
||||
osg::RefMatrix* matrix = dynamic_cast<osg::RefMatrix*>(images.front()->getUserData());
|
||||
osg::ref_ptr<osg::RefMatrix> matrix = dynamic_cast<osg::RefMatrix*>(images.front()->getUserData());
|
||||
|
||||
if (!matrix)
|
||||
{
|
||||
if (xSize==0.0) xSize = static_cast<float>(image_s);
|
||||
if (ySize==0.0) ySize = static_cast<float>(image_t);
|
||||
if (zSize==0.0) zSize = static_cast<float>(image_r);
|
||||
|
||||
matrix = new osg::RefMatrix(xSize, 0.0, 0.0, 0.0,
|
||||
0.0, ySize, 0.0, 0.0,
|
||||
0.0, 0.0, zSize, 0.0,
|
||||
0.0, 0.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
osg::Vec4 minValue(FLT_MAX, FLT_MAX, FLT_MAX, FLT_MAX);
|
||||
osg::Vec4 maxValue(-FLT_MAX, -FLT_MAX, -FLT_MAX, -FLT_MAX);
|
||||
@@ -1249,7 +1262,7 @@ int main( int argc, char **argv )
|
||||
osg::notify(osg::NOTICE)<<"Creating sequence of "<<images.size()<<" volumes."<<std::endl;
|
||||
|
||||
osg::ref_ptr<osg::ImageSequence> imageSequence = new osg::ImageSequence;
|
||||
imageSequence->setLength(10.0);
|
||||
imageSequence->setLength(sequenceLength);
|
||||
image_3d = imageSequence.get();
|
||||
for(Images::iterator itr = images.begin();
|
||||
itr != images.end();
|
||||
@@ -1266,12 +1279,9 @@ int main( int argc, char **argv )
|
||||
|
||||
osg::ref_ptr<osgVolume::Layer> layer = new osgVolume::ImageLayer(image_3d.get());
|
||||
|
||||
if (matrix)
|
||||
{
|
||||
osgVolume::Locator* locator = new osgVolume::Locator(*matrix);
|
||||
layer->setLocator(locator);
|
||||
tile->setLocator(locator);
|
||||
}
|
||||
osgVolume::Locator* locator = new osgVolume::Locator(*matrix);
|
||||
layer->setLocator(locator);
|
||||
tile->setLocator(locator);
|
||||
|
||||
tile->setLayer(layer.get());
|
||||
|
||||
|
||||
@@ -173,11 +173,35 @@ class BoundingBoxImpl
|
||||
|
||||
/** Expands this bounding box to include the given bounding box.
|
||||
* If this box is uninitialized, set it equal to bb. */
|
||||
void expandBy(const BoundingBoxImpl& bb);
|
||||
void expandBy(const BoundingBoxImpl& bb)
|
||||
{
|
||||
if (!bb.valid()) return;
|
||||
|
||||
if(bb._min.x()<_min.x()) _min.x() = bb._min.x();
|
||||
if(bb._max.x()>_max.x()) _max.x() = bb._max.x();
|
||||
|
||||
if(bb._min.y()<_min.y()) _min.y() = bb._min.y();
|
||||
if(bb._max.y()>_max.y()) _max.y() = bb._max.y();
|
||||
|
||||
if(bb._min.z()<_min.z()) _min.z() = bb._min.z();
|
||||
if(bb._max.z()>_max.z()) _max.z() = bb._max.z();
|
||||
}
|
||||
|
||||
/** Expands this bounding box to include the given sphere.
|
||||
* If this box is uninitialized, set it to include sh. */
|
||||
void expandBy(const BoundingSphereImpl<VT>& sh);
|
||||
void expandBy(const BoundingSphereImpl<VT>& sh)
|
||||
{
|
||||
if (!sh.valid()) return;
|
||||
|
||||
if(sh._center.x()-sh._radius<_min.x()) _min.x() = sh._center.x()-sh._radius;
|
||||
if(sh._center.x()+sh._radius>_max.x()) _max.x() = sh._center.x()+sh._radius;
|
||||
|
||||
if(sh._center.y()-sh._radius<_min.y()) _min.y() = sh._center.y()-sh._radius;
|
||||
if(sh._center.y()+sh._radius>_max.y()) _max.y() = sh._center.y()+sh._radius;
|
||||
|
||||
if(sh._center.z()-sh._radius<_min.z()) _min.z() = sh._center.z()-sh._radius;
|
||||
if(sh._center.z()+sh._radius>_max.z()) _max.z() = sh._center.z()+sh._radius;
|
||||
}
|
||||
|
||||
|
||||
/** Returns the intersection of this bounding box and the specified bounding box. */
|
||||
@@ -205,36 +229,6 @@ class BoundingBoxImpl
|
||||
}
|
||||
};
|
||||
|
||||
template<typename VT>
|
||||
void BoundingBoxImpl<VT>::expandBy(const BoundingBoxImpl<VT>& bb)
|
||||
{
|
||||
if (!bb.valid()) return;
|
||||
|
||||
if(bb._min.x()<_min.x()) _min.x() = bb._min.x();
|
||||
if(bb._max.x()>_max.x()) _max.x() = bb._max.x();
|
||||
|
||||
if(bb._min.y()<_min.y()) _min.y() = bb._min.y();
|
||||
if(bb._max.y()>_max.y()) _max.y() = bb._max.y();
|
||||
|
||||
if(bb._min.z()<_min.z()) _min.z() = bb._min.z();
|
||||
if(bb._max.z()>_max.z()) _max.z() = bb._max.z();
|
||||
}
|
||||
|
||||
template<typename VT>
|
||||
void BoundingBoxImpl<VT>::expandBy(const BoundingSphereImpl<VT>& sh)
|
||||
{
|
||||
if (!sh.valid()) return;
|
||||
|
||||
if(sh._center.x()-sh._radius<_min.x()) _min.x() = sh._center.x()-sh._radius;
|
||||
if(sh._center.x()+sh._radius>_max.x()) _max.x() = sh._center.x()+sh._radius;
|
||||
|
||||
if(sh._center.y()-sh._radius<_min.y()) _min.y() = sh._center.y()-sh._radius;
|
||||
if(sh._center.y()+sh._radius>_max.y()) _max.y() = sh._center.y()+sh._radius;
|
||||
|
||||
if(sh._center.z()-sh._radius<_min.z()) _min.z() = sh._center.z()-sh._radius;
|
||||
if(sh._center.z()+sh._radius>_max.z()) _max.z() = sh._center.z()+sh._radius;
|
||||
}
|
||||
|
||||
typedef BoundingBoxImpl<Vec3f> BoundingBoxf;
|
||||
typedef BoundingBoxImpl<Vec3d> BoundingBoxd;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -191,7 +191,7 @@ class OSG_EXPORT DisplaySettings : public osg::Referenced
|
||||
unsigned int getNumOfDatabaseThreadsHint() const { return _numDatabaseThreadsHint; }
|
||||
|
||||
/** Set the hint for number of threads in the DatbasePager to dedicate to reading http requests.*/
|
||||
void setNumOfHttpDatabaseThreadsHint(unsigned int numThreads) { _numDatabaseThreadsHint = numThreads; }
|
||||
void setNumOfHttpDatabaseThreadsHint(unsigned int numThreads) { _numHttpDatabaseThreadsHint = numThreads; }
|
||||
|
||||
/** Get the hint for number of threads in the DatbasePager dedicated to reading http requests.*/
|
||||
unsigned int getNumOfHttpDatabaseThreadsHint() const { return _numHttpDatabaseThreadsHint; }
|
||||
|
||||
@@ -26,9 +26,14 @@ enum Endian
|
||||
|
||||
inline Endian getCpuByteOrder()
|
||||
{
|
||||
static char big_endian_1[2] = { 0, 1 };
|
||||
union {
|
||||
char big_endian_1[2];
|
||||
short is_it_really_1;
|
||||
} u;
|
||||
u.big_endian_1[0] = 0;
|
||||
u.big_endian_1[1] = 1;
|
||||
|
||||
if ( (*((short*) big_endian_1)) == 1)
|
||||
if (u.is_it_really_1 == 1)
|
||||
return BigEndian;
|
||||
else
|
||||
return LittleEndian;
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
#pragma warning( disable : 4244 )
|
||||
#pragma warning( disable : 4251 )
|
||||
#pragma warning( disable : 4275 )
|
||||
#pragma warning( disable : 4512 )
|
||||
#pragma warning( disable : 4267 )
|
||||
#pragma warning( disable : 4702 )
|
||||
#pragma warning( disable : 4511 )
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__)
|
||||
|
||||
@@ -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)); }
|
||||
|
||||
@@ -31,6 +31,13 @@ namespace osg {
|
||||
class DeleteHandler;
|
||||
class Observer;
|
||||
|
||||
/** template class to help enforce static initialization order. */
|
||||
template <typename T, T M()>
|
||||
struct depends_on
|
||||
{
|
||||
depends_on() { M(); }
|
||||
};
|
||||
|
||||
/** Base class from providing referencing counted objects.*/
|
||||
class OSG_EXPORT Referenced
|
||||
{
|
||||
|
||||
@@ -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 2
|
||||
#define OPENSCENEGRAPH_SOVERSION 55
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
namespace osgAnimation
|
||||
{
|
||||
|
||||
class OSGANIMATION_EXPORT Animation : public virtual osg::Object
|
||||
class OSGANIMATION_EXPORT Animation : public osg::Object
|
||||
{
|
||||
public:
|
||||
META_Object(osgAnimation, Animation)
|
||||
@@ -84,7 +84,6 @@ namespace osgAnimation
|
||||
|
||||
~Animation() {}
|
||||
|
||||
std::string _name;
|
||||
double _duration;
|
||||
double _originalDuration;
|
||||
float _weight;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace osgAnimation
|
||||
META_Object(osgAnimation, BasicAnimationManager);
|
||||
|
||||
BasicAnimationManager();
|
||||
BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) : AnimationManagerBase(b,copyop) {}
|
||||
BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||
virtual ~BasicAnimationManager();
|
||||
|
||||
void update (double time);
|
||||
|
||||
@@ -27,6 +27,47 @@ namespace osgAnimation
|
||||
{
|
||||
public:
|
||||
|
||||
RigGeometry();
|
||||
RigGeometry(const osg::Geometry& b);
|
||||
RigGeometry(const RigGeometry& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
META_Object(osgAnimation, RigGeometry);
|
||||
|
||||
void setInfluenceMap(osgAnimation::VertexInfluenceMap* vertexInfluenceMap) { _vertexInfluenceMap = vertexInfluenceMap; }
|
||||
const osgAnimation::VertexInfluenceMap* getInfluenceMap() const { return _vertexInfluenceMap.get();}
|
||||
osgAnimation::VertexInfluenceMap* getInfluenceMap() { return _vertexInfluenceMap.get();}
|
||||
|
||||
const Skeleton* getSkeleton() const;
|
||||
Skeleton* getSkeleton();
|
||||
|
||||
void setNeedToComputeMatrix(bool state) { _needToComputeMatrix = state;}
|
||||
bool getNeedToComputeMatrix() const { return _needToComputeMatrix;}
|
||||
|
||||
void buildVertexSet();
|
||||
void buildTransformer(Skeleton* root);
|
||||
void computeMatrixFromRootSkeleton();
|
||||
|
||||
virtual void transformSoftwareMethod();
|
||||
const osgAnimation::VertexInfluenceSet& getVertexInfluenceSet() const { return _vertexInfluenceSet;}
|
||||
|
||||
const std::vector<osg::Vec3>& getPositionSource() const { return _positionSource;}
|
||||
const std::vector<osg::Vec3>& getNormalSource() const { return _normalSource;}
|
||||
|
||||
protected:
|
||||
|
||||
std::vector<osg::Vec3> _positionSource;
|
||||
std::vector<osg::Vec3> _normalSource;
|
||||
|
||||
osgAnimation::VertexInfluenceSet _vertexInfluenceSet;
|
||||
osg::ref_ptr<osgAnimation::VertexInfluenceMap> _vertexInfluenceMap;
|
||||
osgAnimation::TransformVertexFunctor _transformVertexes;
|
||||
|
||||
osg::Matrix _matrixFromSkeletonToGeometry;
|
||||
osg::Matrix _invMatrixFromSkeletonToGeometry;
|
||||
osg::observer_ptr<Skeleton> _root;
|
||||
bool _needToComputeMatrix;
|
||||
|
||||
|
||||
struct FindNearestParentSkeleton : public osg::NodeVisitor
|
||||
{
|
||||
osg::ref_ptr<osgAnimation::Skeleton> _root;
|
||||
@@ -73,7 +114,7 @@ namespace osgAnimation
|
||||
/** BuildVertexTransformerVisitor is used to setup RigGeometry drawable
|
||||
* throw a subgraph.
|
||||
*/
|
||||
struct BuildVertexTransformerVisitor : public osg::NodeVisitor
|
||||
struct BuildVertexTransformerVisitor : public osg::NodeVisitor
|
||||
{
|
||||
osg::ref_ptr<Skeleton> _root;
|
||||
BuildVertexTransformerVisitor(Skeleton* root): osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) { _root = root;}
|
||||
@@ -94,46 +135,7 @@ namespace osgAnimation
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
RigGeometry();
|
||||
RigGeometry(const osg::Geometry& b);
|
||||
RigGeometry(const RigGeometry& b, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
virtual osg::Object* cloneType() const { return new RigGeometry(); }
|
||||
virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new RigGeometry(*this,copyop); }
|
||||
virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const RigGeometry*>(obj)!=NULL; }
|
||||
virtual const char* libraryName() const { return "osgAnimation"; }
|
||||
virtual const char* className() const { return "RigGeometry"; }
|
||||
|
||||
|
||||
void setInfluenceMap(osgAnimation::VertexInfluenceMap* vertexInfluenceMap) { _vertexInfluenceMap = vertexInfluenceMap; }
|
||||
const osgAnimation::VertexInfluenceMap* getInfluenceMap() const { return _vertexInfluenceMap.get();}
|
||||
osgAnimation::VertexInfluenceMap* getInfluenceMap() { return _vertexInfluenceMap.get();}
|
||||
void buildVertexSet();
|
||||
void buildTransformer(Skeleton* root);
|
||||
void computeMatrixFromRootSkeleton();
|
||||
|
||||
void setNeedToComputeMatrix(bool state) { _needToComputeMatrix = state;}
|
||||
bool getNeedToComputeMatrix() const { return _needToComputeMatrix;}
|
||||
|
||||
const Skeleton* getSkeleton() const;
|
||||
Skeleton* getSkeleton();
|
||||
virtual void transformSoftwareMethod();
|
||||
const osgAnimation::VertexInfluenceSet& getVertexInfluenceSet() const { return _vertexInfluenceSet;}
|
||||
|
||||
std::vector<osg::Vec3> _positionSource;
|
||||
std::vector<osg::Vec3> _normalSource;
|
||||
|
||||
osgAnimation::VertexInfluenceSet _vertexInfluenceSet;
|
||||
osg::ref_ptr<osgAnimation::VertexInfluenceMap> _vertexInfluenceMap;
|
||||
osgAnimation::TransformVertexFunctor _transformVertexes;
|
||||
|
||||
osg::Matrix _matrixFromSkeletonToGeometry;
|
||||
osg::Matrix _invMatrixFromSkeletonToGeometry;
|
||||
osg::observer_ptr<Skeleton> _root;
|
||||
bool _needToComputeMatrix;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
namespace osgAnimation
|
||||
{
|
||||
|
||||
class Action : public virtual osg::Object
|
||||
class Action : public osg::Object
|
||||
{
|
||||
public:
|
||||
|
||||
class Callback : public virtual osg::Object
|
||||
class Callback : public osg::Object
|
||||
{
|
||||
public:
|
||||
Callback(){}
|
||||
@@ -162,7 +162,7 @@ namespace osgAnimation
|
||||
};
|
||||
|
||||
|
||||
class Timeline : public virtual osg::Object
|
||||
class Timeline : public osg::Object
|
||||
{
|
||||
protected:
|
||||
typedef std::pair<unsigned int, osg::ref_ptr<Action> > FrameAction;
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
// the Free Software Foundation; either version 2.1 of the License, or (at //
|
||||
// your option) any later version. //
|
||||
//****************************************************************************//
|
||||
|
||||
/*****************************************************************************/
|
||||
/** Loads a core compressed keyframe instance.
|
||||
/* Loads a core compressed keyframe instance.
|
||||
*
|
||||
* This function loads a core compressed keyframe instance from a data source.
|
||||
*
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#define OSGDB_FSTREAM 1
|
||||
|
||||
#include <osgDB/Export>
|
||||
#include <osg/Export>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef OSGINTROSPECTION_EXPORTHDR
|
||||
#define OSGINTROSPECTION_EXPORTHDR 1
|
||||
|
||||
#include <osg/Config>
|
||||
|
||||
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
|
||||
#pragma warning( disable : 4251 )
|
||||
|
||||
@@ -30,7 +30,17 @@
|
||||
#include <osg/Vec3>
|
||||
#include <osg/BoundingBox>
|
||||
|
||||
#include <OpenThreads/ReadWriteMutex>
|
||||
// 9th Febrary 2009, disabled the use of ReadWriteMutex as it looks like this
|
||||
// is introducing threading problems due to threading problems in OpenThreads::ReadWriteMutex.
|
||||
// #define OSGPARTICLE_USE_ReadWriteMutex
|
||||
|
||||
#ifdef OSGPARTICLE_USE_ReadWriteMutex
|
||||
#include <OpenThreads/ReadWriteMutex>
|
||||
#else
|
||||
#include <OpenThreads/Mutex>
|
||||
#include <OpenThreads/ScopedLock>
|
||||
#endif
|
||||
|
||||
|
||||
namespace osgParticle
|
||||
{
|
||||
@@ -182,7 +192,17 @@ namespace osgParticle
|
||||
|
||||
virtual osg::BoundingBox computeBound() const;
|
||||
|
||||
OpenThreads::ReadWriteMutex* getReadWriteMutex() const { return &_readWriteMutex; }
|
||||
#ifdef OSGPARTICLE_USE_ReadWriteMutex
|
||||
typedef OpenThreads::ReadWriteMutex ReadWriterMutex;
|
||||
typedef OpenThreads::ScopedReadLock ScopedReadLock;
|
||||
typedef OpenThreads::ScopedWriteLock ScopedWriteLock;
|
||||
#else
|
||||
typedef OpenThreads::Mutex ReadWriterMutex;
|
||||
typedef OpenThreads::ScopedLock<OpenThreads::Mutex> ScopedReadLock;
|
||||
typedef OpenThreads::ScopedLock<OpenThreads::Mutex> ScopedWriteLock;
|
||||
#endif
|
||||
|
||||
ReadWriterMutex* getReadWriteMutex() const { return &_readWriteMutex; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -222,8 +242,7 @@ namespace osgParticle
|
||||
int _detail;
|
||||
mutable int _draw_count;
|
||||
|
||||
mutable OpenThreads::ReadWriteMutex _readWriteMutex;
|
||||
|
||||
mutable ReadWriterMutex _readWriteMutex;
|
||||
};
|
||||
|
||||
// INLINE FUNCTIONS
|
||||
|
||||
@@ -64,7 +64,7 @@ class OSGTERRAIN_EXPORT Terrain : public osg::Group
|
||||
/** Get the const TerrainTile for a given TileID.*/
|
||||
const TerrainTile* getTile(const TileID& tileID) const;
|
||||
|
||||
/** Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from..*/
|
||||
/** Set the TerrainTechnique prototype from which TerrainTiles can clone the techniques from.*/
|
||||
void setTerrainTechniquePrototype(TerrainTechnique* technique) { _terrainTechnique = technique; }
|
||||
|
||||
/** Get the TerrainTechnique prototype */
|
||||
|
||||
@@ -27,19 +27,13 @@ namespace osgTerrain {
|
||||
|
||||
class Terrain;
|
||||
|
||||
class TileID
|
||||
class OSGTERRAIN_EXPORT TileID
|
||||
{
|
||||
public:
|
||||
|
||||
TileID():
|
||||
level(-1),
|
||||
x(-1),
|
||||
y(-1) {}
|
||||
TileID();
|
||||
|
||||
TileID(int in_level, int in_x, int in_y):
|
||||
level(in_level),
|
||||
x(in_x),
|
||||
y(in_y) {}
|
||||
TileID(int in_level, int in_x, int in_y);
|
||||
|
||||
bool operator == (const TileID& rhs) const
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ class OSGUTIL_EXPORT DrawElementTypeSimplifierVisitor : public osg::NodeVisitor
|
||||
{
|
||||
public:
|
||||
|
||||
META_NodeVisitor("osgUtil","DrawElementTypeSimplifierVisitor")
|
||||
META_NodeVisitor("osgUtil","DrawElementTypeSimplifierVisitor");
|
||||
|
||||
void apply(osg::Geode& node);
|
||||
};
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -78,6 +78,12 @@ class OSGVOLUME_EXPORT Layer : public osg::Object
|
||||
void addProperty(Property* property);
|
||||
|
||||
|
||||
/** Specify whether ImageLayer requires update traversal. */
|
||||
virtual bool requiresUpdateTraversal() const { return false; }
|
||||
|
||||
/** Call update on the Layer.*/
|
||||
virtual void update(osg::NodeVisitor& /*nv*/) {}
|
||||
|
||||
/** increment the modified count."*/
|
||||
virtual void dirty() {};
|
||||
|
||||
@@ -137,6 +143,10 @@ class OSGVOLUME_EXPORT ImageLayer : public Layer
|
||||
/** Compute the min color component of the image and then translate and pixels by this offset to make the new min component 0.*/
|
||||
void translateMinToZero();
|
||||
|
||||
virtual bool requiresUpdateTraversal() const;
|
||||
|
||||
virtual void update(osg::NodeVisitor& /*nv*/);
|
||||
|
||||
virtual void dirty();
|
||||
virtual void setModifiedCount(unsigned int value);
|
||||
virtual unsigned int getModifiedCount() const;
|
||||
@@ -175,6 +185,10 @@ class OSGVOLUME_EXPORT CompositeLayer : public Layer
|
||||
|
||||
unsigned int getNumLayers() const { return _layers.size(); }
|
||||
|
||||
bool requiresUpdateTraversal() const;
|
||||
|
||||
virtual void update(osg::NodeVisitor& /*nv*/);
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~CompositeLayer() {}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2009 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -40,11 +40,11 @@ class TransparencyProperty;
|
||||
class OSGVOLUME_EXPORT PropertyVisitor
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
PropertyVisitor(bool traverseOnlyActiveChildren=true);
|
||||
|
||||
|
||||
virtual ~PropertyVisitor() {}
|
||||
|
||||
|
||||
virtual void apply(Property&) {}
|
||||
virtual void apply(CompositeProperty&);
|
||||
virtual void apply(SwitchProperty&);
|
||||
@@ -56,9 +56,9 @@ class OSGVOLUME_EXPORT PropertyVisitor
|
||||
virtual void apply(LightingProperty&) {}
|
||||
virtual void apply(SampleDensityProperty&) {}
|
||||
virtual void apply(TransparencyProperty&) {}
|
||||
|
||||
|
||||
bool _traverseOnlyActiveChildren;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -70,11 +70,11 @@ class OSGVOLUME_EXPORT Property : public osg::Object
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||
Property(const Property&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, Property);
|
||||
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~Property();
|
||||
@@ -88,7 +88,7 @@ class OSGVOLUME_EXPORT CompositeProperty : public Property
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||
CompositeProperty(const CompositeProperty& compositeProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, CompositeProperty);
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
@@ -106,14 +106,14 @@ class OSGVOLUME_EXPORT CompositeProperty : public Property
|
||||
void addProperty(Property* property) { _properties.push_back(property); }
|
||||
|
||||
void removeProperty(unsigned int i) { _properties.erase(_properties.begin()+i); }
|
||||
|
||||
|
||||
unsigned int getNumProperties() const { return _properties.size(); }
|
||||
|
||||
protected:
|
||||
|
||||
virtual ~CompositeProperty() {}
|
||||
|
||||
|
||||
|
||||
Properties _properties;
|
||||
};
|
||||
|
||||
@@ -126,7 +126,7 @@ class OSGVOLUME_EXPORT SwitchProperty : public CompositeProperty
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||
SwitchProperty(const SwitchProperty& switchProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, SwitchProperty);
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
@@ -141,7 +141,7 @@ class OSGVOLUME_EXPORT SwitchProperty : public CompositeProperty
|
||||
protected:
|
||||
|
||||
virtual ~SwitchProperty() {}
|
||||
|
||||
|
||||
int _activeProperty;
|
||||
};
|
||||
|
||||
@@ -150,12 +150,12 @@ class OSGVOLUME_EXPORT TransferFunctionProperty : public Property
|
||||
public:
|
||||
|
||||
TransferFunctionProperty(osg::TransferFunction* tf = 0);
|
||||
|
||||
|
||||
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
|
||||
TransferFunctionProperty(const TransferFunctionProperty& tfp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, TransferFunctionProperty);
|
||||
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
|
||||
/** Set the transfer function.*/
|
||||
@@ -168,9 +168,9 @@ class OSGVOLUME_EXPORT TransferFunctionProperty : public Property
|
||||
const osg::TransferFunction* getTransferFunction() const { return _tf.get(); }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~TransferFunctionProperty() {}
|
||||
|
||||
|
||||
osg::ref_ptr<osg::TransferFunction> _tf;
|
||||
};
|
||||
|
||||
@@ -181,11 +181,11 @@ class OSGVOLUME_EXPORT ScalarProperty : public Property
|
||||
public:
|
||||
|
||||
ScalarProperty(const std::string& scaleName, float value);
|
||||
|
||||
|
||||
ScalarProperty(const ScalarProperty& scalarProperty,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, ScalarProperty);
|
||||
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
|
||||
/** Set the value.*/
|
||||
@@ -201,9 +201,9 @@ class OSGVOLUME_EXPORT ScalarProperty : public Property
|
||||
const osg::Uniform* getUniform() const { return _uniform.get(); }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~ScalarProperty() {}
|
||||
|
||||
|
||||
ScalarProperty();
|
||||
|
||||
osg::ref_ptr<osg::Uniform> _uniform;
|
||||
@@ -215,15 +215,15 @@ class OSGVOLUME_EXPORT IsoSurfaceProperty : public ScalarProperty
|
||||
public:
|
||||
|
||||
IsoSurfaceProperty(float value=1.0);
|
||||
|
||||
|
||||
IsoSurfaceProperty(const IsoSurfaceProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, IsoSurfaceProperty);
|
||||
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~IsoSurfaceProperty() {}
|
||||
};
|
||||
|
||||
@@ -232,24 +232,24 @@ class OSGVOLUME_EXPORT AlphaFuncProperty : public ScalarProperty
|
||||
public:
|
||||
|
||||
AlphaFuncProperty(float value=1.0);
|
||||
|
||||
|
||||
AlphaFuncProperty(const AlphaFuncProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, AlphaFuncProperty);
|
||||
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
|
||||
virtual void setValue(float v);
|
||||
|
||||
|
||||
osg::AlphaFunc* getAlphaFunc() { return _alphaFunc.get(); }
|
||||
|
||||
const osg::AlphaFunc* getAlphaFunc() const { return _alphaFunc.get(); }
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~AlphaFuncProperty() {}
|
||||
|
||||
|
||||
osg::ref_ptr<osg::AlphaFunc> _alphaFunc;
|
||||
};
|
||||
|
||||
@@ -258,15 +258,15 @@ class OSGVOLUME_EXPORT MaximumIntensityProjectionProperty : public Property
|
||||
public:
|
||||
|
||||
MaximumIntensityProjectionProperty();
|
||||
|
||||
|
||||
MaximumIntensityProjectionProperty(const MaximumIntensityProjectionProperty& mipp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, MaximumIntensityProjectionProperty);
|
||||
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~MaximumIntensityProjectionProperty() {}
|
||||
};
|
||||
|
||||
@@ -276,15 +276,15 @@ class OSGVOLUME_EXPORT LightingProperty : public Property
|
||||
public:
|
||||
|
||||
LightingProperty();
|
||||
|
||||
|
||||
LightingProperty(const LightingProperty& mipp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, LightingProperty);
|
||||
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~LightingProperty() {}
|
||||
};
|
||||
|
||||
@@ -294,15 +294,15 @@ class OSGVOLUME_EXPORT SampleDensityProperty : public ScalarProperty
|
||||
public:
|
||||
|
||||
SampleDensityProperty(float value=1.0);
|
||||
|
||||
|
||||
SampleDensityProperty(const SampleDensityProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, SampleDensityProperty);
|
||||
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~SampleDensityProperty() {}
|
||||
};
|
||||
|
||||
@@ -311,15 +311,15 @@ class OSGVOLUME_EXPORT TransparencyProperty : public ScalarProperty
|
||||
public:
|
||||
|
||||
TransparencyProperty(float value=1.0);
|
||||
|
||||
|
||||
TransparencyProperty(const TransparencyProperty& isp,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
|
||||
|
||||
|
||||
META_Object(osgVolume, TransparencyProperty);
|
||||
|
||||
|
||||
virtual void accept(PropertyVisitor& pv) { pv.apply(*this); }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
virtual ~TransparencyProperty() {}
|
||||
};
|
||||
|
||||
@@ -327,9 +327,9 @@ class OSGVOLUME_EXPORT TransparencyProperty : public ScalarProperty
|
||||
class OSGVOLUME_EXPORT CollectPropertiesVisitor : public osgVolume::PropertyVisitor
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CollectPropertiesVisitor(bool traverseOnlyActiveChildren=true);
|
||||
|
||||
|
||||
virtual void apply(Property&);
|
||||
virtual void apply(TransferFunctionProperty&);
|
||||
virtual void apply(ScalarProperty&);
|
||||
@@ -339,7 +339,7 @@ class OSGVOLUME_EXPORT CollectPropertiesVisitor : public osgVolume::PropertyVisi
|
||||
virtual void apply(LightingProperty& lp);
|
||||
virtual void apply(SampleDensityProperty& sdp);
|
||||
virtual void apply(TransparencyProperty& tp);
|
||||
|
||||
|
||||
osg::ref_ptr<TransferFunctionProperty> _tfProperty;
|
||||
osg::ref_ptr<IsoSurfaceProperty> _isoProperty;
|
||||
osg::ref_ptr<AlphaFuncProperty> _afProperty;
|
||||
@@ -347,27 +347,27 @@ class OSGVOLUME_EXPORT CollectPropertiesVisitor : public osgVolume::PropertyVisi
|
||||
osg::ref_ptr<LightingProperty> _lightingProperty;
|
||||
osg::ref_ptr<SampleDensityProperty> _sampleDensityProperty;
|
||||
osg::ref_ptr<TransparencyProperty> _transparencyProperty;
|
||||
|
||||
|
||||
};
|
||||
|
||||
class OSGVOLUME_EXPORT PropertyAdjustmentCallback : public osgGA::GUIEventHandler, public osg::StateSet::Callback
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
PropertyAdjustmentCallback();
|
||||
|
||||
PropertyAdjustmentCallback(const PropertyAdjustmentCallback&,const osg::CopyOp&) {}
|
||||
|
||||
META_Object(osgVolume,PropertyAdjustmentCallback);
|
||||
|
||||
|
||||
void setKeyEventCycleForward(int key) { _cyleForwardKey = key; }
|
||||
int getKeyEventCyclesForward() const { return _cyleForwardKey; }
|
||||
|
||||
void setKeyEventCycleBackward(int key) { _cyleBackwardKey = key; }
|
||||
int getKeyEventCyclesBackward() const { return _cyleBackwardKey; }
|
||||
|
||||
void setKeyEventActivatesTransparenyAdjustment(int key) { _transparencyKey = key; }
|
||||
int getKeyEventActivatesTransparenyAdjustment() const { return _transparencyKey; }
|
||||
void setKeyEventActivatesTransparencyAdjustment(int key) { _transparencyKey = key; }
|
||||
int getKeyEventActivatesTransparencyAdjustment() const { return _transparencyKey; }
|
||||
|
||||
void setKeyEventActivatesSampleDensityAdjustment(int key) { _sampleDensityKey = key; }
|
||||
int getKeyEventActivatesSampleAdjustment() const { return _sampleDensityKey; }
|
||||
@@ -382,7 +382,7 @@ class OSGVOLUME_EXPORT PropertyAdjustmentCallback : public osgGA::GUIEventHandle
|
||||
int _transparencyKey;
|
||||
int _alphaFuncKey;
|
||||
int _sampleDensityKey;
|
||||
|
||||
|
||||
bool _updateTransparency;
|
||||
bool _updateAlphaCutOff;
|
||||
bool _updateSampleDensity;
|
||||
|
||||
@@ -26,21 +26,13 @@ namespace osgVolume {
|
||||
|
||||
class Volume;
|
||||
|
||||
class TileID
|
||||
class OSGVOLUME_EXPORT TileID
|
||||
{
|
||||
public:
|
||||
|
||||
TileID():
|
||||
level(-1),
|
||||
x(-1),
|
||||
y(-1),
|
||||
z(-1) {}
|
||||
TileID();
|
||||
|
||||
TileID(int in_level, int in_x, int in_y, int in_z):
|
||||
level(in_level),
|
||||
x(in_x),
|
||||
y(in_y),
|
||||
z(in_z) {}
|
||||
TileID(int in_level, int in_x, int in_y, int in_z);
|
||||
|
||||
bool operator == (const TileID& rhs) const
|
||||
{
|
||||
@@ -115,7 +107,7 @@ class OSGVOLUME_EXPORT VolumeTile : public osg::Group
|
||||
const Locator* getLocator() const { return _locator.get(); }
|
||||
|
||||
|
||||
void setLayer(Layer* layer) { _layer = layer; }
|
||||
void setLayer(Layer* layer);
|
||||
Layer* getLayer() { return _layer.get(); }
|
||||
const Layer* getLayer() const { return _layer.get(); }
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class OSGWIDGET_EXPORT BrowserManager : public osg::Object
|
||||
|
||||
virtual ~BrowserManager();
|
||||
|
||||
META_Object(osgWidget,BrowserManager)
|
||||
META_Object(osgWidget,BrowserManager);
|
||||
|
||||
std::string _application;
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#define OSGWIDGET_EXPORT_ 1
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( disable : 4121 )
|
||||
#pragma warning( disable : 4244 )
|
||||
#pragma warning( disable : 4251 )
|
||||
#pragma warning( disable : 4267 )
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
|
||||
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
|
||||
*
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* This library is open source and may be redistributed and/or modified under
|
||||
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
|
||||
* (at your option) any later version. The full license is in LICENSE file
|
||||
* included with this distribution, and on the openscenegraph.org website.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* OpenSceneGraph Public License for more details.
|
||||
*/
|
||||
|
||||
@@ -248,7 +248,7 @@ class OSGWIDGET_EXPORT WindowManager: public osg::Switch, public UIObjectParent<
|
||||
_windowHeight = h;
|
||||
}
|
||||
|
||||
// Wrappers around the real calls. These only pertains to mouse buttons,
|
||||
// Wrappers around the real calls. These only pertains to mouse buttons,
|
||||
// particularly 3-button mice, although there are other more generic
|
||||
// "pointer" API methods.
|
||||
bool mousePushedLeft(float x, float y) {
|
||||
@@ -333,7 +333,7 @@ class OSGWIDGET_EXPORT WindowManager: public osg::Switch, public UIObjectParent<
|
||||
|
||||
bool _handleMousePushed (float, float, bool&);
|
||||
bool _handleMouseReleased (float, float, bool&);
|
||||
bool _haneldMouseScrolled (float, float, bool = false);
|
||||
bool _handleMouseScrolled (float, float, bool = false);
|
||||
void _getPointerXYDiff (float&, float&);
|
||||
void _updatePickWindow (const WidgetList*, point_type, point_type);
|
||||
|
||||
@@ -368,7 +368,7 @@ EventInterface* WindowManager::getFirstEventInterface(T& container, Event& ev) {
|
||||
parent->getParentList(windowList);
|
||||
|
||||
// A WindowList from getParentList includes the Window the method was called
|
||||
// on, and the entire tree of parentage.
|
||||
// on, and the entire tree of parentage.
|
||||
for(WindowList::iterator i = windowList.begin(); i != windowList.end(); i++) {
|
||||
Window* window = i->get();
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -198,13 +198,13 @@ void ThreadPrivateActions::PrintThreadSchedulingInfo(Thread *thread) {
|
||||
if(status != 0 || my_policy == -1) {
|
||||
|
||||
printf("THREAD INFO (%d) : Get sched param: %s/%s\n",
|
||||
unsigned int(thread->getProcessId()),
|
||||
(unsigned int)(thread->getProcessId()),
|
||||
strerror(status),
|
||||
strerror(errno));
|
||||
} else {
|
||||
printf(
|
||||
"THREAD INFO (%d) : Thread running at %s / Priority: %d\n",
|
||||
unsigned int(thread->getProcessId()),
|
||||
(unsigned int)(thread->getProcessId()),
|
||||
(my_policy == SCHED_FIFO ? "SCHEDULE_FIFO"
|
||||
: (my_policy == SCHED_RR ? "SCHEDULE_ROUND_ROBIN"
|
||||
: (my_policy == SCHED_TS ? "SCHEDULE_TIME_SHARE"
|
||||
@@ -217,7 +217,7 @@ void ThreadPrivateActions::PrintThreadSchedulingInfo(Thread *thread) {
|
||||
|
||||
printf(
|
||||
"THREAD INFO (%d) : Max priority: %d, Min priority: %d\n",
|
||||
unsigned int(thread->getProcessId()),
|
||||
(unsigned int)(thread->getProcessId()),
|
||||
max_priority, min_priority);
|
||||
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
if (have_waiters)
|
||||
{
|
||||
// Wake up all the waiters.
|
||||
ReleaseSemaphore(sema_.get(),waiters_,NULL);
|
||||
ReleaseSemaphore(sema_.get(), w, NULL);
|
||||
|
||||
cooperativeWait(waiters_done_.get(), INFINITE);
|
||||
|
||||
@@ -112,8 +112,7 @@ public:
|
||||
}
|
||||
catch(...){
|
||||
// thread is canceled in cooperative wait , do cleanup
|
||||
InterlockedDecrement(&waiters_);
|
||||
long w = InterlockedGet(&waiters_);
|
||||
long w = InterlockedDecrement(&waiters_);
|
||||
int last_waiter = was_broadcast_ && w == 0;
|
||||
|
||||
if (last_waiter) SetEvent(waiters_done_.get());
|
||||
@@ -123,8 +122,7 @@ public:
|
||||
|
||||
|
||||
// We're ready to return, so there's one less waiter.
|
||||
InterlockedDecrement(&waiters_);
|
||||
long w = InterlockedGet(&waiters_);
|
||||
long w = InterlockedDecrement(&waiters_);
|
||||
int last_waiter = was_broadcast_ && w == 0;
|
||||
|
||||
if (result != -1 && last_waiter)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <osg/ArgumentParser>
|
||||
#include <osg/ApplicationUsage>
|
||||
#include <osg/Math>
|
||||
#include <osg/Notify>
|
||||
|
||||
#include <set>
|
||||
@@ -163,8 +164,8 @@ bool ArgumentParser::Parameter::assign(const char* str)
|
||||
*_value._bool = (strcmp(str,"True")==0 || strcmp(str,"true")==0 || strcmp(str,"TRUE")==0);
|
||||
break;
|
||||
}
|
||||
case Parameter::FLOAT_PARAMETER: *_value._float = atof(str); break;
|
||||
case Parameter::DOUBLE_PARAMETER: *_value._double = atof(str); break;
|
||||
case Parameter::FLOAT_PARAMETER: *_value._float = osg::asciiToFloat(str); break;
|
||||
case Parameter::DOUBLE_PARAMETER: *_value._double = osg::asciiToDouble(str); break;
|
||||
case Parameter::INT_PARAMETER: *_value._int = atoi(str); break;
|
||||
case Parameter::UNSIGNED_INT_PARAMETER: *_value._uint = atoi(str); break;
|
||||
case Parameter::STRING_PARAMETER: *_value._string = str; break;
|
||||
|
||||
@@ -111,7 +111,7 @@ void CullSettings::readEnvironmentalVariables()
|
||||
|
||||
if ((ptr = getenv("OSG_NEAR_FAR_RATIO")) != 0)
|
||||
{
|
||||
_nearFarRatio = atof(ptr);
|
||||
_nearFarRatio = osg::asciiToDouble(ptr);
|
||||
|
||||
osg::notify(osg::INFO)<<"Set near/far ratio to "<<_nearFarRatio<<std::endl;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <osg/DisplaySettings>
|
||||
#include <osg/ArgumentParser>
|
||||
#include <osg/ApplicationUsage>
|
||||
#include <osg/Math>
|
||||
#include <osg/Notify>
|
||||
#include <osg/ref_ptr>
|
||||
|
||||
@@ -267,22 +268,22 @@ void DisplaySettings::readEnvironmentalVariables()
|
||||
|
||||
if( (ptr = getenv("OSG_EYE_SEPARATION")) != 0)
|
||||
{
|
||||
_eyeSeparation = atof(ptr);
|
||||
_eyeSeparation = osg::asciiToFloat(ptr);
|
||||
}
|
||||
|
||||
if( (ptr = getenv("OSG_SCREEN_WIDTH")) != 0)
|
||||
{
|
||||
_screenWidth = atof(ptr);
|
||||
_screenWidth = osg::asciiToFloat(ptr);
|
||||
}
|
||||
|
||||
if( (ptr = getenv("OSG_SCREEN_HEIGHT")) != 0)
|
||||
{
|
||||
_screenHeight = atof(ptr);
|
||||
_screenHeight = osg::asciiToFloat(ptr);
|
||||
}
|
||||
|
||||
if( (ptr = getenv("OSG_SCREEN_DISTANCE")) != 0)
|
||||
{
|
||||
_screenDistance = atof(ptr);
|
||||
_screenDistance = osg::asciiToFloat(ptr);
|
||||
}
|
||||
|
||||
if( (ptr = getenv("OSG_SPLIT_STEREO_HORIZONTAL_EYE_MAPPING")) != 0)
|
||||
|
||||
@@ -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,27 @@ 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
|
||||
@@ -837,12 +850,35 @@ void GraphicsContext::resizedImplementation(int x, int y, int width, int height)
|
||||
case(osg::Camera::VERTICAL): camera->getProjectionMatrix() *= osg::Matrix::scale(1.0, aspectRatioChange,1.0); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
osg::Camera* master = view ? view->getCamera() : 0;
|
||||
if (view && camera==master)
|
||||
{
|
||||
for(unsigned int i=0; i<view->getNumSlaves(); ++i)
|
||||
{
|
||||
osg::View::Slave& child = view->getSlave(i);
|
||||
if (child._camera.valid() && child._camera->getReferenceFrame()==osg::Transform::RELATIVE_RF)
|
||||
{
|
||||
// scale the slaves by the inverse of the change that has been applied to master, to avoid them be
|
||||
// scaled twice (such as when both master and slave are on the same GraphicsContexts) or by the wrong scale
|
||||
// when master and slave are on different GraphicsContexts.
|
||||
switch(policy)
|
||||
{
|
||||
case(osg::Camera::HORIZONTAL): child._projectionOffset *= osg::Matrix::scale(aspectRatioChange,1.0,1.0); break;
|
||||
case(osg::Camera::VERTICAL): child._projectionOffset *= osg::Matrix::scale(1.0, 1.0/aspectRatioChange,1.0); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
_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();
|
||||
|
||||
@@ -276,7 +276,7 @@ GLenum Image::computeFormatDataType(GLenum pixelFormat)
|
||||
|
||||
default:
|
||||
{
|
||||
notify(WARN)<<"error computeFormatType = "<<std::hex<<pixelFormat<<std::endl;
|
||||
notify(WARN)<<"error computeFormatType = "<<std::hex<<pixelFormat<<std::dec<<std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
@@ -377,7 +378,7 @@ unsigned int Image::computeNumComponents(GLenum pixelFormat)
|
||||
|
||||
default:
|
||||
{
|
||||
notify(WARN)<<"error pixelFormat = "<<std::hex<<pixelFormat<<std::endl;
|
||||
notify(WARN)<<"error pixelFormat = "<<std::hex<<pixelFormat<<std::dec<<std::endl;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
@@ -965,7 +966,7 @@ bool State::checkGLErrors(const char* str) const
|
||||
{
|
||||
const char* error = (char*)gluErrorString(errorNo);
|
||||
if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '" << error<<"'";
|
||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x" << std::hex << errorNo;
|
||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x" << std::hex << errorNo << std::dec;
|
||||
|
||||
if (str) osg::notify(WARN)<<" at "<<str<< std::endl;
|
||||
else osg::notify(WARN)<<" in osg::State."<< std::endl;
|
||||
@@ -996,7 +997,7 @@ bool State::checkGLErrors(const StateAttribute* attribute) const
|
||||
{
|
||||
const char* error = (char*)gluErrorString(errorNo);
|
||||
if (error) osg::notify(WARN)<<"Warning: detected OpenGL error '"<< error <<"' after applying attribute "<<attribute->className()<<" "<<attribute<< std::endl;
|
||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying attribute "<<attribute->className()<<" "<<attribute<< std::endl;
|
||||
else osg::notify(WARN)<<"Warning: detected OpenGL error number 0x"<< std::hex << errorNo <<" after applying attribute "<<attribute->className()<<" "<<attribute<< std::dec << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -194,14 +194,13 @@ void Texture2D::apply(State& state) const
|
||||
|
||||
// compute the internal texture format, this set the _internalFormat to an appropriate value.
|
||||
computeInternalFormat();
|
||||
|
||||
|
||||
// compute the dimensions of the texture.
|
||||
computeRequiredTextureDimensions(state,*image,_textureWidth, _textureHeight, _numMipmapLevels);
|
||||
|
||||
|
||||
textureObject = generateTextureObject(
|
||||
|
||||
_textureObjectBuffer[contextID] = textureObject = generateTextureObject(
|
||||
contextID,GL_TEXTURE_2D,_numMipmapLevels,_internalFormat,_textureWidth,_textureHeight,1,0);
|
||||
|
||||
|
||||
textureObject->bind();
|
||||
|
||||
applyTexParameters(GL_TEXTURE_2D,state);
|
||||
@@ -217,16 +216,13 @@ void Texture2D::apply(State& state) const
|
||||
//notify(NOTICE)<<"Creating new texture object"<<std::endl;
|
||||
applyTexImage2D_load(state,GL_TEXTURE_2D,image.get(),
|
||||
_textureWidth, _textureHeight, _numMipmapLevels);
|
||||
|
||||
|
||||
textureObject->setAllocated(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// update the modified tag to show that it is upto date.
|
||||
getModifiedCount(contextID) = image->getModifiedCount();
|
||||
|
||||
_textureObjectBuffer[contextID] = textureObject;
|
||||
|
||||
if (_unrefImageDataAfterApply && areAllTextureObjectsLoaded() && image->getDataVariance()==STATIC)
|
||||
{
|
||||
Texture2D* non_const_this = const_cast<Texture2D*>(this);
|
||||
|
||||
@@ -420,7 +420,7 @@ void Texture2DArray::applyTexImage2DArray_subload(State& state, Image* image, GL
|
||||
numMipmapLevels = 1;
|
||||
|
||||
GLint blockSize, size;
|
||||
getCompressedSize(_internalFormat, inwidth, inheight, indepth, blockSize,size);
|
||||
getCompressedSize(_internalFormat, inwidth, inheight, 1, blockSize,size);
|
||||
|
||||
extensions->glCompressedTexSubImage3D(target, 0,
|
||||
0, 0, indepth,
|
||||
|
||||
@@ -163,29 +163,28 @@ BoundingSphere Transform::computeBound() const
|
||||
|
||||
computeLocalToWorldMatrix(l2w,NULL);
|
||||
|
||||
Vec3 xdash = bsphere._center;
|
||||
osg::BoundingSphere::vec_type xdash = bsphere._center;
|
||||
xdash.x() += bsphere._radius;
|
||||
xdash = xdash*l2w;
|
||||
|
||||
Vec3 ydash = bsphere._center;
|
||||
osg::BoundingSphere::vec_type ydash = bsphere._center;
|
||||
ydash.y() += bsphere._radius;
|
||||
ydash = ydash*l2w;
|
||||
|
||||
Vec3 zdash = bsphere._center;
|
||||
osg::BoundingSphere::vec_type zdash = bsphere._center;
|
||||
zdash.z() += bsphere._radius;
|
||||
zdash = zdash*l2w;
|
||||
|
||||
|
||||
bsphere._center = bsphere._center*l2w;
|
||||
|
||||
xdash -= bsphere._center;
|
||||
float len_xdash = xdash.length();
|
||||
osg::BoundingSphere::value_type len_xdash = xdash.length();
|
||||
|
||||
ydash -= bsphere._center;
|
||||
float len_ydash = ydash.length();
|
||||
osg::BoundingSphere::value_type len_ydash = ydash.length();
|
||||
|
||||
zdash -= bsphere._center;
|
||||
float len_zdash = zdash.length();
|
||||
osg::BoundingSphere::value_type len_zdash = zdash.length();
|
||||
|
||||
bsphere._radius = len_xdash;
|
||||
if (bsphere._radius<len_ydash) bsphere._radius = len_ydash;
|
||||
|
||||
@@ -17,7 +17,20 @@
|
||||
|
||||
using namespace osgAnimation;
|
||||
|
||||
BasicAnimationManager::~BasicAnimationManager() {}
|
||||
BasicAnimationManager::BasicAnimationManager()
|
||||
: _lastUpdate(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
BasicAnimationManager::BasicAnimationManager(const AnimationManagerBase& b, const osg::CopyOp& copyop)
|
||||
: AnimationManagerBase(b,copyop)
|
||||
, _lastUpdate(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
BasicAnimationManager::~BasicAnimationManager()
|
||||
{
|
||||
}
|
||||
|
||||
void BasicAnimationManager::stopAll()
|
||||
{
|
||||
@@ -31,10 +44,6 @@ void BasicAnimationManager::stopAll()
|
||||
_animationsPlaying.clear();
|
||||
}
|
||||
|
||||
BasicAnimationManager::BasicAnimationManager()
|
||||
{
|
||||
_lastUpdate = 0;
|
||||
}
|
||||
void BasicAnimationManager::playAnimation(Animation* pAnimation, int priority, float weight)
|
||||
{
|
||||
if (!findAnimation(pAnimation))
|
||||
|
||||
@@ -31,6 +31,7 @@ SET(LIB_PUBLIC_HEADERS
|
||||
${HEADER_PATH}/EaseMotion
|
||||
${HEADER_PATH}/Assert
|
||||
${HEADER_PATH}/Timeline
|
||||
${HEADER_PATH}/RigGeometry
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user