You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(128) |
Dec
(65) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(48) |
Feb
(132) |
Mar
(95) |
Apr
(47) |
May
(54) |
Jun
(2) |
Jul
(57) |
Aug
(109) |
Sep
(131) |
Oct
(186) |
Nov
(105) |
Dec
(78) |
2007 |
Jan
(125) |
Feb
(105) |
Mar
(52) |
Apr
(104) |
May
(63) |
Jun
(116) |
Jul
(76) |
Aug
|
Sep
(18) |
Oct
(93) |
Nov
(110) |
Dec
(169) |
2008 |
Jan
(90) |
Feb
(64) |
Mar
(41) |
Apr
(23) |
May
(6) |
Jun
(18) |
Jul
(10) |
Aug
(61) |
Sep
(139) |
Oct
(50) |
Nov
(55) |
Dec
(2) |
2009 |
Jan
|
Feb
(1) |
Mar
(62) |
Apr
(22) |
May
(17) |
Jun
(19) |
Jul
(40) |
Aug
(21) |
Sep
|
Oct
(40) |
Nov
(23) |
Dec
|
2010 |
Jan
(14) |
Feb
(40) |
Mar
(9) |
Apr
(11) |
May
(19) |
Jun
(4) |
Jul
(10) |
Aug
(22) |
Sep
(15) |
Oct
|
Nov
(2) |
Dec
|
2011 |
Jan
(13) |
Feb
(10) |
Mar
|
Apr
(13) |
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(33) |
May
(20) |
Jun
|
Jul
(8) |
Aug
(7) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Braden M. <br...@us...> - 2007-06-02 06:46:33
|
Update of /cvsroot/openvrml/openvrml/doc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4931/doc Modified Files: Tag: OpenVRML-0_16-BRANCH Doxyfile Log Message: Updates for 0.16.5 release. Index: Doxyfile =================================================================== RCS file: /cvsroot/openvrml/openvrml/doc/Doxyfile,v retrieving revision 1.23.2.5 retrieving revision 1.23.2.6 diff -C2 -d -r1.23.2.5 -r1.23.2.6 *** Doxyfile 30 Apr 2007 07:37:08 -0000 1.23.2.5 --- Doxyfile 2 Jun 2007 06:46:32 -0000 1.23.2.6 *************** *** 5,9 **** #--------------------------------------------------------------------------- PROJECT_NAME = OpenVRML ! PROJECT_NUMBER = 0.16.4 OUTPUT_DIRECTORY = CREATE_SUBDIRS = NO --- 5,9 ---- #--------------------------------------------------------------------------- PROJECT_NAME = OpenVRML ! PROJECT_NUMBER = 0.16.5 OUTPUT_DIRECTORY = CREATE_SUBDIRS = NO |
From: Braden M. <br...@us...> - 2007-06-02 06:46:33
|
Update of /cvsroot/openvrml/openvrml/mozilla-plugin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4931/mozilla-plugin Modified Files: Tag: OpenVRML-0_16-BRANCH configure.ac Log Message: Updates for 0.16.5 release. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/mozilla-plugin/configure.ac,v retrieving revision 1.14.2.8 retrieving revision 1.14.2.9 diff -C2 -d -r1.14.2.8 -r1.14.2.9 *** configure.ac 30 Apr 2007 07:37:09 -0000 1.14.2.8 --- configure.ac 2 Jun 2007 06:46:32 -0000 1.14.2.9 *************** *** 1,4 **** AC_PREREQ([2.53]) ! AC_INIT([OpenVRML Mozilla Plugin], [0.16.4], [ope...@li...]) AC_COPYRIGHT([Portions copyright 2004, 2005, 2006, 2007 Braden McDaniel]) --- 1,4 ---- AC_PREREQ([2.53]) ! AC_INIT([OpenVRML Mozilla Plugin], [0.16.5], [ope...@li...]) AC_COPYRIGHT([Portions copyright 2004, 2005, 2006, 2007 Braden McDaniel]) |
From: Braden M. <br...@us...> - 2007-06-02 06:46:33
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml-gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4931/src/libopenvrml-gl Modified Files: Tag: OpenVRML-0_16-BRANCH Makefile.am Log Message: Updates for 0.16.5 release. Index: Makefile.am =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml-gl/Makefile.am,v retrieving revision 1.6.2.3 retrieving revision 1.6.2.4 diff -C2 -d -r1.6.2.3 -r1.6.2.4 *** Makefile.am 30 Apr 2007 07:37:10 -0000 1.6.2.3 --- Makefile.am 2 Jun 2007 06:46:32 -0000 1.6.2.4 *************** *** 1,3 **** ! LIBRARY_VERSION = 6:5:0 # | | | # +------+ | +---+ --- 1,3 ---- ! LIBRARY_VERSION = 6:6:0 # | | | # +------+ | +---+ |
From: Braden M. <br...@us...> - 2007-06-02 06:17:45
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25447 Modified Files: Tag: OpenVRML-0_16-BRANCH configure-gcc-dbg configure-gcc-opt Log Message: Added --prefix=$HOME. Index: configure-gcc-dbg =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure-gcc-dbg,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** configure-gcc-dbg 23 Feb 2007 06:21:37 -0000 1.1.2.6 --- configure-gcc-dbg 2 Jun 2007 06:15:48 -0000 1.1.2.7 *************** *** 1,3 **** #!/bin/bash ! ./$(dirname $0)/configure -C --disable-static --enable-gtk-doc CPPFLAGS='-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC' CXXFLAGS='-g3 -O0 -Wall -Wextra -Wno-missing-braces -Wno-missing-field-initializers -Wno-attributes' "$*" --- 1,3 ---- #!/bin/bash ! ./$(dirname $0)/configure -C --prefix=$HOME --disable-static --enable-gtk-doc CPPFLAGS='-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC' CXXFLAGS='-g3 -O0 -Wall -Wextra -Wno-missing-braces -Wno-missing-field-initializers -Wno-attributes' "$*" Index: configure-gcc-opt =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure-gcc-opt,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** configure-gcc-opt 30 Nov 2006 03:10:45 -0000 1.1.2.3 --- configure-gcc-opt 2 Jun 2007 06:15:48 -0000 1.1.2.4 *************** *** 1,3 **** #!/bin/bash ! ./$(dirname $0)/configure -C --disable-static --disable-exception-specs --enable-gtk-doc CXXFLAGS='-Os -Wall -Wextra -Wno-missing-braces -fvisibility-inlines-hidden' "$*" --- 1,3 ---- #!/bin/bash ! ./$(dirname $0)/configure -C --prefix=$HOME --disable-static --disable-exception-specs --enable-gtk-doc CXXFLAGS='-Os -Wall -Wextra -Wno-missing-braces -fvisibility-inlines-hidden' "$*" |
From: Braden M. <br...@us...> - 2007-06-02 06:17:45
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25465 Modified Files: configure-gcc-dbg configure-gcc-opt Log Message: Added --prefix=$HOME. Index: configure-gcc-dbg =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure-gcc-dbg,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** configure-gcc-dbg 23 Feb 2007 06:19:26 -0000 1.7 --- configure-gcc-dbg 2 Jun 2007 06:16:01 -0000 1.8 *************** *** 1,3 **** #!/bin/bash ! ./$(dirname $0)/configure -C --disable-static --enable-gtk-doc CPPFLAGS='-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC' CXXFLAGS='-g3 -O0 -Wall -Wextra -Wno-missing-braces -Wno-missing-field-initializers -Wno-attributes' "$*" --- 1,3 ---- #!/bin/bash ! ./$(dirname $0)/configure -C --prefix=$HOME --disable-static --enable-gtk-doc CPPFLAGS='-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC' CXXFLAGS='-g3 -O0 -Wall -Wextra -Wno-missing-braces -Wno-missing-field-initializers -Wno-attributes' "$*" Index: configure-gcc-opt =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure-gcc-opt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** configure-gcc-opt 30 Nov 2006 03:10:55 -0000 1.4 --- configure-gcc-opt 2 Jun 2007 06:16:01 -0000 1.5 *************** *** 1,3 **** #!/bin/bash ! ./$(dirname $0)/configure -C --disable-static --disable-exception-specs --enable-gtk-doc CXXFLAGS='-Os -Wall -Wextra -Wno-missing-braces -fvisibility-inlines-hidden' "$*" --- 1,3 ---- #!/bin/bash ! ./$(dirname $0)/configure -C --prefix=$HOME --disable-static --disable-exception-specs --enable-gtk-doc CXXFLAGS='-Os -Wall -Wextra -Wno-missing-braces -fvisibility-inlines-hidden' "$*" |
From: Braden M. <br...@us...> - 2007-06-01 20:05:08
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13096 Modified Files: ChangeLog configure.ac Log Message: Upgrade to/require ANTLR 2.7.7. Index: configure.ac =================================================================== RCS file: /cvsroot/openvrml/openvrml/configure.ac,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** configure.ac 21 May 2007 04:12:35 -0000 1.114 --- configure.ac 1 Jun 2007 20:04:36 -0000 1.115 *************** *** 51,59 **** OV_PROG_JAVAH OV_PROG_JAR ! OV_PROG_ANTLR([2.7.6]) AS_IF([test -z "$ANTLR"], [AS_IF([test ! -f $srcdir/src/libopenvrml/openvrml/Vrml97Parser.cpp], ! [AC_MSG_FAILURE([antlr 2.7.6 not found])], ! [AC_MSG_WARN([antlr 2.7.6 not found; but generated files already exist])])]) AC_ARG_VAR([DOXYGEN], [Doxygen documentation generator]) --- 51,59 ---- OV_PROG_JAVAH OV_PROG_JAR ! OV_PROG_ANTLR([2.7.7]) AS_IF([test -z "$ANTLR"], [AS_IF([test ! -f $srcdir/src/libopenvrml/openvrml/Vrml97Parser.cpp], ! [AC_MSG_FAILURE([antlr 2.7.7 not found])], ! [AC_MSG_WARN([antlr 2.7.7 not found; but generated files already exist])])]) AC_ARG_VAR([DOXYGEN], [Doxygen documentation generator]) Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1517 retrieving revision 1.1518 diff -C2 -d -r1.1517 -r1.1518 *** ChangeLog 1 Jun 2007 06:33:59 -0000 1.1517 --- ChangeLog 1 Jun 2007 20:04:35 -0000 1.1518 *************** *** 1,4 **** --- 1,8 ---- 2007-06-01 Braden McDaniel <br...@en...> + * configure.ac: Upgrade to/require ANTLR 2.7.7. + + 2007-06-01 Braden McDaniel <br...@en...> + Locking fixes for loading inline scenes. |
From: Braden M. <br...@us...> - 2007-06-01 20:04:39
|
Update of /cvsroot/openvrml/openvrml/lib/antlr/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13096/lib/antlr/src Modified Files: BaseAST.cpp String.cpp Log Message: Upgrade to/require ANTLR 2.7.7. Index: BaseAST.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/lib/antlr/src/BaseAST.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** BaseAST.cpp 3 Nov 2006 05:38:19 -0000 1.4 --- BaseAST.cpp 1 Jun 2007 20:04:39 -0000 1.5 *************** *** 18,23 **** #endif - const char* const BaseAST::TYPE_NAME = "BaseAST"; - size_t BaseAST::getNumberOfChildren() const { --- 18,21 ---- |
From: Braden M. <br...@us...> - 2007-06-01 20:04:39
|
Update of /cvsroot/openvrml/openvrml/lib/antlr/contrib/MSCV6 In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13096/lib/antlr/contrib/MSCV6 Removed Files: README libcpp.dsp libcpp.dsw Log Message: Upgrade to/require ANTLR 2.7.7. --- README DELETED --- --- libcpp.dsw DELETED --- --- libcpp.dsp DELETED --- |
From: Braden M. <br...@us...> - 2007-06-01 20:04:39
|
Update of /cvsroot/openvrml/openvrml/lib/antlr In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13096/lib/antlr Removed Files: COPYING antlr.dsp antlr.dsw Log Message: Upgrade to/require ANTLR 2.7.7. --- antlr.dsp DELETED --- --- antlr.dsw DELETED --- --- COPYING DELETED --- |
From: Braden M. <br...@us...> - 2007-06-01 20:04:39
|
Update of /cvsroot/openvrml/openvrml/lib/antlr/contrib/MSCV6-dll In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13096/lib/antlr/contrib/MSCV6-dll Removed Files: README antlr.dsw dll.cpp dll.dsp lib.dsp Log Message: Upgrade to/require ANTLR 2.7.7. --- dll.dsp DELETED --- --- README DELETED --- --- dll.cpp DELETED --- --- antlr.dsw DELETED --- --- lib.dsp DELETED --- |
From: Braden M. <br...@us...> - 2007-06-01 20:04:39
|
Update of /cvsroot/openvrml/openvrml/lib/antlr/antlr In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13096/lib/antlr/antlr Modified Files: BaseAST.hpp CharScanner.hpp Parser.hpp config.hpp Log Message: Upgrade to/require ANTLR 2.7.7. Index: config.hpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/lib/antlr/antlr/config.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** config.hpp 3 Nov 2006 05:38:18 -0000 1.6 --- config.hpp 1 Jun 2007 20:04:37 -0000 1.7 *************** *** 102,106 **** # define NO_STRCASECMP # undef ANTLR_CCTYPE_NEEDS_STD ! #endif // End of Microsoft Visual C++ --- 102,106 ---- # define NO_STRCASECMP # undef ANTLR_CCTYPE_NEEDS_STD ! # define NO_STATIC_CONSTS #endif // End of Microsoft Visual C++ Index: BaseAST.hpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/lib/antlr/antlr/BaseAST.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BaseAST.hpp 3 Nov 2006 09:31:14 -0000 1.2 --- BaseAST.hpp 1 Jun 2007 20:04:37 -0000 1.3 *************** *** 35,49 **** /// Return the class name ! const char* typeName( void ) const ! { ! return BaseAST::TYPE_NAME; ! } /// Clone this AST node. ! RefAST clone( void ) const ! { ! ANTLR_USE_NAMESPACE(std)cerr << "BaseAST::clone()" << ANTLR_USE_NAMESPACE(std)endl; ! return nullAST; ! } /// Is node t equal to this in terms of token type and text? --- 35,42 ---- /// Return the class name ! virtual const char* typeName( void ) const = 0; /// Clone this AST node. ! virtual RefAST clone( void ) const = 0; /// Is node t equal to this in terms of token type and text? *************** *** 139,143 **** /// Set the next sibling after this one. ! void setNextSibling(RefAST n) { right = static_cast<BaseAST*>(static_cast<AST*>(n)); --- 132,136 ---- /// Set the next sibling after this one. ! virtual void setNextSibling(RefAST n) { right = static_cast<BaseAST*>(static_cast<AST*>(n)); *************** *** 176,181 **** virtual ANTLR_USE_NAMESPACE(std)string toStringList() const; virtual ANTLR_USE_NAMESPACE(std)string toStringTree() const; - - static const char* const TYPE_NAME; protected: RefBaseAST down; --- 169,172 ---- |
From: Braden M. <br...@us...> - 2007-06-01 06:34:01
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7233/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Locking fixes for loading inline scenes. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.219 retrieving revision 1.220 diff -C2 -d -r1.219 -r1.220 *** browser.cpp 1 Jun 2007 06:28:12 -0000 1.219 --- browser.cpp 1 Jun 2007 06:33:59 -0000 1.220 *************** *** 6148,6152 **** { { ! read_write_mutex::scoped_write_lock scene_lock(this->scene_mutex_); using std::for_each; --- 6148,6152 ---- { { ! read_write_mutex::scoped_read_write_lock scene_lock(this->scene_mutex_); using std::for_each; *************** *** 6166,6169 **** --- 6166,6172 ---- boost::mem_fun(&browser_listener::browser_changed), browser_event(*this, browser_event::shutdown))); + + scene_lock.promote(); + this->scene_.reset(); assert(this->viewpoint_list_.empty()); *************** *** 6179,6182 **** --- 6182,6188 ---- register_node_metatypes(*this); this->scene_.reset(new scene(*this)); + + scene_lock.demote(); + this->scene_->load(in); *************** *** 7069,7081 **** void openvrml::scene::load(resource_istream & in) { ! read_write_mutex::scoped_write_lock ! nodes_lock(this->nodes_mutex_), ! url_lock(this->url_mutex_), ! meta_lock(this->meta_mutex_); ! this->nodes_.clear(); ! this->meta_.clear(); ! this->url_ = in.url(); ! parse_vrml(in, in.url(), in.type(), *this, this->nodes_, this->meta_); this->scene_loaded(); } --- 7075,7089 ---- void openvrml::scene::load(resource_istream & in) { ! { ! read_write_mutex::scoped_write_lock ! nodes_lock(this->nodes_mutex_), ! url_lock(this->url_mutex_), ! meta_lock(this->meta_mutex_); ! this->nodes_.clear(); ! this->meta_.clear(); ! this->url_ = in.url(); ! parse_vrml(in, in.url(), in.type(), *this, this->nodes_, this->meta_); ! } this->scene_loaded(); } |
From: Braden M. <br...@us...> - 2007-06-01 06:34:01
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7233 Modified Files: ChangeLog Log Message: Locking fixes for loading inline scenes. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1516 retrieving revision 1.1517 diff -C2 -d -r1.1516 -r1.1517 *** ChangeLog 1 Jun 2007 06:28:11 -0000 1.1516 --- ChangeLog 1 Jun 2007 06:33:59 -0000 1.1517 *************** *** 1,4 **** --- 1,15 ---- 2007-06-01 Braden McDaniel <br...@en...> + Locking fixes for loading inline scenes. + + * src/libopenvrml/openvrml/browser.cpp + (openvrml::browser::set_world(resource_istream &)): Lock the + scene_mutex_ with a read-write lock; promote the lock only when + resetting scene_. + (openvrml::scene::load(resource_istream &)): Release the locks + before calling scene_loaded. + + 2007-06-01 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/browser.cpp (openvrml::browser::set_world(resource_istream &)): Sending TRUE |
From: Braden M. <br...@us...> - 2007-06-01 06:28:42
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5202 Modified Files: ChangeLog Log Message: Sending TRUE to the newly-active Viewpoint's set_bind is handled in during initialization of the viewpoint_node implementation's metatype; we don't need to do it again. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1515 retrieving revision 1.1516 diff -C2 -d -r1.1515 -r1.1516 *** ChangeLog 1 Jun 2007 06:08:44 -0000 1.1515 --- ChangeLog 1 Jun 2007 06:28:11 -0000 1.1516 *************** *** 1,4 **** --- 1,12 ---- 2007-06-01 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/browser.cpp + (openvrml::browser::set_world(resource_istream &)): Sending TRUE + to the newly-active Viewpoint's set_bind is handled in during + initialization of the viewpoint_node implementation's metatype; we + don't need to do it again. + + 2007-06-01 Braden McDaniel <br...@en...> + Ensure that scene pointers for the active viewpoint_node and the active navigation_info_node point to scenes that are either the |
From: Braden M. <br...@us...> - 2007-06-01 06:28:18
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5202/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Sending TRUE to the newly-active Viewpoint's set_bind is handled in during initialization of the viewpoint_node implementation's metatype; we don't need to do it again. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.218 retrieving revision 1.219 diff -C2 -d -r1.218 -r1.219 *** browser.cpp 1 Jun 2007 06:08:44 -0000 1.218 --- browser.cpp 1 Jun 2007 06:28:12 -0000 1.219 *************** *** 6148,6154 **** { { ! read_write_mutex::scoped_write_lock ! scene_lock(this->scene_mutex_), ! active_viewpoint_lock(this->active_viewpoint_mutex_); using std::for_each; --- 6148,6152 ---- { { ! read_write_mutex::scoped_write_lock scene_lock(this->scene_mutex_); using std::for_each; *************** *** 6169,6174 **** browser_event(*this, browser_event::shutdown))); this->scene_.reset(); - this->active_viewpoint_ = - node_cast<viewpoint_node *>(this->default_viewpoint_.get()); assert(this->viewpoint_list_.empty()); assert(this->scoped_lights_.empty()); --- 6167,6170 ---- *************** *** 6212,6230 **** this->node_metatype_map_.init(initial_viewpoint, now); ! if (this->active_viewpoint_ ! != node_cast<viewpoint_node *>(this->default_viewpoint_.get())) { ! // XXX ! // XXX Fix openvrml::viewpoint_node so that we don't have to get an ! // XXX event_listener here. ! // XXX ! event_listener & listener = ! this->active_viewpoint_->event_listener("set_bind"); ! dynamic_cast<sfbool_listener &>(listener) ! .process_event(sfbool(true), now); } this->modified(true); this->new_view = true; // Force resetUserNav ! } // unlock this->mutex_, this->listeners_mutex_ read_write_mutex::scoped_read_lock --- 6208,6220 ---- this->node_metatype_map_.init(initial_viewpoint, now); ! if (!this->active_viewpoint_) { ! read_write_mutex::scoped_write_lock ! lock(this->active_viewpoint_mutex_); ! this->active_viewpoint_ = this->default_viewpoint_.get(); } this->modified(true); this->new_view = true; // Force resetUserNav ! } // unlock this->scene_mutex_, this->active_viewpoint_mutex_ read_write_mutex::scoped_read_lock |
From: Braden M. <br...@us...> - 2007-06-01 06:08:56
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29801 Modified Files: ChangeLog Log Message: Ensure that scene pointers for the active viewpoint_node and the active navigation_info_node point to scenes that are either the browser's root_scene or one of its descendants. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1514 retrieving revision 1.1515 diff -C2 -d -r1.1514 -r1.1515 *** ChangeLog 1 Jun 2007 05:34:01 -0000 1.1514 --- ChangeLog 1 Jun 2007 06:08:44 -0000 1.1515 *************** *** 1,6 **** --- 1,23 ---- 2007-06-01 Braden McDaniel <br...@en...> + Ensure that scene pointers for the active viewpoint_node and the + active navigation_info_node point to scenes that are either the + browser's root_scene or one of its descendants. + + * src/libopenvrml/openvrml/browser.cpp + (openvrml::browser::active_viewpoint(viewpoint_node &)): Validate + that the argument viewpoint_node's scene is (a descendant of) the + browser's root_scene. + (openvrml::browser::active_navigation_info(navigation_info_node&)): + Validate that the argument navigation_info_node's scene is (a + descendant of) the browser's root_scene. + + 2007-06-01 Braden McDaniel <br...@en...> + Removed node-wide recursive mutex. + * src/libopenvrml/openvrml/browser.cpp + (openvrml::externproto_node::set_proto_node(proto_node_type &)): + Removed lock. * src/libopenvrml/openvrml/node.cpp (openvrml::node::scene() const): Moved definition from node.h; *************** *** 106,110 **** (insertShellConvex(ShellData *)): Ensure indices are valid before using them. ! (openvrml::gl::viewer::insert_shell(unsigned int, const std::vector<vec3f> &, const std::vector<int32> &, const std::vector<color> &, const std::vector<int32> &, const --- 123,127 ---- (insertShellConvex(ShellData *)): Ensure indices are valid before using them. ! (openvrml::gl::viewer::do_insert_shell(unsigned int, const std::vector<vec3f> &, const std::vector<int32> &, const std::vector<color> &, const std::vector<int32> &, const |
From: Braden M. <br...@us...> - 2007-06-01 06:08:56
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29801/src/libopenvrml/openvrml Modified Files: browser.cpp Log Message: Ensure that scene pointers for the active viewpoint_node and the active navigation_info_node point to scenes that are either the browser's root_scene or one of its descendants. Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.217 retrieving revision 1.218 diff -C2 -d -r1.217 -r1.218 *** browser.cpp 1 Jun 2007 05:34:02 -0000 1.217 --- browser.cpp 1 Jun 2007 06:08:44 -0000 1.218 *************** *** 5918,5926 **** * * @param[in] viewpoint a @c viewpoint_node. */ void openvrml::browser::active_viewpoint(viewpoint_node & viewpoint) OPENVRML_NOTHROW { ! read_write_mutex::scoped_write_lock lock(this->active_viewpoint_mutex_); this->active_viewpoint_ = &viewpoint; } --- 5918,5938 ---- * * @param[in] viewpoint a @c viewpoint_node. + * + * @pre @p viewpoint.scene() == @c this->root_scene() */ void openvrml::browser::active_viewpoint(viewpoint_node & viewpoint) OPENVRML_NOTHROW { ! read_write_mutex::scoped_read_lock scene_lock(this->scene_mutex_); ! read_write_mutex::scoped_write_lock ! active_viewpoint_lock(this->active_viewpoint_mutex_); ! # ifndef NDEBUG ! scene * root_scene = 0; ! for (root_scene = viewpoint.scene(); ! root_scene->parent(); ! root_scene = root_scene->parent()) ! {} ! # endif ! assert(root_scene == this->scene_.get()); this->active_viewpoint_ = &viewpoint; } *************** *** 5958,5967 **** * * @param[in] nav_info a @c navigation_info_node. */ void openvrml::browser::active_navigation_info(navigation_info_node & nav_info) OPENVRML_NOTHROW { read_write_mutex::scoped_write_lock ! lock(this->active_navigation_info_mutex_); this->active_navigation_info_ = &nav_info; } --- 5970,5990 ---- * * @param[in] nav_info a @c navigation_info_node. + * + * @pre @p viewpoint.scene() == @c this->root_scene() */ void openvrml::browser::active_navigation_info(navigation_info_node & nav_info) OPENVRML_NOTHROW { + read_write_mutex::scoped_read_lock scene_lock(this->scene_mutex_); read_write_mutex::scoped_write_lock ! active_navigation_info_lock(this->active_navigation_info_mutex_); ! # ifndef NDEBUG ! scene * root_scene = 0; ! for (root_scene = nav_info.scene(); ! root_scene->parent(); ! root_scene = root_scene->parent()) ! {} ! # endif ! assert(root_scene == this->scene_.get()); this->active_navigation_info_ = &nav_info; } |
From: Braden M. <br...@us...> - 2007-06-01 05:34:10
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15889/src/libopenvrml/openvrml Modified Files: browser.cpp node.cpp node.h read_write_mutex.cpp read_write_mutex.h vrml97node.cpp Log Message: Removed node-wide recursive mutex. Index: read_write_mutex.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/read_write_mutex.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** read_write_mutex.cpp 15 May 2007 04:06:11 -0000 1.1 --- read_write_mutex.cpp 1 Jun 2007 05:34:02 -0000 1.2 *************** *** 25,28 **** --- 25,29 ---- #include "read_write_mutex.h" + #include <cassert> /** *************** *** 224,225 **** --- 225,284 ---- writing_(false) {} + + + /** + * @class openvrml::read_write_mutex::scoped_read_write_lock openvrml/read_write_lock.h + * + * @brief Lock the mutex for read/write access. + * + * Upon construction, the associated mutex is locked for reading. The lock + * can be “promoted” to a write lock by calling @c #promote. + */ + + /** + * @brief Construct. + * + * @param[in] mutex a @c read_write_mutex. + */ + openvrml::read_write_mutex::scoped_read_write_lock:: + scoped_read_write_lock(read_write_mutex & mutex): + scoped_read_lock(mutex) + {} + + /** + * @brief Destroy. + */ + openvrml::read_write_mutex::scoped_read_write_lock::~scoped_read_write_lock() + { + this->demote(); + } + + /** + * @brief Promote the lock to a write lock. + */ + void openvrml::read_write_mutex::scoped_read_write_lock::promote() + { + this->lock_.lock(); + assert(!this->mutex_.writing_); + if (this->mutex_.readers_active_ != 1) { + ++this->mutex_.writers_waiting_; + while (this->mutex_.readers_active_ != 1) { + this->mutex_.write_.wait(this->lock_); + } + --this->mutex_.writers_waiting_; + } + this->mutex_.writing_ = true; + this->lock_.unlock(); + } + + /** + * @brief Demote the lock from a write lock back to a read lock. + * + * If the lock has not previously been promoted, this function has no effect. + */ + void openvrml::read_write_mutex::scoped_read_write_lock::demote() + { + this->lock_.lock(); + this->mutex_.writing_ = false; + this->lock_.unlock(); + } Index: node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** node.cpp 13 May 2007 00:46:34 -0000 1.92 --- node.cpp 1 Jun 2007 05:34:02 -0000 1.93 *************** *** 1760,1771 **** * @internal * - * @var boost::recursive_mutex openvrml::node::mutex_ - * - * @brief Object mutex. - */ - - /** - * @internal - * * @var const openvrml::node_type & openvrml::node::type_ * --- 1760,1763 ---- *************** *** 1786,1789 **** --- 1778,1789 ---- * @internal * + * @var openvrml::read_write_mutex openvrml::node::scene_mutex_ + * + * @brief Mutex protecting @c #scene_. + */ + + /** + * @internal + * * @var openvrml::scene * openvrml::node::scene_ * *************** *** 1794,1797 **** --- 1794,1805 ---- * @internal * + * @var openvrml::read_write_mutex openvrml::node::modified_mutex_ + * + * @brief Mutex protecting @c #modified_. + */ + + /** + * @internal + * * @var bool openvrml::node::modified_ * *************** *** 1982,1991 **** /** - * @fn openvrml::scene * openvrml::node::scene() const - * * @brief Get the scene with which the node is associated. * * @return the scene with which the node is associated. */ /** --- 1990,2003 ---- /** * @brief Get the scene with which the node is associated. * * @return the scene with which the node is associated. */ + openvrml::scene * openvrml::node::scene() const OPENVRML_NOTHROW + { + read_write_mutex::scoped_read_lock lock(this->scene_mutex_); + return this->scene_; + } + /** *************** *** 2007,2013 **** OPENVRML_THROW1(std::bad_alloc) { ! boost::recursive_mutex::scoped_lock lock(this->mutex_); if (!this->scene_) { this->scene_ = &scene; this->do_initialize(timestamp); --- 2019,2027 ---- OPENVRML_THROW1(std::bad_alloc) { ! read_write_mutex::scoped_read_write_lock lock(this->scene_mutex_); if (!this->scene_) { + lock.promote(); this->scene_ = &scene; + lock.demote(); this->do_initialize(timestamp); *************** *** 2142,2149 **** void openvrml::node::shutdown(const double timestamp) OPENVRML_NOTHROW { ! boost::recursive_mutex::scoped_lock lock(this->mutex_); if (this->scene_) { this->do_shutdown(timestamp); this->scene_ = 0; const node_interface_set & interfaces = this->type_.interfaces(); --- 2156,2165 ---- void openvrml::node::shutdown(const double timestamp) OPENVRML_NOTHROW { ! read_write_mutex::scoped_read_write_lock lock(this->scene_mutex_); if (this->scene_) { this->do_shutdown(timestamp); + lock.promote(); this->scene_ = 0; + lock.demote(); const node_interface_set & interfaces = this->type_.interfaces(); *************** *** 2514,2518 **** void openvrml::node::modified(const bool value) { ! boost::recursive_mutex::scoped_lock lock(this->mutex_); this->modified_ = value; if (this->modified_) { this->type_.metatype().browser().modified(true); } --- 2530,2534 ---- void openvrml::node::modified(const bool value) { ! read_write_mutex::scoped_write_lock lock(this->modified_mutex_); this->modified_ = value; if (this->modified_) { this->type_.metatype().browser().modified(true); } *************** *** 2530,2534 **** bool openvrml::node::modified() const { ! boost::recursive_mutex::scoped_lock lock(this->mutex_); return this->modified_; } --- 2546,2550 ---- bool openvrml::node::modified() const { ! read_write_mutex::scoped_read_lock lock(this->modified_mutex_); return this->modified_; } *************** *** 2549,2563 **** } - /** - * @fn boost::recursive_mutex & openvrml::node::mutex() const - * - * @brief Get the mutex associated with the @c node. - * - * Concrete node types should lock the @c node mutex when modifying field - * values outside the rendering thread. - * - * @return the mutex associated with the @c node. - */ - namespace { struct OPENVRML_LOCAL field_printer_ { --- 2565,2568 ---- *************** *** 2635,2639 **** const size_t indent) const { - boost::recursive_mutex::scoped_lock lock(this->mutex_); for (size_t i = 0; i < indent; ++i) { out << ' '; } std::string nodeId = this->id(); --- 2640,2643 ---- *************** *** 3087,3091 **** rendering_context context) { - boost::recursive_mutex::scoped_lock lock(this->mutex()); this->do_render_appearance(v, context); this->modified(false); --- 3091,3094 ---- *************** *** 3093,3100 **** /** ! * @brief render_appearance implementation. * ! * @param[in,out] v viewer. ! * @param[in] context rendering_context. */ void --- 3096,3103 ---- /** ! * @brief @c #render_appearance implementation. * ! * @param[in,out] v @c viewer. ! * @param[in] context @c rendering_context. */ void *************** *** 3103,3109 **** /** ! * @brief Cast to an appearance_node. * ! * @return a pointer to this appearance_node. */ openvrml::appearance_node * openvrml::appearance_node::to_appearance() --- 3106,3112 ---- /** ! * @brief Cast to an @c appearance_node. * ! * @return a pointer to this @c appearance_node. */ openvrml::appearance_node * openvrml::appearance_node::to_appearance() *************** *** 3118,3122 **** * @brief Get the material node associated with this appearance node. * ! * @return the material_node associated with this appearance_node. */ --- 3121,3125 ---- * @brief Get the material node associated with this appearance node. * ! * @return the @c material_node associated with this @c appearance_node. */ *************** *** 3126,3130 **** * @brief Get the texture node associated with this appearance node. * ! * @return the texture_node associated with this appearance_node. */ --- 3129,3133 ---- * @brief Get the texture node associated with this appearance node. * ! * @return the @c texture_node associated with this @c appearance_node. */ *************** *** 3134,3138 **** * @brief Get the texture transform node associated with this appearance node. * ! * @return the texture_transform_node associated with this appearance_node. */ --- 3137,3142 ---- * @brief Get the texture transform node associated with this appearance node. * ! * @return the @c texture_transform_node associated with this ! * @c appearance_node. */ *************** *** 3148,3151 **** --- 3152,3163 ---- * @internal * + * @var openvrml::read_write_mutex openvrml::bounded_volume_node::bounding_volume_dirty_mutex_ + * + * @brief Mutex protecting @c #bounding_volume_dirty_. + */ + + /** + * @internal + * * @var bool openvrml::bounded_volume_node::bounding_volume_dirty_ * *************** *** 3178,3186 **** * Nodes that have no bounding volume, or have a difficult to calculate * bvolume (like, say, Extrusion or Billboard) can just return an infinite ! * bsphere. Note that returning an infinite bvolume means that all the node's * ancestors will also end up with an infinite bvolume, and will never be * culled. * ! * Delegates to <code>bounded_volume_node::do_bounding_volume</code>. * * @return a maximized bounding volume. --- 3190,3198 ---- * Nodes that have no bounding volume, or have a difficult to calculate * bvolume (like, say, Extrusion or Billboard) can just return an infinite ! * bsphere. Note that returning an infinite bvolume means that all the node's * ancestors will also end up with an infinite bvolume, and will never be * culled. * ! * Delegates to @c #do_bounding_volume. * * @return a maximized bounding volume. *************** *** 3190,3193 **** --- 3202,3207 ---- { const openvrml::bounding_volume & bv = this->do_bounding_volume(); + read_write_mutex::scoped_write_lock + lock(this->bounding_volume_dirty_mutex_); this->bounding_volume_dirty_ = false; return bv; *************** *** 3195,3199 **** /** ! * @brief Called by <code>bounded_volume_node::bounding_volume</code>. * * @return a maximized bounding volume. --- 3209,3213 ---- /** ! * @brief Called by @c #bounding_volume. * * @return a maximized bounding volume. *************** *** 3227,3231 **** void openvrml::bounded_volume_node::bounding_volume_dirty(const bool value) { ! boost::recursive_mutex::scoped_lock lock(this->mutex()); this->bounding_volume_dirty_ = value; if (value) { // only if dirtying, not clearing --- 3241,3246 ---- void openvrml::bounded_volume_node::bounding_volume_dirty(const bool value) { ! read_write_mutex::scoped_write_lock ! lock(this->bounding_volume_dirty_mutex_); this->bounding_volume_dirty_ = value; if (value) { // only if dirtying, not clearing *************** *** 3242,3246 **** bool openvrml::bounded_volume_node::bounding_volume_dirty() const { ! boost::recursive_mutex::scoped_lock lock(this->mutex()); if (this->type().metatype().browser().flags_need_updating) { this->type().metatype().browser().update_flags(); --- 3257,3262 ---- bool openvrml::bounded_volume_node::bounding_volume_dirty() const { ! read_write_mutex::scoped_read_lock ! lock(this->bounding_volume_dirty_mutex_); if (this->type().metatype().browser().flags_need_updating) { this->type().metatype().browser().update_flags(); *************** *** 3299,3304 **** void openvrml::child_node::relocate() OPENVRML_THROW1(std::bad_alloc) { - boost::recursive_mutex::scoped_lock lock(this->mutex()); - typedef void (child_node::* Do_relocate)(); --- 3315,3318 ---- *************** *** 3346,3350 **** const rendering_context context) { - boost::recursive_mutex::scoped_lock lock(this->mutex()); this->do_render_child(v, context); this->modified(false); --- 3360,3363 ---- *************** *** 3644,3647 **** --- 3657,3670 ---- /** + * @internal + * + * @var boost::mutex openvrml::geometry_node::gemoetry_reference_mutex_ + * + * @brief Mutex protecting @c #geometry_reference. + */ + + /** + * @internal + * * @var openvrml::viewer::object_t openvrml::geometry_node::geometry_reference * *************** *** 3652,3657 **** * @brief Construct. * ! * @param[in] type the node_type associated with the node. ! * @param[in] scope the scope the node belongs to. */ openvrml::geometry_node:: --- 3675,3680 ---- * @brief Construct. * ! * @param[in] type the @c node_type associated with the @c node. ! * @param[in] scope the @c scope the @c node belongs to. */ openvrml::geometry_node:: *************** *** 3667,3674 **** * @brief Destroy. * ! * @todo Proper resource deallocation in the <code>viewer</code> depends on the ! * <code>viewer</code> <strong>not</strong> having been decoupled from ! * the browser. We need to handle this better via some refcounting ! * scheme. */ openvrml::geometry_node::~geometry_node() OPENVRML_NOTHROW --- 3690,3696 ---- * @brief Destroy. * ! * @todo Proper resource deallocation in the @c viewer depends on the ! * @c viewer @b not having been decoupled from the @c browser. We need ! * to handle this better via some refcounting scheme. */ openvrml::geometry_node::~geometry_node() OPENVRML_NOTHROW *************** *** 3698,3702 **** rendering_context context) { ! boost::recursive_mutex::scoped_lock lock(this->mutex()); if (this->geometry_reference != 0 && this->modified()) { --- 3720,3724 ---- rendering_context context) { ! boost::mutex::scoped_lock lock(this->geometry_reference_mutex_); if (this->geometry_reference != 0 && this->modified()) { *************** *** 3724,3728 **** bool openvrml::geometry_node::emissive() const OPENVRML_NOTHROW { - boost::recursive_mutex::scoped_lock lock(this->mutex()); return this->do_emissive(); } --- 3746,3749 ---- *************** *** 4294,4297 **** --- 4315,4328 ---- /** + * @internal + * + * @var boost::mutex openvrml::texture_node::texture_reference_mutex_ + * + * @brief Mutex protecting @c #texture_reference. + */ + + /** + * @internal + * * @var openvrml::viewer::texture_object_t openvrml::texture_node::texture_reference * *************** *** 4316,4323 **** * @brief Destroy. * ! * @todo Proper resource deallocation in the <code>viewer</code> depends on the ! * <code>viewer</code> <strong>not</strong> having been decoupled from ! * the browser. We need to handle this better via some refcounting ! * scheme. */ openvrml::texture_node::~texture_node() OPENVRML_NOTHROW --- 4347,4353 ---- * @brief Destroy. * ! * @todo Proper resource deallocation in the @c viewer depends on the ! * @c viewer @b not having been decoupled from the @c browser. We need ! * to handle this better via some refcounting scheme. */ openvrml::texture_node::~texture_node() OPENVRML_NOTHROW *************** *** 4334,4338 **** openvrml::texture_node::render_texture(viewer & v) { ! boost::recursive_mutex::scoped_lock lock(this->mutex()); if (this->texture_reference != 0 && this->modified()) { --- 4364,4368 ---- openvrml::texture_node::render_texture(viewer & v) { ! boost::mutex::scoped_lock lock(this->texture_reference_mutex_); if (this->texture_reference != 0 && this->modified()) { Index: node.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/node.h,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** node.h 13 May 2007 00:46:35 -0000 1.59 --- node.h 1 Jun 2007 05:34:02 -0000 1.60 *************** *** 449,456 **** mutable size_t ref_count_; - mutable boost::recursive_mutex mutex_; const node_type & type_; ! boost::shared_ptr<openvrml::scope> scope_; openvrml::scene * scene_; bool modified_; --- 449,459 ---- mutable size_t ref_count_; const node_type & type_; ! const boost::shared_ptr<openvrml::scope> scope_; ! ! mutable read_write_mutex scene_mutex_; openvrml::scene * scene_; + + mutable read_write_mutex modified_mutex_; bool modified_; *************** *** 514,519 **** OPENVRML_NOTHROW; - boost::recursive_mutex & mutex() const OPENVRML_NOTHROW; - private: virtual void do_initialize(double timestamp) --- 517,520 ---- *************** *** 598,610 **** } - inline openvrml::scene * node::scene() const OPENVRML_NOTHROW - { - return this->scene_; - } - - inline boost::recursive_mutex & node::mutex() const OPENVRML_NOTHROW - { - return this->mutex_; - } template <typename FieldValue> --- 599,602 ---- *************** *** 614,619 **** { boost::function_requires<FieldValueConcept<FieldValue> >(); - - boost::recursive_mutex::scoped_lock lock(this->mutex_); return dynamic_cast<const FieldValue &>(this->do_field(id)); } --- 606,609 ---- *************** *** 883,886 **** --- 873,877 ---- class OPENVRML_API bounded_volume_node : public virtual node { + mutable read_write_mutex bounding_volume_dirty_mutex_; mutable bool bounding_volume_dirty_; *************** *** 1003,1006 **** --- 994,998 ---- class OPENVRML_API geometry_node : public virtual bounded_volume_node { + boost::mutex geometry_reference_mutex_; viewer::object_t geometry_reference; *************** *** 1176,1179 **** --- 1168,1172 ---- class OPENVRML_API texture_node : public virtual node { + boost::mutex texture_reference_mutex_; viewer::texture_object_t texture_reference; Index: vrml97node.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/vrml97node.cpp,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** vrml97node.cpp 13 May 2007 06:47:28 -0000 1.129 --- vrml97node.cpp 1 Jun 2007 05:34:02 -0000 1.130 *************** *** 2504,2517 **** --- 2504,2528 ---- sftime_emitter bind_time_emitter_; + read_write_mutex front_mutex_; image front; bool front_needs_update; + + read_write_mutex back_mutex_; image back; bool back_needs_update; + + read_write_mutex left_mutex_; image left; bool left_needs_update; + + read_write_mutex right_mutex_; image right; bool right_needs_update; + + read_write_mutex top_mutex_; image top; bool top_needs_update; + + read_write_mutex bottom_mutex_; image bottom; bool bottom_needs_update; *************** *** 3040,3043 **** --- 3051,3055 ---- url_exposedfield url_; + read_write_mutex image_mutex_; openvrml::image image_; bool texture_needs_update; *************** *** 5568,5571 **** --- 5580,5591 ---- background.update_textures(); + read_write_mutex::scoped_read_lock + front_lock(background.front_mutex_), + back_lock(background.back_mutex_), + left_lock(background.left_mutex_), + right_lock(background.right_mutex_), + top_lock(background.top_mutex_), + bottom_lock(background.bottom_mutex_); + background.viewerObject = v.insert_background( *************** *** 5589,5600 **** * @brief Create a node_type. * ! * @param id the name for the new node_type. ! * @param interfaces the interfaces for the new node_type. * ! * @return a boost::shared_ptr<node_type> to a node_type capable of * creating Background nodes. * * @exception unsupported_interface if @p interfaces includes an interface ! * not supported by background_metatype. * @exception std::bad_alloc if memory allocation fails. */ --- 5609,5620 ---- * @brief Create a node_type. * ! * @param id the name for the new @c node_type. ! * @param interfaces the interfaces for the new @c node_type. * ! * @return a @c boost::shared_ptr<node_type> to a @c node_type capable of * creating Background nodes. * * @exception unsupported_interface if @p interfaces includes an interface ! * not supported by @c background_metatype. * @exception std::bad_alloc if memory allocation fails. */ *************** *** 6304,6308 **** const std::string uri_; ! boost::recursive_mutex & node_mutex_; openvrml::image & image_; openvrml::node & node_; --- 6324,6328 ---- const std::string uri_; ! openvrml::read_write_mutex & image_mutex_; openvrml::image & image_; openvrml::node & node_; *************** *** 6407,6411 **** openvrml::image & image, openvrml::node & node, ! boost::recursive_mutex & node_mutex); virtual ~image_stream_listener() OPENVRML_NOTHROW; --- 6427,6431 ---- openvrml::image & image, openvrml::node & node, ! openvrml::read_write_mutex & image_mutex); virtual ~image_stream_listener() OPENVRML_NOTHROW; *************** *** 6436,6441 **** *static_cast<png_reader_t *>(png_get_progressive_ptr(png_ptr)); ! boost::recursive_mutex::scoped_lock ! lock(reader.stream_listener.node_mutex_); openvrml::image & image = reader.stream_listener.image_; --- 6456,6461 ---- *static_cast<png_reader_t *>(png_get_progressive_ptr(png_ptr)); ! openvrml::read_write_mutex::scoped_write_lock ! lock(reader.stream_listener.image_mutex_); openvrml::image & image = reader.stream_listener.image_; *************** *** 6538,6543 **** *static_cast<png_reader_t *>(png_get_progressive_ptr(png_ptr)); ! boost::recursive_mutex::scoped_lock ! lock(reader.stream_listener.node_mutex_); openvrml::image & image = reader.stream_listener.image_; --- 6558,6563 ---- *static_cast<png_reader_t *>(png_get_progressive_ptr(png_ptr)); ! openvrml::read_write_mutex::scoped_write_lock ! lock(reader.stream_listener.image_mutex_); openvrml::image & image = reader.stream_listener.image_; *************** *** 6794,6799 **** do_read(const std::vector<unsigned char> & data) { ! boost::recursive_mutex::scoped_lock ! lock(this->stream_listener.node_mutex_); if (data.size() > this->buffer.size()) { --- 6814,6819 ---- do_read(const std::vector<unsigned char> & data) { ! openvrml::read_write_mutex::scoped_write_lock ! lock(this->stream_listener.image_mutex_); if (data.size() > this->buffer.size()) { *************** *** 6932,6938 **** bool image_stream_listener::jpeg_reader::output_scanlines() { - boost::recursive_mutex::scoped_lock - lock(this->stream_listener.node_mutex_); - JDIMENSION top = this->cinfo_.output_scanline; bool result = true; --- 6952,6955 ---- *************** *** 6976,6982 **** openvrml::image & image, openvrml::node & node, ! boost::recursive_mutex & node_mutex): uri_(uri), ! node_mutex_(node_mutex), image_(image), node_(node) --- 6993,6999 ---- openvrml::image & image, openvrml::node & node, ! openvrml::read_write_mutex & image_mutex): uri_(uri), ! image_mutex_(image_mutex), image_(image), node_(node) *************** *** 7011,7015 **** void update_texture(background_node & node, ! boost::recursive_mutex & node_mutex, const openvrml::mfstring & url, openvrml::image & img) --- 7028,7032 ---- void update_texture(background_node & node, ! openvrml::read_write_mutex & img_mutex, const openvrml::mfstring & url, openvrml::image & img) *************** *** 7031,7035 **** img, node, ! node_mutex)); node.scene()->read_stream(in, listener); } --- 7048,7052 ---- img, node, ! img_mutex)); node.scene()->read_stream(in, listener); } *************** *** 7045,7049 **** if (this->front_needs_update) { update_texture(*this, ! this->mutex(), this->front_url_, this->front); --- 7062,7066 ---- if (this->front_needs_update) { update_texture(*this, ! this->front_mutex_, this->front_url_, this->front); *************** *** 7052,7056 **** if (this->back_needs_update) { update_texture(*this, ! this->mutex(), this->back_url_, this->back); --- 7069,7073 ---- if (this->back_needs_update) { update_texture(*this, ! this->back_mutex_, this->back_url_, this->back); *************** *** 7059,7063 **** if (this->left_needs_update) { update_texture(*this, ! this->mutex(), this->left_url_, this->left); --- 7076,7080 ---- if (this->left_needs_update) { update_texture(*this, ! this->left_mutex_, this->left_url_, this->left); *************** *** 7066,7070 **** if (this->right_needs_update) { update_texture(*this, ! this->mutex(), this->right_url_, this->right); --- 7083,7087 ---- if (this->right_needs_update) { update_texture(*this, ! this->right_mutex_, this->right_url_, this->right); *************** *** 7073,7077 **** if (this->top_needs_update) { update_texture(*this, ! this->mutex(), this->top_url_, this->top); --- 7090,7094 ---- if (this->top_needs_update) { update_texture(*this, ! this->top_mutex_, this->top_url_, this->top); *************** *** 7080,7084 **** if (this->bottom_needs_update) { update_texture(*this, ! this->mutex(), this->bottom_url_, this->bottom); --- 7097,7101 ---- if (this->bottom_needs_update) { update_texture(*this, ! this->bottom_mutex_, this->bottom_url_, this->bottom); *************** *** 12481,12485 **** this->image_, *this, ! this->mutex())); this->scene()->read_stream(in, listener); } --- 12498,12502 ---- this->image_, *this, ! this->image_mutex_)); this->scene()->read_stream(in, listener); } *************** *** 13658,13668 **** * Render each of the children. * ! * @param viewer a Viewer. ! * @param context a rendering context. */ ! void ! inline_node:: ! do_render_child(openvrml::viewer & viewer, ! const rendering_context context) { this->load(); --- 13675,13683 ---- * Render each of the children. * ! * @param viewer a @c viewer. ! * @param context a @c rendering_context. */ ! void inline_node::do_render_child(openvrml::viewer & viewer, ! const rendering_context context) { this->load(); Index: browser.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v retrieving revision 1.216 retrieving revision 1.217 diff -C2 -d -r1.216 -r1.217 *** browser.cpp 31 May 2007 07:18:55 -0000 1.216 --- browser.cpp 1 Jun 2007 05:34:02 -0000 1.217 *************** *** 4110,4115 **** OPENVRML_THROW1(std::bad_alloc) { - boost::recursive_mutex::scoped_lock lock(this->mutex()); - using boost::static_pointer_cast; --- 4110,4113 ---- Index: read_write_mutex.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/read_write_mutex.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** read_write_mutex.h 18 May 2007 06:49:08 -0000 1.2 --- read_write_mutex.h 1 Jun 2007 05:34:02 -0000 1.3 *************** *** 36,40 **** --- 36,44 ---- public: + class scoped_read_write_lock; + class scoped_read_lock : boost::noncopyable { + friend class scoped_read_write_lock; + read_write_mutex & mutex_; boost::mutex::scoped_lock lock_; *************** *** 54,57 **** --- 58,70 ---- }; + class scoped_read_write_lock : scoped_read_lock { + public: + explicit scoped_read_write_lock(read_write_mutex & mutex); + ~scoped_read_write_lock(); + + void promote(); + void demote(); + }; + read_write_mutex(); }; |
From: Braden M. <br...@us...> - 2007-06-01 05:34:10
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15889 Modified Files: ChangeLog Log Message: Removed node-wide recursive mutex. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1513 retrieving revision 1.1514 diff -C2 -d -r1.1513 -r1.1514 *** ChangeLog 31 May 2007 14:53:52 -0000 1.1513 --- ChangeLog 1 Jun 2007 05:34:01 -0000 1.1514 *************** *** 1,2 **** --- 1,92 ---- + 2007-06-01 Braden McDaniel <br...@en...> + + Removed node-wide recursive mutex. + + * src/libopenvrml/openvrml/node.cpp + (openvrml::node::scene() const): Moved definition from node.h; + acquire a read lock of the scene_mutex_. + (openvrml::node::initialize(openvrml::scene &, double)): Acquire a + read lock of the scene_mutex_; promote it to a write lock when + actually setting the scene_. + (openvrml::node::shutdown(double)): Acquire a read lock of the + scene_mutex_; promote it to a write lock when actually setting the + scene_. + (openvrml::node::modified(bool)): Acquire a write lock of the + modified_mutex_. + (openvrml::node::modified() const): Acquire a read lock of the + modified_mutex_. + (openvrml::node::print(std::ostream &, size_t) const): Removed + lock. + (openvrml::appearance_node::render_appearance(viewer &, + rendering_context)): Removed lock. + (openvrml::bounded_volume_node::bounding_volume() const): Acquire + a write lock of the bounding_volume_dirty_mutex_. + (openvrml::bounded_volume_node::bounding_volume_dirty(bool)): + Acquire a write lock of the bounding_volume_dirty_mutex_. + (openvrml::bounded_volume_node::bounding_volume_dirty() const): + Acquire a read lock of the bounding_volume_dirty_mutex_. + (openvrml::child_node::relocate()): Removed lock. + (openvrml::child_node::render_child(viewer &, rendering_context)): + Removed lock. + (openvrml::geometry_node::render_geometry(viewer &, + rendering_context)): Lock the geometry_reference_mutex_. + (openvrml::geometry_node::emissive() const): Removed lock. + (openvrml::texture_node::render_texture(viewer &)): Lock the + texture_reference_mutex_. + * src/libopenvrml/openvrml/node.h + (openvrml::node): Removed mutex_ and its accessor; changed scope_ + to be const; added scene_mutex_ and modified_mutex_. + (openvrml::node::scene() const): Moved to be out-of-line in + node.cpp. + (openvrml::bounded_volume_node): Added + bounding_volume_dirty_mutex_. + (openvrml::geometry_node): Added geometry_reference_mutex_. + (openvrml::texture_node): Added texture_reference_mutex_. + * src/libopenvrml/openvrml/read_write_mutex.cpp + (openvrml::read_write_mutex::scoped_read_write_lock::scoped_read_write_lock(read_write_mutex&)): + Added constructor. + (openvrml::read_write_mutex::scoped_read_write_lock::~scoped_read_write_lock()): + Added destructor. + (openvrml::read_write_mutex::scoped_read_write_lock::promote()): + Added function to promote the lock to a write lock. + (openvrml::read_write_mutex::scoped_read_write_lock::demote()): + Added function to demote a promted lock back to a read lock. + * src/libopenvrml/openvrml/read_write_mutex.h + (openvrml::read_write_mutex): Added scoped_read_write_lock, a lock + that is constructed as a read lock and can be promoted to a write + lock. + * src/libopenvrml/openvrml/vrml97node.cpp + (background_node): Added read_write_mutexes to protect the + images--front_mutex_, back_mutex_, left_mutex_, right_mutex_, + top_mutex_, bottom_mutex_. + (image_texture_node): Added image_mutex_. + (background_metatype::do_render(viewer &) const): Acquire read + locks of all the image mutexes before calling + viewer::insert_background. + (image_stream_listener): Replaced node_mutex_--a reference to the + node-wide recursive mutex--with image_mutex_, a reference to the + mutex associated with the image. + (image_stream_listener::image_stream_listener(const std::string &, + openvrml::image &, openvrml::node &, + openvrml::read_write_mutex&)): Pass the read_write_mutex + associated with the image instead of the node-wide recursive + mutex. + (openvrml_png_info_callback(png_structp, png_infop)): Acquire a + write lock of the image_mutex_. + (openvrml_png_row_callback(png_structp, png_bytep, png_uint_32, + int)): Acquire a write lock of the image_mutex_. + (image_stream_listener::jpeg_reader::do_read(const + std::vector<unsigned char> &)): Acquire a write lock of the + image_mutex_. + (image_stream_listener::jpeg_reader::output_scanlines()): Removed + lock. + (update_texture(background_node &, openvrml::read_write_mutex &, + const openvrml::mfstring &, openvrml::image &)): Pass the + read_write_mutex associated with the image instead of the + node-wide recursive mutex. + (background_node::update_textures()): Pass the read_write_mutexes + associated with the images instead of the node-wide recursive + mutex. + 2007-05-31 Braden McDaniel <br...@en...> |
From: Braden M. <br...@us...> - 2007-05-31 14:53:55
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24422 Modified Files: ChangeLog Log Message: Changed default_viewpoint_ to be an intrusive_ptr<viewpoint_node>; changed default_navigation_info_ to be an intrusive_ptr<navigation_info_node>. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1512 retrieving revision 1.1513 diff -C2 -d -r1.1512 -r1.1513 *** ChangeLog 31 May 2007 07:59:32 -0000 1.1512 --- ChangeLog 31 May 2007 14:53:52 -0000 1.1513 *************** *** 1,4 **** --- 1,11 ---- 2007-05-31 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/browser.h + (openvrml::browser): Changed default_viewpoint_ to be an + intrusive_ptr<viewpoint_node>; changed default_navigation_info_ to + be an intrusive_ptr<navigation_info_node>. + + 2007-05-31 Braden McDaniel <br...@en...> + Ensure indices into coordinate, normal, and color data are valid before using them in the renderer. |
From: Braden M. <br...@us...> - 2007-05-31 14:53:55
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24422/src/libopenvrml/openvrml Modified Files: browser.h Log Message: Changed default_viewpoint_ to be an intrusive_ptr<viewpoint_node>; changed default_navigation_info_ to be an intrusive_ptr<navigation_info_node>. Index: browser.h =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.h,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** browser.h 25 May 2007 06:13:07 -0000 1.70 --- browser.h 31 May 2007 14:53:55 -0000 1.71 *************** *** 242,251 **** boost::scoped_ptr<scene> scene_; ! const boost::intrusive_ptr<node> default_viewpoint_; mutable read_write_mutex active_viewpoint_mutex_; viewpoint_node * active_viewpoint_; ! const boost::intrusive_ptr<node> default_navigation_info_; mutable read_write_mutex active_navigation_info_mutex_; --- 242,252 ---- boost::scoped_ptr<scene> scene_; ! const boost::intrusive_ptr<viewpoint_node> default_viewpoint_; mutable read_write_mutex active_viewpoint_mutex_; viewpoint_node * active_viewpoint_; ! const boost::intrusive_ptr<navigation_info_node> ! default_navigation_info_; mutable read_write_mutex active_navigation_info_mutex_; |
From: Braden M. <br...@us...> - 2007-05-31 07:59:34
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24779/src/libopenvrml-gl/openvrml/gl Modified Files: viewer.cpp Log Message: Ensure indices into coordinate, normal, and color data are valid before using them in the renderer. Index: viewer.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl/viewer.cpp,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** viewer.cpp 6 Mar 2007 07:24:02 -0000 1.61 --- viewer.cpp 31 May 2007 07:59:32 -0000 1.62 *************** *** 209,213 **** const std::vector<openvrml::vec2f> & texCoord; const std::vector<openvrml::int32> & texCoordIndex; ! int *texAxes; float *texParams; size_t nf, i; --- 209,213 ---- const std::vector<openvrml::vec2f> & texCoord; const std::vector<openvrml::int32> & texCoordIndex; ! int (&texAxes)[2]; float *texParams; size_t nf, i; *************** *** 222,226 **** const std::vector<openvrml::vec2f> & texCoord, const std::vector<openvrml::int32> & texCoordIndex, ! int * texAxes, float * texParams, size_t nf, size_t i); }; --- 222,226 ---- const std::vector<openvrml::vec2f> & texCoord, const std::vector<openvrml::int32> & texCoordIndex, ! int (&texAxes)[2], float * texParams, size_t nf, size_t i); }; *************** *** 234,238 **** const std::vector<openvrml::vec2f> & texCoord, const std::vector<openvrml::int32> & texCoordIndex, ! int * texAxes, float * texParams, size_t nf, --- 234,238 ---- const std::vector<openvrml::vec2f> & texCoord, const std::vector<openvrml::int32> & texCoordIndex, ! int (&texAxes)[2], float * texParams, size_t nf, *************** *** 2802,2811 **** // Per-face attributes ! if (!s->color.empty() ! && !(s->mask & viewer::mask_color_per_vertex)) { ! const size_t index = !s->colorIndex.empty() ! ? s->colorIndex[nf] ! : nf; ! glColor3fv(&s->color[index][0]); } --- 2802,2811 ---- // Per-face attributes ! const size_t color_index = (nf < s->colorIndex.size()) ! ? s->colorIndex[nf] ! : nf; ! if (color_index < s->color.size() ! && !(s->mask & viewer::mask_color_per_vertex)) { ! glColor3fv(&s->color[color_index][0]); } *************** *** 2814,2822 **** ? 0 : i + 1; ! if (!s->normal.empty()) { ! const size_t index = !s->normalIndex.empty() ! ? s->normalIndex[nf] ! : nf; ! glNormal3fv(&s->normal[index][0]); } else if (i < s->coordIndex.size() - 4 && s->coordIndex[i1] >= 0 --- 2814,2822 ---- ? 0 : i + 1; ! const size_t normal_index = (nf < s->normalIndex.size()) ! ? s->normalIndex[nf] ! : nf; ! if (normal_index < s->normal.size()) { ! glNormal3fv(&s->normal[normal_index][0]); } else if (i < s->coordIndex.size() - 4 && s->coordIndex[i1] >= 0 *************** *** 2839,2856 **** if (s->coordIndex[i] >= 0) { // Per-vertex attributes ! if (!s->color.empty() ! && (s->mask & viewer::mask_color_per_vertex)) { ! const size_t index = !s->colorIndex.empty() ! ? s->colorIndex[i] ! : s->coordIndex[i]; ! glColor3fv(&s->color[index][0]); } if (s->mask & viewer::mask_normal_per_vertex) { ! if (!s->normal.empty()) { ! const size_t index = !s->normalIndex.empty() ! ? s->normalIndex[i] ! : s->coordIndex[i]; ! glNormal3fv(&s->normal[index][0]); } else { ; // Generate per-vertex normal here... --- 2839,2856 ---- if (s->coordIndex[i] >= 0) { // Per-vertex attributes ! const size_t color_index = (i < s->colorIndex.size()) ! ? s->colorIndex[i] ! : s->coordIndex[i]; ! if (color_index < s->color.size() ! && (s->mask & viewer::mask_color_per_vertex)) { ! glColor3fv(&s->color[color_index][0]); } if (s->mask & viewer::mask_normal_per_vertex) { ! const size_t normal_index = (i < s->normalIndex.size()) ! ? s->normalIndex[i] ! : s->coordIndex[i]; ! if (normal_index < s->normal.size()) { ! glNormal3fv(&s->normal[normal_index][0]); } else { ; // Generate per-vertex normal here... *************** *** 2859,2867 **** const vec3f & v = s->coord[s->coordIndex[i]]; ! if (!s->texCoord.empty()) { ! const size_t index = !s->texCoordIndex.empty() ! ? s->texCoordIndex[i] ! : s->coordIndex[i]; ! glTexCoord2fv(&s->texCoord[index][0]); } else { float c0, c1; --- 2859,2867 ---- const vec3f & v = s->coord[s->coordIndex[i]]; ! const size_t tex_coord_index = (i < s->texCoordIndex.size()) ! ? s->texCoordIndex[i] ! : s->coordIndex[i]; ! if (tex_coord_index < s->texCoord.size()) { ! glTexCoord2fv(&s->texCoord[tex_coord_index][0]); } else { float c0, c1; *************** *** 2995,2999 **** // Texture coordinate generation parameters. ! int texAxes[2]; // Map s,t to x,y,z float texParams[4]; // s0, 1/sSize, t0, 1/tSize --- 2995,2999 ---- // Texture coordinate generation parameters. ! int texAxes[2] = { 0, 1 }; // Map s,t to x,y,z float texParams[4]; // s0, 1/sSize, t0, 1/tSize |
From: Braden M. <br...@us...> - 2007-05-31 07:59:34
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24779 Modified Files: ChangeLog Log Message: Ensure indices into coordinate, normal, and color data are valid before using them in the renderer. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1511 retrieving revision 1.1512 diff -C2 -d -r1.1511 -r1.1512 *** ChangeLog 31 May 2007 07:18:54 -0000 1.1511 --- ChangeLog 31 May 2007 07:59:32 -0000 1.1512 *************** *** 1,4 **** --- 1,21 ---- 2007-05-31 Braden McDaniel <br...@en...> + Ensure indices into coordinate, normal, and color data are valid + before using them in the renderer. + + * src/libopenvrml-gl/openvrml/gl/viewer.cpp + (ShellData): Changed texAxes to be an array reference. + (ShellData::ShellData): Changed texAxes to be an array reference. + (insertShellConvex(ShellData *)): Ensure indices are valid before + using them. + (openvrml::gl::viewer::insert_shell(unsigned int, const + std::vector<vec3f> &, const std::vector<int32> &, const + std::vector<color> &, const std::vector<int32> &, const + std::vector<vec3f> &, const std::vector<int32> &, const + std::vector<vec2f> &, const std::vector<int32> &)): Initialize + texAxes to { 0, 1 }. + + 2007-05-31 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/browser.cpp (openvrml::scene::url() const): Ensure the scene's URL is relative |
From: Braden M. <br...@us...> - 2007-05-31 07:59:16
|
Update of /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24743/src/libopenvrml-gl/openvrml/gl Modified Files: Tag: OpenVRML-0_16-BRANCH viewer.cpp Log Message: Ensure indices into coordinate, normal, and color data are valid before using them in the renderer. Index: viewer.cpp =================================================================== RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml-gl/openvrml/gl/viewer.cpp,v retrieving revision 1.43.2.13 retrieving revision 1.43.2.14 diff -C2 -d -r1.43.2.13 -r1.43.2.14 *** viewer.cpp 6 Mar 2007 07:23:13 -0000 1.43.2.13 --- viewer.cpp 31 May 2007 07:59:16 -0000 1.43.2.14 *************** *** 209,213 **** const std::vector<openvrml::vec2f> & texCoord; const std::vector<openvrml::int32> & texCoordIndex; ! int *texAxes; float *texParams; size_t nf, i; --- 209,213 ---- const std::vector<openvrml::vec2f> & texCoord; const std::vector<openvrml::int32> & texCoordIndex; ! int (&texAxes)[2]; float *texParams; size_t nf, i; *************** *** 222,226 **** const std::vector<openvrml::vec2f> & texCoord, const std::vector<openvrml::int32> & texCoordIndex, ! int * texAxes, float * texParams, size_t nf, size_t i); }; --- 222,226 ---- const std::vector<openvrml::vec2f> & texCoord, const std::vector<openvrml::int32> & texCoordIndex, ! int (&texAxes)[2], float * texParams, size_t nf, size_t i); }; *************** *** 234,238 **** const std::vector<openvrml::vec2f> & texCoord, const std::vector<openvrml::int32> & texCoordIndex, ! int * texAxes, float * texParams, size_t nf, --- 234,238 ---- const std::vector<openvrml::vec2f> & texCoord, const std::vector<openvrml::int32> & texCoordIndex, ! int (&texAxes)[2], float * texParams, size_t nf, *************** *** 2780,2789 **** // Per-face attributes ! if (!s->color.empty() ! && !(s->mask & viewer::mask_color_per_vertex)) { ! const size_t index = !s->colorIndex.empty() ! ? s->colorIndex[nf] ! : nf; ! glColor3fv(&s->color[index][0]); } --- 2780,2789 ---- // Per-face attributes ! const size_t color_index = (nf < s->colorIndex.size()) ! ? s->colorIndex[nf] ! : nf; ! if (color_index < s->color.size() ! && !(s->mask & viewer::mask_color_per_vertex)) { ! glColor3fv(&s->color[color_index][0]); } *************** *** 2792,2800 **** ? 0 : i + 1; ! if (!s->normal.empty()) { ! const size_t index = !s->normalIndex.empty() ! ? s->normalIndex[nf] ! : nf; ! glNormal3fv(&s->normal[index][0]); } else if (i < s->coordIndex.size() - 4 && s->coordIndex[i1] >= 0 --- 2792,2800 ---- ? 0 : i + 1; ! const size_t normal_index = (nf < s->normalIndex.size()) ! ? s->normalIndex[nf] ! : nf; ! if (normal_index < s->normal.size()) { ! glNormal3fv(&s->normal[normal_index][0]); } else if (i < s->coordIndex.size() - 4 && s->coordIndex[i1] >= 0 *************** *** 2817,2834 **** if (s->coordIndex[i] >= 0) { // Per-vertex attributes ! if (!s->color.empty() ! && (s->mask & viewer::mask_color_per_vertex)) { ! const size_t index = !s->colorIndex.empty() ! ? s->colorIndex[i] ! : s->coordIndex[i]; ! glColor3fv(&s->color[index][0]); } if (s->mask & viewer::mask_normal_per_vertex) { ! if (!s->normal.empty()) { ! const size_t index = !s->normalIndex.empty() ! ? s->normalIndex[i] ! : s->coordIndex[i]; ! glNormal3fv(&s->normal[index][0]); } else { ; // Generate per-vertex normal here... --- 2817,2834 ---- if (s->coordIndex[i] >= 0) { // Per-vertex attributes ! const size_t color_index = (i < s->colorIndex.size()) ! ? s->colorIndex[i] ! : s->coordIndex[i]; ! if (color_index < s->color.size() ! && (s->mask & viewer::mask_color_per_vertex)) { ! glColor3fv(&s->color[color_index][0]); } if (s->mask & viewer::mask_normal_per_vertex) { ! const size_t normal_index = (i < s->normalIndex.size()) ! ? s->normalIndex[i] ! : s->coordIndex[i]; ! if (normal_index < s->normal.size()) { ! glNormal3fv(&s->normal[normal_index][0]); } else { ; // Generate per-vertex normal here... *************** *** 2837,2845 **** const vec3f & v = s->coord[s->coordIndex[i]]; ! if (!s->texCoord.empty()) { ! const size_t index = !s->texCoordIndex.empty() ! ? s->texCoordIndex[i] ! : s->coordIndex[i]; ! glTexCoord2fv(&s->texCoord[index][0]); } else { float c0, c1; --- 2837,2845 ---- const vec3f & v = s->coord[s->coordIndex[i]]; ! const size_t tex_coord_index = (i < s->texCoordIndex.size()) ! ? s->texCoordIndex[i] ! : s->coordIndex[i]; ! if (tex_coord_index < s->texCoord.size()) { ! glTexCoord2fv(&s->texCoord[tex_coord_index][0]); } else { float c0, c1; *************** *** 2972,2976 **** // Texture coordinate generation parameters. ! int texAxes[2]; // Map s,t to x,y,z float texParams[4]; // s0, 1/sSize, t0, 1/tSize --- 2972,2976 ---- // Texture coordinate generation parameters. ! int texAxes[2] = { 0, 1 }; // Map s,t to x,y,z float texParams[4]; // s0, 1/sSize, t0, 1/tSize |
From: Braden M. <br...@us...> - 2007-05-31 07:59:16
|
Update of /cvsroot/openvrml/openvrml In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24743 Modified Files: Tag: OpenVRML-0_16-BRANCH ChangeLog Log Message: Ensure indices into coordinate, normal, and color data are valid before using them in the renderer. Index: ChangeLog =================================================================== RCS file: /cvsroot/openvrml/openvrml/ChangeLog,v retrieving revision 1.1310.2.176 retrieving revision 1.1310.2.177 diff -C2 -d -r1.1310.2.176 -r1.1310.2.177 *** ChangeLog 31 May 2007 07:18:16 -0000 1.1310.2.176 --- ChangeLog 31 May 2007 07:59:15 -0000 1.1310.2.177 *************** *** 1,4 **** --- 1,21 ---- 2007-05-31 Braden McDaniel <br...@en...> + Ensure indices into coordinate, normal, and color data are valid + before using them in the renderer. + + * src/libopenvrml-gl/openvrml/gl/viewer.cpp + (ShellData): Changed texAxes to be an array reference. + (ShellData::ShellData): Changed texAxes to be an array reference. + (insertShellConvex(ShellData *)): Ensure indices are valid before + using them. + (openvrml::gl::viewer::insert_shell(unsigned int, const + std::vector<vec3f> &, const std::vector<int32> &, const + std::vector<color> &, const std::vector<int32> &, const + std::vector<vec3f> &, const std::vector<int32> &, const + std::vector<vec2f> &, const std::vector<int32> &)): Initialize + texAxes to { 0, 1 }. + + 2007-05-31 Braden McDaniel <br...@en...> + * src/libopenvrml/openvrml/browser.cpp (openvrml::scene::url() const): Ensure the scene's URL is relative |