Re: [osg-users] compiling osg with intel compiler, windows

2010-01-15 Thread Andrew Cunningham
Except, I am a moron and compiled the wrong file... Did you submit a bug report to Intel? 1>-- Rebuild All started: Project: Plugins osgwidget, Configuration: Release x64 -- 1>Compiling with Intel(R) C++ 11.1.054 [Intel(R) 64]... (Intel C++ Environment) 1>Input.cpp 1>D:\VAOne2010\OSG\Ope

Re: [osg-users] compiling osg with intel compiler, windows

2010-01-15 Thread Andrew Cunningham
Hi Rupert, I had no problem compiling that file with the Intel compiler. Note that I created the VS2008 projects using CMake, then "converted" to using the Intel compiler manually. 1>-- Rebuild All started: Project: osgWidget, Configuration: Debug x64 -- 1>Compiling with Intel(R) C++ 11

Re: [osg-users] Warning: GraphicsWindowWin32::grabFocus() - Failed grabbing the focus

2010-01-15 Thread Andrew Cunningham
One of my problems was that , by default, the ESC key is mapped to killing the viewer ( done=true). So basically, if you hit the ESC key with the window active, the viewer just stops handling events. This should be turned off in MFC with setKeyEventSetsDone(0) Andrew -- Read th

Re: [osg-users] Warning: GraphicsWindowWin32::grabFocus() - Failed grabbing the focus

2010-01-07 Thread Andrew Cunningham
My code is based on the 2.8.2 OSG MFC template/example so there really is nothing to post. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22267#22267 ___ osg-users mailing list osg-users@lists.opensc

[osg-users] Warning: GraphicsWindowWin32::grabFocus() - Failed grabbing the focus

2010-01-07 Thread Andrew Cunningham
Hi, I am having problems on Win32/MFC where the osgViewer embedded in a MFC window becomes unresponsive to mouse-down and paint events at seemingly random times. A call stack seems to show an "infinite" loop of messages being passed around between CFrameWnd and the GraphicsWindowWin32 event han

Re: [osg-users] Best practice for getting OpenGL information ( Vendor, driver version etc)

2009-12-24 Thread Andrew Cunningham
Thanks for the pointer to that example, that will work well enough for me Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=21867#21867 ___ osg-users mailing list osg-users@lists.openscenegra

[osg-users] Best practice for getting OpenGL information ( Vendor, driver version etc)

2009-12-23 Thread Andrew Cunningham
I wanted to capture/print out the current OpenGL version, vendor information and maybe driver version at program startup. The glGetString() functions and osg equivalents require an active GL context. Would one create a special invisible context just to get this information?. Seems like this sho

Re: [osg-users] Develop a scalable binary file format for native OSG scenes?

2009-12-10 Thread Andrew Cunningham
Just to throw out a wild idea, did anyone think of using HDF as the basis for a new binary OSG format? HDF is probably over-kill but HDF is self-describing and includes things like compression of FP data etc. The hierarchical part of HDF seems to me to well suited to storing scene-graph type da

Re: [osg-users] Masking (hiding) a subset of primitives?

2009-12-07 Thread Andrew Cunningham
Hi Robert, Thanks for your help - I am glad that you confirmed my initial feeling that overriding the 'current' drawImplementation would be quite complicated was correct and that I was not missing something obvious. Andrew -- Read this topic online here: http://forum.openscene

[osg-users] Masking (hiding) a subset of primitives?

2009-12-06 Thread Andrew Cunningham
I want to do something a little 'odd' and am not sure of the best way to do this. - assuming a 'large' number of (tri or quad) primitives in a primitiveset (say 100K-500K+) I want to hide ( not draw) a user-defined subset of those primitives. - the user scenario is that the user selects a sub

Re: [osg-users] Best ways to render "FE" models with millions of tris and quads

2009-11-19 Thread Andrew Cunningham
Thanks for all the help guys - I will experiment with the duplicate vertices option - that may actually not be that bad in memory usage vs. using display lists. Anyway, I can expose that to the user in some way for them to make a speed/memory tradeoff if required. The main thing is that at least

Re: [osg-users] Best ways to render "FE" models with millions of tris and quads

2009-11-18 Thread Andrew Cunningham
OK, I think I have resolved the mystery. The VBO was being stalled by a setNormalBinding(osg::Geometry::BIND_PER_PRIMITIVE); If I remove that, and compare FPS, then the VBO performance is slightly better than the displaylist version Why do I use setNormalBinding(osg::Geometry::BIND_PER_PRIMITI

Re: [osg-users] Best ways to render "FE" models with millions of tris and quads

2009-11-18 Thread Andrew Cunningham
Just for completeness, this is with both VBO and DL off. It so similar to the VBO version in speed that if I were suspicious I would suggest that I was not turning VBO on as claimed in the VBO version. However I stepped into the code, and see that VBO buffers are being created - that seemed pret

Re: [osg-users] Best ways to render "FE" models with millions of tris and quads

2009-11-18 Thread Andrew Cunningham
Hi Robert, The FPS statistics are not representative - they are an artifice of trying to get a good screen shot. In face the display list version was getting typically 100FPS+. The problem is that a Quadro FX1400 is a typical, perhaps slightly low-end, graphics card for our target market ( CA

Re: [osg-users] Best ways to render "FE" models with millions of tris and quads

2009-11-18 Thread Andrew Cunningham
With due respect, after having enabling the HUD stats display in my application, they really do not give enough detail to tell you anything useful except in the most general terms. Running Rational Quantify or the AMD performance tools to find the bottleneck is the only real way to find out wha

Re: [osg-users] Best ways to render "FE" models with millions of tris and quads

2009-11-18 Thread Andrew Cunningham
Well that is a bit of a mystery as the only thing I am changing is flipping the displaylist flag or VBO flag in these leaf/geometry nodes - and these geometry nodes (now) contain a single primitive set of TRIANGLES. Not sure what the scene graph contains is so sub-optimal. Andrew

Re: [osg-users] Best ways to render "FE" models with millions of tris and quads

2009-11-17 Thread Andrew Cunningham
Hi Robert, With optimization I mean calling something like osgUtil::Optimizer optimizer; optimizer.optimize(osgAssembly_,osgUtil::Optimizer::DEFAULT_OPTIMIZATIONS ); Anyway, I did my own optimization to create the absolute minimum number of PrimitiveSets and have basically got back to where I

Re: [osg-users] Best ways to render "FE" models with millions of tris and quads

2009-11-17 Thread Andrew Cunningham
Hi Robert et al, As usual, some great and helpful replies! - The geometry consists of probably 20 or so geonodes, so is probably reasonably well subdivided , but not too much... - What the bleep is a VBO and how do I use it. Seriously, I am an OpenGL 1.2 guy so do not have lot of experience w

[osg-users] Best ways to render "FE" models with millions of tris and quads

2009-11-16 Thread Andrew Cunningham
Hi, I am struggling with the most efficient way to render "finite-element" models with the best speed/memory tradeoff. These models may have milllions of "nodes" and "elements" ( triangles and quads), with usually simple shading. I am replacing some custom OpenGL code (hard to maintain, not clea

Re: [osg-users] PolytopeIntersector "distance" and Transform

2009-08-11 Thread Andrew Cunningham
Hi Peter, I have no time to work on this either at the moment. I will just avoid the scale transforms and scale the objects 'manually'. Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16108#16108

Re: [osg-users] PolytopeIntersector "distance" and Transform

2009-08-10 Thread Andrew Cunningham
Hi Peter, Did you ever work up a fix for this? ... Thank you! Cheers, Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16056#16056 ___ osg-users mailing list osg-users@lists.openscenegraph.or

Re: [osg-users] OpenSceneGraph-2.8.2 release candidate one tagged

2009-07-01 Thread Andrew Cunningham
Hi, Sorry, this is what I meant, a link to the forum discussion about this bug. http://forum.openscenegraph.org/viewtopic.php?t=2949&highlight=polytope Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14772#14772

Re: [osg-users] OpenSceneGraph-2.8.2 release candidate one tagged

2009-06-30 Thread Andrew Cunningham
Hi Robert, If you follow the link-to-the-post I have uploaded a sample geometry into that thread. The problem can be illustrated by using the osgkeyboardmouseexample and using the polytope intersector. Picking the "purple" cone is very inconsistent. The reason is that the "first" intersection s

Re: [osg-users] OpenSceneGraph-2.8.2 release candidate one tagged

2009-06-30 Thread Andrew Cunningham
Hi, Is there an 'official' bug list somewhere? I say this as 2.8.1 has , for me , a nasty bug where the polytope intersector does not correctly calculate the intersection distance value when a scale transform is present. http://forum.openscenegraph.org/viewtopic.php?t=2949&highlight=polytope

Re: [osg-users] PolytopeIntersector "distance" and Transform

2009-06-22 Thread Andrew Cunningham
Hi, Peter Thanks for looking into this a tricky bug ... I got really lost trying to trace the problem myself. good luck! I think as a workaround I will scale the geometry manually without using a transform. Andrew -- Read this topic online here: http://forum.openscenegraph

Re: [osg-users] Annotating large numbers of objects

2009-06-19 Thread Andrew Cunningham
In the end I rendered all 255 characters of my chosen annotation font/style/size into 255 gl bitmaps, then use glBitMap to draw strings on the fly composing them from the character bitmaps -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14257#1425

Re: [osg-users] PolytopeIntersector "distance" and Transform

2009-06-19 Thread Andrew Cunningham
Hi Peter, Although your fix did not work - it is definitely the "scale" part of the transform causing the problem. If I remove the scaling part of the transform , then the polytope picking works as expected ... Andrew -- Read this topic online here: http://forum.opensceneg

[osg-users] PolytopeIntersector "distance" and Transform

2009-06-18 Thread Andrew Cunningham
Hi, I am having some problems with the "distance" found by the PolytopeIntersector but only when the geometry I am trying to pick has a non-null (Matrix)Transform in it's parent. The PolytopeIntersector registers that object as a 'hit', BUT the distance recorded appears to be incorrect ( the

Re: [osg-users] Annotating large numbers of objects

2009-06-15 Thread Andrew Cunningham
Hi Chris, Thanks for the suggestion - I am backed into a corner a bit by the need to support access via Windows RDC ( remote desktop connection) which works quite well for small/medium models but only supports basic OpenGL(1.1?) without shaders. Of course I can test for that and use an alternat

[osg-users] Annotating large numbers of objects

2009-06-15 Thread Andrew Cunningham
Hi, I need to label or annotate large numbers of 3D locations with a short label like a number. Think possibly 100,000+ locations or nodes (for example, represented as small cubes). I naively used osg::Text to create labels and ended up consuming 100's of MB of memory. This seems like a case w

Re: [osg-users] osg::Camera:DrawCallback vtable link error in "Release" mode on Windows

2009-06-11 Thread Andrew Cunningham
I am using Visual Studio 2005 SP1, and using the standard toolset. There is not a problem with compilation - it is a linking problem. The problem only occurs when - My code has a class derived from osg::Camera::DrawCallBack - Linked in release mode. That means the issue would be encountered o

Re: [osg-users] osg::Camera:DrawCallback vtable link error in "Release" mode on Windows

2009-06-10 Thread Andrew Cunningham
Ok I found what the problem is caused by To me it looks like a typo in the "camera" header file... struct OSG_EXPORT DrawCallback : virtual public Object I can't imagine any reason to make Object a "virtual base class" here. struct OSG_EXPORT DrawCallback : public Object Changing this

[osg-users] osg::Camera:DrawCallback vtable link error in "Release" mode on Windows

2009-06-10 Thread Andrew Cunningham
Hi, I have had no problems linking building on Win32/64 (Visual 2005) in debug and release mode until I used a class derived from osg::Camera::DrawCallback. Debug mode 32/64 links fine, but Release mode gets the link error. At a wild guess it looks like the vtable for osg::Camera::DrawCallback

Re: [osg-users] [osgPlugins] FreeType plugin for Win64

2009-06-10 Thread Andrew Cunningham
Yes, It would definitely not be a problem to compile FT "as-is" on Linux as on 64-bit Linux sizeof(long)==8==sizeof(void *). Of course under Win64 sizeof(long)==4. I made the following changes to fttypes.h #ifdef _WIN64 typedef signed long long FT_Long; #else typedef signed long FT_Long; #

Re: [osg-users] [osgPlugins] FreeType plugin for Win64

2009-06-09 Thread Andrew Cunningham
With some fiddling of the FT headers I got the number of warnings in the FT Win64 build down to a plausible set and the osg text example works fine under Win64. If anyone is interested I can send the changed FT header file. -- Read this topic online here: http://forum.opensceneg

[osg-users] [osgPlugins] FreeType plugin for Win64

2009-06-09 Thread Andrew Cunningham
I am able to build and use the FT plug-in on Win32 using VS 2005. Attempts to build the required FT libraries (starting from the FT 2.3.9 distro) on Win64 are proving very difficult as the FT headers have a number of unfortunate assumptions that sizeof(unsigned long) = sizeof(void *) Has anyon

Re: [osg-users] 2.8.1 Image::readPixels and packing.

2009-06-09 Thread Andrew Cunningham
Call it what you like (bug, not optimal behavior, I don't care) but I would expect that in a code snippet image->setPacking(4) image->readPixels(,,,) That the readPixels call would respect the the packing that you set in previous line.However Image::readPixels resets the packing to 1 That is a

Re: [osg-users] Transparency on geode and shared stateSet

2009-06-09 Thread Andrew Cunningham
Jason Daly wrote: > Andrew Cunningham wrote: > > > Adjusting the material color alpha will work for some geometries but I have > > other geometries where each vertex has a BIND_PER_VERTEX color ( think of > > a contour plot of a value), so I would still need to adjus

[osg-users] 2.8.1 Image::readPixels and packing.

2009-06-08 Thread Andrew Cunningham
Image::readPixels() resets the packing of it's Image to 1. It should either take a packing parameter or respect the existing packing by passing _packing to allocateImage -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13732#13732 _

Re: [osg-users] Transparency on geode and shared stateSet

2009-06-08 Thread Andrew Cunningham
Adjusting the material color alpha will work for some geometries but I have other geometries where each vertex has a BIND_PER_VERTEX color ( think of a contour plot of a value), so I would still need to adjust the alpha of each vertex color. -- Read this topic online here: http

Re: [osg-users] Transparency on geode and shared stateSet

2009-06-08 Thread Andrew Cunningham
I am struggling with the same/similar issue. I want to set the transparency level dynamically ( the user has a slider) of a "group" in my scene. My understanding is that apart from setting the state GL_BLEND etc it is required to traverse/visit all of the nodes of the sub-graph setting the alp

Re: [osg-users] Possible primitiveIndex inconsistency in osgUtil::LineSegmentIntersector

2009-06-04 Thread Andrew Cunningham
In my field of finite elements, mixtures of QUADS and TRIS are the rule , not the exception. Anyway, the workaround is for me to always use a PolyTope intersector, even if it is only 1 pixel square... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p

[osg-users] Possible primitiveIndex inconsistency in osgUtil::LineSegmentIntersector

2009-06-03 Thread Andrew Cunningham
I have noticed that the osgUtil::LineSegmentIntersector will record two possible primitiveIndex's for each QUAD. For example, if you have a single QUAD you will get a primitiveIndex of 0 or 1 depending on where you are picking ( i.e which triangle) This is different from osgUtil::PolytopeInters

Re: [osg-users] osgUtil::SceneView and MFC

2009-06-03 Thread Andrew Cunningham
I seemed to have worked around my problems by replacing viewer()->frame() with the sequence of calls skipping the eventraversal() call viewer->advance(); viewer >updateTraversal(); viewer >renderingTraversals(); -- Read this topic o

Re: [osg-users] osgUtil::SceneView and MFC

2009-06-03 Thread Andrew Cunningham
I am trying to "port" an existing MFC application to use OSG instead of a "home-grown" scene graph. For Rev.0 I need to handle all my own MFC events as per my existing structure - I do not want the Viewer do any event handling. I have tried two options 1) using a "Render" thread as per the OSG

[osg-users] osgUtil::SceneView and MFC

2009-06-02 Thread Andrew Cunningham
Hi, If anyone has a code sample using osgUtil::SceneView (OSG 2.8.x) and MFC in a MDI app that would be really helpful to me. The osgViewer::Viewer class is proving problematic to use - I am fighting with it over events.. I need to take a step back to a level where I have more control. Thank

Re: [osg-users] Picking primitive subset

2009-06-01 Thread Andrew Cunningham
One thing that makes the primitiveIndex field of the intersection classes significantly less useful that it could be is that the Intersector decomposes QUADS etc into triangles. This means some additional housekeeping to keep track of what the index relates to -- Read this topic

Re: [osg-users] Picking primitive subset

2009-06-01 Thread Andrew Cunningham
Paul, I already have the two geometries sharing the same vertex array. But some "decorations" to show a "picked state" are mutually exclusive. For example, showing the "picked" primitives subset as wireframe ( not filled) is not possible as the same primitives will be present as "filled" in the

Re: [osg-users] Picking primitive subset

2009-06-01 Thread Andrew Cunningham
Hi Paul, I suppose I am unsure of "OSG best practices" to use when picking of primitives. With osg::Nodes I am using "userdata" quite effectively to relate an picked osg::node back to my data model - but with primitives it is not quite so clear what the best OSG way would be especially when dea

[osg-users] Picking primitive subset

2009-06-01 Thread Andrew Cunningham
Hi, I have a geometry that is represented by perhaps 500K triangle and/or quad primitives. During user interaction, I need to pick ( using a selection rectangle) a significant subset ( say 10K) of these primitives and "highlight" them ( simply turning the picked primitives wireframe would do).

Re: [osg-users] Visual Studio, Iterator Debugging, Secure SCL, Slow Performance, and getFileExtension "bug"

2009-05-29 Thread Andrew Cunningham
Hi, I have just been bitten by and wasted hours on with this 'issue' with VC++ 2005 . As noted you cannot mix vectors across "Release Mode" libraries that uses STL compiled with _SECURE_SCL=0 (mine) and "Release Mode" libraries e.g OSG ) compiled _SECURE_SCL=1 ( the default). It causes all sor

Re: [osg-users] Set image as static background

2009-05-22 Thread Andrew Cunningham
Hi, OK, I worked this out - Create a PRE_RENDER camera - create a 'square' add it to a geometry - create a new group, add geometry to group - add group to camera - add camera to scene - don't clear color buffer in main camera. ... Thank you! Cheers, Andrew -- Read this topic onl

Re: [osg-users] Driving me crazy...setting viewMatrix manually causes Geodes to get culled

2009-05-22 Thread Andrew Cunningham
Hi Paul, As you suggested... This fixed the problem... getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); That was driving me crazy Thank you! Cheers, Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12788#

[osg-users] Driving me crazy...setting viewMatrix manually causes Geodes to get culled

2009-05-22 Thread Andrew Cunningham
Hi, I am not using any of the osg manipulators - I am taking full control of the ortho projection and the viewer's camera viewmatrix using camera->setProjectionMatrixAsOrtho() and camera->setViewMatrix(). As I rotate the model about the origin various Geodes vanish and reappear ( not being simp

Re: [osg-users] Set image as static background

2009-05-22 Thread Andrew Cunningham
Hi Paul, I want to do a similar thing (a graduated background image). I did this in raw OGL quite easily, but like the previous poster , I am quite confused about how to do this with OSG. I too am using the "viewer" class which has a "setCamera" and "getCamera". I see the addSlave method but I

Re: [osg-users] Bad OSG geometry

2009-05-22 Thread Andrew Cunningham
Hi, Thanks for the tips guys - I did not think the light source node was included in the BBox... obvious once you think of it.. Thank you! Cheers, Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12767#12767

Re: [osg-users] MFC and OSG - letting MFC handle events

2009-05-21 Thread Andrew Cunningham
Ok, I am officially an idiot! During all my code changes to integrate the MFC OSG example code I forgot to properly inherit my MESSAGE MAP from the parent class. Works as expected now! I was not looking for the simple solution Andrew -- Read this topic online here: http://

<    1   2