Re: [osg-users] Cross-compiling from XP64 for Windows 7 64: Crashing when rendering with shaders

2013-01-11 Thread Sebastian Messerschmidt

Hi Johannes,

IIRC there was a bug in the 3.1.2 int osgProgram.cpp in Line 772 which 
can be fixed like this:


if (_extensions-isShaderAtomicCounterSupported())
-
if (_extensions-isShaderAtomicCounterSupported()  
!atomicCounterMap.empty())



cheers
Sebastian


Hi Chris,

good idea, but actually but does tell me much about the actual problem:


Code:
OpenGL extension 'GL_ARB_vertex_program' is supported.
OpenGL extension 'GL_EXT_secondary_color' is supported.
OpenGL extension 'GL_EXT_fog_coord' is supported.
OpenGL extension 'GL_ARB_multitexture' is supported.
OpenGL extension 'GL_NV_occlusion_query' is supported.
OpenGL extension 'GL_ARB_occlusion_query' is supported.
OpenGL extension 'GL_EXT_timer_query' is supported.
OpenGL extension 'GL_ARB_timer_query' is supported.
GraphicsCostEstimator::calibrate(..)
GraphicsWindowWin32::setSyncToVBlank on
Viewer::startThreading() - starting threading
Viewer::startThreading() - contexts.size()=1
Making scene thread safe
Doing add
Doing add
Doing add
   gc-getGraphicsThread()-startThread() 02CAEAD0
Set up threading
View::init()
cull()
cull() got SceneView 02C2AA50
ShaderComposer::~ShaderComposer() 02C27CA0
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
Uniform Adding parent
end cull() 02C2A8E0
Doing run 02CAEAD0 isRunning()=1
draw() 02C2A8E0
draw() got SceneView 02C2AA50
Renderer::compile()
OpenGL extension 'GL_ARB_shader_objects' is supported.
OpenGL extension 'GL_ARB_vertex_shader' is supported.
OpenGL extension 'GL_ARB_fragment_shader' is supported.
OpenGL extension 'GL_ARB_shading_language_100' is supported.
OpenGL extension 'GL_EXT_geometry_shader4' is supported.
OpenGL extension 'GL_EXT_gpu_shader4' is supported.
OpenGL extension 'GL_ARB_tessellation_shader' is supported.
OpenGL extension 'GL_ARB_uniform_buffer_object' is supported.
OpenGL extension 'GL_ARB_get_program_binary' is supported.
OpenGL extension 'GL_ARB_gpu_shader_fp64' is supported.
OpenGL extension 'GL_ARB_shader_atomic_counters' is supported.
glVersion=4.3, isGlslSupported=YES, glslLanguageVersion=4.3

Compiling VERTEX source:
 1: void main()
 2: {
 3: gl_Position = ftransform();
 4: }


Compiling FRAGMENT source:
 1: void main()
 2: {
 3: gl_FragColor = vec4(0.5, 1, 1, 1);
 4: }

Linking osg::Program  id=3 contextID=0

E:\OSG-3.1.2\bin



After compiling OSG 3.1.0, 3.1.1, 3.1.2, 3.1.3 over night I found that 3.1.2 
seems to be the only version crashing with shaders. I will upgrade my 
development system to OSG 3.1.3 now to see if the crash bug is gone.

Thank you!

Cheers,
Johannes[/code]


---
Johannes Scholz
Software Engineer
P3 Voith Aerospace GmbH, Bremen, Germany

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





___
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] OSG and Android

2013-01-11 Thread Jan Ciger
On Fri, Jan 11, 2013 at 1:28 AM, Jason Daly jd...@ist.ucf.edu wrote:

 Actually, we've got shared library loading working already.

 A lot of our software is plugin-based (using dlopen), and it's working
 fine on Android.  There is a bit of JNI involved, but only enough to hook
 into the regular Android GUI/View stuff.


Ah, that's good news then. Would you mind to publish any changes you needed
to do to it? I would love to switch to shared lib too, because with the
static linking the recompiles are taking ages every time.

Regards,

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


Re: [osg-users] Osgdem bathymetry problem

2013-01-11 Thread Paul Pocock

Thanks Sebastion -  will try when I get home..

Thanks again



On 01/11/2013 06:52 PM, Sebastian Messerschmidt wrote:

Hi Paul,

any easy workaround is to put your elevation and/or imagery into 
separate directories and use them as parameters.


cheers
Sebastian

Hi all,
I'm trying to compile blue marble terrain and bathymetry data from 
two seperate files however its always the last data entered on the 
command-line that is getting compiled. I thought anything after -d 
would contribute..  the command I'm using is:



Osgdem -d bm-bath-geo.tif bm-srtm-geo.tif -v 10. -l 6 -o world.I've

Does anyone have a suggestion or if anyone has compiled multiple data 
sources show me the correct array of commands?


Thanks
Paul
___
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] seg fault with text-setText(mystring) called in NodeCallback

2013-01-11 Thread DavidHornung

Hi Robert,

i have tested you tip, but it in my case it seems not to work.
I only call the setText() method via my NodeVisitor, also run the viewer 
in SingleThreaded mode, and set text-setDataVariance(osg::Object::DYNAMIC).

what else could be wrong?

David

Hi David,

Best guess would be that you are running the viewer multi-threaded
(it's default if you have a multicore processor) and the update
traversal to the text is occurring at the same time as the draw
traversal that is reading.  The solution is to tell the scene graph
that you plan to dynamically update the text object so that it knows
not to overlap the update/event and draw traversals.  You can do this
by using text-setDataVariance(osg::Object::DYNAMIC);

Robert.

On 10 January 2013 16:41, DavidHornung horn...@googlemail.com wrote:

Hello,
i have a seg fault because the osgText::Text::setText(std::string) is not
thread-save.
It appears from type to time

Why get I this seg fault sometimes?

I have the following setup

class ObjectGroup : public osg::Group
{
...
 ObjectGroup()
{
 ...
 text = osgText::Text;
 
 this-addChild(text);
 this-setUpdateCallback(new ObjectNodeCallback);
}

//called from NodeCallback
void updateText()
{
  text-setText(myText);
 }

private:
 osgText::Text text;
 std::String myText;
...
};

class ObjectNodeCallback : public osg::NodeCallback
{
  //override
  operator ()(osg::Node* node, osg::NodeVisitor* nv)
  {
  osg::ref_ptrObjectGroup obj =
dynamic_castObjectGroup*(node);
  obj-updateText();
  traverse(node, nv);
  }
};


Cheers,
David
___
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] Cross-compiling from XP64 for Windows 7 64: Crashing when rendering with shaders

2013-01-11 Thread Johannes Scholz
Hi Sebastian,

great, that's it. I love bugs that are already fixed.

Thank you!

Cheers,
Johannes


---
Johannes Scholz
Software Engineer
P3 Voith Aerospace GmbH, Bremen, Germany

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





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


Re: [osg-users] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2013-01-11 Thread Lukasz Izdebski
Hi,

I have a question. Why while reading dds file, to set number of mipmaps it is 
using function osg::Image::computeNumberOfMipmapLevels( s, t, r ) but not what 
is written in dds file header ?
I think that dds file knows better how many mipmaps it has inside.

Thank you!

Cheers,
Lukasz

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





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


Re: [osg-users] How to get node rotation in world coordinates?

2013-01-11 Thread Sergey Polischuk
Hi attitude is osg::Quat, and it does not have routines to transform it with matrix. You can use something like this: osg::Matrix world(osg::computeLocalToWorld(node-getParentalNodePaths()[0]));//world.setTrans(osg::Vec3()); - not sure if this makes any differenceworld.preMultRotate(node-getAttitude());osg::Quat result(world.getRotate()); Cheers,Sergey. 11.01.2013, 08:35, "michael kapelko" korn...@gmail.com:Hi. I have one PAT node as child of another one.I've implemented retrieval of its position in world coordinates this way: node-getPosition() * osg::computeLocalToWorld(node-getParentalNodePaths()[0]) This works fine.I've tried the same for rotation: node-getAttitude() * osg::computeLocalToWorld(node-getParentalNodePaths()[0]); But this doesn't even compile.Can anybody tell me how to get node rotation in world coordinates?Thanks.  ,___osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2013-01-11 Thread Christian Schulte

Hi,

I think it is used as cross-checking method. Indeed, if the calculated 
number (using osg::Image) is less than the number of mipmaps specified 
in the dds file, the calculated value is kept. On the other hand if the 
theoretical number of possible mipmaps is higher than the number of 
mipmaps specified by the dds file, the number used is the one of the dds 
file. In my opinion, it seems to be possible to have dds files with 
wrong mipmap informations...


Cheers,

Christian

Le 11/01/2013 13:42, Lukasz Izdebski a écrit :

Hi,

I have a question. Why while reading dds file, to set number of mipmaps it is 
using function osg::Image::computeNumberOfMipmapLevels( s, t, r ) but not what 
is written in dds file header ?
I think that dds file knows better how many mipmaps it has inside.

Thank you!

Cheers,
Lukasz

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





___
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] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2013-01-11 Thread Lukasz Izdebski
Hi,

But for example we have 512x512 dds texture compressed with DXT1 and in header 
we have 4 mipmaps.
In this example is meaningless to compute number of mipmaps, because OpenGL 
,with my knowledge, does not generate mipmaps for compressed textures. So 
setting bigger number of mipmaps is wrong.

I didn't find a program which generate dds and write wrong number of mipmaps. 
If it does change the program :).

Thank you!

Cheers,
Lukasz

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





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


[osg-users] “Include can't be =?UTF-8?Q?found=E2=80=9D?=, how to fix it?

2013-01-11 Thread Mohamed Alji
Hi,

I am developing using OpenSceneGraph. I installed it from a user-runnable 
installer (http://www.artoolworks.com/dist/openscenegraph/3.1.x/).

When I try to compile an application using OpenSceneGraph, I have this Include 
can't be found for all osg/* includes, like osg/AnimationPath.

The file is available here 
/Library/Frameworks/osg.framework/Versions/92/Headers/ So following this 
solution on how to add existing frameworks to the new Xcode 
(http://stackoverflow.com/questions/3352664/how-to-add-existing-frameworks-in-xcode-4).
 I added osg.framework to the project : 

[Image: http://i.stack.imgur.com/EUl3V.png ]

any idea is a welcome.

I am using :
IDE Xcode 4.5
Clang 4.1
OS X Mountain Lion

Cheers,
Mohamed[/img][/list]


Mohamed ALJI
Blog http://aljilogy.blogspot.fr


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




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


Re: [osg-users] mapping to video koordinate system

2013-01-11 Thread Sergey Polischuk
Hi

best thing is to get real camera parameters f.e. calibrating it with opencv 
routines, so you can built correct projection matrix.
other than that all you can is just guessing and trying different projections 
to see which will fit best.

Cheers.

07.01.2013, 18:51, DavidHornung horn...@googlemail.com:
 Hi,
 for example: I have a video of a football game, the teal camera always
 stays in its place and force the same point.
 Now I want to add a virtual football field on the one in the video.

 So how can i get the camera parameters the real camera had(unknown) for
 my virtual camera so that their views fit together?
 Which techniques are there?

 Hope now it is more clear

 Cheers,
 David

 Am 07.01.2013 15:43, schrieb Robert Osfield:

  Hi David,

  On 7 January 2013 11:21, DavidHornung horn...@googlemail.com wrote:
  how can I map a rectangle in my osg world on a rectangle with the same size
  in a Video? The Video is behind the OSG Scene.
  Probably solve this in a similar way to one would answer the generic
  question how long is a piece of string?

  The bottom line is we can't answer you question as it's too open
  ended.  Is you OSG world a 3D one, an perspective or orthographic one?
    When you say rectangle in my OSG world, what exactly do you mean?
  What about the rectangle in the video, is the dimensions of the vedeo
  frame or a rectangle that is within the video image?

  Robert.
  ___
  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] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2013-01-11 Thread Christian Schulte

Hi,

I didn't either find such a program being able to give a wrong number of 
mipmaps, I only said that it may exist... Maybe it is better if Wojciech 
explains us why he made this calculations. If we can indeed don't make 
it it is ok for me, but it does not change anything to the fact that the 
floor calculation is wrong on gcc under windows using math.h.
And by the way, I checked, it is not the only place in OSG code where 
floor is used. So maybe it is still better to correct this behaviour.
I just recompiled OSG on win xp, win7 and linux and in all cases no 
problems appeared by replacing math.h by cmath in include/osg/Math.
However, I saw some other places where math.h has been included, maybe 
it will be necessary to change all math.h to cmath and not only the one 
in include/osg/Math.


Cheers,

Christian

Le 11/01/2013 15:00, Lukasz Izdebski a écrit :

Hi,

But for example we have 512x512 dds texture compressed with DXT1 and in header 
we have 4 mipmaps.
In this example is meaningless to compute number of mipmaps, because OpenGL 
,with my knowledge, does not generate mipmaps for compressed textures. So 
setting bigger number of mipmaps is wrong.

I didn't find a program which generate dds and write wrong number of mipmaps. 
If it does change the program :).

Thank you!

Cheers,
Lukasz

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





___
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] seg fault with text-setText(mystring) called in NodeCallback

2013-01-11 Thread Robert Osfield
On 11 January 2013 11:44, DavidHornung horn...@googlemail.com wrote:
 Hi Robert,

 i have tested you tip, but it in my case it seems not to work.
 I only call the setText() method via my NodeVisitor, also run the viewer in
 SingleThreaded mode, and set text-setDataVariance(osg::Object::DYNAMIC).
 what else could be wrong?

Again I can only guess - it's you who has the seg fault and the
ability to debug it, best guess now is a dangling pointer?

Try using ref_ptr rather than C pointers.

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


Re: [osg-users] OSG and Android

2013-01-11 Thread Jason Daly

On 01/11/2013 04:48 AM, Jan Ciger wrote:


On Fri, Jan 11, 2013 at 1:28 AM, Jason Daly jd...@ist.ucf.edu 
mailto:jd...@ist.ucf.edu wrote:


Actually, we've got shared library loading working already.

A lot of our software is plugin-based (using dlopen), and it's
working fine on Android.  There is a bit of JNI involved, but only
enough to hook into the regular Android GUI/View stuff.


Ah, that's good news then. Would you mind to publish any changes you 
needed to do to it? I would love to switch to shared lib too, because 
with the static linking the recompiles are taking ages every time.





I will if I can.  I doubt I'll be able to, though.  I'm frantically 
trying to finish this up before I switch jobs next week, and I've got a 
few other things on the plate, too.  My outside work time is pretty full 
too, with moving and stuff.


I'm currently doing things like writing the Android.mk file manually for 
our specific build tree, which is fine for the guys here, but probably 
wouldn't do for OSG in general.


If nothing else, I could give you what I end up with and you (or someone 
else) could massage it into a nice, CMake-friendly form if you like.


--J

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


Re: [osg-users] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2013-01-11 Thread Jason Daly

On 01/11/2013 08:26 AM, Christian Schulte wrote:

Hi,

I think it is used as cross-checking method. Indeed, if the calculated
number (using osg::Image) is less than the number of mipmaps specified
in the dds file, the calculated value is kept. On the other hand if the
theoretical number of possible mipmaps is higher than the number of
mipmaps specified by the dds file, the number used is the one of the dds
file. In my opinion, it seems to be possible to have dds files with
wrong mipmap informations...


Right, OpenGL requires a certain number of mipmap levels depending on 
the dimensions of the image.  DDS likely doesn't enforce the same 
restriction.


--J

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


Re: [osg-users] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2013-01-11 Thread Jason Daly

On 01/11/2013 09:00 AM, Lukasz Izdebski wrote:

Hi,

But for example we have 512x512 dds texture compressed with DXT1 and in header 
we have 4 mipmaps.
In this example is meaningless to compute number of mipmaps, because OpenGL 
,with my knowledge, does not generate mipmaps for compressed textures. So 
setting bigger number of mipmaps is wrong.


Never mind what I said before  :-)

I think the check is to be sure that for some reason, the DDS file 
doesn't have too many mipmaps.  The loader will take the number of 
mipmaps in the file, or the number of mipmaps that OpenGL can handle, 
whichever is less.


osg::Image automatically sets the GL_TEXTURE_MAX_LEVEL parameter to the 
number of mipmaps that are loaded.


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


[osg-users] [osgCompute] Build INSTALL cannot find dll files

2013-01-11 Thread Ethan Fahy
Hello,

I am able to successfully build osgCompute in both debug and release modes 
using CMake in Windows 7x64.  However when I perform a Build on the INSTALL 
project it is able to copy the osgCompute.lib file but cannot find the 
osgCompute.dll file.  Here's the relevant error section from the command line:

-- Install configuration: Release
3  -- Installing: C:/SceneSim/ext/osgCompute/lib/osgCompute.lib
3  CMake Error at src/osgCompute/cmake_install.cmake:46 (FILE):
3file INSTALL cannot find
3C:/SceneSim/ext/osgCompute/build/bin/Release/../osgCompute.dll.
3  Call Stack (most recent call first):
3src/cmake_install.cmake:32 (INCLUDE)
3cmake_install.cmake:32 (INCLUDE)

C:\SceneSim\ext\osgCompute\build\bin\Release\osgCompute.dll does exist but as 
you can see the path has a .. in it that is tripping it up.  I've built a lot 
of projects using CMake and have never seen this issue before.  I'm guessing I 
can figure it out eventually but wanted to post it here anyway for the record 
and to see if anyone has a fix already.  Thanks!

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





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


Re: [osg-users] [osgCompute] Build INSTALL cannot find dll files

2013-01-11 Thread Ethan Fahy
P.S. I also noticed that the pdb files were built on the same level as the 
Release and Debug directories while the debud dll and ilk files were built 
correctly in the Debug directory (which is abnormal as far as I know).  I think 
there must be a path issue in the CMakeLists.txt files somewhere, perhaps a 
relative vs absolute definition?

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





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


Re: [osg-users] [osgPlugins] DDS Texture vanish with LINEAR_MIPMAP_LINEAR

2013-01-11 Thread Wojciech Lewandowski
I was summoned so I respond. Version of DDS plugin before my additions was
using this code to compute number of mipmaps (see revision 10369 of
ReaderWriterDDS.cpp ):

//debugging messages
 float power2_s = logf((float)s)/logf((float)2);
 float power2_t = logf((float)t)/logf((float)2);
 osg::notify(osg::INFO)  ReadDDSFile INFO : ddsd.dwMipMapCount =
 ddsd.dwMipMapCountstd::endl;
 osg::notify(osg::INFO)  ReadDDSFile INFO : s = sstd::endl;
 osg::notify(osg::INFO)  ReadDDSFile INFO : t = tstd::endl;
 osg::notify(osg::INFO)  ReadDDSFile INFO :
 power2_s=power2_sstd::endl;
 osg::notify(osg::INFO)  ReadDDSFile INFO :
 power2_t=power2_tstd::endl;
 mipmaps.resize((unsigned int)osg::maximum(power2_s,power2_t),0);


I replaced above with call to osg::Image::computeNumberOfMipmapLevels
because this was the same math.  But I also encountered problems with
memory access errors with DDS files which did not contain full mipmap chain
(with 3D Volume textures mostly) and then I added line which updates
numOfMipmaps if file have lower number than theoretical number.

Hope that explanation excludes me from the list of people to blame ;-). I
agree that probably using number of mipmaps from file ignoring theoretical
number could be the best idea. However, if log function does not work as it
should, it has to be fixed as highest priority as its used in many other
places in OSG.

On a side note: I was always surprised by use of floating point math in
mipmap number computation:
logf((float)s)/logf((float)2);

I would rather use folowing fixed point code instead (which would avoid log
problem entirely):

num_mipmaps = 1 + max( MostSignificantBit( width ), MostSignificantBit(
height ) );

with

int MostSignifcantBit( unsigned int i )
{
if( i == 0 )
  return -1

int bit = 0;
if( i = 0x1 ) { bit += 16; i = 16; }
if( i = 0x100 ) { bit += 8; i = 8; }
if( i = 0x10 ) { bit += 4; i = 4; }
if( i = 0x4 ) { bit += 2; i = 2; }
if( i = 0x2 ) { bit += 1; i = 1; }

return bit;
}


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


Re: [osg-users] [osgCompute] Build INSTALL cannot find dll files

2013-01-11 Thread Ethan Fahy
Sorry sorry sorry I have no idea how I missed the other forum post that 
discusses this issue!  Please disregard.   :-*

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





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


Re: [osg-users] Which GPGPU postprocessing method is best for me?

2013-01-11 Thread Ethan Fahy
I went back to the osgCompute src to look at how it creates a CUDA context.  I 
am tempted to simply use osgCompute since they have an RTT example that looks 
like it would work for my purposes.  The only thing that's keeping me from 
investing into osgCompute is that the osgCompute forum only has a handful of 
posts from the past year and I wonder how much continued development there is...

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





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


Re: [osg-users] [osgCompute] Build INSTALL cannot find dll files

2013-01-11 Thread Ethan Fahy
Actually it looks like the Visual Studio 2010 INSTALL problem wasn't addressed 
from this post:

http://forum.openscenegraph.org/viewtopic.php?t=9473

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





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