[osg-users] [build] Preprocessor macros / OSX

2009-03-20 Thread Hartwig Wiesmann
Hi, what is the official preprocessor macro to define the OSX platform? It seems to me that only __APPLE__ is used. Therefore, there is no distinction between Cocoa and Carbon? Thank you. Hartwig -- Read this topic online here:

Re: [osg-users] [vpb] Error during compiling VirtualPlanetBuilder

2009-11-24 Thread Hartwig Wiesmann
Hi, how did you solve the problem of the compiler errors? I also still get them! Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20313#20313 ___ osg-users mailing list

[osg-users] osgterrain example and required input file

2009-11-27 Thread Hartwig Wiesmann
Hi, what kind of input file does the osgterrain example expect? BTW: what is a master file in this context?? Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20501#20501

[osg-users] osgterrain example and camera position

2009-11-28 Thread Hartwig Wiesmann
Hi, I am calling the osgterrain example only with the argument --image land_shallow_topo_2048.jpg. The earth is now displayed on the left edge of my window/screen. If I am adding lines parallel to the coordinate axes x, y and z with a length of 10e6 the whole scene is centered. From my

Re: [osg-users] osgterrain example and camera position

2009-11-28 Thread Hartwig Wiesmann
Hi, sorry, I meant of course a length of 20e6 symmetric to (0, 0, 0). Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20523#20523 ___ osg-users mailing list

Re: [osg-users] [build] Preprocessor symbols / definitions and descriptions

2009-12-04 Thread Hartwig Wiesmann
Hi Robert, thanks for the reply. I do not use makefiles on any of the supported platforms (actually, I do not use any terminal dependent software if I can prevent it). Therefore, I need to know which platform uses which macros or defines. Furthermore, I really dislike to use libraries out of

[osg-users] osgTerrain::ProxyLayer

2009-12-04 Thread Hartwig Wiesmann
Hi, a newbie question: what is the purpose of osgTerrain::ProxyLayer? Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20913#20913 ___ osg-users mailing list

[osg-users] Looking for recommendation for (Paged)LODs and terrain visualization

2009-12-04 Thread Hartwig Wiesmann
Hi, I am looking for a recommendation how to implement best the following problem using OSG: assume that I have terrain data in a (paged) LOD using a specific coordinate system. Now, I want to visualize the same terrain data that is stored in coordinate system A in coordinate system B or by

Re: [osg-users] Looking for recommendation for (Paged)LODs and terrain visualization

2009-12-05 Thread Hartwig Wiesmann
Hi Robert, hi Glen, with different coordinate systems I meant different types of coordinate systems or spatial reference systems: polar, UTM etc. The data amount is about 100 GB. So, if I like to support the most popular types of coordinate systems I am getting too big. So, my currently best

Re: [osg-users] Looking for recommendation for (Paged)LODs and terrain visualization

2009-12-06 Thread Hartwig Wiesmann
Hi Glenn, yes, that's what I planned to do. I am just evaluating osgEarth. Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20971#20971 ___ osg-users mailing list

[osg-users] [vpb] how to create valid terrain database?

2009-12-06 Thread Hartwig Wiesmann
Hi, I am using osgdem 0.9.10 with the following arguments: osgdem --xx 10 --yy 10 -t ps_texture_16k.tif\ --xx 10 --yy 10 -d ps_height_16k.tif\ -v 0.1 --terrain -o test.osg Unfortunately, this does not produce anything useful. So, it seems to be that an argument is missing to create a valid

Re: [osg-users] [vpb] how to create valid terrain database?

2009-12-06 Thread Hartwig Wiesmann
Hi, sorry, but with anything useful I meant that osgviewer test.osg is not displaying anything and it seems to be that no height data is stored in the database. Thank you! Cheers, Hartwig -- Read this topic online here:

Re: [osg-users] [vpb] how to create valid terrain database?

2009-12-07 Thread Hartwig Wiesmann
Hi Robert, I just added the backslashes here in the text to prevent unwanted line breaks. The real command is written in one line with the appropriate spaces. So, this is not the problem! Cheers, Hartwig -- Read this topic online here:

[osg-users] Bug in osg::Texture::computeInternalFormatWithImage / osg::Image

2010-03-14 Thread Hartwig Wiesmann
Hi, assume you create a picture using GL_BGRA format using osg::Image::allocateImage(int s,int t,int r,GLenum format,GLenum type, int packing) or you set the format with osg::Image::setInternalTextureFormat. Both methods do not check if the internal texture format is valid. Calling

[osg-users] Bug in osg::Texture::computeInternalFormatWithImage / osg::Image

2010-03-14 Thread Hartwig Wiesmann
Hi, sorry, it should read Calling osg::Texture::computeInternalFormatWithImage then results in an invalid texture format Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25629#25629

[osg-users] Bug in osg::Texture::computeInternalFormatWithImage / osg::Image

2010-03-15 Thread Hartwig Wiesmann
Hi Robert, OK, I can agree with this. But currently you do not get a feedback that you did something wrong. At least I would suggest that an error message is issued somewhere in the code if the internal format is set to a valid that is not OpenGL compliant. At the moment you get only the

[osg-users] Bug in osg::Texture::computeInternalFormatWithImage / osg::Image

2010-03-16 Thread Hartwig Wiesmann
Hi Robert, enabling attribute checking does not help in this case because the state attribute setting itself is not causing the error. wxTexImageXX is going to fail and this function also reports the invalid enumerator error. As far as I can see there is nowhere code in OSG that allows

Re: [osg-users] Multi screen display issue

2010-03-17 Thread Hartwig Wiesmann
Hi, I would also like to know it because on the Mac there is a bug. If I have two monitors connected next to each other (left and right) the right part of the picture is displayed on the left and vice versa! Cheers, Hartwig -- Read this topic online here:

[osg-users] osgtexture1d example / osg::TexGenNode order

2010-04-19 Thread Hartwig Wiesmann
Hi, in the osgtexture1d example the node construction is done like this: root-addChild(loadedModel); // having attached a stateset using a 1d texture root-addChild(texGenNode); Why is this working? I would expect an order like: root-addChild(texGenNode); texGenNode-addChild(loadedModel);

Re: [osg-users] osgtexture1d example / osg::TexGenNode order

2010-04-20 Thread Hartwig Wiesmann
Hi Robert, yes, this is what I understand, I think. But that means the example relies on the fact that children added to a parent are ordered in the same way as they are added. So, root-addChild(texGenNode); root-addChild(loadedModel); should not work, or? Thank you! Cheers, Hartwig

Re: [osg-users] newbie question about osgTerrain yet again

2010-04-20 Thread Hartwig Wiesmann
Hi Anton, the current implementation is not using the height as an index for the contour but the x-coordinate (as you mentioned). You did nothing wrong. If somebody is interested I can provide a patch. Cheers, Hartwig -- Read this topic online here:

[osg-users] osgviewer::GraphicsWindowCarbon and wxWidgets conflict

2010-05-13 Thread Hartwig Wiesmann
Hi, osgViewer::GraphicsWindowCarbon and wxWidgets do not work well together on Mac OSX in case you are using dynamic wxWidget event handlers (event handlers that are linked by using wxEvtHandler::Connect). The quit-event is not caught by wxWidgets but is handled by OSG. And this means that

Re: [osg-users] osgviewer::GraphicsWindowCarbon and wxWidgets conflict

2010-05-13 Thread Hartwig Wiesmann
Hi Stephan, yes, this would help in case a window is open having an OpenGL context. But in the Carbon version OSG also takes all quit events in case no window or other windows are open. Cheers, Hartwig -- Read this topic online here:

Re: [osg-users] osgviewer::GraphicsWindowCarbon and wxWidgets conflict

2010-05-14 Thread Hartwig Wiesmann
Hi Stephan, I just tried 2.9.6 and there the quit event is still initialized in the static variable initialization part. And I think there is no way around it (or only a bit tricky one) because this handler is also not associated with any window. And it can only be initialized once (so you

[osg-users] LineStipple / binding to vertex

2010-05-27 Thread Hartwig Wiesmann
Hi, it seems to be that OSG is not supporting to bind LineStipple to a vertex (like it can be done with the colour) in the state set. Is there any workaround to change the stippling within a line strip for example? Thank you! Cheers, Hartwig -- Read this topic online here:

Re: [osg-users] How to check visibility of a point

2010-06-03 Thread Hartwig Wiesmann
Hi Nick, Thank you for your answer! Actually, I did not know this class. But unfortunately it cannot be used, I suppose. I want to test the visibility of a point and depending on the result I want to draw another geometry. osg::OcclusionQueryNode tests all its children. So, I cannot add the

Re: [osg-users] Dynamic Terrain

2010-11-22 Thread Hartwig Wiesmann
Hi, a contour layer assigns to a height value a color value. Therefore, you can use the layer to visualize terrain contours, respectively areas of equal height. Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33954#33954

[osg-users] LOD chicken and egg problem

2010-12-05 Thread Hartwig Wiesmann
Hi, assume I have an LOD node. The children of this LOD node are geodes having as drawables only text objects. Something like this Code: lodPtr = new osg::LOD(); ... // some initializations textPtr = new osg::Text(); ... // some initializations geodePtr = new osg::Geode();

[osg-users] Is caching in osg::Drawable and osg::Node getBound() methods error free?

2010-12-05 Thread Hartwig Wiesmann
Hi, The current code for the getBound() methods are like this Code: inline const BoundingBox getBound() const { if(!_boundingBoxComputed) { _boundingBox = _initialBound; if (_computeBoundCallback.valid())

[osg-users] Dynamic PagedLOD node creation

2013-03-02 Thread Hartwig Wiesmann
Hi, I would like to create dynamically PageLOD nodes whenever a node within a certain LOD range is displayed. Example: Code: pagedLOD-AddChild(modelL1,100.0f,FLT_MAX); pagedLOD-AddChild(modelL2,0.0f,100.0f); Whenever the node modelL2 is displayed I would like to have a callback in which

Re: [osg-users] Dynamic PagedLOD node creation

2013-03-02 Thread Hartwig Wiesmann
Hi Aurelian, hi Chris, thanks for the tip. I did not understand the pseudo-loader concept so far but now I got the idea! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52933#52933

[osg-users] OpenGL ES 2.0 and shaders

2013-03-02 Thread Hartwig Wiesmann
Hi, it seems to be that OSG creates in ShaderGenCache::createStateSet the shader statement gl_FrontColor = gl_Color; if the state mask is not set. But when using OpenGL ES 2.0 gl_FrontColor does not exist. Is this a bug or am I missing anything? Cheers, Hartwig -- Read this

[osg-users] OpenGL ES 2.0 and static libraries - compiler error (bug?)

2013-03-03 Thread Hartwig Wiesmann
Hi, GLStaticLibrary.cpp defines the function void initGLES2ProcAddress(); even if GLES2 is not defined. This leads to some compiling errors because some functions do not exist in OpenGL ES 1. I think initGLES2ProcAddrees() should be surrounded by #ifdef OSG_GLES2_AVAILABLE ... #endif

[osg-users] [OpenGL ES] Bug in loading textures

2011-10-08 Thread Hartwig Wiesmann
Hi, Texture::applyTexImage2D_load (...) calls in case of mipmapping for uncompressed images (file Texture.cpp line 1931 of the source code in trunk) Code: glTexImage2D( target, 0, _internalFormat, inwidth, inheight, _borderWidth, (GLenum)image-getPixelFormat(),

Re: [osg-users] [OpenGL ES] Bug in loading textures

2011-10-08 Thread Hartwig Wiesmann
Hi, just found out that I can also patch Texture::computeInternalFormatWithImage(const osg::Image) const so that it returns valid OpenGL ES formats (in case OpenGL ES is used). Cheers, Hartwig -- Read this topic online here:

Re: [osg-users] [OpenGL ES] Bug in loading textures

2011-10-08 Thread Hartwig Wiesmann
Hi, this is my patch for Texture::computeInternalFormatWithImage(...) replacing lines 1435 - 1442: Code: // GLES doesn't cope with some internal OpenGL formats so map them to the appropriate equivalents. #if defined(OSG_GLES1_AVAILABLE) || defined(OSG_GLES2_AVAILABLE) switch

[osg-users] [OpenGL ES] Bug in drawing primitive sets using DrawElementsUInt

2011-10-08 Thread Hartwig Wiesmann
Hi, DrawElementsUInt::draw(...) tries to draw elements also in OpenGL ES. But in OpenGL ES glDrawElements(...) does not support GL_UNSIGNED_INT. Therefore, the class DrawElementsUInt should be disabled for OpenGL ES applications or all its methods should not do anything but triggering an error

[osg-users] osgText and getting fonts on OS X becoming difficult

2012-03-19 Thread Hartwig Wiesmann
Hi, it is becoming more and more difficult to obtain the filenames of fonts in OS X. Actually, it seems to be that all system functions are depreciated that obtain from a font object (like NSFont) the font's filename (directly or indirectly). What do you do to get from a native font object in

[osg-users] PixelBuffer Cocoa - Meaning of output message?

2012-03-19 Thread Hartwig Wiesmann
Hi, in osgView::PixelBufferCocoa::realizeImplementation there is a line Code: std::cout PixelBufferCocoa :: realizeImplementation not implemented yet std::endl; Isn't this message obsolete? At least it seems to me that the method is implemented. Thank you! Cheers, Hartwig

[osg-users] [build] Compiling error for OpenGLES

2015-03-08 Thread Hartwig Wiesmann
Hi, I think that the commit on 2015-01-21 16:35 for PolygonMode.cpp is not valid for OpenGLES because glPolygonMode is not available for OpenGLES. Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62995#62995

Re: [osg-users] [build] Compiling error for OpenGLES

2015-03-08 Thread Hartwig Wiesmann
Sorry, did not have the latest OSG version. Issue has been solved on 2015-03-03. Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62996#62996 ___ osg-users mailing list

[osg-users] Version 3.3.6 and OpenGLES / error in shaders

2015-03-08 Thread Hartwig Wiesmann
Hi, when running simpleExample on iOS I get shader errors because on GLES variables like gl_Vertex, gl_LightSource etc. are undefined. Or? Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62997#62997

Re: [osg-users] LOD node is culling my visible child nodes / depends on number of child nodes

2015-02-27 Thread Hartwig Wiesmann
Hi, thank you for your reply! Actually, culling was not the reason but my understanding of how the LOD node works. I thought that the LOD node applies the distance calculation of the LOD to each child's bounding sphere center. But it seems to be that the distance calculation is done for the

[osg-users] Nasty bug when compiling for Mac OS X or iOS

2015-02-23 Thread Hartwig Wiesmann
Hi, if compiling OSG for OS X or iOS there is a nasty bug in the std::map library. This bug only exists when the C++ language dialect is C++98, GNU++ 98 or when using the compiler's default dialect. Due to this bug assignments like Code: aMap = aMap clear the content of aMap. This bug can

Re: [osg-users] Nasty bug when compiling for Mac OS X or iOS

2015-02-23 Thread Hartwig Wiesmann
Hi, the allocate modification definitely works because I already implemented it by myself. For the others I do not have a test case at hand but should work, too. Thank you! Cheers, Hartwig -- Read this topic online here:

Re: [osg-users] Nasty bug when compiling for Mac OS X or iOS

2015-02-25 Thread Hartwig Wiesmann
Hi, working. Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=62825#62825 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] LOD node is culling my visible child nodes / depends on number of child nodes

2015-02-25 Thread Hartwig Wiesmann
Hi, I have two LOD nodes. One LOD node has one child node the other one has - for example - 1000 children. All children of both nodes have the same range settings (0 - maxValue). The single child of the LOD node is shown on the scene. Children in the vicinity of this single child - but part of

Re: [osg-users] How to render (sub-)graph only into depth buffer?

2016-12-17 Thread Hartwig Wiesmann
Hi, sorry, my fault. I messed up the rendering order. If the sphere is rendered first, it works. Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69699#69699 ___

Re: [osg-users] [build] x86_64, cmd line, built OK - but warning in Xcode

2017-01-05 Thread Hartwig Wiesmann
Hi Robert, I fully agree with you! But would you mind if I submit patches that at least remove some warnings of existing code by adding an appropriate cast (the code with and without the cast should be identical)? I am especially concerned about header files because then the warnings are also

[osg-users] Visualization of billboards depending on pre-conditions

2017-01-07 Thread Hartwig Wiesmann
Hi, I would like to show a complete billboard when a certain part of the billboard is visible. Although other parts may be (partially) hidden by other items. Example: assume that the billboard is a sign consisting out of a foot, pole and the sign itself. Whenever the foot is visible (depth

Re: [osg-users] How to render (sub-)graph only into depth buffer?

2017-01-07 Thread Hartwig Wiesmann
Hi, isn't it also a viable solution to use a slave camera that just pre-renders its depth related scene into the depth buffer and use the main camera to render the real scene afterwards? Both cameras operate on the same context. Though I do not know whether it causes any problems. Cheers,

[osg-users] Visual flicker when using multi-pass technique, related to frustum?

2017-01-07 Thread Hartwig Wiesmann
Hi, I have two graphs that have completely different content. One is used for initialising the depth buffer, the other one for showing the scene. Code: visibleGraphPtr = ... depthGraphPtr = ... depthGraphPtr->getOrCreateStateSet()->setAttributeAndModes(new

Re: [osg-users] Visualization of billboards depending on pre-conditions

2017-01-08 Thread Hartwig Wiesmann
Hi, yes, this is an idea. But as a first step I have to estimate a suitable area location and size for the passes. I do not like the idea of ray checking because I think that it is rather slow. Especially when I have to do the checks for a lot of billboards. Thank you! Cheers, Hartwig

Re: [osg-users] [build] x86_64, cmd line, built OK - but warning in Xcode

2016-12-29 Thread Hartwig Wiesmann
Hi, I know that these compiler warnings are not critical but I find them still annoying and I think it is also not a good programming style to use the "wrong" integer type. I also know that a simple modification might break some code (especially for virtual methods). But wouldn't it be in

Re: [osg-users] Visualization of billboards depending on pre-conditions

2017-01-08 Thread Hartwig Wiesmann
Hi Tian, an occlusion query is difficult because the scene is continuously changing. Ad Robert: drawing the sign itself is not the issue. I would either like to see the sign completely or not at all. I will do some tests with multi-passes. Thank you! Cheers, Hartwig -- Read

Re: [osg-users] glsl version 130 not supported (and related problems)

2016-12-21 Thread Hartwig Wiesmann
Hi, did you solve your issue? In case you are using osgViewer's GraphicsWindowCocoa class there has once been a change in OSG: it explicitely specifies the OpenGL core version 4.1. If you specify the legacy version you should be fine. You can find the line for patching in

Re: [osg-users] Capture image on iOS get black image

2016-12-28 Thread Hartwig Wiesmann
Hi, glReadPixels is not supported by iOS. Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69782#69782 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] How to render (sub-)graph only into depth buffer?

2016-12-16 Thread Hartwig Wiesmann
Hi, I would like to fill the depth buffer with the data of a rendered subgraph. The subgraph itself should not be visible in the view. Afterwards, I want to render another - and now visible - subgraph that uses (and modifies) the previously filled depth buffer. How can I do this? I wrote a

Re: [osg-users] Visual flicker when using multi-pass technique, related to frustum?

2017-01-15 Thread Hartwig Wiesmann
Hi Robert, I have also removed the near/far computation from the main camera. Now, there is no flicker anymore. Do you have an idea why the near/far computation of the main camera only causes problems? How can I overcome this issue? Cheers, Hartwig -- Read this topic online

Re: [osg-users] Does OSG work on Mac OS?

2017-09-26 Thread Hartwig Wiesmann
Hi, I am using OSG on OS X without problems. But I am using OSG version 3.2 (did not test the newest version, yet). ... and I am not using any of the CMake files but compiling the source using my own Xcode project... Cheers, Hartwig -- Read this topic online here:

Re: [osg-users] META_object macro returning osg::Object* for cloneType and clone

2017-11-28 Thread Hartwig Wiesmann
Hi Robert, I already feared that it had to do with non-compliant compilers. It seems to be that I have already been in the lucky situation that all my compilers did never have any problems with this issue. Though I think / hope that all current C++ compilers should be able to compile this

Re: [osg-users] META_object macro returning osg::Object* for cloneType and clone

2017-11-25 Thread Hartwig Wiesmann
Hi, yes and no, you can change the return type though. Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72458#72458 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] META_object macro returning osg::Object* for cloneType and clone

2017-11-26 Thread Hartwig Wiesmann
Hi, if you have a list of pointer of derived classes from osg::Object and you would like to clone them you always have to cast them. And I like to prevent casts as often as possible. Example: if you clone a StateAttribute you get back a pointer to an Object although you know (and the compiler

[osg-users] META_object macro returning osg::Object* for cloneType and clone

2017-11-25 Thread Hartwig Wiesmann
Hi, is there any reason why clone(const omg::CopyOp&) and cloneType() are returning osg::Object* and not name*? Does changing the macro break any existing code? I do not think so but may be that I am overlooking something. Thank you! Cheers, Hartwig -- Read this topic online

[osg-users] Serialization and multiple inheritance

2017-12-18 Thread Hartwig Wiesmann
Hi, I am writing a wrapper for my own object that uses multiple inheritance. What do I have to mention in the inheritance relation section of REGISTER_OBJECT_WRAPPER? Do I have to take special care in case the object uses virtual base classes? Thank you! Cheers, Hartwig --

Re: [osg-users] Crash in ReaderWriterCURL::readFile when used with DatabasePager

2017-12-18 Thread Hartwig Wiesmann
Hi Robert, I am using 3.4.2. I already checked GIT but could not find any modification in ReaderWriterCurl that is relevant. Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72601#72601

Re: [osg-users] Crash in ReaderWriterCURL::readFile when used with DatabasePager

2017-12-18 Thread Hartwig Wiesmann
Hi Robert, I did some further investigations: I added in ReaderWriterCURL::readFile an atomic counter and stopped in the debugger whenever the atomic counter reaches 2 (means 2 threads are running at the same time an instance of ReaderWriterCURL::readFile). The debugger showed clearly that

[osg-users] Crash in ReaderWriterCURL::readFile when used with DatabasePager

2017-12-17 Thread Hartwig Wiesmann
Hi, I am using PagedLOD together with a pseudo-loader to load files via the network. To load the files the ReaderWriterCURL class is used. The database pager is set up with one general and one HTTP thread. This means that the ReaderWriterCURL::readFile(ObjectType, const std::string&, const

Re: [osg-users] Potential bug in ref_ptr::assign

2017-10-25 Thread Hartwig Wiesmann
Hi Robert, please do not understand me wrong: I fully understand what is meant but I have my doubts that highly optimising compilers are clever enough. Anyway, thanks for your good work! Cheers, Hartwig -- Read this topic online here:

[osg-users] Potential bug in ref_ptr::assign

2017-10-24 Thread Hartwig Wiesmann
Hi, in ref_ptr you find the following code: Code: template void assign(const ref_ptr& rp) { if (_ptr==rp._ptr) return; T* tmp_ptr = _ptr; _ptr = rp._ptr; if (_ptr) _ptr->ref(); // unref second to prevent any deletion

[osg-users] Shader composition with multiple function injection

2018-05-12 Thread Hartwig Wiesmann
Hi, I had a look at the shader composition example. The main shader looks like this: Code: #pragma import_defines ( LIGHTING, TEXTURE_2D, VERTEX_FUNC(v) ) #ifdef LIGHTING // forward declare lighting computation, provided by lighting.vert shader void directionalLight( int lightNum, vec3 normal,

[osg-users] Serialization differences between ASCII and XML

2017-12-27 Thread Hartwig Wiesmann
Hi, wrote a simple serialiser for the output of a range: Code: namespace { bool checkGeographicRange(osgPlanetCore::GeodeticData const&) { return true; } bool readGeographicRange(osgDB::InputStream& inputStream, osgPlanetCore::GeodeticData&

[osg-users] Serialization with virtual base classes

2017-12-23 Thread Hartwig Wiesmann
Hi, I already asked a similar question a few days ago but did not get an answer. I try to be a bit more specific. Assume I have the following definitions: Code: class VirtualBaseClass : public osg::Object { }; class A : virtual public VirtualBaseClass { }; class B : virtual public

[osg-users] XML serialisation issues / examples

2018-01-15 Thread Hartwig Wiesmann
Hi, as previously mentioned there are some issues when using serialisation with XML. Here is a small code snippet: Code: #define USE_BRACKETS 1 #define USE_USER_SERIALIZER 1 namespace TestOSG { class TestStruct : public osg::Object { public:

Re: [osg-users] XML serialisation issues / examples

2018-01-16 Thread Hartwig Wiesmann
Hi Robert, I did the tests using 3.4.2 and had a look at source files of a more recent version (3.5.x) but did not find any real differences. The ASCII and binary files - according to my experience and usage - seem to be OK. Cheers, Hartwig -- Read this topic online here:

[osg-users] Online documentation not available

2018-02-03 Thread Hartwig Wiesmann
Hi, it seems to be that the server for the online documentation is not available. Has the server been switched off or is it temporarily not available? Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72912#72912

Re: [osg-users] Online documentation not available

2018-02-04 Thread Hartwig Wiesmann
Hi, I used the ones on this page: http://www.openscenegraph.org/index.php/documentation/guides/reference-guides Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72924#72924

Re: [osg-users] Online documentation not available

2018-02-05 Thread Hartwig Wiesmann
Hi Jordi, thanks for updating the links! This does not belong to the original topic but is similar. Besides looking for documentation a lot of people look at the download links. Here also very old links are mentioned (to SVN repos) for stable and developer releases. I think that not a lot has

Re: [osg-users] Online documentation not available

2018-02-07 Thread Hartwig Wiesmann
Hi Jordi, there are some more old links: - Downloads/Developer Releases - Downloads/Data resources x Link to old repo x Link to Nasa's blue marble website Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72948#72948

Re: [osg-users] Serialization with virtual base classes

2017-12-26 Thread Hartwig Wiesmann
Hi Julien, thanks for your reply. I checked a couple of source files but it seems to be that I did not find the right ones. Anyway, I would never have found the trick with the dynamic cast! I like OS and the efforts of the community but it is a real shame that OSG is documented so badly.

[osg-users] Prevention of near plane culling while moving camera

2018-03-09 Thread Hartwig Wiesmann
Hi, In my dynamic scene (objects can be added or removed) I use a perspective projection and automatic near and far plane calculation. To prevent during camera movement culling of objects between the camera and the near plane I calculate before each camera movement if there are objects in the

Re: [osg-users] Prevention of near plane culling while moving camera

2018-03-10 Thread Hartwig Wiesmann
Hi, sorry not to be precise. I actually meant clipping. When the camera is placed perpendicular to the scene (a large plane with some objects on it) everything can be seen. If the camera is looking at the scene under an angle of 70 degrees (between look-vector and plane's normal) the lower

[osg-users] Draping polygons on existing objects using stencil shadow volumes

2018-04-05 Thread Hartwig Wiesmann
Hi, I would like to implement draping of objects using stencil shadow volumes. To do so I have to do the following steps: 1) Draw the scene's objects 2) Start multi-pass rendering for the stencil shadow volumes 2a) Clear the stencil buffer 2b) Set the attributes for the first pass and draw the

Re: [osg-users] AutoTransform, ROTATE_TO_SCREEN and small feature culling

2018-03-27 Thread Hartwig Wiesmann
Hi Robert, I was not talking about the cullingActive flag but the method isCullingActive! isCullingActive checks besides the cullingActive flag if the boundary sphere is valid. As long as the boundary sphere is invalid isCullingActive() returns false. This is the problem I reported. Code:

Re: [osg-users] AutoTransform, ROTATE_TO_SCREEN and small feature culling

2018-03-29 Thread Hartwig Wiesmann
Hi Robert, what I would like to produce is an object that is always oriented towards the user (screen) and has the same size independent of the zoom level. Though the zoom level is limited in a certain range by an additional LOD. Therefore, I think that AutoTranslate is the only viable option,

Re: [osg-users] DatabasePager::DatabaseThread is crashing when DatabasePager has been deleted

2018-03-24 Thread Hartwig Wiesmann
Hi, I am using - OSG 3.5.10 - mac OS 10.13 - Clang 9.0 Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73159#73159 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] DatabasePager::DatabaseThread is crashing when DatabasePager has been deleted

2018-03-24 Thread Hartwig Wiesmann
Hi, I have the following scenario: 1) A scene is using a database pager to load data by a pseudo-loader via the network; the viewer runs single threaded, the database pager uses default parameters 2) When the database pager is still loading data via the network the viewer is closed. 3)

Re: [osg-users] DatabasePager::DatabaseThread is crashing when DatabasePager has been deleted

2018-03-25 Thread Hartwig Wiesmann
Hi Robert, I will try. My problem is that in my test project the database pager seems to be (time wise) initialised differently than in my real project. Let's see. Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73166#73166

Re: [osg-users] DatabasePager::DatabaseThread is crashing when DatabasePager has been deleted

2018-03-25 Thread Hartwig Wiesmann
Hi Robert, sorry, that it was not clear enough. What I tried to explain is in summary that the database pager starts twice as many threads as it should but keeps track of only half of them. Therefore, when the viewer is closed the database pager only cancels half of them while the other half

[osg-users] Encoding of text files

2018-03-25 Thread Hartwig Wiesmann
Hi, I have coincidentally recognised (when looking at merge differences) that at least one text file (AUTHORS.txt) is encoded using ISO Latin 1. Wouldn't it be a good idea to use UTF-8 (or a different UTF encoding) for these type of files? Probably, AUTHORS.txt is anyway the only file where it

Re: [osg-users] DatabasePager::DatabaseThread is crashing when DatabasePager has been deleted

2018-03-25 Thread Hartwig Wiesmann
Hi Robert, I tested the modifications (using mac OS, modified OSG 3.5.10) and did not have any crashes anymore. Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73169#73169

[osg-users] osgshadow.cpp option --sv (ShadowVolume) not working

2018-04-02 Thread Hartwig Wiesmann
Hi, I am using OSG 3.5.10 and trying to run the example osgshadow.cpp with the --sv (ShadowVolume) option. Unfortunately, no shadows are shown. All other techniques are showing shadows. Any ideas? Are there any known shortcomings with ShadowVolume? I am running the example on mac OS 11.3 OSG

Re: [osg-users] osgshadow.cpp option --sv (ShadowVolume) not working

2018-04-02 Thread Hartwig Wiesmann
Hi Robert, I found out that no indices are generated for the occluder geometry. Though I do not know if this is required. Furthermore, TriangleCollector (inside OccluderGeometry) defines _tempoaryTriangleVertices but I could not find anywhere a statement that actually assigns anything to the

Re: [osg-users] AutoTransform, ROTATE_TO_SCREEN and small feature culling

2018-03-30 Thread Hartwig Wiesmann
Hi Robert, I want to come back to my original remark that culling does not work correctly with AutoTransforms and ROTATE_TO_SCREEN. I have modified the example osgautotransform.cpp by adding a new class that contains an AutoTransform and a drawable. An object of this class is added to the

[osg-users] AutoTransform, ROTATE_TO_SCREEN and small feature culling

2018-03-26 Thread Hartwig Wiesmann
Hi, I found a very old article covering this issue: https://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg15948.html. In the meantime it seems to be that proposal (2) has been implemented and the AutoTransform's computeBound() method returns an invalid bounding sphere during the

Re: [osg-users] Show part of geometry which intersects a specific area

2018-03-26 Thread Hartwig Wiesmann
Hi, you may use a PolytopeIntersector to get all items intersecting the rectangle. Afterwards, you may modify the node mask of the found items: set a specific bit of the node mask to one if it is found by the PolytopeIntersector and to zero if not (by implementing a visitor inspecting the

Re: [osg-users] DatabasePager::DatabaseThread is crashing when DatabasePager has been deleted

2018-03-24 Thread Hartwig Wiesmann
Hi Robert, I think that it has nothing to do with Clang or GCC. I did some further investigations and probably found the bug. In DatabasePager::requestNodeFile you find the following code: Code: if (!_startThreadCalled) { OpenThreads::ScopedLock lock(_run_mutex); if

[osg-users] Database pager and failed loading of PagedLOD's children

2018-03-04 Thread Hartwig Wiesmann
Hi, I use PagedLODs and the database pager to load dynamically nodes. Here is the pseudo code: Code: pagedLOD->addChild(nodePtr,limit,std::numeric_limits::max); pagedLOD->setFileName(1,fileName); pagedLOD->setRange(1,0.0,limit); In case the pseudo-loader for fileName fails I would

Re: [osg-users] Database pager and failed loading of PagedLOD's children

2018-03-04 Thread Hartwig Wiesmann
Hi Robert, the problem seems to be that the database pager (respectively the paged LOD) keeps trying to load the node that fails to load. To stop this I somehow have to tell the paged LOD to stop loading the children, or I have to modify the limits. But for doing so I need to know when a child