Lionel Lagarde | 30 Mar 14:48 2015
Picon

Image::computeNumberOfMipmapLevels doesn't return valid value

Hi,

you can find in the attached zip a fix for the Image::computeNumberOfMipmapLevels method.
The method did use the float version of the log function and the / operator.
It works for most of the input sizes, but fails for 8192, 32768...
For 8192, the method returns 13 instead of 14.

Using double resolved the problem.

Lionel Lagarde


Attachment (Image.7z): application/octet-stream, 15 KiB
#include <stdio.h>
#include <math.h>

int computeNumberOfMipmapLevelsf(int w)
{
	float lf = logf(w)/logf(2.0f);
	int nf = 1 + static_cast<int>(floorf(lf));
	return nf;
}

int computeNumberOfMipmapLevelsd(int w)
{
	double ld = log((double)w)/log(2.0);
	int nd = 1 + static_cast<int>(floor(ld));
	return nd;
}

int computeNumberOfMipmapLevelsbithacks(int w)
{
	// http://graphics.stanford.edu/~seander/bithacks.html#IntegerLogIEEE64Float
	int v = w; // 32-bit integer to find the log base 2 of
	int r; // result of log_2(v) goes here
	union { unsigned int u[2]; double d; } t; // temp
	
	t.u[1] = 0x43300000;
	t.u[0] = v;
	t.d -= 4503599627370496.0;
	r = (t.u[1] >> 20) - 0x3FF;
	
	return r+1;
}

int main(int argc, char argv[])
{
	int w = 1;
	
	while (w < 1000000)
	{
		int nf = computeNumberOfMipmapLevelsf(w);
		int nd = computeNumberOfMipmapLevelsd(w);
		int nb = computeNumberOfMipmapLevelsbithacks(w);
		
		printf("%6d: %2d %2d (%2d) %s\n", w, nf, nd, nb, nf==nd ? " ok" : "nok");
		
		w *= 2;
	}
	
	/* w = 1;
	while ((w & 0x80000000) == 0)
	{
		int nf = computeNumberOfMipmapLevelsf(w);
		int nd = computeNumberOfMipmapLevelsd(w);
		if (nf != nd)
			printf("%6d %2d %2d\n", w, nf, nd);
		++w;
	} */
	
	return 0;
}
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Giampaolo ViganĂ² | 27 Mar 17:45 2015
Picon

3ds plugin (ReaderWriter3DS.cpp) fix for transparency+reflection

Hi Robert,

you can find in the attached ZIP archive a fix for transparent diffuse 
textures and opacity maps and the support for reflection map (see 
examples within the PDF document in the attached zip archive). I 
included in the ZIP both the whole source file ReaderWriter3DS.cpp and 
the patch file related to the 3.3.6 developer version (even if I am 
using Windows I saved the file with UNIX line endings to keep the same 
original format of OSG original source files).
I started from the 3ds plugin code from the 3.3.6 developer version and 
I made my changes to that code (I marked the modified sections in my 
way, feel free to reformat it). I am using this fixed 3ds plugin within 
OSG 3.2.1.
I added the reflection map looking at the code of FPX plugin. Also the 
UV scaling was missing, so I added it to both diffuse, opacity and 
reflection maps (anyway UV offset and rotation are not yet supported).

Giampaolo

Attachment (ReaderWriter3DS_fix_OSG336.zip): application/x-compressed, 306 KiB
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Jannik Heller | 19 Mar 23:11 2015
Picon

osgviewerQt multithreading crash on Linux/X11

Hi Robert,

The osgviewerQt example crashes when build with Qt4 on Linux.

To reproduce this issue, use -DDESIRED_QT_VERSION=4 when building OSG, start the osgviewerQt example,
and you will get the following crash (sometimes on launch, sometimes when resizing the window):

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
osgviewerQt: ../../src/xcb_io.c:179: dequeue_pending_request: Assertion
`!xcb_xlib_unknown_req_in_deq' failed.
Aborted (core dumped)

With Qt5, there is no crash, because the multithreading is currently disabled (see comment in osgviewerQt).

This patch adds the AA_X11InitThreads flag to the QApplication setup, meaning QT will call XInitThreads
for us. This also bumps the required QT version to 4.8+, because the AA_X11InitThreads flag was
introduced in that version. If that is not acceptable, we could add a QT_VERSION >= 0x040800 guard, or
manually call XInitThreads() instead. Let me know what you think.

Cheers
Jannik

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

Attachment (osgqt_xinitthreads.zip): application/zip, 3748 bytes
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Julien Valentin | 17 Mar 17:16 2015
Picon

VAOs integration: On Geometry or PrimitiveSet?

Hi,

I've added VAO support to osg Geometry.
It need to be discussed:
First I was thinking it was not a great deal:
-Add a flag in osg::Geometry
-Do the stuff done in drawimplementation in compileGLObjects. 
However , I ran into the problem that Primitiveset (DrawElements) embed their BO and so bind it even if it is
already bound by VAO
So I had to add a virtual method in DrawElements (arbitrary named indexLessDraw).

It seams to work but don't know if I didn't break stuff

Need reviews and critisms 

Thank you!

Cheers,
Julien

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

Index: include/osg/Geometry
===================================================================
--- include/osg/Geometry	(revision 14800)
+++ include/osg/Geometry	(working copy)
 <at>  <at>  -140,6 +140,14  <at>  <at> 
             method to use OpenGL vertex buffer objects for rendering.*/
         virtual void setUseVertexBufferObjects(bool flag);

+
+		/**use VertexBufferArray For Drawing*/
+		bool getUseVertexArrayObjects()const{return _useVAO&&getUseVertexBufferObjects();}
+
+		void setUseVertexArrayObjects(bool flag){
+			setUseVertexBufferObjects(flag);_useVAO=flag; 
+		}
+
         /** Force a recompile on next draw() of any OpenGL display list associated with this geoset.*/
         virtual void dirtyDisplayList();

 <at>  <at>  -217,6 +225,9  <at>  <at> 
         void addVertexBufferObjectIfRequired(osg::Array* array);
         void addElementBufferObjectIfRequired(osg::PrimitiveSet* primitiveSet);

+		bool _useVAO;
+		typedef std::pair<unsigned int, const PrimitiveSet*> VAOKey;
+		mutable std::map<VAOKey ,unsigned int> _contextID2VAO; ///per context per primset vertex array
object 

         PrimitiveSetList                _primitives;
         osg::ref_ptr<Array>             _vertexArray;
Index: include/osg/PrimitiveSet
===================================================================
--- include/osg/PrimitiveSet	(revision 14800)
+++ include/osg/PrimitiveSet	(working copy)
 <at>  <at>  -395,7 +395,8  <at>  <at> 
         virtual void setElement(unsigned int, unsigned int) = 0;
         virtual unsigned int getElement(unsigned int) = 0;
         virtual void addElement(unsigned int) = 0;
-
+		///use it in order not to bind index and give a start index 
+		virtual void indexLessDraw(State& state, GLsizeiptr indexstart) const =0;
     protected:

         virtual ~DrawElements() {}
 <at>  <at>  -439,6 +440,7  <at>  <at> 
         virtual bool            supportsBufferObject() const { return false; }

         virtual void draw(State& state, bool useVertexBufferObjects) const ;
+		virtual void indexLessDraw(State& state, GLsizeiptr indexstart) const ;

         virtual void accept(PrimitiveFunctor& functor) const;
         virtual void accept(PrimitiveIndexFunctor& functor) const;
 <at>  <at>  -503,6 +505,7  <at>  <at> 
         virtual bool            supportsBufferObject() const { return false; }

         virtual void draw(State& state, bool useVertexBufferObjects) const;
+		virtual void indexLessDraw(State& state, GLsizeiptr indexstart) const ;

         virtual void accept(PrimitiveFunctor& functor) const;
         virtual void accept(PrimitiveIndexFunctor& functor) const;
 <at>  <at>  -567,6 +570,7  <at>  <at> 
         virtual bool            supportsBufferObject() const { return false; }

         virtual void draw(State& state, bool useVertexBufferObjects) const;
+		virtual void indexLessDraw(State& state, GLsizeiptr indexstart) const ;

         virtual void accept(PrimitiveFunctor& functor) const;
         virtual void accept(PrimitiveIndexFunctor& functor) const;
Index: src/osg/Geometry.cpp
===================================================================
--- src/osg/Geometry.cpp	(revision 14800)
+++ src/osg/Geometry.cpp	(working copy)
 <at>  <at>  -23,8 +23,10  <at>  <at> 
     _containsDeprecatedData(false)
 {
     _supportsVertexBufferObjects = true;
+	setSupportsDisplayList(false);
     // temporary test
-    // setSupportsDisplayList(false);
+
+	///default 4 DEBUGsetUseVertexArrayObjects(true); 
 }

 Geometry::Geometry(const Geometry& geometry,const CopyOp& copyop):
 <at>  <at>  -716,6 +718,50  <at>  <at> 
         extensions->glBindBuffer(GL_ARRAY_BUFFER_ARB,0);
         extensions->glBindBuffer(GL_ELEMENT_ARRAY_BUFFER_ARB,0);

+		if (_useVAO){
+				State& state = *renderInfo.getState();
+				for (unsigned int primitiveSetNum = 0; primitiveSetNum != _primitives.size(); ++primitiveSetNum)
+				{
+				//	ArrayDispatchers& arrayDispatchers = state.getArrayDispatchers(); 
+				
+					const PrimitiveSet* primitiveset = _primitives[primitiveSetNum].get();
+
+					///create VAO for this context and primitiveset
+					std::map<VAOKey, unsigned int>::iterator itm = _contextID2VAO.find(VAOKey(contextID, primitiveset));
+					if (itm != _contextID2VAO.end()) //delete vao if already created
+						extensions->glDeleteVertexArrays(1, &(*itm).second);
+
+					///create new VAO
+					_contextID2VAO[VAOKey(contextID, primitiveset)] = 0;
+					itm = _contextID2VAO.find(VAOKey(contextID, primitiveset));
+					
+
+					extensions->glGenVertexArrays(1, &(*itm).second);
+
+					///setup VAO
+					extensions->glBindVertexArray((*itm).second);
+
+					//bind vertex buffers
+					drawVertexArraysImplementation(renderInfo);
+				
+
+					//bind element buffer
+					GLBufferObject* ebo = primitiveset->getOrCreateGLBufferObject(state.getContextID());
+					state.bindElementBufferObject(ebo);
+
+					///end VAO setup
+					extensions->glBindVertexArray(NULL);
+					
+					state.lazyDisablingOfVertexAttributes();
+					state.applyDisablingOfVertexAttributes();
+		 
+
+				}
+				state.unbindVertexBufferObject();
+				state.unbindElementBufferObject();
+
+		}
+
     }
     else
     {
 <at>  <at>  -733,23 +779,68  <at>  <at> 

     State& state = *renderInfo.getState();

+	
     bool checkForGLErrors = state.getCheckForGLErrors()==osg::State::ONCE_PER_ATTRIBUTE;
     if (checkForGLErrors) state.checkGLErrors("start of Geometry::drawImplementation()");
+	if (_useVAO){

-    drawVertexArraysImplementation(renderInfo);
+		//drawVertexArraysImplementation(renderInfo);
+		ArrayDispatchers& arrayDispatchers = state.getArrayDispatchers();
+		GLExtensions* extensions = state.get<GLExtensions>();
+		//HACK 
+		//reset candidates to osg::Array::BIND_OVERALL as glColor can't be embed in VAOs
+		arrayDispatchers.activateColorArray(_colorArray.get());
+		arrayDispatchers.activateSecondaryColorArray(_secondaryColorArray.get());

-    if (checkForGLErrors) state.checkGLErrors("Geometry::drawImplementation() after vertex arrays setup.");
+		// dispatch any attributes that are bound overall
+		arrayDispatchers.dispatch(osg::Array::BIND_OVERALL, 0);
+	 
+		
+		for (unsigned int primitiveSetNum = 0; primitiveSetNum != _primitives.size(); ++primitiveSetNum)
+		{
+			// dispatch any attributes that are bound per primitive
+			bool bindPerPrimitiveSetActive = arrayDispatchers.active(osg::Array::BIND_PER_PRIMITIVE_SET);
+			if (bindPerPrimitiveSetActive)
arrayDispatchers.dispatch(osg::Array::BIND_PER_PRIMITIVE_SET, primitiveSetNum);
+			const PrimitiveSet* primitiveset = _primitives[primitiveSetNum].get();
+			
+			extensions->glBindVertexArray(_contextID2VAO[VAOKey(state.getContextID(), primitiveset)]);
+			
+			//HACK 
+			//problem with primitiveset embedding element buffer (we're here to avoid this using VAO)
+			//:( binding->draw(state,true/* usingVertexBufferObjects*/);
+			//so I add a new method in DrawElements
+			GLBufferObject* ebo = primitiveset->getOrCreateGLBufferObject(state.getContextID());
+			if (ebo)//assume DrawElements
+			((DrawElements*)primitiveset)->indexLessDraw(state, ebo->getOffset(primitiveset->getBufferIndex()));
+			else primitiveset->draw(state, true);//drawArray
+			

-    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-    //
-    // draw the primitives themselves.
-    //
-    drawPrimitivesImplementation(renderInfo);
+			extensions->glBindVertexArray(NULL);
+	
+		}

-    // unbind the VBO's if any are used.
-    state.unbindVertexBufferObject();
-    state.unbindElementBufferObject();
+		state.lazyDisablingOfVertexAttributes();
+		state.applyDisablingOfVertexAttributes();

+
+	}
+	else{
+		drawVertexArraysImplementation(renderInfo);
+
+		if (checkForGLErrors) state.checkGLErrors("Geometry::drawImplementation() after vertex
arrays setup.");
+
+		///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		//
+		// draw the primitives themselves.
+		//
+		drawPrimitivesImplementation(renderInfo);
+
+		// unbind the VBO's if any are used.
+		state.unbindVertexBufferObject();
+		state.unbindElementBufferObject();
+
+
+	}
     if (checkForGLErrors) state.checkGLErrors("end of Geometry::drawImplementation().");
 }

 <at>  <at>  -850,6 +941,49  <at>  <at> 
     }
 }

+class AttributeFunctorArrayVisitor : public ArrayVisitor
+{
+    public:
+
+        AttributeFunctorArrayVisitor(Drawable::AttributeFunctor& af):
+            _af(af),
+            _type(0) {}
+
+        virtual ~AttributeFunctorArrayVisitor() {}
+
+        virtual void apply(ByteArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(ShortArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(IntArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(UByteArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(UShortArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(UIntArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(Vec4ubArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(FloatArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(Vec2Array& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(Vec3Array& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(Vec4Array& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(DoubleArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(Vec2dArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(Vec3dArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(Vec4dArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+
+
+        inline void applyArray(Drawable::AttributeType type,Array* array)
+        {
+            if (array)
+            {
+                _type = type;
+                array->accept(*this);
+            }
+        }
+
+    protected:
+
+        AttributeFunctorArrayVisitor& operator = (const AttributeFunctorArrayVisitor&) { return *this; }
+        Drawable::AttributeFunctor&   _af;
+        Drawable::AttributeType       _type;
+};
+
 void Geometry::accept(AttributeFunctor& af)
 {
     AttributeFunctorArrayVisitor afav(af);
 <at>  <at>  -880,7 +1014,50  <at>  <at> 
     }
 }

+class ConstAttributeFunctorArrayVisitor : public ConstArrayVisitor
+{
+    public:

+        ConstAttributeFunctorArrayVisitor(Drawable::ConstAttributeFunctor& af):
+            _af(af),
+            _type(0) {}
+
+        virtual ~ConstAttributeFunctorArrayVisitor() {}
+
+        virtual void apply(const ByteArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const ShortArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const IntArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const UByteArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const UShortArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const UIntArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const Vec4ubArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const FloatArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const Vec2Array& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const Vec3Array& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const Vec4Array& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const DoubleArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const Vec2dArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const Vec3dArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+        virtual void apply(const Vec4dArray& array) {  if (!array.empty())
_af.apply(_type,array.size(),&(array.front())); }
+
+
+        inline void applyArray(Drawable::AttributeType type,const Array* array)
+        {
+            if (array)
+            {
+                _type = type;
+                array->accept(*this);
+            }
+        }
+
+protected:
+
+        ConstAttributeFunctorArrayVisitor& operator = (const ConstAttributeFunctorArrayVisitor&) {
return *this; }
+
+        Drawable::ConstAttributeFunctor&    _af;
+        Drawable::AttributeType             _type;
+};
+
 void Geometry::accept(ConstAttributeFunctor& af) const
 {
     ConstAttributeFunctorArrayVisitor afav(af);
Index: src/osg/PrimitiveSet.cpp
===================================================================
--- src/osg/PrimitiveSet.cpp	(revision 14800)
+++ src/osg/PrimitiveSet.cpp	(working copy)
 <at>  <at>  -164,6 +164,13  <at>  <at> 
     releaseGLObjects();
 }

+void DrawElementsUByte::indexLessDraw(State& state, GLsizeiptr indexstart) const{
+
+		if (_numInstances >= 1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_BYTE, (const
GLvoid *)indexstart/*ebo->getOffset(getBufferIndex()))*/, _numInstances);
+		else glDrawElements(_mode, size(), GL_UNSIGNED_BYTE, (const GLvoid *)indexstart/*ebo->getOffset(getBufferIndex()))*/);
+	
+
+}
 void DrawElementsUByte::draw(State& state, bool useVertexBufferObjects) const
 {
     GLenum mode = _mode;
 <at>  <at>  -219,7 +226,13  <at>  <at> 
 {
     releaseGLObjects();
 }
+void DrawElementsUShort::indexLessDraw(State& state, GLsizeiptr indexstart) const{

+		if (_numInstances >= 1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_SHORT, (const
GLvoid *)indexstart/*ebo->getOffset(getBufferIndex()))*/, _numInstances);
+		else glDrawElements(_mode, size(), GL_UNSIGNED_SHORT, (const GLvoid *)indexstart/*ebo->getOffset(getBufferIndex()))*/);
+	
+
+}
 void DrawElementsUShort::draw(State& state, bool useVertexBufferObjects) const
 {
     GLenum mode = _mode;
 <at>  <at>  -275,7 +288,13  <at>  <at> 
 {
     releaseGLObjects();
 }
+void DrawElementsUInt::indexLessDraw(State& state, GLsizeiptr indexstart) const{

+		if (_numInstances >= 1) state.glDrawElementsInstanced(_mode, size(), GL_UNSIGNED_INT, (const
GLvoid *)indexstart/*ebo->getOffset(getBufferIndex()))*/, _numInstances);
+		else glDrawElements(_mode, size(), GL_UNSIGNED_INT, (const GLvoid *)indexstart/*ebo->getOffset(getBufferIndex()))*/);
+	
+
+}
 void DrawElementsUInt::draw(State& state, bool useVertexBufferObjects) const
 {
     GLenum mode = _mode;
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Konstantin | 13 Mar 08:40 2015
Picon

osg::Callback's serializer fix for static build

Hi, Robert!

Small fix for OSG 3.3.6.119 in the attachment.

One line added in osg/LibraryWrapper.cpp

USE_SERIALIZER_WRAPPER(Callback)


Konstantin Matveyev

Attachment (LibraryWrapper.cpp): text/x-c++src, 7266 bytes
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Voerman, L. | 12 Mar 17:29 2015
Picon

missing picks while picking flat objects

Hi Robert,

attached is a zip with a modified version of:
OpenSceneGraph\src\osgUtil\LineSegmentIntersector.cpp

Here in the Netherlands we have some very flat land, and we had some problems with the picking 
not returning a hit at all. After a lot of debugging I found out that the picker optimizes the 
bounding box for the current object, and rejects the pick if it's outside the box. However, when the 
box has height zero a lot of picks get rejected on numeric errors. I propose a fix by disableing the 
box test, as I think there is no possibility to generate a hit outside the bbox except by rounding errors.
We acutally have been using this fix with the stable tree for quite some time now, but I think it should 
only be merged into the svn tree.

Tested with Visual Studio Express 2013 on 64bit windows 7

This patch applies the svn tree only, the file in the stable tree has some differences.


Regards, Laurens Voerman.

Attachment (LineSegmentIntersector.zip): application/zip, 7327 bytes
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Voerman, L. | 12 Mar 16:47 2015
Picon

link debug dicom libraries AND FORCE:MULTIPLE for MSVC

Hi Robert,

attached is a zip with a modified version of:
OpenSceneGraph\src\osgPlugins\dicom\CMakeLists.txt

This version links to the debug version of the openEXR libraries, 
useful for better debuggin and to avoid warnings from MSVC.

Also added a /FORCE:MULTIPLE for MSVC to the DCMTK_FOUND version, I don't have ITK 
currently availble to test the ITK_FOUND version - leaving that unchanged for the moment.

Tested with Visual Studio Express 2013 on 64bit windows 7

This patch applies to both the svn and the 3.2 stable tree.


Regards, Laurens Voerman.
Attachment (dicom_CMakeLists.zip): application/zip, 1203 bytes
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Voerman, L. | 12 Mar 16:36 2015
Picon

debug version exr plugin should link debug exr libraries

Hi Robert,

attached is a zip with a modified version of:
OpenSceneGraph\src\osgPlugins\exr\CMakeLists.txt

This version links to the debug version of the openEXR libraries, 
useful for better debuggin and to avoid warnings from MSVC.

Tested with Visual Studio Express 2013 on 64bit windows 7

This patch applies to both the svn and the 3.2 stable tree.


Regards, Laurens Voerman.

Attachment (exr_CMakeLists.zip): application/zip, 518 bytes
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Konstantin | 12 Mar 12:25 2015
Picon

MorphGeometry problem in the 3.3.6 devel release

Hello!

I have a problem with morph geometry after conversion to osgb(t).

# OSG_OPTIMIZER=OFF osgconv osg-data/morphing.osg morphing.osgb(t)

osganimationviewer morphing.osg morph the face.
osganimationviewer morphing.osgb(t) do not morph the face.

What in can be?
Same operations in 3.2.1 are working!


PS
Changing in the morphing.osgt
UseVertexBufferObjects TRUE -> FALSE
doesn't work.

on Linux

_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Voerman, L. | 12 Mar 12:02 2015
Picon

FindFBX.cmake for fbx 2015.1

Hi Robert,

attached is a zip with a modified version of:
OpenSceneGraph\CMakeModules\FindFBX.cmake

This version can find fbx sdk 2015.1 and will prefer it over older versions. 

Tested with Visual Studio Express 2013 on 64bit windows 7

This patch applies to both the svn and the 3.2 stable tree.


Regards, Laurens Voerman.
Attachment (FindFBX.zip): application/zip, 1564 bytes
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
Mattias Helsing | 12 Mar 11:08 2015
Picon

osgjs plugin fails to build with android-ndk

Hi Robert,
The new osgjs plugin fails to build due to usage of std::isfinite and
std::isinf. See:
http://cdash.openscenegraph.org/index.php?project=OpenSceneGraph&date=2015-03-12

The code is correct; the problem is that stlport (embedded in
android-ndk) doesn't put these functions in the std namespace but in
global one. See this thread:
https://code.google.com/p/android/issues/detail?id=34793
I'm using android-ndk-r7c and I haven't tested other ndk

This submission adds some ugle ifdefs to make the android build
succeed. An alternative would be to import std::isfinite and
std::isinf into the global namespace for non-android builds. Do as you
prefer, the submission at least identify the problem.
I also took the liberty to copy the license text from other header to
json_stream

cheers
Mattias
Attachment (json_stream): application/octet-stream, 13 KiB
_______________________________________________
osg-submissions mailing list
osg-submissions@...
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Gmane