Roni Zanolli | 3 May 03:09 2015
Picon

reading osgb file

H Robert,

I'm attaching the osgDB/Serializer file with the fix for osgb file loading a hud 
camera.

Thank you!

Cheers,
Roni

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63607#63607

Attachments: 
http://forum.openscenegraph.org//files/2099_1430615385._563.
Jannik Heller | 30 Apr 16:54 2015
Picon

Transform::computeBound optimization

Hi Robert,

here's an optimization for the Transform::computeBound function. There are three calls to sqrt() in this
function whereas only one was really necessary.

The function gains a 10% speedup from my tests. Timings were obtained in release build with the following code:

Code:

osg::MatrixTransform* trans = new osg::MatrixTransform;
osg::Geometry* drw = new osg::Geometry;
drw->setInitialBound(osg::BoundingBoxf(osg::Vec3f(-3,-3,-3), osg::Vec3f(3,3,3)));
trans->addChild(drw);
osg::Timer timer;
for (int i=0; i<1000000; ++i)
{
   trans->computeBound();
}
std::cout << "took " << timer.time_m() << std::endl;

Thank you!

Cheers,
Jannik

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63587#63587

(Continue reading)

christian | 24 Apr 18:54 2015
Picon

changes for making osgAndroid working with GLES1 enabled with 3.3.7 rc2 trunk

change done in OpenSceneGraph/include/osg/GLDefines, line 35
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2014 Robert Osfield
 * Copyright (C) 2003-2005 3Dlabs Inc. Ltd.
 * Copyright (C) 2004-2005 Nathan Cournia
 * Copyright (C) 2007 Art Tevs
 * Copyright (C) 2008 Zebra Imaging
 * Copyright (C) 2010 VIRES Simulationstechnologie GmbH
 * Copyright (C) 2012 David Callu
 * Copyright (C) 2008 Mike Weiblen
 * Copyright (C) 2012 Holger Helmich
 *
 * This application is open source and may be redistributed and/or modified
 * freely and without restriction, both in commercial and non commercial
 * applications, as long as this copyright notice is maintained.
 *
 * This application 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.
*/

#ifndef OSG_GLDEFINES
#define OSG_GLDEFINES 1

#include <osg/Referenced>
#include <osg/GL>

#include <string>

(Continue reading)

Leandro Linardos | 22 Apr 06:16 2015
Picon

osgTerrain::GeometryTechnique::generateGeometry possible submission

Hi,

I'm working with osgTerrain.

In the generateGeometry method of osgTerrain::GeometryTechnique, when the primitive data is populated
there's a bunch deciding which corner vertexs connect to minimize the curvature.

I'm using an elevation data source which has its own definition of which corners connect, so, I will modify
this bunch of code to achieve this.

Is considered valuable the submission of this modification? I'm thinking in a strategy pattern to decide
how to connect the vertexs.

Thank you!

Cheers,
Leandro

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63497#63497
Chris Denham | 21 Apr 17:32 2015
Picon

Fix two memory leaks in 3DS plugin

I found a couple of memory leaks in 3DS reader plugin and I have attached corrected files. I have attached an
example 3DS file I used to test the leaks/fixes using osgviewer for trunk at rev [14853] and the tagged
version 3.2.1. 

The first leak is in the lib3ds module (yeah, I know that probably should be corrected at
http://code.google.com/p/lib3ds/ but I'm assuming that as no commits have happened there since 2011
that it may be better to fix the copy we have in the OSG of that project) The leak is caused by lib3d's use of
realloc(ptr, 0) to free up memory allocations, but realloc, when ptr==NULL returns malloc(0) rather
than NULL and thus leaks a zero byte allocation. The solution here was to adjust the
'lib3ds_util_reserve_array' function so that it realloc is not used to release a NULL pointer.

The second leak is in ReaderWriter3DS.cpp and arises when any of the created StateSet objects added to the
StateSetMap don't subsequently get applied to a Node. The solution here was just to simply use the
osg::ref_ptr around the raw StateSet pointer that was used in the locally defined StateSetInfo struct.

Chris

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63494#63494

Attachments: 
http://forum.openscenegraph.org//files/fixleak3ds_159.zip
Tim Moore | 19 Apr 17:04 2015
Picon

Fix for crash in order_by_primitive_mode

The order_by_primitive_mode comparer was not providing a strict weak
ordering, which was causing a crash in the sort() call in
VertexAccessOrderVisitor::optimizeOrder (gcc 4.9, Fedora 21).

From 05f29345cc39b4c2111bc80c8df8583aeaf9bf3f Mon Sep 17 00:00:00 2001
From: Tim Moore <timoore33 <at> gmail.com>
Date: Sat, 18 Apr 2015 13:22:39 +0200
Subject: Fix for crash in order_by_primitive_mode

The order_by_primitive_mode comparer was not providing a strict weak
ordering, which was causing a crash in the sort() call in
VertexAccessOrderVisitor::optimizeOrder (gcc 4.9, Fedora 21).
---
 include/osgUtil/MeshOptimizers | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/osgUtil/MeshOptimizers b/include/osgUtil/MeshOptimizers
index c140266..e0ddd1e 100644
--- a/include/osgUtil/MeshOptimizers
+++ b/include/osgUtil/MeshOptimizers
 <at>  <at>  -94,7 +94,7  <at>  <at>  class OSGUTIL_EXPORT VertexAccessOrderVisitor : public GeometryCollector
         inline bool operator() (const osg::ref_ptr<osg::PrimitiveSet>& prim1, const
osg::ref_ptr<osg::PrimitiveSet>& prim2)
         {
             if(prim1 && prim2) {
-                return prim1->getMode() >= prim2->getMode();
+                return prim1->getMode() > prim2->getMode();
             }
             else if(prim1) {
                 return true;
--

-- 
2.1.0

Attachment (MeshOptimizers): application/octet-stream, 5240 bytes
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Roman Grigoriev | 16 Apr 09:58 2015
Picon

Re: VAOs integration in osg::Geometry

Hi, Robert!
Have you looked in patches or what is you decision about VAO?
Thank you!

Cheers,
Roman

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63424#63424
philippe renon | 11 Apr 19:13 2015
Picon

Fix for compile error with MinGW

Hi,

This is a fix for the following compilation error when compiling with MinGW.

[ 89%] Building CXX object src/osgPlugins/osgjs/CMakeFiles/osgdb_osgjs.dir/Animation.obj
In file included from d:/Projects/OpenPilotTools/qt-5.4.1/Tools/mingw491_32/i686-w64-mingw32/include/c++/cstdint:35:0,
                 from D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:34,
                 from D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\Animation.cpp:12:
d:/Projects/OpenPilotTools/qt-5.4.1/Tools/mingw491_32/i686-w64-mingw32/include/c++/bits/c++0x_warning.h:32:2: error: #er
ror This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimenta
l, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
In file included from D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\Animation.cpp:12:0:
D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:94:67: error: 'uint8_t' was not declared in this sc
ope
     void encodeArrayAsVarintBuffer(osg::Array const*, std::vector<uint8_t>&) const;
                                                                   ^
D:\Projects\OpenPilot\3rdparty\osg\src\osgPlugins\osgjs\JSON_Objects:94:74: error: template argument 1 is invalid
     void encodeArrayAsVarintBuffer(osg::Array const*, std::vector<uint8_t>&) const;
                                                                          ^
[...SNIP..]
Attachment (JSON_Objects): application/octet-stream, 15 KiB
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Jannik Heller | 10 Apr 16:52 2015
Picon

Transform BoundingSphere by matrix utility

Hi Robert,

In osg::Transform we have some code that transforms a bounding sphere by a matrix, but it's hidden in the
implementation file. I found this code useful for my own purposes, so I moved it to the BoundingSphere
class. Now it's publicly accessible whenever someone needs it.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63318#63318

_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Konstantin | 9 Apr 08:43 2015
Picon

GLES3 on iOS

Hi, Robert!

I've added GLES3 profile, which also enables GLES2 features (OSG_GLES3_AVAILABLE=true => OSG_GLES2_AVAILABLE=true).

If OSG_OPENGL_PROFILE="GLES3" =>
GraphicsWindowIOS will create gles3 context.
If failed, GraphicsWindowIOS will create gles2 context.
Multisampling also working.

Please have a look at this.

Good luck!
KOS

_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Jannik Heller | 4 Apr 21:23 2015
Picon

Drawable fixes

Hi Robert,

Recently Drawable was changed to inherit from Node instead of Object. I believe I have discovered some
leftovers from before this change. For example, dynamic_casts to both Drawable* and Node* where casting
to Node* would be sufficient.

Please note I haven't tested these changes other than checking it compiles, as I'm not familiar with the
changed code not sure where it could be tested.

ShapeToGeometriesVisitor seems to be completely unused, so instead of fixing it we might as well remove it?

Thanks,
Jannik

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63276#63276

_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Gmane