Re: [osg-users] how to pick a cluster of points

2012-09-25 Thread Robert Osfield
Hi Shawl,

On 25 September 2012 06:40, wh_xiexing wh_xiex...@sina.com wrote:
 i want to create an editor  tool that can select a cluster of points
 one time in order to remove the selected points .
 osg provide the functions to do that job?   or i need to code from
 scratch?

How to tackle it will depend on how you plan to represent the points
in the scene graph and how you wish to define the selection of the
points.  You don't provide any information on this so I the best I can
do is say you probably need to write your own custom intersectors.

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


Re: [osg-users] how to pick a cluster of points

2012-09-25 Thread Sergey Polischuk
Hii think easiest way to do that is make some invisible geometry representating that point cloud which encloses all points, link it with point cloud and check intersection vs it.Cheers,Sergey. 25.09.2012, 09:40, "wh_xiexing" wh_xiex...@sina.com:Dear friends .    i want to create an editor  tool that can select a cluster of points one time in order to remove the selected points .   osg provide the functions to do that job?   or i need to code from scratch?    thank you for your help Shawl,___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] Memory leak notify handler

2012-09-25 Thread Markus Hochstrasser
Thank you very much!

I already solved the problem removing the handler at the end of my program.


Code:
osg::setNotifyHandler(NULL);



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





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


Re: [osg-users] osg::Image pixel format conversion

2012-09-25 Thread Ryan Ron
Hi,

Imagine a Program which lets you do a wide variety of ways to edit, alter, 
enhance and process batch conversion of your pictures in just a few clicks. 
Batch Image converter is the easiest to use programs that can apply your 
desired option to all or selected pictures at once... 

Thank you!

Cheers,
Ryan

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





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


Re: [osg-users] Depth buffer questions

2012-09-25 Thread Andrey Shvartsman
Thanks, hybr. But I still do not know why the values in the image attached to 
the depth buffer are the same in every single array cell, when I would expect 
to see a lot of variance between the top and bottom portions of the image, 
given that the top portion would be covering the sky, and the bottom half is 
covering the terrain. 

And can anyone comment on the approach itself vs using ray-tracing for 
emulating a lidar-like sensor?

Thank you!

Andrey

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





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


Re: [osg-users] unexecpted result with SetHomePosition

2012-09-25 Thread Claus Steuer
Hi,
i hope my question fits into this Thread.

I try to implement a custom CameraManipulator that derives from 
osgGA::CameraManipulator. My current goal is to change the lookAt Vector of the 
camera. After inspecting the definition of CameraManipulator it seemed to me 
that i could achieve this with the setHomePosition Method... but no matter what 
parameters i pass to setHomePosition nothing seems to happen.

Ulrich already pointed out that different manipulators use those values in a 
different way.
So my question is: Are the _eye, _center and _up values used at all when i just 
derive from CameraManipulator.

Thank you!

Cheers,
Claus

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





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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Christoffer Pettersson
Hello, I'm trying to write a program where the renderer is running on a 
separate thread. On the main thread I want to control the command line inputs 
but as soon as I add scenedata to the osgViewer which is stored in the renderer 
then the renderer takes over the standard input. std::cin in the main thread is 
ignored. If I put std::cin in the renderer thread however the program pauses 
and expects an input from the command line.

Does anyone know how I can prevent osgViewer from taking over the command line? 
I have attached sample code to this post where I demonstrate the problem.


Code:

#include 
#include 
#include 

class MiniRenderer: public OpenThreads::Thread 
{ 
public: 
void addModel(osg::Node* node) 
{ 
_nodes.push_back(node); 
} 

void run() 
{ 
_viewer.setUpViewInWindow(0, 0, 640, 480); 
_viewer.realize(); 
_sceneRoot = new osg::Group; 
_run = true; 
while(_run) 
{ 
if(_nodes.size()0) 
{ 
for(unsigned int i = 0; i  _nodes.size(); ++i) 
_sceneRoot-addChild(_nodes[i]); 
_nodes.clear(); 
_viewer.setSceneData(_sceneRoot.get()); 
} 
int test = -2; 
std::cout  In Thread:   std::endl; 
std::cin  test; 
std::cout  In Thread :   test  std::endl; 
_viewer.frame(); 
} 
} 
bool _run; 
osg::ref_ptr _sceneRoot; 
osgViewer::Viewer _viewer; 
std::vector  _nodes; 
}; 


int main( int argc, char **argv ) 
{ 
std::cout  Starting thread  std::endl; 
MiniRenderer *minirenderer = new MiniRenderer(); 
mr-startThread(); 

osg::ref_ptr root = osgDB::readNodeFile(cessna.osg); 
minirenderer-addModel(root); 
int test = -1; 

std::cout  Main cin  std::endl; 
std::cin  test; 
std::cout  Main cin:   test  std::endl; 

while(true) 
{ 

} 
return 0; 
} 




Edit: Parts of my code seem to have gone missing after I posted this, so here's 
a pastebin link with the code: 

pastebin . com / GxFAbZvf

I found one way to be able to get input from the console by using 
std::cin.clear() and std::ignore(std::numeric_limitstd::streamsize::max, 
'\n'). But this code would work in some places but not in others, so I can't 
use this since it's very unreliable..

Kind Regards
Hoffe

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





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


[osg-users] Multithreading Culling problems

2012-09-25 Thread Randall Hand
I've got a pretty decent little OpenSceneGraph system going, but I'm having 
problems getting it to work multithreaded.  If I set 
Code:
viewer-setThreadingModel(osgViewer::Viewer::SingleThreaded );

 then everything works fine, but if I enable any method of multithreading then 
I get strange flickering in my scene that in my best guesses seems to be 
related to Culling operations gone awry.  

I have a very simple scene (1 OBJ model loaded from disk, 3 times), but 4 
graphics contexts across 4 windows (I have 2 main windows that are rendering to 
textures, then 4 other windows all displaying the textures in screen-aligned 
quads).  The end result is 7 cameras (the 2 Slaves to do the two renders, 2 
slaves to show the Color textures, 2 slaves to do the Depth buffers, and one 
other attached to the Viewer as the Master.).




... 

Thank you!

Cheers,
Randall

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





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


Re: [osg-users] Is there something like an optimal way for integrating physics?

2012-09-25 Thread funk menera
Hi! 

Well, honestly i had a look at Havok. 
Luckily ... because the documentation seems much more complete and detailed 
than the PhysX docs.
So i started to play around with that ... multithreaded ; )
Thanks to the osgHavok example by Janusz (to be found in this forum) i got 
started easily
(uses callbacks)

Maybe i should try bullet next ...
... just loaded the src ... wow, openCL optimized code for AMD : ) 
But the vehicle functions seem very basic compared to Havok : ( 

So sadly, but likely i will stay with Havok. 
Except bullet has tremendous advantages in terms of integrating/managing the 
terrain? 
But that's propably a chapter of its own, especially in conjunction with OSG. 
Or somebody might have a quick advice for me on how to get started with that 
topic? 


Thanks alot for taking the time!

Cheers,
funk

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





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


Re: [osg-users] Using OSG Embedded in an Existing OpenGL Project

2012-09-25 Thread Dainon Woudstra
Hi,

S2LR, thanks for your help... I've tested out your suggestion and feel like I'm 
getting somewhere. The good/bad news, depending on your outlook, is that it 
does something. I had to modify some of what you provided to make it compile, 
but the result is that the application renders a solid color. With or without 
using...

gw-getCamera()-setClearMask(0);

or

view-getCamer()-setClearMask(0);

or neither

the application renders a solid color...

1) White without the clearMask
2) Black with the clearMask on view
3) Blue with the clearMask on gw

Additional Information
I have a three monitor display. The application runs on a 1680 x 1060 window, 
not full screen. When I run the code provided here, parts of the dartboard 
application renders on the first monitor for a split-second, then all three 
monitors are displaying the solid color.

I've played around with the OSG Cookbook Spheres example and found that calling 
the single screen function fixed the three screen issue.

viewer.setUpViewOnSingleScreen();

This function is not available with osgViwere::CompositeViewer.

OSG Setup

Code:

geode = new osg::Geode;

std::string fontFile(arial.ttf);
font = osgText::readFontFile(fontFile);
if (font.valid()) {

   osgText::Text* text = new osgText::Text;
   if (text != 0) {
  text-setUseDisplayList(false);
  text-setFont(font);
  text-setColor(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f));
  text-setCharacterSize(36.0f);
  text-setAutoRotateToScreen(true);
  text-setPosition(osg::Vec3(100.0f, 100.0f, 10.0f));
  //text-setAxisAlignment(osgText::Text::XZ_PLANE);
  text-setText(SomeSome!);

  text-setLayout(osgText::Text::LEFT_TO_RIGHT);

  geode-addDrawable(text);
   }
}

viewer = new osgViewer::CompositeViewer();
osgViewer::GraphicsWindowEmbedded *gw = (osgViewer::GraphicsWindowEmbedded*) 
new osgViewer::GraphicsWindow();
gw-setWindowRectangle(0, 0, 1680, 1060);

osgViewer::View *view = new osgViewer::View;
view-getCamera()-setGraphicsContext(gw);
view-getCamera()-setViewport(0, 0, 1680, 1060); // somewhere inside OGL 
viewport/window that has origin in LL corner 

view-setSceneData(geode);
viewer-addView(view);
viewer-realize();




Frame Renderer

Code:

glPushAttrib(GL_ALL_ATTRIB_BITS);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glMatrixMode(GL_TEXTURE);
glPushMatrix();
glMatrixMode(GL_MODELVIEW);
glPushMatrix();

viewer-frame();

glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glMatrixMode(GL_TEXTURE);
glPopMatrix();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glPopAttrib();
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);




Thank you!

Cheers,
Dainon

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





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


Re: [osg-users] Using OSG Embedded in an Existing OpenGL Project

2012-09-25 Thread Dainon Woudstra
What I've tried from your suggestions
I hope the code here is clear enough. I haven't had any success with your 
suggestions to this point. I have placed them in an easy format to try them all 
without getting commented code mixed up with other code. I'm posting here the 
four relevant sections of my code, in hopes it may help get me over this hump. 
I've tried putting the OSG initialization before the OpenGl initialization and 
the three different suggestions of initialization and rendering. I've ensured 
the DLL wrapper works, it will retun the values I set in them and I can step 
through it while debugging and see legit values being assigned to the font. 
DartModelDll.dll is poorly named and will be changed in the future. Anywhere 
that name is in the following, assume OsgDLL.

C# Form Constructor

Code:

   public partial class Form1 : Form
  {
 OsgWrapper osgWrapper;

 // OpenGL contrrol object
 private static OpenGLControl openGLControl;
 
 public Form1()
 {   
// Initialze components
InitializeComponent();

// Test
osgWrapper = new OsgWrapper();
int blah = osgWrapper.Init();

// Initialize SharpGL
initSharpGL();

...




C# OSG Drawing Function

Code:

 private void openGLControl_OpenGLDraw(object sender, PaintEventArgs e)
 {
//  Get the OpenGL object.
OpenGL gl = openGLControl.OpenGL;

//  Clear the color and depth buffer.
gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT | OpenGL.GL_DEPTH_BUFFER_BIT);
gl.ClearColor(0.0f, 0.0f, 0.0f, 1.0f);

//  Load the identity matrix.
gl.LoadIdentity();

scoreKeeper.calculateGameScore();

// Render the textures for the dartboard and background
renderBackgroundTextures();

// render dartboard sections
renderDartboardSections();

// render scoring sections
renderScoringSection();
   
int blah = osgWrapper.TestText();

...




C# Wrapper Code for the Osg DLL

Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WMPLib;
using System.Runtime.InteropServices;

namespace DartBoardApplication.Items {
   public class OsgWrapper {
  [DllImport(DartModelDll.dll)]
  static extern IntPtr dll_cOsgViewer();

  [DllImport(DartModelDll.dll, CallingConvention = 
CallingConvention.Cdecl)]
  static extern int dll_initViewer(IntPtr dm);

  [DllImport(DartModelDll.dll, CallingConvention = 
CallingConvention.Cdecl)]
  static extern int dll_testText(IntPtr dm);

  IntPtr dartModel;

  public OsgWrapper() {
 dartModel = dll_cOsgViewer();
  }

  public int Init() {
 return dll_initViewer(dartModel);
  }

  public int TestText() {
 return dll_testText(dartModel);
  }
   }
}




Osg DLL

Code:

#include Windows.h
#include gl/gl.h
#include osg/Node
#include osg/Geode
#include osg/Group
#include osgViewer/Viewer
#include osgViewer/CompositeViewer
#include osgViewer/GraphicsWindow
#include osgDB/ReadFile
#include osgText/Text
#include osg/ShapeDrawable
#include excpt.h
#include osg/StateSet

#include osgViewer/Viewer
#include osg/MatrixTransform

using namespace osg;
using namespace osgDB;
using namespace osgText;

class COsgViewer {
   public:
  COsgViewer() {
  };

  ~COsgViewer() {
  }

  osg::ref_ptrosgText::Font font;
  osg::ref_ptrosgViewer::Viewer mViewer;
  osgViewer::CompositeViewer *viewer;
  osg::observer_ptrosgViewer::GraphicsWindowEmbedded mWindow;
  osg::ref_ptrosg::Group mRoot;
  osg::ref_ptrosg::Geode geode;
  osg::ref_ptrosg::StateSet mLastStateSet;

  int initViewer(void) {

//initViewer1();
//initViewer2();
initViewer3();

 return 4;
  }

  void initViewer1() {
 // Create the scene root
 mRoot = new osg::Group;

 geode = new osg::Geode;

 std::string fontFile(arial.ttf);
 font = osgText::readFontFile(fontFile);
 if (font.valid()) {

osgText::Text* text = new osgText::Text;
if (text != 0) {
   text-setUseDisplayList(false);
   text-setFont(font);
   text-setColor(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f));
   text-setCharacterSize(36.0f);
   text-setAutoRotateToScreen(true);
   text-setPosition(osg::Vec3(100.0f, 100.0f, 10.0f));
   //text-setAxisAlignment(osgText::Text::XZ_PLANE);
   text-setText(SomeSome!);

   

Re: [osg-users] How to select or pick an object in OSG, in file .osg using osgviewer pick.osg?

2012-09-25 Thread Kleber Jacome
Hi,

Yes , I'm using the example 'osgpick' in OSG. But It does'nt found in 
osgviewer, using the command in console: osgviewer osgpick.osg , 'pick' or 
'pickHandle' only works on the application. Osgviewer locks the keyboard and 
mouse, to use their own movements: osgviewer --help-keys. Is there a way to 
run 'pick' on Osgviewer? or unlock Osgviewer movements and keys?

Thank you!

Cheers,
Kleber

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





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


[osg-users] [forum] Windows 7 64Bit OSG

2012-09-25 Thread Michael Aquilino
Hi,

We have had OSG embedded in our application for some time now.  Our current 
version is 2.8.1.  We had been running on Windows XP Pro until recently when we 
installed our application on a Windows 7 laptop (32Bit).  There were a few very 
minor glitches that we corrected.  More recently we installed on a Windows 7 
desktop (64Bit).  The library DLL that we build on top of OSG fails to load.  
We get the infamous error An attempt was made to load a program with an 
incorrect format.  Any help would be much appreciated.

Thank you!

Cheers,
Michael

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





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


[osg-users] Invert scene graph

2012-09-25 Thread Stéphane Bonardi
Dear OSG users,

I've been using OSG since quite some time now but I'm facing a problem for 
which I was not able to find a good solution. I both searched on the forum and 
googled my problem but with no luck so far.  

Since my overall setup is a bit complicated, I'm going to use here a simplified 
version to explain what I'm trying to achieve. Imagine that I try to create and 
animate a robotic arm with three degrees of freedom (articulations): I create a 
scene graph composed of a root node (osg::Group, called G, the basis of the 
arm) and three PositionAttitudeTransforms (P1,P2, and P3) corresponding to the 
articulations. The parenting relationship between those elements are the 
following: G is parent of (ipo) P1, P1 ipo P2 and P2 ipo P3. To each of those 
PositionAttitudeTransforms (PAT) I attached a node (osg::Node, called N1, N2, 
and N3 respectively) representing the physical model of the moving parts 
(loaded from stl files). So far everything is working perfectly and when moving 
the arm using a KeyboardEventHandler to move the different degrees of freedom 
the children of the articulations are moving accordingly. 
The particularity of the arm is that it can attached to the environment using 
its end effector (here N3) and detached its first articulation from the basis 
(N1 from G). I would like to be able to replicate such a behaviour meaning 
having alternatively G ipo P1 ipo P2 ipo P3 and G ipo P3 ipo P2 ipo P1. I would 
like to control the arm with the same events than before the disconnection: 
when I move P3, both P2 and P1 should be moving with the correct setting for 
the pivot points and positions.  

I already tried two options:
- use the removeChild function to dynamically recreate the scene graph: the 
main problem is that it seems that the information regarding the PAT (both the 
position and the pivot point) are then incorrect. My guess was that those 
information are relative to the parent node but I didn't know how to correctly 
modify them afterwards.  
- having two different PAT for each node (like having a forward kinematic chain 
and a backward one): I did not think it was a good idea at the time so I 
quickly dropped the idea (I remembered obtaining two copies of each node 
displayed).  

My question would be the following: what would be the correct way to simulate 
such a behaviour, considering that there would be a succession of connection 
and disconnection (P1 and P3 being connected to the root alternatively)? 

Thank you!

Best,

Stéphane

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





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


[osg-users] [ANN] osgVirtualAssembly Project contain Bullet GImpact Detection Collision

2012-09-25 Thread GL
Hello dear OSG-community,

I write a project that contains Bullet GImpact Detection Collision, customer 
osgDragger like 3DMax use and a simple AnimationManager , so I hope it will 
help others who want to use the bullet Detection Collision.

the software version is: Bullet2.8.0 , Qt4.7.4 , OSG3.1.2
and if you want to use the Detection Collision you should revise your osg source
In the osgManipulator::Dragger  include file
revise  the function void dispatch(MotionCommand command) to virtual void 
dispatch(MotionCommand command)
Best regards,
liuzy

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




Attachments: 
http://forum.openscenegraph.org//files/osgvirtualassembly_131.rar


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


[osg-users] osgconv FileNameList File Path

2012-09-25 Thread Jason Cunningham
Hi,

I am new to OpenSceneGraph and am creating my own .osg files that I then want 
to convert to .ive files for use in our application. My .osg file will 
basically be a list of ProxyNodes to other .ive files. These .ive files can be 
at different locations. When I convert my working .osg file to .ive it removes 
the file paths from the files listed in FileNameList ProxyNodes and just 
outputs the file name. I need to retain the file path.

For example, a proxy node in my .osg file could be:

  ProxyNode {
nodeMask 0x
...
FileNameList 1 {
  X102/Y58/L0/R0/102x58_0_0x0.ive
}

When I use osgconvert to convert the .osg file to .ive the file name will be 
written with the name only 102x59_0_0x0.ive without the path, so my 
application can't find the file. So far I have not been able to find a command 
argument to include the full path. 

Is there a way to get osgconvert to retain the full path?

I appreciate any help.
... 

Thank you!

Cheers,
Jason

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





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


[osg-users] setColorArray is slow on large model

2012-09-25 Thread Tina Guo
Hi,

I am trying to change the color of a geometry after I pick it. I use display 
list, however, when call setColorArray, it takes time to really change the 
color. I read this post http://forum.openscenegraph.org/viewtopic.php?t=9234 , 
and setUseDisplayList(false). However, after that, the manipulate of model, 
rotate, pan...becomes slow, and frame rate drops. I do not know if there's way 
to change the color of geometry with call setColorArray to avoid calling 
dirtyDisplayList(). 
... 

Thank you!

Cheers,
Tina

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





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


[osg-users] Mipmapping for downsampling

2012-09-25 Thread Kenzo Lespagnol
Hi,

I'm currently implementing my own global tone mapping (without osgPPU). As a 
first iteration, I'm averaging the luminance by using hardware mipmap 
generation. Then I'm wondering if there is a mean to retrieve the last level of 
mipmapping from a osg::Texture?

Is someone have a useful link I missed during my searchs? A example will be 
also appreciated.

Thank you!

Cheers,
Kenzo

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





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


Re: [osg-users] OSG + Qt + Thread exception thread::run

2012-09-25 Thread Francisco
Thanks for reply.

I tried to reinstall the OSG library because I think I did something wrong the 
first time, but errors continued. However I think the problem came by my 
graphic card drivers, I have an ATI Xpress 1250 (onboard). Changing the file 
atioglxx.dll from legacy version 10.2 to Catalyst 7.10 it seems that works 
fine!!! :)

Francisco.

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





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


Re: [osg-users] Multithreading Culling problems

2012-09-25 Thread Robert Osfield
Hi Randall,

The flickering issues is very unlikely to be related to culling as
it's naturally thread safe thanks to the way it's effectively buffered
and hasn't caused problems before. The exception to this would be if
you have some cull callback that is't thread safe, or you are using
something like AutoTransform that doesn't bufferer it's state so can't
reliably handle multiple camera positions above it.

More likely problems when multi-threading are related to changing data
in the update traversal that are being rendered at the same time in
draw traversal.  To avoid this the OSG tracks objects which are
dynamically updated and avoids letting the next frame commense till
all these dynamic objects are dispatched.  The OSG requires you to say
which objects you plan to modify though, so you need to set the
DataVariance to DYNAMIC for all Drawable and StateSet that contain
data that is dynamically updated.  You don't need to set the
DataVariance of Nodes in the scene graph to be DYNAMIC though as it's
only StateSet and Drawable that areused in in the draw traversal.

Robert.

On 17 September 2012 19:08, Randall Hand randall.h...@gmail.com wrote:
 I've got a pretty decent little OpenSceneGraph system going, but I'm having 
 problems getting it to work multithreaded.  If I set
 Code:
 viewer-setThreadingModel(osgViewer::Viewer::SingleThreaded );

  then everything works fine, but if I enable any method of multithreading 
 then I get strange flickering in my scene that in my best guesses seems to be 
 related to Culling operations gone awry.

 I have a very simple scene (1 OBJ model loaded from disk, 3 times), but 4 
 graphics contexts across 4 windows (I have 2 main windows that are rendering 
 to textures, then 4 other windows all displaying the textures in 
 screen-aligned quads).  The end result is 7 cameras (the 2 Slaves to do the 
 two renders, 2 slaves to show the Color textures, 2 slaves to do the Depth 
 buffers, and one other attached to the Viewer as the Master.).




 ...

 Thank you!

 Cheers,
 Randall

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





 ___
 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] How to select or pick an object in OSG, in file .osg using osgviewer pick.osg?

2012-09-25 Thread Robert Osfield
Hi Kleber,

On 18 September 2012 15:12, Kleber Jacome gasnapiro_...@hotmail.com wrote:
 Yes , I'm using the example 'osgpick' in OSG. But It does'nt found in 
 osgviewer, using the command in console: osgviewer osgpick.osg , 'pick' or 
 'pickHandle' only works on the application. Osgviewer locks the keyboard and 
 mouse, to use their own movements: osgviewer --help-keys. Is there a way to 
 run 'pick' on Osgviewer? or unlock Osgviewer movements and keys?

The osgpick example is an example program found in
OpenSceneGraph/examples/osgpick/osgpick.cpp, it's not data that you'd
load into osgviewer.

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


Re: [osg-users] setColorArray is slow on large model

2012-09-25 Thread Robert Osfield
Hi Tina,

Setting the colour array on an osg::Geometry should be quick and
shouldn't normally make rendering slow.  The fact you are finding this
suggests that perhaps you are setting up osg::Geometry to render with
OpenGL slow paths so as using indices arrays or per primitive bindings
- these are a deprecated.

I would suggest you take a step back and try to work out why you are
getting slower performance.  We can't help you too much without more
information about what the bottlenecks are and what performance you
were and are now getting.  For instance tells the hardware, OS, OSG
version, how you've compiled it (debug vs release), the model stats,
the performance stats such as update, cull, draw dispatch and draw GPU
times.

Robert.

On 20 September 2012 21:37, Tina Guo guoyiting1...@gmail.com wrote:
 Hi,

 I am trying to change the color of a geometry after I pick it. I use display 
 list, however, when call setColorArray, it takes time to really change the 
 color. I read this post http://forum.openscenegraph.org/viewtopic.php?t=9234 
 , and setUseDisplayList(false). However, after that, the manipulate of model, 
 rotate, pan...becomes slow, and frame rate drops. I do not know if there's 
 way to change the color of geometry with call setColorArray to avoid calling 
 dirtyDisplayList().
 ...

 Thank you!

 Cheers,
 Tina

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





 ___
 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] [ANN] osgVirtualAssembly Project contain Bullet GImpact Detection Collision

2012-09-25 Thread Robert Osfield
Hi luizy,

On 25 September 2012 01:42, GL 524582...@qq.com wrote:
 In the osgManipulator::Dragger  include file
 revise  the function void dispatch(MotionCommand command) to virtual void 
 dispatch(MotionCommand command)

I have just checked in the change of the method
dispatch(MotionCommand command) to virtual into svn/trunk.

Good luck with your project,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Depth buffer questions

2012-09-25 Thread Sergey Polischuk
Hi

Is the image that you attach to camera have same dimensions as camera viewport? 
May be you rendering only small part of picture to your image ( like small 
piece of sky )

Cheers,
Sergey.

17.09.2012, 17:09, Andrey Shvartsman ashvarts...@dcscorp.com:
 Thanks, hybr. But I still do not know why the values in the image attached to 
 the depth buffer are the same in every single array cell, when I would expect 
 to see a lot of variance between the top and bottom portions of the image, 
 given that the top portion would be covering the sky, and the bottom half is 
 covering the terrain.

 And can anyone comment on the approach itself vs using ray-tracing for 
 emulating a lidar-like sensor?

 Thank you!

 Andrey

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

 ___
 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] Invert scene graph

2012-09-25 Thread Thrall, Bryan
Stéphane Bonardi wrote on 2012-09-19: 
 Since my overall setup is a bit complicated, I'm going to use here a
 simplified version to explain what I'm trying to achieve. Imagine that I
 try to create and animate a robotic arm with three degrees of freedom
 (articulations): I create a scene graph composed of a root node
 (osg::Group, called G, the basis of the arm) and three
 PositionAttitudeTransforms (P1,P2, and P3) corresponding to the
 articulations. The parenting relationship between those elements are the
 following: G is parent of (ipo) P1, P1 ipo P2 and P2 ipo P3. To each of
 those PositionAttitudeTransforms (PAT) I attached a node (osg::Node,
 called N1, N2, and N3 respectively) representing the physical model of
 the moving parts (loaded from stl files). So far everything is working
 perfectly and when moving the arm using a KeyboardEventHandler to move
 the different degrees of freedom the children of the articulations are
 moving accordingly. The particularity of the arm is that it can attached
 to the environment using its end effector (here N3) and detached its
 first articulation from the basis (N1 from G). I would like to be able
 to replicate such a behaviour meaning having alternatively G ipo P1 ipo
 P2 ipo P3 and G ipo P3 ipo P2 ipo P1. I would like to control the arm
 with the same events than before the disconnection: when I move P3, both
 P2 and P1 should be moving with the correct setting for the pivot points
 and positions.
 
 I already tried two options: - use the removeChild function to
 dynamically recreate the scene graph: the main problem is that it
 seems that the information regarding the PAT (both the position and the
 pivot point) are then incorrect. My guess was that those information are
 relative to the parent node but I didn't know how to correctly modify
 them afterwards. - having two different PAT for each node (like having a
 forward kinematic chain and a backward one): I did not think it was a
 good idea at the time so I quickly dropped the idea (I remembered
 obtaining two copies of each node displayed).
 
 My question would be the following: what would be the correct way to
 simulate such a behaviour, considering that there would be a succession
 of connection and disconnection (P1 and P3 being connected to the root
 alternatively)?

Hi Stéphane,

I think if you invert the matrices when you are doing backward kinematics, you 
can keep the same scenegraph structure. For example, when the end effector is 
attached, you have the transform from P3 to P2 but you have P2 ipo P2, so the 
inverse of the transform you have is what you should set the PAT transform to.

Hope this helps,
--
Bryan Thrall
Principal Software Engineer
FlightSafety International
bryan.thr...@flightsafety.com


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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Christoffer Pettersson
Hello,

This problem occurs when I run the code on an old machine with intel core 2 
duo,Nvidia quadro FX 580, 4gb ram, OS=Slackware. If I run this code on another 
machine with Intel i7-3770, AMD Radeon 7800 series (2gb), 12gb ram, OS=Red Hat 
then the code runs just fine.

Do you have any ideas as to why this older hardware does not handle this code 
properly?


 
 Using standard input is a bit unusual for a rendering application, 
 might I suggest you just read the keyboard input from the actual 
 rendering window itself?


Unfortunately this is not an option. I'm writing a test framework which depends 
on input from the console.

Kind Regards
Christoffer

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





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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Robert Osfield
Hi Christoffer,

On 25 September 2012 12:39, Christoffer Pettersson hoffe...@hotmail.com wrote:
 This problem occurs when I run the code on an old machine with intel core 2 
 duo,Nvidia quadro FX 580, 4gb ram, OS=Slackware. If I run this code on 
 another machine with Intel i7-3770, AMD Radeon 7800 series (2gb), 12gb ram, 
 OS=Red Hat then the code runs just fine.

 Do you have any ideas as to why this older hardware does not handle this code 
 properly?

As I mentioned in my previous email handling of cin won't be releated
to the OSG itself, and I'd go further and say it will not have
anything to do with the hardware and drivers as well.

This will be compiler or terminal interaction.

I'll also state, write a proper gui.

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


Re: [osg-users] [forum] Windows 7 64Bit OSG

2012-09-25 Thread Chris Hanson

 We have had OSG embedded in our application for some time now.  Our
 current version is 2.8.1.  We had been running on Windows XP Pro until
 recently when we installed our application on a Windows 7 laptop (32Bit).
  There were a few very minor glitches that we corrected.  More recently we
 installed on a Windows 7 desktop (64Bit).  The library DLL that we build on
 top of OSG fails to load.  We get the infamous error An attempt was made
 to load a program with an incorrect format.  Any help would be much
 appreciated.


  Are you trying to call 32-bit OSG from a 64-bit compiled app? You don't
really say.



 Thank you!

 Cheers,
 Michael

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





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




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Christoffer Pettersson
hmm ok. I tried the code on another computer with specifications between the 
two computers mentioned before. This one running Slackware as well. And the 
code ran fine on this one. Theyre using the same terminal and as far as I know 
they also use the same compiler.

As I mentioned before, Writing a proper gui is not an option. The framework 
needs to be controlled from the terminal.

Kind Regards
Christoffer

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





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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Jason Daly

On 09/25/2012 12:04 PM, Christoffer Pettersson wrote:

hmm ok. I tried the code on another computer with specifications between the 
two computers mentioned before. This one running Slackware as well. And the 
code ran fine on this one. Theyre using the same terminal and as far as I know 
they also use the same compiler.

As I mentioned before, Writing a proper gui is not an option. The framework 
needs to be controlled from the terminal.


Hi, Christoffer,

As Robert has hinted at, the OSG isn't really designed to be used from 
the command line, and as such, it doesn't provide any interfaces to do 
so.  That usage model is rather antiquated and graphical interfaces are 
by far the norm these days.


As luck would have it, however, I recently implemented a tool that was 
also required to be console-driven.  The easiest way to handle it is to 
use a separate thread to wait for and read your input (this way, stdin 
can block as usual while waiting for a command, while the main viewer 
threads can proceed merrily on their way).  I'll send you my console app 
(off-list), so you can have an example to follow.


--J

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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Jorge Izquierdo Ciges
Maybe would be easier to do a client-server approach to give orders to the
renderer (server) and that the client program would hear the terminal
orders.

2012/9/25 Jason Daly jd...@ist.ucf.edu

 On 09/25/2012 12:04 PM, Christoffer Pettersson wrote:

 hmm ok. I tried the code on another computer with specifications between
 the two computers mentioned before. This one running Slackware as well. And
 the code ran fine on this one. Theyre using the same terminal and as far as
 I know they also use the same compiler.

 As I mentioned before, Writing a proper gui is not an option. The
 framework needs to be controlled from the terminal.


 Hi, Christoffer,

 As Robert has hinted at, the OSG isn't really designed to be used from the
 command line, and as such, it doesn't provide any interfaces to do so.
  That usage model is rather antiquated and graphical interfaces are by far
 the norm these days.

 As luck would have it, however, I recently implemented a tool that was
 also required to be console-driven.  The easiest way to handle it is to use
 a separate thread to wait for and read your input (this way, stdin can
 block as usual while waiting for a command, while the main viewer threads
 can proceed merrily on their way).  I'll send you my console app
 (off-list), so you can have an example to follow.

 --J


 __**_
 osg-users mailing list
 osg-users@lists.**openscenegraph.org osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.**org/listinfo.cgi/osg-users-**
 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] osgViewer takes over my standard input

2012-09-25 Thread Christoffer Pettersson
Hi Robert,

That is pretty much what I'm doing, just the other way around. The main thread 
is responsible for handling standard inputs, while the second thread is 
responsible for handling the renderer. 

Hi Jorge,
That is exactly what I try to mimic using the current design :) I cant add 
network support at the moment so I need to use the sort of design I have 
presented.

Kind Regards
Christoffer

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





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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Jason Daly

On 9/25/2012 5:01 PM, Christoffer Pettersson wrote:

Hi Jason,

That is pretty much what I'm doing, just the other way around. The main thread 
is responsible for handling standard inputs, while the second thread is 
responsible for handling the renderer.
   


I didn't see the code you posted earlier (just looked it up on the forum).

I'm a bit confused as to why you're reading from cin in both threads.  
That is definitely going to cause a problem.  You should only be reading 
from cin in the main thread in your case.  I'd expect the viewer thread 
to be hanging up on that cin call in the run() function on every frame.


Another potential issue I saw is that you're not protecting your _nodes 
vector at all.  You could theoretically be trying to add a model to it 
in the main thread at the same time as you're pulling models off of it 
in the renderer thread.


--J

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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Christoffer Pettersson
The cin in the thread is only there for demonstration purposes. It was used to 
test the blocking of the cin function. If i write cin in the render thread then 
the program is halted. If i write it in the main thread it is not halted. The 
model code is also just for demonstration. That part of the code works. It's 
essentially just there to recreate the cin problem

Kind regards
Christoffer

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





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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Jason Daly

On 9/25/2012 5:27 PM, Christoffer Pettersson wrote:

The cin in the thread is only there for demonstration purposes. It was used to 
test the blocking of the cin function. If i write cin in the render thread then 
the program is halted. If i write it in the main thread it is not halted. The 
model code is also just for demonstration. That part of the code works. It's 
essentially just there to recreate the cin problem
   


Maybe I'm missing your point, but that behavior is exactly what I would 
expect.


If you try to read from cin in the same thread that you're using for the 
OSG rendering, it will block waiting for input every time.  As far as I 
know, there's no way for it to not block.  The way to get around this is 
to read commands from cin in a different thread and store the commands 
in a buffer, and then process the buffered commands in the render thread 
between frames.


--J

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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Christoffer Pettersson
The cin in the render thread is not supposed to be there. They were just put 
there to see if they would block or not, which they did.  The problem i have is 
that if i write cin in any other thread than the render thread, then the thread 
containing the cin command does not block. It jumps over the cin command giving 
me an empty buffer. This happens on 1 out of the 3 computers i have tested the 
code on. On the other 2, the cin command succesfully blocks.

Kind regards 
Christoffer

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





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


Re: [osg-users] osgViewer takes over my standard input

2012-09-25 Thread Jason Daly

On 09/25/2012 05:45 PM, Christoffer Pettersson wrote:

The cin in the render thread is not supposed to be there. They were just put 
there to see if they would block or not, which they did.  The problem i have is 
that if i write cin in any other thread than the render thread, then the thread 
containing the cin command does not block. It jumps over the cin command giving 
me an empty buffer. This happens on 1 out of the 3 computers i have tested the 
code on. On the other 2, the cin command succesfully blocks.


Ah, OK, now I understand the problem.  Thanks  :-)

Not sure about your case, but usually when std::cin doesn't block, it 
means that there's something left to be read from the stream.  What 
happens if you switch to using std::getline() instead?  You can then 
process the entire line of input using a stringstream, and there's no 
chance a stray \n will get stuck in the stream.  It's usually better to 
process console input in a line-oriented way.



Take a look at this question on Stack Overflow:

http://stackoverflow.com/questions/11354936/why-doesnt-stdgetline-block


--J

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


Re: [osg-users] [ANN] osgVirtualAssembly Project contain Bullet GImpact Detection Collision

2012-09-25 Thread zy liu
Thanks Robert

2012/9/25 Robert Osfield robert.osfi...@gmail.com

 Hi luizy,

 On 25 September 2012 01:42, GL 524582...@qq.com wrote:
  In the osgManipulator::Dragger  include file
  revise  the function void dispatch(MotionCommand command) to virtual
 void dispatch(MotionCommand command)

 I have just checked in the change of the method
 dispatch(MotionCommand command) to virtual into svn/trunk.

 Good luck with your project,
 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] OSG using OpenGL 3.2 in Mac OS X 10.7 (Lion)

2012-09-25 Thread Paul Martz
Hi David -- I posted your change #1 to osg-submissions. (To refresh your memory, 
this is the fix for how OpenGL.h is included by the include/osg/GL header.)


With this change, we (at least) have OSG trunk building for GL3 on OSX 10.7. To 
actually get it running (i.e., support for forward compatible / core profile, 
vertex array objects, etc), that can be a follow-on submission.

   -Paul



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


Re: [osg-users] OpenGL ES 2 iOS 5.1 Non power of two textures

2012-09-25 Thread Guillaume Tazé
Hi,

I tried to use non power of two textures under iOS 5.1 with OpenGL ES 2 (on 
Ipad 2) but didn't succeed so far.. Am i missing something ?

I'm using this kind of code :

texture = new osg::Texture2D();
texture-setImage(0, image);
texture-setResizeNonPowerOfTwoHint(false);
texture-setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR);
texture-setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);

and then osg::createTexturedQuadGeometry to create my geometry...

I'm getting an error : Warning: detected OpenGL error 'invalid enumerant' at 
after RenderBin::draw(..).

It seems like the extension GL_APPLE_texture_2D_limited_npot is available on 
Ipad 2... ?

Can someone help me please :) ?

Thank you!

Cheers,
Guillaume

EDIT : Nevermind, i thought that the GL_APPLE_texture_2D_limited_npot was 
available in OpenGL ES 2 but it is only on OpenGL ES 1 for the Ipad. Turning to 
OpenGL ES 1 is working !

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





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


Re: [osg-users] osgconv FileNameList File Path

2012-09-25 Thread Jason Cunningham
Hi,

I am new to OpenSceneGraph and am creating my own .osg files that I then want 
to convert to .ive files for use in our application. My .osg file will 
basically be a list of ProxyNodes to other .ive files. These .ive files can be 
at different locations. When I convert my working .osg file to .ive it removes 
the file paths from the files listed in FileNameList ProxyNodes and just 
outputs the file name. I need to retain the file path.

For example, a proxy node in my .osg file could be:

  ProxyNode {
nodeMask 0x
...
FileNameList 1 {
  X102/Y58/L0/R0/102x58_0_0x0.ive
}

When I use osgconvert to convert the .osg file to .ive the file name will be 
written with the name only 102x59_0_0x0.ive without the path, so my 
application can't find the file. So far I have not been able to find a command 
argument to include the full path. 

Is there a way to get osgconvert to retain the full path?

I appreciate any help.

EDIT: I figured it out. I needed the inlineExternalReferencesInIVEFile 
command line argument.
... 

Thank you!

Cheers,
Jason

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





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


[osg-users] [forum] Forum Problems?

2012-09-25 Thread Andrey Shvartsman
Has anyone experienced problems with the forum in the last week or so? I keep 
getting a lot of 502 Bad Gateway error messages a lot of the time I try to 
open posts.

Andrey

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





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


Re: [osg-users] Mipmapping for downsampling

2012-09-25 Thread Kenzo Lespagnol
Hi,

I've managed to generate my mipmap via the hardware. But I'm guessing I don't 
have the good mipmap as the result of my tone mapping is unstable. The screen 
is brighter in a jerky manner for some position of the camera. 

As below, how to create my mipmap:

Code:

osg::ref_ptrosg::Texture2D tex2D = 
dynamic_castosg::Texture2D*(logAveragedLumTexture.get());
tex2D-setNumMipmapLevels(9);
tex2D-setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
tex2D-setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR_MIPMAP_LINEAR);




Then I'm retrieving the values of the smallest mipmap (2x2), by accessing to 
the LOD level 9 as my texture is 512 by 512 as the beginning:

Code:

// get last mipmap level as 2x2 texture
vec4 lastMipmapLevel;
lastMipmapLevel.x = textureLod(logAveragedLumTexture, vec2(0.25, 0.25), 9.0).r;
lastMipmapLevel.y = textureLod(logAveragedLumTexture, vec2(0.75, 0.25), 9.0).r;
lastMipmapLevel.z = textureLod(logAveragedLumTexture, vec2(0.25, 0.75), 9.0).r;
lastMipmapLevel.w = textureLod(logAveragedLumTexture, vec2(0.75, 0.75), 9.0).r;




I'm not sure about the way to access to my mipmap. I've tried other texture 
coordinates but the results is still unstable.

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





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


Re: [osg-users] [3rdparty] build souces under QT

2012-09-25 Thread Liu Zhiyu
Hi,
first,You should build your osg binary with mingw,so the qt binary can use.
the CMake can build the mingw makefile.


Thank you!

Cheers,
Liu

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





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


[osg-users] How to get position information

2012-09-25 Thread Michael W. Hall
Well I have my application displaying maps.  I also believe that I have
some DTED data loading.  Now I would like to have the lat/long and
elevation display in the status bar.  My question is how do you get the
position information as you move the mouse over the map?

I was trying to make my own class derived from osgGA::GUIEventHandler.
Before I go off in some direction I thought I would ask.

Thanks for any help.

___
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 position information

2012-09-25 Thread Chris Hanson
On Tue, Sep 25, 2012 at 7:26 PM, Michael W. Hall hal...@att.net wrote:

 Well I have my application displaying maps.  I also believe that I have
 some DTED data loading.  Now I would like to have the lat/long and
 elevation display in the status bar.  My question is how do you get the
 position information as you move the mouse over the map?
 I was trying to make my own class derived from osgGA::GUIEventHandler.
 Before I go off in some direction I thought I would ask.


  If you're not using osgEarth for this, you're doing it the hard way.



 Thanks for any help.

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




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org