Re: [osg-users] Falling off the NVidia fast path

2012-03-22 Thread Sergey Polischuk
Hi May be using some specific blendfunc\op or logic op can cause this. Some glsl code on older hardware (f.e. indexing into array with non-constant index)You can try to strip your shaders to basic ones to check if they cause problems, and turn off rasterization specific state one by one Cheers 22.03.2012, 03:52, "Chris Hanson" xe...@alphapixel.com:  I'm doing my 16-bit RTT work with GL_RGBA16 successfully now, though osg::Image doesn't like it much (I avoided the problem). However, recently, I've made some change that knocked me off the fast path onto software rendering(!) on some older hardware. My GTX 560M is just fine, but a Quadro FX 2700M laptop is kicking into software rendering (Ayi!) and a 9600M GT also is reported to do the same thing.  Now, the Quadro is supposed to be a G94GLM core:http://en.wikipedia.org/wiki/Nvidia_Quadro#Quadro_FX_M  and this chart:http://developer.download.nvidia.com/opengl/texture_formats/nv_ogl_texture_formats.pdf  seems to indicate that the G80, GT200 and presumably later support RGBA16 without compromise.  Any other suggestions about what could be kicking me off the fast path on these devices? Would it be usage of some particular GLSL function? Or use of some texture mode? I wouldn't think allocating too many 16-bit textures would do it, because I'd think that would just fail to allocate the last one(s).  Any pointers to where I could learn what could be kicking me off the hardware path is appreciated.   OSG has reported "Rendering in software: pixelFormatIndex 3." on one of the devices, a GeForce 7300. I'm not clear on what GPU core this is (G73?) or where it falls on that chart, but empirical testing of earlier versions of the code seemed to indicate it was delivering 16-it capability fine.-- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/Training • Consulting • Contracting3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCLDigital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android___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


[osg-users] Unique colors on a shared Geode

2012-03-22 Thread Hartmut Leister
I'm using a shared Geode/Billboard multiparented to several transforms and want 
to attach a unique color and transparency to each of these.
(Also they will have unique positions, rotations and scalings, but those I 
already got using PositionAttitudeTransform).

What would be the best way to set and change color and transparency?
(If possible, I'd stay with the PositionAttitudeTransform rather than 
calculating the MatrixTransform myself)

Right now I can set a unique color to each PAT, but it's just a constant color 
and I need a 3D-Effect. I'm not really firm with all those Blend-Enums and 
could need a hint how to set source and destination, if this is the solution.

Best regards
Hartmut


// -
osg::ref_ptrosg::Group myGroup = new osg::Group;
osg::ref_ptrosg::PositionAttitudeTransform myPat1 = new 
osg::PositionAttitudeTransform,
myPat2 = new osg::PositionAttitudeTransform;
osg::ref_ptrosg::Geode myGeode = new osg::Geode;
osg::ref_ptrosg::Geometry myGeom = CloneNode3D(); // this is the shared 
geometry
myGeode-addDrawable(myGeom.get());

// -
const osg::StateAttribute::GLModeValue modeValue =
osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE;
osg::ref_ptrosg::BlendFunc myBF1 = new osg::BlendFunc(),
 myBF2 = new osg::BlendFunc;
osg::ref_ptrosg::BlendColor myBC1 = new osg::BlendColor,
  myBC2 = new osg::BlendColor;

myBF1-setSource(osg::BlendFunc::SRC_ALPHA);
myBF1-setDestination(osg::BlendFunc::ONE_MINUS_SRC_ALPHA);

myPat1-getOrCreateStateSet()-setAttributeAndModes(myBF1,osg::StateAttribute::ON);

myPat1-getOrCreateStateSet()-setAttributeAndModes(myBC1,osg::StateAttribute::ON);

myBC1-setConstantColor(osg::Vec4(0,0,1,0.1));
myBC2-setConstantColor(osg::Vec4(0,1,0,1));
osg::ref_ptrosg::StateSet state1 = new osg::StateSet,
state2 = new osg::StateSet;

state1-setAttributeAndModes( myBC1, modeValue );
state2-setAttributeAndModes( myBC2, modeValue );
//osg::BlendFunc* bf = new osg::BlendFunc( 
osg::BlendFunc::CONSTANT_ALPHA,osg::BlendFunc::ONE_MINUS_CONSTANT_ALPHA );


// -
myPat1-setScale(osg::Vec3(2,2,2));
myPat1-setPosition(osg::Vec3(4,4,4));
myPat1-setStateSet(state1.get());
myPat1-addChild(myGeode);
m_PAT_to_Id[myPat1] = 1;

myPat2-setScale(osg::Vec3(1,1,1));
myPat2-setPosition(osg::Vec3(0,-2,0));
myPat2-setStateSet(state2.get());
myPat2-addChild(myGeode);
m_PAT_to_Id[myPat2] = 2;

// -
myGroup-addChild(myPat1);
myGroup-addChild(myPat2);
loadedModel-addChild(myGroup);

-- 
frag nicht - du könntest eine antwort erhalten

NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!  

Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Nodes in osg::Group affect each other's state.

2012-03-22 Thread Eldar Insafutdinov
Hi Robert,

Thanks for explanation, the only thing is that in this case I'm applying a 
texture to the node, and I thought that will somehow override the colour 
settings and I wouldn't need to specify any colours.

Cheers,
Eldar

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





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


Re: [osg-users] OpenThreads/Atomic currently broken with Xcode 4.3.1 and IOS

2012-03-22 Thread Mathias Fröhlich

Hi,

On Thursday 22 March 2012, Ulrich Hertlein wrote:
 On 13/03/12 4:43 , Stephan Maximilian Huber wrote:
  it seems that compiling osg and specifically OpenThreads is currently
  broken for IOS when using xcode 4.3.1. The compilation fails at
  OpenThreads/Atomic with
 
  Users/stephan/Documents/Projekte/cefix/cefix/ios/../../libs/ios/include/O
 penThreads/Atomic:244:48: error: cannot initialize a parameter of type
  'void *' with an lvalue of type 'const void *const'
  return __sync_bool_compare_and_swap(_ptr, ptrOld, ptrNew);
 
  Googling around it seems, that this is because of a bug in the
  clang-compiler: http://llvm.org/bugs/show_bug.cgi?id=11280
 
  Has anybody an idea how to fix the issue? In the meantime i'll switch to
  _OPENTHREADS_ATOMIC_USE_MUTEX

 This recently broke for me on OS X (with clang 3.1) as well.  Casting
 'ptrOld' to (void*) works and this is also done for the other
 implementations (WIN32_INTERLOCKED and BSD_ATOMIC) as well.

 No ideal, both 'ptrOld' and 'ptrNew' are only read and could actually both
 be const but aren't for some reason.

Casting this is probably ok. It boils down to the question if gcc accepts the 
casted version that clang needs or if gcc then fails with a similar problem.

If you can make sure that gcc's like the cast variant, replace it. If not 
provide an alternative ifdef that sorts out if you are runnung clang or not.

Greetings

Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
-- 
Vorstandsvorsitzender/Chairman of the board of management:
Gerd-Lothar Leonhart
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Michael Heinrichs, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196

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


Re: [osg-users] OpenThreads/Atomic currently broken with Xcode 4.3.1 and IOS

2012-03-22 Thread Stephan Maximilian Huber
Hi Ulrich,

Am 22.03.12 03:01, schrieb Ulrich Hertlein:
 This recently broke for me on OS X (with clang 3.1) as well.  Casting 
 'ptrOld' to (void*)
 works and this is also done for the other implementations (WIN32_INTERLOCKED 
 and
 BSD_ATOMIC) as well.
 
 No ideal, both 'ptrOld' and 'ptrNew' are only read and could actually both be 
 const but
 aren't for some reason.


thanks for the feedback, there's even a simpler solution: use the
BSD_ATOMIC implementation for IOS and OS X.

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


[osg-users] Update callback for text in HUD causing crash

2012-03-22 Thread Ethan Fahy
I have a scene with objects colored according to external physical models.  The 
colors change as a function of model time and these colors are updated in 
shaders.  I have a time manager class that keeps track of the current model 
time and feeds that time value into my shaders using an osg uniform callback.  
I also have a keyboard listener set up to step backwards and forwards in time 
by a set amount.  When these keys are pressed the time is successully modified 
and the results change correctly in my scene.  My next step was to implement a 
simple HUD that displayed the current model time as a string.  I went through 
the HUD tutorial and successfully overlaid a text string on my scene.

Now, the problem part.  Instead of a generic text string, I wanted to have a 
callback to that string that grabbed the current time string from my time 
manager class.  I passed my time manager class by reference into my HUD class, 
then passed it again into a HUD update callback class.  For experimentation I 
tried the exact class seen in this thread:
http://forum.openscenegraph.org/viewtopic.php?t=3418
I replaced the jet_yaw and jet_pitch with a generic text string.  Everything 
else is the same.  However, as soon as my code reaches the line in the HUD 
callback that does a text-setText() command it crashes with a Access violation 
writing location 0x0001. error message.  That error message generally means 
that I am trying to write to an uninitialized variable, but text was 
initialized just a few lines above and in the debugger it does seem to have 
been initialized.  The thread with that source code had advice saying to make 
the text object dynamic.  I tried making the text object dynamic in both the 
HUD callback updater and in the HUD class and my code still crashes.  

I'm a little stuck as to why this is happening but my best guess is that more 
than one function is trying to access my time manager class simultaneously.  My 
time manager class is passed by reference to my scene component's classes as 
well so that they can retrieve the time to pass to the shaders using my uniform 
callback.  Might that be the issue? I realize this is a long question but I 
figured I'd throw it out there in case there was something obvious I was doing 
wrong.  

Are there any other HUD callback tutorials that might be better suited to my 
needs?  Thanks all!

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





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


Re: [osg-users] Unique colors on a shared Geode

2012-03-22 Thread Hartmut Leister
after trying a different approach using osg::Material, I found the 
(surprisingly simple) solution (see below)
You just need to create a unique osg::Material for each PAT, add the wanted 
color and transparence. Also you should set the rendering hints to 
TRANSPARENT_BIN for correct transparence calculation.
(I think that's it)

Best regards
Hartmut


osg::ref_ptrosg::Geometry geom;
...
geom-getOrCreateStateSet()-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
...
osg::ref_ptrosg::Material myMat1 = new osg::Material;
myMat1-setDiffuse(osg::Material::FRONT,osg::Vec4(1,0,0,0.3));
myPat1-getOrCreateStateSet()-setAttribute(myMat1.get());
-- 
frag nicht - du könntest eine antwort erhalten

Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Update callback for text in HUD causing crash

2012-03-22 Thread Ethan Fahy
Nevermind, figured this one out on my own.  The problem was that in that 
updateHUDCallback class, int i was declared twice.  I am used to C and Java 
where this wouldn't have compiled to begin with so my eyes were looking right 
at the problem and just didn't see it.

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





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


Re: [osg-users] OSG + Qt + threading.

2012-03-22 Thread Aitor Ardanza
Hi,

I've had to change several things to works it...
OSGQtRenderThreadManager: public QThread, and the render thread loop is:


Code:

void OSGQtRenderThreadManager::run() 
{
_done = false;

osg::notify(osg::INFO)  Start OSGRender Thread!std::endl;
while(!_done)
{
emit updateFrame();
msleep(10);
}
osg::notify(osg::INFO)  End OSGRender Thread!std::endl;

}


In the constructor of OSGQtTRenderThreadManager I have defined the connection 
between these object and void ViewerQT::paintGL():

Code:

connect(this,SIGNAL(updateFrame()),_qtViewer,SLOT(updateGL()));




Now I can update render frame in another frame than GUI main frame!

Thank you!

Cheers,
Aitor

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





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


Re: [osg-users] OSG + Qt + threading.

2012-03-22 Thread Aurelien Albert
Hi,


 Now I can update render frame in another frame than GUI main frame! 


I don't think so. Because when you do that :


Code:
connect(this,SIGNAL(updateFrame()),_qtViewer,SLOT(updateGL())); 



If the this object and _qtViewer belongs to different thread, the 
connection will be established as a Qt::QueuedConnection and so the 
updateGL() slot will be executed in the _qtViewer owner thread which is the 
main thread.

I think you can check that by settings breakpoints in updateGL() and check 
which thread is the current thread within the debugger.


Cheers,
Aurelien

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





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


Re: [osg-users] Update callback for text in HUD causing crash

2012-03-22 Thread Chris Hanson
  Also, I learned from experience that HUD text you update on the fly
should be marked DYNAMIC or you'll experience nasty evil.


-- 
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] OSG + Qt + threading.

2012-03-22 Thread Aitor Ardanza
Hi Aurelien,

You are right! I am emiting a signal to execute painGL() fuction on main 
thread...
I've been looking but I haven't found anything clear... How would I refresh a 
QGLWidget embedded in a main gui layout from another thread? is possible?

Thank you!

Cheers,
Aitor

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





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


Re: [osg-users] OSG + Qt + threading.

2012-03-22 Thread Aurelien Albert
Have a look to this article : 
http://labs.qt.nokia.com/2011/06/03/threaded-opengl-in-4-8/

I think it's maybe not possible with qt previous 4.8 version, but maybe under 
some conditions.

Basically, you need to call the updateGL() method from the worker thread.

Have also a look to this article about threading in Qt : 
http://labs.qt.nokia.com/2010/06/17/youre-doing-it-wrong/

Cheers,
Aurelien

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





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


Re: [osg-users] OSG + Qt + threading.

2012-03-22 Thread Aitor Ardanza
Ok, so I need to update qt...

Thank you!

Cheers,
Aitor

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





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


[osg-users] texture over multiple graphics context

2012-03-22 Thread Suyang Dong
Hi,
This is an MFC program of single document.
The composite viewer sits in the MFC::app, and the program instantiates a 
separate osgViewer::View for each MFC::View. Each osgViewer::View have its own 
GraphicsContext and the contextID is increased 


Code:
  void CompositeFk::AddView(const HWND hwnd, const RECT rect, 
osgViewer::View* view)
  {
// Init the GraphicsContext Traits
osg::ref_ptrosg::GraphicsContext::Traits traits 
  = new osg::GraphicsContext::Traits;

// Init the Windata Variable that holds the handle 
// for the Window to display OSG in.
osg::Referenced* windata 
  = new osgViewer::GraphicsWindowWin32::WindowData(hwnd);

// Setup the traits parameters
traits-x = 0;
traits-y = 0;
traits-width = rect.right - rect.left;
traits-height = rect.bottom - rect.top;
traits-windowDecoration = false;
traits-doubleBuffer = true;
traits-sharedContext = 0;
traits-setInheritedWindowPixelFormat = true;
traits-inheritedWindowData = windata;

// Create the Graphics Context
osg::ref_ptrosg::GraphicsContext gc 
  = osg::GraphicsContext::createGraphicsContext(traits);

// Init a new Camera (Master for this View)
osg::Camera* camera = new osg::Camera;

// Assign Graphics Context to the Camera
camera-setGraphicsContext(gc);
gc-getState()-setContextID(++m_nContextID);
//set clear color as deep blue 
camera-setClearColor(osg::Vec4f(0,0,0/*0.2f, 0.2f, 0.4f*/, 1.0f));

// Set the viewport for the Camera
camera-setViewport(new osg::Viewport(traits-x, 
  traits-y, traits-width, traits-height));
camera-setProjectionMatrixAsPerspective( 30.0f, 
  (double)traits-width/(double)traits-height, 1.0f, 1.0f );

// Add the Camera to the mainView
view-setCamera(camera);
mv-addView(view);
  }



HWND comes from the MFC::View::GetSafeHwnd()
All of the osgViewer::View points to the same osg::Group node. 
The texture is correctly copied over all the osgViewer::View.

However the program will crash after opening multiple views, and close any one 
of them. (Open single view and close it is OK)

Code:
void C***_View::OnDestroy()
{
// it informs the composite viewer to do removeView(view)
theApp.DeleteView(m_view.get()); 
CView::OnDestroy();
}



The program will crush on exit of OnDestroy() (not immediately after removeView)

System Configuration:
1. Single NVidia graphics card (8 years old)
2. Windows XP
3. VS 2008 SP1
4. OSG 3.0.1

... 

Thank you!

Cheers,
Suyang

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





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


Re: [osg-users] Nodes in osg::Group affect each other's state.

2012-03-22 Thread Robert Osfield
Hi Eldar,

On 22 March 2012 10:37, Eldar Insafutdinov e.insafutdi...@gmail.com wrote:
 Thanks for explanation, the only thing is that in this case I'm applying a 
 texture to the node, and I thought that will somehow override the colour 
 settings and I wouldn't need to specify any colours.

There are settings of the GL fixed function pipeline that ignore the
vertex colours, but by default they will be blended with the texture
colours.  The relationship is rather complex and really requires an
understanding of how OpenGL manages vertex colours, material colours
and texture blending.  I would recommend reading the OpenGL blue and
orange books on this topic.

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


[osg-users] Wiki

2012-03-22 Thread Jason Daly



I'm finishing up some work for a sponsor, and they'd like me to 
contribute the application I ended up writing to the community.


I'd like to post it on the Community/Software page of the wiki.  How 
would I go about doing that?  I tried editing the page myself, but my 
account (username: lyceel) doesn't seem to have the required permissions.


I can also just submit the app if that's the preferred way of doing it.

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


Re: [osg-users] Wiki

2012-03-22 Thread Robert Osfield
Hi Jason,

On 22 March 2012 18:56, Jason Daly jd...@ist.ucf.edu wrote:
 I'm finishing up some work for a sponsor, and they'd like me to contribute
 the application I ended up writing to the community.

 I'd like to post it on the Community/Software page of the wiki.  How would I
 go about doing that?  I tried editing the page myself, but my account
 (username: lyceel) doesn't seem to have the required permissions.

Jose Luis Hidalgo has been the one to add the required permissions,
but he's really busy with his new venture so might not be able respond
right away.

I'm afraid I don't recall the procedure require to add permission.

 I can also just submit the app if that's the preferred way of doing it.

You could just send the entry text and link to me and I could add it for you.

As a more general note, I'm starting to look again at migrating to a
new server and website.  I haven't yet decided upon the best step
forward so tomorrow will raise this topic in a separate thread.  Part
of this discussion will be what to do about wiki's and user
permissions.

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


Re: [osg-users] OpenThreads/Atomic currently broken with Xcode 4.3.1 and IOS

2012-03-22 Thread Ulrich Hertlein
Hi Stephan,

On 22/03/12 22:29 , Stephan Maximilian Huber wrote:
 Am 22.03.12 03:01, schrieb Ulrich Hertlein:
 This recently broke for me on OS X (with clang 3.1) as well.  Casting 
 'ptrOld' to (void*)
 works and this is also done for the other implementations (WIN32_INTERLOCKED 
 and
 BSD_ATOMIC) as well.

 No ideal, both 'ptrOld' and 'ptrNew' are only read and could actually both 
 be const but
 aren't for some reason.
 
 thanks for the feedback, there's even a simpler solution: use the
 BSD_ATOMIC implementation for IOS and OS X.

Simpler maybe, but I would expect that to be more expensive in CPU terms than a 
CPU
opcode.  Not?

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


[osg-users] Creating an 'outline' effect in osgText?

2012-03-22 Thread Preet
Hey all,

I'm trying to create an outline effect with osgText. Here's an example
of what I'm trying to accomplish:
http://gimpology.com/uploads/3_8_8.png

How can I get a similar effect?


Regards,

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


Re: [osg-users] Falling off the NVidia fast path

2012-03-22 Thread Chris Hanson
  I just wanted to follow up and note that GL_RGBA16 seems to have been the
culprit. GL_RGBA16F_ARB performs fine.

  I don't get what's so unsupported about basic GL_RGBA16, but OSG dislikes
it AND Nvidia Quadros dislike it.

-- 
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] Creating an 'outline' effect in osgText?

2012-03-22 Thread Hamm, Brandon
Preet,

Take a look at the osgtext example.  There's a setBackdropType() member
function of osgText::Text that you can call to set a backdrop type of
osgText::Text::OUTLINE.  You can specify the color of the outline using
the member function setBackdropColor.

Brandon Hamm


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Preet
Sent: Thursday, March 22, 2012 4:44 PM
To: OpenSceneGraph Users
Subject: [osg-users] Creating an 'outline' effect in osgText?

Hey all,

I'm trying to create an outline effect with osgText. Here's an example
of what I'm trying to accomplish:
http://gimpology.com/uploads/3_8_8.png

How can I get a similar effect?


Regards,

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


Re: [osg-users] Falling off the NVidia fast path

2012-03-22 Thread Jean-Sébastien Guay

Hi Chris,


   I just wanted to follow up and note that GL_RGBA16 seems to have been
the culprit. GL_RGBA16F_ARB performs fine.


Have a look at this. It's an older version of the NVidia GPU programming 
guide, but it (and the newer version at the following link) has lots of 
good info.


http://developer.download.nvidia.com/GPU_Programming_Guide/GPU_Programming_Guide.pdf

http://developer.nvidia.com/nvidia-gpu-programming-guide

In the Supported Texture Formats section, you will see that the 
A16B16G16R16 format (which is GL_RGBA16 in OpenGL land) is not supported 
on GeForce 6 and 7 cards, but A16B16G16R16F (GL_RGBA16F_ARB) is.


I also found this document:

http://developer.nvidia.com/content/nvidia-opengl-texture-formats

It states that RGBA16 is internally substituted by RGBA8 in all nvidia 
chipsets that support it, so I wouldn't use it anyways even on cards 
where it is supported. Whereas RGBA16F (which seems to be named 
FLOAT_RGBA16 in the left-most column) is supported natively since NV30 
(GeForce FX). This is commonly called a half-float format BTW.


If you want exact values to carry over from your program into your 
shaders, you might still want a non-float format. From the G80 chipsets 
onward it seems like you can use RGBA16UI (RGBA16UI_EXT) through the 
EXT_texture_integer extension. The above texture format table seems to 
have lots of good info to decide what to use in your specific use case, 
and here's the link to the extension in question.


http://developer.download.nvidia.com/opengl/specs/GL_EXT_texture_integer.txt

Hope this helps,

J-S
--
__
Jean-Sebastien Guay  jean_...@videotron.ca
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] A crash problem while using SharedStateManager in the DatabasePager

2012-03-22 Thread Wang Rui
Hi Robert and all,

I've encountered a crash problem while managing and rendering huge scene in
OSG. To make it work smoothly, I use both the IncrementalCompileOperation
and SharedStateSetManager to help improve the paging process. Both my
application soon crashes when the camera is moving over the scene quickly
(which means the scene data is also quickly and frequently loaded and
unloaded). I debug into it and surprisingly find that the
databaseRequest-_loadedModel is sometimes empty in
the DatabasePager::addLoadedDataToSceneGraph() and thus causes the issue. I
add a determination before using the SharedStateManager to optimize the
model and the problem seems disappeared:

if (osgDB::Registry::instance()-getSharedStateManager()
 databaseRequest-_loadedModel.valid())

osgDB::Registry::instance()-getSharedStateManager()-share(databaseRequest-_loadedModel.get());

I suggest make such changes in the trunk, too, so we won't meet the same
crash problem again. But it in fact doesn't find the truth: when and how a
request in the _dataToMergeList list is changed and the loaded model
pointer is made invalid? I'm just curious about the reason why the
_loadedModel is reset unexpectedly. Is there any other possibilities?

Regards,

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


Re: [osg-users] Creating an 'outline' effect in osgText?

2012-03-22 Thread Preet
Hey,

On Thu, Mar 22, 2012 at 7:03 PM, Hamm, Brandon
brandon.h...@qinetiq-na.com wrote:
 Preet,

 Take a look at the osgtext example.  There's a setBackdropType() member
 function of osgText::Text that you can call to set a backdrop type of
 osgText::Text::OUTLINE.  You can specify the color of the outline using
 the member function setBackdropColor.

Thanks. This seems to be exactly what I'm looking for.


 Brandon Hamm


I have a general follow up question about osgText. I'd like to draw
the text along a path. I thought a good way to do this would have been
to rotate the text character by character. So I'd create an osgText
object for each character of text, and position/align them along the
path... but this doesn't seem to preserve spacing between characters
(this is expected, but I don't really know how to get around it), and
the space character itself ( ) as an individual osgText object seems
to have a width of zero (calculated with osg::Drawable::getBound()).

* Is the approach I'm taking a 'good' one? If not, what would be a
better methodology?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org