[osg-users] [osgPlugins] GDAL plugin

2016-05-26 Thread Filip Arlet
Hi, GDAL plugin uses outdated function extractImageLayer Code: virtual osgTerrain::ImageLayer* extractImageLayer(unsigned int sourceMinX, unsigned int sourceMinY, unsigned int sourceMaxX, unsigned int sourceMaxY, unsigned int targetWidth=0, unsigned int targetHeight=0); for extraction of

Re: [osg-users] Vec3Array instantiation

2016-04-07 Thread Filip Arlet
Hi, Simply you can't do it. They are completle different smart pointers. shared_ptr has outside reference counting and ref_ptr has inside reference counting in osg::Referenced class. Basically you would need to call ref() everytime you create or copy shared_ptr and call unref()

Re: [osg-users] Render a huge image (30.000x30.000)

2016-04-06 Thread Filip Arlet
Hi, Depends on what you want to do. If you want to render big resolution image, you would have to use tiled rendering. Using PBO for transfering data back could help speeding things up. But in most cases you are rendering non RT image (its too big you cant even save it in RT). Then you just

Re: [osg-users] osg::CoordinateSystemNode

2016-04-06 Thread Filip Arlet
Hi, I did, but it seems to me, that this is only offline transform - exact same thing that proj does. I want to transform points "on the fly". Can I somehow use Helmert transformation (from +towgs84 proj param) ? I dont need to transform between multiple systems, just to wgs84 would be nice

Re: [osg-users] Point Selection in Point Cloud

2016-04-06 Thread Filip Arlet
Hi, It really depends on how big your point cloud is. General rule is to create tree (kd-tree, octree, ...). Either multiple nodes or on big custom drawable with tree in it. If you create custom drawable, you can test if ray intersects tree node or polytope contains tree node. If you create

[osg-users] osg::CoordinateSystemNode

2016-04-06 Thread Filip Arlet
Hi, I'm working on a project for displaying geospatial data. I usually have data in some coordinate reference system. What I want now is transform them into another coordinate reference system (wgs84). Its not a big problem transforming coordinates on load or preparing data, but I would like

Re: [osg-users] Multiple shared contexts VBO

2014-07-17 Thread Filip Arlet
Hi, It was Qt-osg problem. I wanted to use my custom QGLWidget using GraphicsWindowQt::GraphicsWindowQt( GLWidget* widget ). Sharing is not possible, because it creates its own traits in function GraphicsWindowQt::createTraits( const QGLWidget* widget ). And then passes it into

Re: [osg-users] Multiple shared contexts VBO

2014-07-11 Thread Filip Arlet
Hi, Thank you! But I hope it wont break any other part of OSG that cant be shared between contexts. Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60251#60251 ___ osg-users mailing

[osg-users] Multiple shared contexts VBO

2014-07-10 Thread Filip Arlet
Hi, I have on big VBO rendered in multiple windows and osg (v 3.0.1) creates new glBuffers for each, not shares them. I thought when two contexts are shared, I dont need to recreate VBO again. Its a feature ? What can I do about it ? Its posible to use osg with one context and multiple windows

Re: [osg-users] Multiple shared contexts VBO

2014-07-10 Thread Filip Arlet
Hi, I know that, but when I debug my app, render will call getOrCreateGLBufferObject() with new contextID without knowledge of sharing context and creates new VBO. Thank you! Cheers, Filip -- Read this topic online here:

[osg-users] osg::Program and osgViewer::Renderer::Compile

2014-02-28 Thread Filip Arlet
Hi, I have problem with osg::Program and osgViewer::Renderer::compile(). I have scene graph with shader only for some part of it. But when display lists are compiled, shader is always active. Its geometry shader with LINES as input so any other geometry will raise opengl error. Shader even

[osg-users] Minimap

2014-01-08 Thread Filip Arlet
Hi, I want to display minimap in my scene, top view of scene, centered on my position and rotation where my main view is heading. What is the best aproach here (including, if first persona manipulator moves in main view, it will be reflected on minimap). Thank you! Cheers, Filip

Re: [osg-users] IncrementalCompileOperation OnDemandMode

2013-10-11 Thread Filip Arlet
Hi, how did you obtain renderInfo and current context, in predraw callback or somehow else ? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=56743#56743 ___ osg-users

[osg-users] IncrementalCompileOperation OnDemandMode

2013-10-10 Thread Filip Arlet
Hi, My issue: 1) I have application that runs on demand. So I dont want to achieve 60 framerates, 10 is more than enought. 2) Application loads very big chunk of data, but not all of them are displayed right away. 3) When I zoom in and show all data (from some area), display lists from that

[osg-users] FBO PBO readPixels

2013-08-08 Thread Filip Arlet
Hi, Can you give me an osg example of rendering to frame buffer object with camera postdraw callback and glReadPixels(); ? I want to read from FBO with PBO and double buffering, but glReadPixels(GL_COLOR_ATTACHMENT0); returns invalid operation even when I attach texture to camera. Can it be

[osg-users] OSMesa

2013-07-25 Thread Filip Arlet
Hi, As fallback for offscreen rendering on computers without GPU I use Mesa3D. (http://www.mesa3d.org/brianp/sig97/offscrn.htm) chapter 6. Everything works great in simple test program, but when I create custom context subclassing osg::GraphicsContext and write methods and viewer.

Re: [osg-users] OSMesa

2013-07-25 Thread Filip Arlet
Hi, Ok I get the situation :) It seems like OSMesa is standalone version of OpenGL and opengl32 is version with GDI (on windows). Calls from application uses OSMesa, but calls from OpenSceneGraph uses opengl32 (I dont know why there are no linker errors). Even if I put mesa opengl32 gdi

Re: [osg-users] Reverse Traversal Order

2013-06-25 Thread Filip Arlet
Hi, Anyway, can you point me, where to find openscenegraph code for bins number sorting ? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54883#54883 ___ osg-users mailing

[osg-users] Reverse Traversal Order

2013-06-20 Thread Filip Arlet
Hi, How can I implement Reverse Traversal RenderBin order ? Same as TraversalOrder but reversed ? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54716#54716 ___ osg-users

Re: [osg-users] Reverse Traversal Order

2013-06-20 Thread Filip Arlet
Hi, Thank you! I forgot to call copyLeavesFromStateGraphListToRenderLeafList(); :) that's why i didnt work. Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54725#54725 ___ osg-users

Re: [osg-users] Reverse Traversal Order

2013-06-20 Thread Filip Arlet
Hi, Next question How I can render bins in reverse order ? render bin with number 10 before render bin with number 1 ? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54733#54733

Re: [osg-users] Reverse Traversal Order

2013-06-20 Thread Filip Arlet
Hi, I have scene with layers with render order. And I use source aplha for transparency. That works well with screen render target. But if I want to render to transparent image and that image draw in another software, I dont know on what background will it use. In that case I can use

[osg-users] Font mipmapping

2013-06-18 Thread Filip Arlet
Hi, I want to generate font mipmaps myself from library not by gl or glu function. How do I do that ? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54643#54643 ___

Re: [osg-users] Multisampling

2013-02-13 Thread Filip Arlet
Hi, Well, the best solution in this case is recreating context without MSAA. How do I do that ? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52629#52629 ___ osg-users

[osg-users] Multisampling

2013-01-28 Thread Filip Arlet
Hi, Is it possilbe to disable (or enable) Multisampling ? I can create context with MSAA and without it, but I have no idea how can I disable or enable it with existing context ? Is it even posible or do I have to recreate Context ? Thank you! Cheers, Filip -- Read this topic

Re: [osg-users] qt rendering thread

2012-11-19 Thread Filip Arlet
Hi, Ok, Thanks, I get the idea behind it. Do I have to worry about thread safety or not ? Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51145#51145 ___ osg-users mailing list

[osg-users] qt rendering thread

2012-11-12 Thread Filip Arlet
Hi, Current state GraphicsWindowQt uses QTimer and function osgQt::setViewer for rendering traversal. It's clever, because Qt and osg events get correctly dispatched. But if fps drops, Qt Gui lags, mainly because some events (menu for example) will request redraw. I want to render scene in

Re: [osg-users] Using the notification API with multi-threading - heap corruption errors

2012-10-22 Thread Filip Arlet
Hi, Your test program has bug in it. std::rand() is not threadsafe nor reentrant. I don't think it can corrupt heap, but it will be better to use something else or use mutex around rand(); Cheers, Filip -- Read this topic online here:

Re: [osg-users] Increasing line width

2012-10-22 Thread Filip Arlet
Chris Hanson wrote: On Wed, Oct 17, 2012 at 9:18 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC () wrote: Take a look at the createAxis() in the osgbillboard.cpp file for the osgbillboard example. There's code in there to set linewidth...   Rather than altering the model

Re: [osg-users] osgFX::Outline implementation for OpenGL ES?

2012-10-19 Thread Filip Arlet
Hi, osgFX wont help in this case, but I think MatrixTransform or PositionAttitudeTranform (preffered) can do scaling, or second camera, at closer z position. Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50672#50672

[osg-users] Increasing line width

2012-10-17 Thread Filip Arlet
Hi, I want to highlight part of CAD model. I have big symbol with lines, that have different line width. Now I want to render that lines with +4.0f linewidth according to original width of every line. What is the best approach? Thank you! Cheers, Filip -- Read this topic

[osg-users] sampler shader texture

2012-10-12 Thread Filip Arlet
Hi, I pass data to my shader in texture which is attached to Group StateSet. If I want to render something in fixed pipilene function, under that StateSet. It will use that texture, but I do not want to do it. I just want to pass sampler to shader, but not to texture fixed pipeline. Is there

Re: [osg-users] dynamic multithreading problem

2012-10-03 Thread Filip Arlet
Hi, I think the problem maybe located in my custom Drawable class. It draws text geometry instead of textured quads (like in osgText::Test). It basicaly works like Group with multiple transforms and geodes with character geometry. But I really need it to be Drawable (structure of transform

[osg-users] dynamic multithreading problem

2012-10-02 Thread Filip Arlet
Hi, in my app I change during event traversal scene graph. I deep copy one par of graph mostly with one geode and it's drawables, but it can be a transform with few geodes and add it to scene. using DrawThreadPerContext it will crash sometimes. what will I have to do ? where do I have to put

[osg-users] Matrix mode GL_COLOR

2012-09-24 Thread Filip Arlet
Hi, I want to use GL_COLOR matrix mode. I want to render everything under osg::Group node in slightly different color. Is GL_COLOR matrix mode capable of this ? And what is the best implementation approach in osg ? Thank you! Cheers, Filip -- Read this topic online here:

[osg-users] osgText stateset

2012-08-29 Thread Filip Arlet
Hi, I have problem with osgText::Text and stateset, osgText is drawable, why isn't pushed my custom StateSet attached to it to StateSet stack in osg::State when rendering ? Thank you Cheers, Filip -- Read this topic online here:

Re: [osg-users] libosg.dll crash with OSG 3.0.1 and mingw

2012-08-06 Thread Filip Arlet
Hi, bad_alloc exception maybe you ran out of memory Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49173#49173 ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] DL - VBO memory

2012-07-18 Thread Filip Arlet
Hi, I switched from DL to VBO and memory footprint (RAM) of my application has dramatically increased. Main reason for switch is deprecated DL. I need only static VBO. Is it normal? And where is the main cause of higher memory consumption, OSG overhead ? ... Thank you! Cheers, Filip

Re: [osg-users] How to create osg::Texture2D from osg::Vec3Array...?

2012-06-28 Thread Filip Arlet
Hi, simplest technique is creating osg::Image, then assigning it to texture like this: Code: osg::Image* image = new osg::Image; image-allocateImage(16, 1, 1, GL_RGBA, GL_FLOAT); image-setInternalTextureFormat(GL_RGBA); osg::Vec4* dataPtr = reinterpret_castosg::Vec4*(image-data()); memcpy();

Re: [osg-users] Multiple Qt windows showing different nodes without performance loss?

2012-06-08 Thread Filip Arlet
Hi, I am sorry, I do not understand this. Could you expand on this? Which code are you referring to? I'm reffering to ViewerBase::run(). And managing frames. Calling ViewerBase::frame renders one frame. Run() function handles frame rate and on demand rendering, etc. In Qt I'm referering to

Re: [osg-users] Using the notification API with multi-threading - heap corruption errors

2012-06-08 Thread Filip Arlet
Hi, Beyond mutexes, I am less skilled with thread synchronisation. But in other libraries like Qt sometimes the concept of thread local storage is used to separate resource access from parallel threads. Do you think this concept would be applicable to provide every thread with its own stream?

Re: [osg-users] Multiple Qt windows showing different nodes without performance loss?

2012-06-07 Thread Filip Arlet
Hi, take a look at function: osgQt::setViewer with multiple views use CompositeViewer. it uses timer too, with some sleep (on_demand) logic. or implement it yourself, you get Qt timer - osg rendering idea from code. Cheers, Filip[/i] -- Read this topic online here:

[osg-users] Extensions

2012-06-07 Thread Filip Arlet
Hi, I have two same looking different geometries: One geometry with geometry shader and second without geometry shader which is slower, more memory consuming fallback geometry that expands geometry on CPU. All check extension functions require contextID. I don't have any contextID when creating

Re: [osg-users] Advice on scene structuring

2012-05-31 Thread Filip Arlet
Hi, I have similar problem. But instanced rendering is not an option, because I want to draw different huge number of objects from time to time. Now I share geometry (can't share Geode because of picking - every object has to be different) between PositionAtitudeTransforms. It's pretty fast,

Re: [osg-users] [AD] Win Free e-Copies of OpenSceneGraph Cookbook

2012-05-29 Thread Filip Arlet
Hi, I think Chapter 8, Managing Massive Amounts of Data will be most interesting part for me, because I'm working on program that manages very large data sets of geographical data. ... Thank you! Cheers, Filip[/i] -- Read this topic online here:

[osg-users] Database pager

2012-05-22 Thread Filip Arlet
Hi, I need to use osgDB::DatabasePager not in cull traversal, but from somewhere else (on demand update of my scenegraph, reloading segment from big database of vector data). The main problem is that database pager invalidates request because of bad request or pager frameStamp, is there any

[osg-users] Qt

2012-05-09 Thread Filip Arlet
Hi, I use multiple Qt windows for rendering, that can be created and destroyed while program is running. My problem occurs when I destroy and than create new view. New view has incorrect scenegraph (other views has correct one). Any idea why ? ... Thank you! Cheers, Filip --

Re: [osg-users] Qt - multiple views

2012-05-09 Thread Filip Arlet
Hi, ok this doesnt have anything with view, I think the problem are Display Lists, it will call bad list, I dont know why (I think it's problem with sharing display lists to new context), T have switched to vertexarrays and it works Thank you! Cheers, Filip -- Read this topic

Re: [osg-users] Rendering osgText::Text using osg::Material?

2012-04-18 Thread Filip Arlet
Hi, Because osgText calls state.Color in drawImplementation and this overrides glColor4fv in osg::Material::apply(State) const when using osg::Material with colorMode = OFF Cheers, Filip -- Read this topic online here:

Re: [osg-users] Unexpected osgText::TextBase::computeBound() behaviour

2012-04-11 Thread Filip Arlet
Hi, it's a bug, computation of bb in osgText::TextBase (without auto tranform cache) doesnt count with text alignment http://forum.openscenegraph.org/viewtopic.php?p=45355 Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46966#46966

[osg-users] Bug in BB computation in osgText::TextBase

2012-02-09 Thread Filip Arlet
Hi, computation of bb (without tranform cache) doesnt count with text alignment(variable _offset). Code: /*virtual*/ osg::BoundingBox BentleyText::computeBound() const { osg::BoundingBox bbox; if (_textBB.valid()) { for(unsigned int i=0;i_autoTransformCache.size();++i)

Re: [osg-users] [3rdparty] SpeedTree 6.0 integration

2012-02-08 Thread Filip Arlet
Hi, I had similar problem with using geometry shader. Setting parametr GL_GEOMETRY_VERTICES_OUT_EXT with correct number of vertices helped... Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45340#45340

Re: [osg-users] How to overcome trnasparency blending distortion

2011-12-15 Thread Filip Arlet
Hi, Did you tried to set Blending Function ? osg::BlendFunc class, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA is always a good starting point. Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44390#44390

Re: [osg-users] Implementing clone() on class derived from osg::Geometry and osg::MatrixTransform

2011-12-12 Thread Filip Arlet
Hi, clone method is virtual and should return osg::Object*. you can dynamic cast (or even static cast if you are sure) to PiGeometry*. How can I force the program to call PiFaceGeometry::clone() if this is only a child of object, on which I called clone()? I am sorry If this question is

Re: [osg-users] Texture image memory leak issue

2011-12-12 Thread Filip Arlet
Hi, if you check your program on memory leaks (for example with visual leak detector) and don't find any leaks, it's probably fine. The problem is in memory management. There are many things that can cause increasing memory: 1) Creating any type of object or buffer on GPU is slow operation, so

Re: [osg-users] [osgPlugins] png plugin - problem loading images

2011-12-02 Thread Filip Arlet
Hi, You are saying that you built OSG from sources. Are you completely sure that you set up PNG_LIBRARY and PNG_PNG_INCLUDE_DIR ? Because if you don't, osg_png plugin won't compile. Cheers, Filip -- Read this topic online here:

Re: [osg-users] Color in ShapeDrawable

2011-12-02 Thread Filip Arlet
Hi, in OpenGL if GL_LIGHTING is disabled, the final color of polygon is determined by glColor. If you see ShapeDrawable::drawImplemenation(), there is glColor call. Code: osg::State state = *renderInfo.getState(); GLBeginEndAdapter gl = state.getGLBeginEndAdapter(); if

[osg-users] Antialiasing Text

2011-12-02 Thread Filip Arlet
Hi, How I can implement text without anti-aliasing. If I zoom too close, it looks horrible. Than you, Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44182#44182 ___ osg-users

Re: [osg-users] Change for need to redraw scene

2011-12-02 Thread Filip Arlet
Hi, for redrawing, call function requestRedraw() on View(er) you want to redraw. I suppose you are changing the scene by yourself. If you want redraw on demand, other than calling frame by yourself use osgViewer::Viewerbase::setRunFrameScheme(ON_DEMAND); In QtViewer example there's QTimer

Re: [osg-users] starting with stencil buffer to achieve ray tracing

2011-12-02 Thread Filip Arlet
Hi, The most simple thing that could it be is this: did you set up stencil buffer by calling osg::DisplaySettings::instance()-setMinimumNumStencilBits(); or creating context with stencil buffer? Cheers, Filip -- Read this topic online here:

Re: [osg-users] starting with stencil buffer to achieve ray tracing

2011-12-01 Thread Filip Arlet
Hi, Use osg::Stencil on root node and set 1 where you draw (stencil func GL_ALWAYS). Use post draw callback on your camera. In callback save content of stencil buffer in osg::Image with readPixels() ... format GL_STENCIL_INDEX Inspect image. Cheers, Filip -- Read this topic

Re: [osg-users] Setting modelview matrix with viewer.getCamera()-setViewMatrix(modelViewMatrix) not working

2011-11-28 Thread Filip Arlet
Hi, This might be your problem: If you use CameraManipulator (for example TrackballManipulator), it will overwrite your ViewMatrix every frame ... see Viewer.cpp @1040 Code: if (_cameraManipulator.valid()) { setFusionDistance( getCameraManipulator()-getFusionDistanceMode(),

Re: [osg-users] Problem updating vertex

2011-11-25 Thread Filip Arlet
Hi, I think you need to call dirtyBound() and dirtyDisplayList() on geometry. Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44041#44041 ___ osg-users mailing list

Re: [osg-users] CullCallback problem

2011-11-15 Thread Filip Arlet
Hi, I think I have similar problem. I studied osg code and find out, that NodeCallback set as Node-CullCallback is called only if node is not culled therefore (osgUtil::CullVisitor*)(nv-isCulled(node)) always return false. I want to implement dynamic line style lod, where shoud I start ? ...

Re: [osg-users] cloning problem

2011-11-08 Thread Filip Arlet
Hi, osgWidget::Window is Transform and osgWidget::Widget is Drawable. Window uses private variable _geode, that will append to itself. All Widgets are stored there. Problem is that Window doesnt have interface for accessing DrawableList of _geode or index accessing of Widgets. Solutions are

[osg-users] Line Style

2011-11-08 Thread Filip Arlet
Hi, I want to implement custom line style. I know about LineStipple and LineWidget, but I want to create something more complicated than that, for example this repeating pattern: | My current solution is custom line geometry created instead of GL_LINE - start - end. The upside is, that

[osg-users] Concave polygons

2011-10-25 Thread Filip Arlet
Hi, I'm having problem with concave polygons. If I use osgUtil::Tessellation it destroys information, that this was a polygon, so I have two options, glue it together or save data (which is memory consuming). It can be done, but the worse problem is in outlining them afterwards with

[osg-users] Window update

2011-10-21 Thread Filip Arlet
Hi, i have a big scene and it takes really long time to compute and draw everything. Is in osg some tool, that enables step by step rendering, so user can see that program is not frozen, but actually does something ? I dont need speeding things up, that is not an issue. No realtime rendering,

[osg-users] Color picking

2011-10-18 Thread Filip Arlet
Hi, I want to implement color picking for my application using rendering to temp buffer (back_buffer) every element in different color ( http://content.gpwiki.org/index.php/OpenGL_Selection_Using_Unique_Color_IDs ). Is there any option in osg how to to this ... personally i would prefer

Re: [osg-users] Double precision vertex data problem

2011-10-18 Thread Filip Arlet
Hi, PolytopeIntersector uses osg::TriangleFunctor T and as you can see in code (TriangleFunctor header). Constructor called with Vec*d does nothing (prints warning). In member function TriangleFunctor::drawArrays OSG is accesing Array, that doesnt exists - and that's where the problem is I