Re: [osg-users] SubloadCallback and PBO cleanup

2011-04-01 Thread Yurii Monakov
Thank you!

Yurii.

2011/4/1 Mikhail I. Izmestev :
> On 04/01/11 12:02, Yurii Monakov wrote:
>> Hi Mikhail,
>>
>> Thank you for your answer. So I should inherit from osg::BufferObject
>> class and implement compileObject() method?
>>
>
> I think in your case you can try to use osg::PixelDataBufferObject as it is.
>
> Mikhail.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] SubloadCallback and PBO cleanup

2011-04-01 Thread Yurii Monakov
Hi Mikhail,

Thank you for your answer. So I should inherit from osg::BufferObject
class and implement compileObject() method?

Yurii

2011/4/1 Mikhail I. Izmestev :
> 01.04.2011 11:41, Yurii Monakov wrote:
>
>> And everything works fine until the cleanup stage. In the code above
>> I've allocated a Pixel Buffer Object. Where should I place it's
>> deletion function (something like ext->glDeleteBuffers(1,&m_pbo))? Or
>> I should generate/delete it on every subload call with performance
>> penalty?
>
> Hi Yurii,
>
> Instead manual generation/destructin of buffer objects use
> osg::BufferObject.
>
> BTW using osg::BufferObject solve problems of your code with multiple
> contexts.
>
> Mikhail.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] SubloadCallback and PBO cleanup

2011-04-01 Thread Yurii Monakov
Hi all!

In my OSG application I need to continuously update small parts of 2D
texture. So I use osg::Texture2D::SubloadCallback:

class MyCallback :
public osg::Texture2D::SubloadCallback
{
/* initialize texture */
void load(const Texture2D& texture,State& state) const
{
/* get pixel buffer object extension functions */
osg::PixelBufferObject::Extensions* ext =

osg::PixelBufferObject::getExtensions(state.getContextID(), true);

/* generate and cache PBO ID */
ext->glGenBuffers(1, &m_pbo);

if(m_pbo)
{
/* bind buffer */
ext->glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, m_pbo);

/* load texture initial data */

/* unbind buffer */
ext->glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0);
}
}

void subload(const osg::Texture2D& tex, osg::State& state) const
{
/* bind buffer */
ext->glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, m_pbo);

/* update some small part of the texture */

/* unbind buffer */
ext->glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0);
}
private:
GLuint m_pbo;
};

And everything works fine until the cleanup stage. In the code above
I've allocated a Pixel Buffer Object. Where should I place it's
deletion function (something like ext->glDeleteBuffers(1, &m_pbo))? Or
I should generate/delete it on every subload call with performance
penalty?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] background visible on point sprite spheres

2010-12-17 Thread Yurii Monakov
Hi Don,

Ok, than you can try disabling depth writes while rendering your point
sprites. You can use osg::Depth attribute to disable depth writes. For
example:

_state->setAttribute(new osg::Depth(osg::Depth::LESS, 0.0, 1.0, false));

The last parameter in constructor of osg::Depth controls depth writes
during rendering.

Best regards,
Yurii Monakov


2010/12/16 Yurii Monakov :
> Hi Don!
>
> I think that you can try enabling GL_BLEND mode in your StateSet (if
> it is not already enabled).
>
> Best regards,
> Yurii Monakov
>
> 2010/12/16 Don Leich :
>> Hi all,
>>
>> I've got a problem that I haven't been able to find a solution
>> for and could use some help.  I'm using the standard texture file
>> "OpenSceneGraph-Data/Images/sphere.gif" as the source image for
>> point sprites.  The file is an image of a shaded sphere against
>> a fully transparent background.
>>
>> I can set a state to properly render small 2-D sphere images with
>> GL_POINTS primitive type.  I needed to add sprites to my scene
>> graph after some other content that requires setting a different
>> state first.  The point sprites after this other content will show
>> the shaded sphere image correctly, but will now also render the
>> sphere image background even though it should be fully transparent.
>>
>> Adding osg::StateAttribute::OVERRIDE to the blend function state
>> was a thought, but no help.
>>
>>    fn->setFunction(osg::BlendFunc::SRC_ALPHA,
>>        osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
>>
>>    _state->setAttributeAndModes(fn,
>>        osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
>>
>> A dump and compare of .osg files didn't yield any insight.  Does
>> anyone have a suggestion for a possible fix here or maybe a way
>> to debug the state with OSG internals?  What besides BlendFunc
>> should be in influence here?  Does it sound like I'm just not
>> applying the state where I think I am?
>>
>> Thanks,
>> -Don Leich
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] background visible on point sprite spheres

2010-12-16 Thread Yurii Monakov
Hi Don!

I think that you can try enabling GL_BLEND mode in your StateSet (if
it is not already enabled).

Best regards,
Yurii Monakov

2010/12/16 Don Leich :
> Hi all,
>
> I've got a problem that I haven't been able to find a solution
> for and could use some help.  I'm using the standard texture file
> "OpenSceneGraph-Data/Images/sphere.gif" as the source image for
> point sprites.  The file is an image of a shaded sphere against
> a fully transparent background.
>
> I can set a state to properly render small 2-D sphere images with
> GL_POINTS primitive type.  I needed to add sprites to my scene
> graph after some other content that requires setting a different
> state first.  The point sprites after this other content will show
> the shaded sphere image correctly, but will now also render the
> sphere image background even though it should be fully transparent.
>
> Adding osg::StateAttribute::OVERRIDE to the blend function state
> was a thought, but no help.
>
>    fn->setFunction(osg::BlendFunc::SRC_ALPHA,
>        osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
>
>    _state->setAttributeAndModes(fn,
>        osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
>
> A dump and compare of .osg files didn't yield any insight.  Does
> anyone have a suggestion for a possible fix here or maybe a way
> to debug the state with OSG internals?  What besides BlendFunc
> should be in influence here?  Does it sound like I'm just not
> applying the state where I think I am?
>
> Thanks,
> -Don Leich
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Texture subloads

2010-12-15 Thread Yurii Monakov
Hi All!

Searching the answers on my question I've discovered some posts about
osg::Texture2D::SubloadCallback and I think that this feature fits my
purposes. The only question I have is about osg::Texture2D::apply()
function - when is it called? Does it depend on parent node visibility
or not? I need this callback to be called every frame regardless of
parent node's spatial orientation.

Thank you!

Best regards,
Yurii Monakov
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Texture subloads

2010-12-13 Thread Yurii Monakov
Hi All!

I have very specific problem which I don't know how to solve with OSG.

I want to create very large texture atlas (4096x2048) which consists
of small subtextures (128x64, so there are 32x32=1024 subtextures).
Each of small textures should contain some textual/symbol information
which is supposed to be frequently updated in the runtime. I use Qt to
compose QImage with rendered text/symbols and I want to update some
subtexture (given by offsets in x and y with constant size) of the the
texture atlas with prerendered data.

I know how to achieve this with pure OpenGL (using PBO and
glTexSubImage2D), but I can't figure out if there is a way do this
with OSG? Maybe subclassing osg::Texture2D or something?

Thank you!

Best regards,
Yurii Monakov
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv

2010-10-29 Thread Yurii Monakov
Hi Huron,

I've experienced the same problems with unresolved symbols from
OpenTreads. The problem was solved by full rebuild of OSG. Just delete
CMake cache, reconfigure and build.

Once I've fought unexpected runtime errors (segmentation faults) in
simple OSG apps (even in examples) and they were also solved by full
rebuild. Seems that something went wrong during compilation process,
but compiler/linker somehow have missed these errors.

Regards,
Yurii
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Drawing complex labels of 3D points in screen space

2010-10-22 Thread Yurii Monakov
Hi,

Thank you for the answer. Now I'm searching for the "right way" to get
to some level (for example, base level, e.g. root) of MVPW matrix
stack from callback or accept() call. But all I see is top level,
which is actual only for the current node.

Yurii

2010/10/22 J.P. Delport :
> Hi,
>
> On 21/10/10 18:26, Yurii Monakov wrote:
>>
>> Hi All
>>
>> After some googling I've discovered an AutoTransform node )) When
>> setting it's auto-rotate mode to ROTATE_TO_SCREEN and
>> setAutoScaleToScreen(true) it gives me exactly what I want. The only
>> problem is that after looking at AutoTransform node I noticed that it
>> does a lot of computation inside. The only thing I need is to push
>> root's MVPW matrix to some part of the graph (Transform nodes, which
>> are children of the screen-spaced node) to update their positions
>> properly. Is there any other way to do this?
>
> not that I know of, but I think you've now discovered enough to create your
> own node, either based on AutoTransform (but for already screen-spaced
> geometry) or your own.
>
> jp
>
>>
>> Thank you!
>>
>> Yurii
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
> --
> This message is subject to the CSIR's copyright terms and conditions, e-mail
> legal notice, and implemented Open Document Format (ODF) standard. The full
> disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
>
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.  MailScanner thanks Transtec
> Computers for their support.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Drawing complex labels of 3D points in screen space

2010-10-21 Thread Yurii Monakov
Hi All

After some googling I've discovered an AutoTransform node )) When
setting it's auto-rotate mode to ROTATE_TO_SCREEN and
setAutoScaleToScreen(true) it gives me exactly what I want. The only
problem is that after looking at AutoTransform node I noticed that it
does a lot of computation inside. The only thing I need is to push
root's MVPW matrix to some part of the graph (Transform nodes, which
are children of the screen-spaced node) to update their positions
properly. Is there any other way to do this?

Thank you!

Yurii
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Drawing complex labels of 3D points in screen space

2010-10-20 Thread Yurii Monakov
Hi All

Consider we have a lot of points in 3D and we need to render some
additional information around them in screen space. For example, for
very 3D point we need to render rectangular panel (with dimensions Mpx
x Npx), line from this panel to the point in 3D and some text on the
panel. So we create a HUD node (as in "osgText, HUD, RenderBins"
tutorial) and an osg::MatrixTransform nodes, which translate our
complex labels (consisting of panel, line and text) to the specified
coordinates on the screen (there is no problem with this step). On
each frame I have to inform screen-space nodes about global MVPW
matrix to properly compute it's new position on the screen from the
global 3D positions of the reference points.

I've tried osgUtil::CullVisitor, but it's MVPW matrix it already post
multiplied by osg::Projection matrix and cannot be used. So I need to
cache MVPW matrix of the root node and update labels' nodes according
to it. What is the best way to inform children of the HUD-node about
changes in the root's MVPW matrix?

Here is the link to the image with an example of such complex label
(and some trivial labels):
http://uranus-sdp.com/uploads/posts/2009-03/1237821576_cwp_2.jpg
The complex label is in upper-right part of the screen (AFL345). It is
connected to the point in 3D (square with inner cross).

Yurii
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] vsync false doesn't change frame rate

2010-09-05 Thread Yurii Monakov
Hi Thomas.

VSync could be switched on explicitly in the driver settings
overriding any application setting.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] happy to execute any little task, and glad to be of use; but he was in

2010-08-21 Thread Yurii Monakov
was stranded in the middle of a station with a trunk he could hardly
   http://sites.google.com/site/ligmllgqaiocaqtaajnf/koxnotgldjzkjaxkf
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] (no subject)

2010-07-24 Thread Yurii Monakov
http://sites.google.com/site/gGtjM8SvxU11/yhhyksvy
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 1-bit texture for shader

2010-07-14 Thread Yurii Monakov
Hi!

You can use 8-bit mask texture filled with zeros and 0xFF's (like your
bitmask). Then just multiply texels of source texture and mask
texture. Texture format could be GL_ALPHA and internal format -
GL_ALPHA8.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] New way to workaround MSVC False Positives

2009-07-31 Thread Yurii Monakov
Hi Torben,

You can turn on automatic generation of memory leak report, which will
trigger after all deinitialization:

#ifdef _DEBUG

int tmp_flag;

HANDLE log_file = CreateFile("mem_log.txt",
GENERIC_WRITE,FILE_SHARE_WRITE,
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);

_CrtSetReportMode(_CRT_ASSERT,_CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW |
_CRTDBG_MODE_DEBUG);
_CrtSetReportMode(_CRT_WARN,_CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
_CrtSetReportMode(_CRT_ERROR,_CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW |
_CRTDBG_MODE_DEBUG);

// output to the file if not under VS
_CrtSetReportFile(_CRT_ASSERT, log_file);
_CrtSetReportFile(_CRT_WARN, log_file);
_CrtSetReportFile(_CRT_ERROR, log_file);

tmp_flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
tmp_flag |= _CRTDBG_ALLOC_MEM_DF;
tmp_flag |= _CRTDBG_DELAY_FREE_MEM_DF;
tmp_flag |= _CRTDBG_LEAK_CHECK_DF;

_CrtSetDbgFlag(tmp_flag);

#endif

Linking with MFC is really strange idea in this case.
Also you can use _CrtSetBreakAlloc() function to break on the memory
allocation with specified
number (you can find this number near each allocation in the output).

Best regards,
Yurii Monakov

2009/7/31 Torben Dannhauer 

> Hi,
>
> My Workaround bases also on MFC, but seems to smaller:
>
> My standart project started as an empty console application without MFC.
>
> If I enabled only the memory leak detection, i get lots of memory leak
> notification because OSGS static objects are not clean until the end of the
> applications leak detection.
>
>
> My solution is:
> 1. enable the memory leak detection in the main function:
>
> Code:
>
>  int main(int argc, char** argv)
> {
>   /*// Redirect memory debugging output to console
>   _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
>   _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT );
>   _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE );
>   _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT );
>   _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE );
>   _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT );
>   */
>
>   //start memory observation
>_CrtMemState s1;
>_CrtMemCheckpoint( &s1 );
>
>{   // this scope is important!! It'ns nessecary to use OSG in a
> subscope of the mainfunction to get no false memory leak indications,
>
>// use an ArgumentParser object to manage the program arguments.
>osg::ArgumentParser arguments(&argc,argv);
>
>// instantiate the applications main class
>osg::ref_ptr core = new app_core(arguments);
>
>// init app
>core->initialize();
>}
>
>// check for leaks
>   _CrtMemDumpAllObjectsSince( &s1 );
>
>return 0;
> }
>
>
>
>
> 2. To disable all false notification based on the static variable problem
> (e.g. singletons):
> Edit the MSVC Project:
> ->project settings: Use of the MFC library: change from "USE WINDOWS
> STANDARD LIBRARY" to "USE STATIC MFC LIBRARY"
> (The use of the dynamic MFC dll doesn't work.)
>
> In my project, now all false positives disapper and only the (test) memory
> leak remains.
>
> Unfortunately memory leaks are not related to codefiles and codefiles, so
> fixing is quite problematic. To solve this issue:
>
> 3. Enable Codefile and Codeline identification
>
> Add a file "memoryLeakDetection.h" or something like this to your project.
>
> this File contains:
>
> Code:
>
> #pragma once
>
> #ifdef _DEBUG
>#include 
>#define DEBUG_NEW new(_NORMAL_BLOCK ,__FILE__, __LINE__)
>#define new DEBUG_NEW
> #else
>#define DEBUG_NEW new
> #endif
>
>
>
>
> Incude this file in every .cpp file after your corresponding header File.
>
> I included the file in the .cpp file to get rid of problems resulting from
> multiple direct and indirect inclusion in the header file (pragma once
> doesn't seem to work well in all situations.).
>
> Now you should have only named, numbered and true memory leaks in your
> application :) I hope this spares someone for searchong severals hours for a
> solution as i did.
>
>
> Cheers,
> Torben
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=15666#15666
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Website not reachable from france and austria

2009-05-31 Thread Yurii Monakov
And Russia :)

2009/6/1 Alan Purvis 

> And Ireland.
>
>
> On 31 May 2009, at 17:45, Sebastian Messerschmidt wrote:
>
>  same for germany
>>
>>> Hi,
>>>
>>> i can access:
>>>
>>> blog.openscenegraph.org
>>> forum.openscenegraph.org
>>>
>>> but not www.openscenegraph.org / openscenegraph.org
>>>
>>> Seems to be a dns problem?
>>>
>>> ping www.openscenegraph.org
>>> PING lemonvm-osg.ai2.upv.es (158.42.9.50) 56(84) bytes of data.
>>>
>>> Thank you!
>>>
>>> Cheers,
>>> Johannes
>>>
>>> --
>>> Read this topic online here:
>>> http://forum.openscenegraph.org/viewtopic.php?p=13213#13213
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-
>>> openscenegraph.org
>>>
>>>
>>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] The normal of my screen

2009-04-28 Thread Yurii Monakov
Computing (center - eye).normalize() we are doing unnecessary work. Look
direction could be obtained directly from camera's matrix.

2009/4/28 Jean-Sébastien Guay 

> Hi Mangu,
>
>  If the the center is what I look at, so basically it's the normal of the
>> plane ( described by the screen) isn't it??
>>
>
> Both eye and center are points, not vectors. So center can't be the normal
> of the screen's plane... (center - eye).normalize() is.
>
> J-S
> --
> __
> Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
>   http://www.cm-labs.com/
>http://whitestar02.webhop.org/
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] The normal of my screen

2009-04-27 Thread Yurii Monakov
I am not sure about matrix layout convention used in OSG, but if it uses
OpenGL convention you can take third row of camera's view matrix (or third
column otherwise).

PS. Supposing that row (column) index starts with 1.

2009/4/27 Mangu Liok 

> Hi,
>
> If I want to know the normal of my screen (for lighting issues) does using
> viewer.getCamera->getViewMatrixAsLookAt(eye,center,up) will give it to me as
> 'eye'??
>
> Thank you.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10906#10906
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgdem write permission error

2009-04-20 Thread Yurii Monakov
Hi Robert,

The problem was in wrong diagnostic message (from
vpb::DataSet::_writeNodeFile). In fact, osgDB complained about missing *.ive
plugin, which was not on the path. Debugging is a great thing.

Thanks,
YM.

2009/4/20 Robert Osfield 

> Hi Yurii,
>
> You really just need to double check your permissions as clearly VPB is
> having problems opening the file and specifically highlighting issues with
> permissions.  If you really think the fault is somewhere in VPB then go
> debug it - as you have all the source code.   I might have all the source
> code, as do others, but we're all running VPB just fine so can't reproduce
> the problems you are seeing.
>
> Robert.
>
> On Thu, Apr 16, 2009 at 10:39 AM, Yurii Monakov wrote:
>
>> Hi All!
>>
>> I have a problem generating whole planet elevation database from SRTM 1 km
>> source ( 43200x21600 )
>> and custom *.vrt file:
>>
>> 
>>  
>>Gray
>>MSB
>>orthoplus.bin
>>  
>> 
>>
>> osgdem command line looks like:
>> osgdem --geocentric --whole-globe -l 3 -d test.vrt
>>
>> And this is what osgdem outputs:
>>
>> --geocentric
>> -d test.vrt
>> loaded layer test.vrt
>> Adding terrainTile
>> DataSet::_run() 0 0
>> started DataSet::createDestination(8)
>> Time for after_reproject 0.09
>> AR=2.00 C1=2 R1=1
>> createNewDestinationGraph
>> Time for _destinationGraph->computeMaximumSourceResolution() = 0.013281
>> Time for createDestinationGraph 0.217807
>> Time for after_computeNeighbours 0.022597
>> completed DataSet::createDestination(8)
>> There are 1 contributing source files:
>> test.vrt
>> mkpath()
>> Need to create output task directory = output_root_L0_X0_Y0
>> mkpath(output_root_L0_X0_Y0)
>>created directory output_root_L0_X0_Y0
>> Task output directory = output_root_L0_X0_Y0\
>> started DataSet::writeDestination(output.ive)
>> _readRow 1
>>reading tile level=0 X=0 Y=0
>> DestinationTile::readFrom(SetName=, FileName=test.vrt)
>> _equalizeRow 1
>>equalizing tile level=0 X=0 Y=0
>> _writeRow 1
>>getDirectory()=
>>writeNodeFile = 0 X=0 Y=0 filename=output.ive
>> _writeNodeFile(output.ive)
>> vpb::access(output.ive, W_OK)=-1
>> vpb::access(., W_OK)=0
>> Error: do not have write permission to write out file output.ive
>> Caught exception : Error: do not have write permission to write out file
>> output.ive
>>
>> Thanks, YM
>>
>> PS. test.vrt and elevation file (orthoplus.bin) are on the path, there is
>> enough free disk space and all output folders are not write-protected.
>> PPS. Using osg v.2.8.0 and vpb v.0.9.10
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgdem write permission error

2009-04-19 Thread Yurii Monakov
Really I have no ideas...
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgdem write permission error

2009-04-16 Thread Yurii Monakov
Hi All!

I have a problem generating whole planet elevation database from SRTM 1 km
source ( 43200x21600 )
and custom *.vrt file:


 
   Gray
   MSB
   orthoplus.bin
 


osgdem command line looks like:
osgdem --geocentric --whole-globe -l 3 -d test.vrt

And this is what osgdem outputs:

--geocentric
-d test.vrt
loaded layer test.vrt
Adding terrainTile
DataSet::_run() 0 0
started DataSet::createDestination(8)
Time for after_reproject 0.09
AR=2.00 C1=2 R1=1
createNewDestinationGraph
Time for _destinationGraph->computeMaximumSourceResolution() = 0.013281
Time for createDestinationGraph 0.217807
Time for after_computeNeighbours 0.022597
completed DataSet::createDestination(8)
There are 1 contributing source files:
test.vrt
mkpath()
Need to create output task directory = output_root_L0_X0_Y0
mkpath(output_root_L0_X0_Y0)
   created directory output_root_L0_X0_Y0
Task output directory = output_root_L0_X0_Y0\
started DataSet::writeDestination(output.ive)
_readRow 1
   reading tile level=0 X=0 Y=0
DestinationTile::readFrom(SetName=, FileName=test.vrt)
_equalizeRow 1
   equalizing tile level=0 X=0 Y=0
_writeRow 1
   getDirectory()=
   writeNodeFile = 0 X=0 Y=0 filename=output.ive
_writeNodeFile(output.ive)
vpb::access(output.ive, W_OK)=-1
vpb::access(., W_OK)=0
Error: do not have write permission to write out file output.ive
Caught exception : Error: do not have write permission to write out file
output.ive

Thanks, YM

PS. test.vrt and elevation file (orthoplus.bin) are on the path, there is
enough free disk space and all output folders are not write-protected.
PPS. Using osg v.2.8.0 and vpb v.0.9.10
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org