Re: [Opensg-users] Build problems with boost

2017-01-23 Thread Carsten Neumann
Hello,

On 2017-01-23 11:21, Andy Somogyi wrote:
> I’m trying to build opensg on MacOS 10.12 Sierra, and it fails when trying 
> accessing boost.
> What version of boost is opensg supposed to work with?. I’m using 1.63.0 
> installed from Brew.

I usually just use what comes with the linux distro, in my case that is 
currently still Fedora 23, that would mean boost 1.59.0 (I think).

> Boost it built without C++11 support, and I try to build Opensg the same way, 
> i.e. disabling C++11.
> I’m using Clang 8.0.
>
> On another note, how does opensg compare complexity wise to openscenegraph. 
> Reason I ask is I’m looking for a simple scene graph library that does not 
> add a significant amount on top of OpenGL, I’m looking to stay as simple and 
> as close to the underlying OpenGL as possible.

I'm not deeply familiar with OpenSceneGraph. I would imagine the level 
of abstraction is somewhat comparable. In general scene graphs have 
fallen a bit out of favor and game engines become more popular as the 
basis for interactive applications. What makes the most sense (as ever 
;) ) depends on your application.

> /Users/andy/src/opensg/Source/Base/Base/OSGAtomic.h:72:27: error: no member 
> named 'atomic_exchange_and_add' in namespace 'boost::detail'
> return boost::detail::atomic_exchange_and_add(pValue, rcDelta);
>~~~^
> /Users/andy/src/opensg/Source/Base/Base/OSGAtomic.h:81:37: error: cannot 
> initialize a parameter of type 'atomic_int_least32_t *'
>   (aka '_Atomic(boost::int_least32_t) *') with an lvalue of type 
> 'RefCountStore *' (aka 'int *')
> boost::detail::atomic_increment(pValue);
> ^~
> /usr/local/include/boost/smart_ptr/detail/sp_counted_base_clang.hpp:29:54: 
> note: passing argument to parameter 'pw' here
> inline void atomic_increment( atomic_int_least32_t * pw )

Hmm, looks like this is making use of boost atomic internals which 
appear to have changed in more recent boost. This would require a little 
bit of investigation to find out what the replacement should be.

Cheers,
Carsten


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users


Re: [Opensg-users] OpenSG2: Accumulated changes... part 3: texture

2017-01-23 Thread Johannes

Hello Carsten,

On 21.01.2017 00:01, Carsten Neumann wrote:
> Can you adjust the changes to TextureBuffer/LayeredTextureBuffer
> to be in line with the above? Thanks!

here we go :-)

Best Johannes


diff -rupN ./opensg_org/Source/System/State/Base/OSGTextureObjChunk.cpp 
./opensg_texture/Source/System/State/Base/OSGTextureObjChunk.cpp
--- ./opensg_org/Source/System/State/Base/OSGTextureObjChunk.cpp
2017-01-16 11:34:55.022138400 +0100
+++ ./opensg_texture/Source/System/State/Base/OSGTextureObjChunk.cpp
2016-09-26 12:15:54.703999700 +0200
@@ -480,7 +480,8 @@ void TextureObjChunk::handleTexture(Wind
 }
 
 if((imgtarget == GL_TEXTURE_1D_ARRAY ||
-imgtarget == GL_TEXTURE_2D_ARRAY  )  &&
+imgtarget == GL_TEXTURE_2D_ARRAY ||
+imgtarget == GL_TEXTURE_CUBE_MAP_ARRAY)  &&
!win->hasExtOrVersion(_extTextureArray, 0x0300))
 {
 FWARNING(("texture arrays not supported on Window %p!\n",
@@ -596,18 +597,21 @@ void TextureObjChunk::handleTexture(Wind
 glTexParameteri(paramtarget, GL_TEXTURE_MAG_FILTER, 
getMagFilter());
 glTexParameteri(paramtarget, GL_TEXTURE_WRAP_S, getWrapS());
 
-if(paramtarget == GL_TEXTURE_2D   ||
-   paramtarget == GL_TEXTURE_2D_ARRAY ||
-   paramtarget == GL_TEXTURE_3D   ||
-   paramtarget == GL_TEXTURE_CUBE_MAP_ARB ||
-   paramtarget == GL_TEXTURE_RECTANGLE_ARB )
+if(paramtarget == GL_TEXTURE_2D ||
+   paramtarget == GL_TEXTURE_2D_ARRAY   ||
+   paramtarget == GL_TEXTURE_3D ||
+   paramtarget == GL_TEXTURE_CUBE_MAP_ARB   ||
+   paramtarget == GL_TEXTURE_CUBE_MAP_ARRAY ||
+   paramtarget == GL_TEXTURE_RECTANGLE_ARB   )
 {
 glTexParameteri(paramtarget, GL_TEXTURE_WRAP_T, getWrapT());
 }
 
-if(paramtarget == GL_TEXTURE_2D_ARRAY ||
-   paramtarget == GL_TEXTURE_3D   ||
-   paramtarget == GL_TEXTURE_CUBE_MAP_ARB  )
+if(paramtarget == GL_TEXTURE_2D_ARRAY   ||
+   paramtarget == GL_TEXTURE_3D ||
+   paramtarget == GL_TEXTURE_CUBE_MAP_ARB   ||
+   paramtarget == GL_TEXTURE_CUBE_MAP_ARRAY  )
+   
 {
 glTexParameteri(paramtarget, GL_TEXTURE_WRAP_R, getWrapR());
 }
@@ -748,6 +752,7 @@ void TextureObjChunk::handleTexture(Wind
 break;
 case GL_TEXTURE_3D:
 case GL_TEXTURE_2D_ARRAY:
+case GL_TEXTURE_CUBE_MAP_ARRAY:
 osgGlCompressedTexImage3D(
 imgtarget, 
 i - baseLevel, 
@@ -802,6 +807,7 @@ void TextureObjChunk::handleTexture(Wind
 break;
 case GL_TEXTURE_3D:
 case GL_TEXTURE_2D_ARRAY:
+case GL_TEXTURE_CUBE_MAP_ARRAY:
 osgGlTexImage3D(imgtarget, 
 i - baseLevel, 
 internalFormat,
@@ -1124,6 +1130,7 @@ void TextureObjChunk::handleTexture(Wind
break;
case GL_TEXTURE_3D:
case GL_TEXTURE_2D_ARRAY:
+   case GL_TEXTURE_CUBE_MAP_ARRAY:
osgGlCompressedTexImage3D(imgtarget, 0, 
  internalFormat,
  osgNextPower2(width),
@@ -1192,6 +1199,7 @@ void TextureObjChunk::handleTexture(Wind
break;
case GL_TEXTURE_3D:
case GL_TEXTURE_2D_ARRAY:
+   case GL_TEXTURE_CUBE_MAP_ARRAY:
osgGlTexImage3D(imgtarget, 
0, 
internalFormat,
@@ -1269,6 +1277,7 @@ void TextureObjChunk::handleTexture(Wind
 break;
 case GL_TEXTURE_3D:
 case GL_TEXTURE_2D_ARRAY:
+case GL_TEXTURE_CUBE_MAP_ARRAY:
 osgGlCompressedTexImage3D(imgtarget, 0, 
   internalFormat,
   width, height, depth, 
@@ -1315,6 +1324,7 @@ void TextureObjChunk::handleTexture(Wind
 break;
 case GL_TEXTURE_3D:
 case