One more time: Bug? problem using osg::GraphicsContext::setClearMask in quadBufferStereo to clear both buffers

Hi,
If there were any responses to this I missed them. Can anyone duplicate
this, or perhaps tell me what I'm doing wrong? Is this a bug?
Basically, when I'm running in stereo the area outside the viewport is only
getting set for one of the buffers.
Thanks,
John
On Mon, 20 Sep 2010, John Kelso wrote:
> Hi,
>
> I have a window whose viewport doesn't fill it, and I want to set the area
> outside the viewport to a specific color.
>
> I'm using:
> _gc = osg::GraphicsContext::createGraphicsContext(_traits);
> _gc->setClearColor( osg::Vec4f(1.f, 0.f, 0.f, 1.0f) );
> _gc->setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
>
> This is osg 2.8.3 on Centos, Quadro FX 4600.
>
> This works fine when traits->quadBufferStereo is false, but when it's true,
> I only get one of the buffers cleared.
>
> Any ideas? I suspect the fix is easy but hard to find, at least for me.

Re: Stereo anaglyph: which glasses?

On 9/29/2010 6:32 AM, Jan Ciger wrote:
>> How can I tweak OSG red/cyan?
>>
> I suppose you will need to change the rendering code, I am not aware
> of this being "tweakable" anywhere, as only OpenGL color masks are
> being used - which basically say render everything into red or blue
> channel (or some combination of them).
>
Just a thought... All you need to do is modify the final output color of
each pixel. I was wondering if the color matrix could be used for this,
assuming OSG even supports that (I've never looked, and I don't have
easy access to the source right now).
It also could conceivably be done in a fragment shader.
--"J"

Re: Stereo anaglyph: which glasses?

On 9/30/2010 10:39 PM, Jason Daly wrote:
> Just a thought... All you need to do is modify the final output color of
> each pixel. I was wondering if the color matrix could be used for this,
> assuming OSG even supports that (I've never looked, and I don't have
> easy access to the source right now).
>
> It also could conceivably be done in a fragment shader.
>
Never mind about the color matrix. I just discovered it only works for
pixel transfer operations. You can still use a fragment shader, though.
--"J"

[osgPPU] Ping pong with osgPPU

Hi,
I'm trying to implement a simulation using for example a "ping pong" implementation of render to texture
(similar to the gameoflife example in osg). I'm using osgPPu for the rendering part of my simulation and I
would like now to integrate the processing of the simulation on the GPU through osgPPU in some way.
For now, I have something like that:
processor
|-> unitTexture (to initialize or change the input texture through the cpu)
|-> processSimulationUnitInOut (will contain the shader for the processing of the simulation)
|-> blurUnitInOut
|-> computeNormalsUnitInOut
|-> outputUnitInOut to get the ouput texture
My idea was to add a UnitInOut as child of processSimulationUnitInOut. This new unit is initialized with an
output texture (like outputUnitInOut) I thought then that I could deliver the new processed texture to
unitTexture through a NodeCallBack by the call of unitTexture->setTexture(
unit->getOutputTexture() ). But it doesn't work, the same if I try to copy the image data from one texture
to the other.
Do I do the right way or is it totaly wrong or impossible that way ? I could use the gameoflife example but I
don't see how I could integrate it.
Thanks a lot in advance for all your advises,
Vincent
...
Thank you!

Re: Missing osgUtil::RegisterRenderBinProxy

Hi Javier,
On Thu, Sep 30, 2010 at 6:54 PM, Javier Taibo <javier.taibo@...> wrote:
> I searched the list and the web but I couldn't found any reference to this
> fact. I was wondering the reason to remove it, just pure curiosity :)
> Is it not the recommended way to define RenderBins anymore?
In RenderBin there is now a static method:
static void addRenderBinPrototype(const std::string& binName,RenderBin* proto);
Which you call :
RenderBin::addRenderBinPrototype("MyRenderBinName",new MyRenderBin);
Robert.

Re: One more time: Bug? problem using osg::GraphicsContext::setClearMask in quadBufferStereo to clear both buffers

Hi John,
On Fri, Oct 1, 2010 at 12:32 AM, John Kelso <kelso@...> wrote:
> If there were any responses to this I missed them. Can anyone duplicate
> this, or perhaps tell me what I'm doing wrong? Is this a bug?
It does sound like a may well be a bug, but I can't test it
unfortunately as I don't have any systems that support quad buffer
stereo.
What happens when you enable quad buffer stereo with the standard
osgviewer? Does this work fine?
Robert.

Cannot debug osg/dotnet application on windows after update from 2.9.7

This week I updated OpenSceneGraph to 2.9.9 and got the following problem in an osg/dotnet application, windows 7, vs2008sp1:

"The Program can't start because MSVCP90D.dll is missing from your computer. Try reinstalling the program to fix this problem."

This happens after trying to load a file with an osgDB plugin.

when linking with osg 2.9.7 this problem does not occur. So I tranced down the changes in osg and found the following change in src\OpenThreads\win32\CMakeLists.txt

From Alok Priyadashi, "The attached patch fixes
- compile errors on windows when compiled with UNICODE flag - warnings for duplicate WIN32_LEAN_AND_MEAN. I think this should better fixed by adding WIN32_LEAN_AND_MEAN to vcproj preprocessor list."

ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)

ADD_DEFINITIONS(-D_WIN32_WINNT=0x0400)

reverting this change resolved the problem for me.

with the _WIN32_WINNT definition a particular version of Windows is targeted, in this case this causes a problem finding the right version of the debug dlls in the dotnet application ... (bleh...)

The problem does not occur in the c++ examples/applications.

cheers,

René

<div>
<p>Hi all,</p>
<div><br></div>
<div>This week I updated OpenSceneGraph to 2.9.9 and got the following problem in an osg/dotnet application, windows 7, vs2008sp1:</div>
<div><br></div>
<div>"The Program can't start because MSVCP90D.dll is missing from your computer. Try reinstalling the program to fix this problem."</div>
<div><br></div>
<div>This happens after trying to load a file with an osgDB plugin.</div>
<div><br></div>
<div>when linking with osg 2.9.7 this problem does not occur. So I tranced down the changes in osg and found the following change in&nbsp;src\OpenThreads\win32\CMakeLists.txt&nbsp;</div>
<div><br></div>
<div>
<div><span class="Apple-style-span">&nbsp;&nbsp;From Alok Priyadashi, "The attached patch fixes&nbsp;<br>
&nbsp;&nbsp;- compile errors on windows when compiled with UNICODE flag&nbsp;<br>&nbsp;&nbsp;- warnings for duplicate WIN32_LEAN_AND_MEAN. I think this should&nbsp;<br>&nbsp;&nbsp;better fixed by adding WIN32_LEAN_AND_MEAN to vcproj preprocessor&nbsp;<br>&nbsp;&nbsp;list."</span></div>
</div>
<div><span class="Apple-style-span"><br></span></div>
<div>
<div>&nbsp;&nbsp;ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN)</div>
<div>&nbsp;&nbsp;ADD_DEFINITIONS(-D_WIN32_WINNT=0x0400)</div>
</div>
<div><br></div>
<div>reverting this change resolved the problem for me.</div>
<div><br></div>
<div>with the&nbsp;<span class="Apple-style-span">_WIN32_WINNT definition a </span><span class="Apple-style-span">particular version of Windows is targeted, in this case this causes a problem finding the right version of the debug dlls in the dotnet application ... (bleh...)&nbsp;</span>
</div>
<div><br></div>
<div>The problem does not occur in the c++ examples/applications.</div>
<div><br></div>
<div>cheers,</div>
<div><br></div>
<div>Ren&eacute;</div>
<div><br></div>
</div>

Re: Missing osgUtil::RegisterRenderBinProxy

On Thu, Sep 30, 2010 at 6:54 PM, Javier Taibo <javier.taibo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I searched the list and the web but I couldn't found any reference to this
> fact. I was wondering the reason to remove it, just pure curiosity :)
> Is it not the recommended way to define RenderBins anymore?

Thanks for the answer. Actually, it was the method called by the proxy class RegisterRenderBinProxy.

It is not indispensable, but was an easy method to automatically register RenderBin's.
Anyway, it can be easily solved including the proxy in my code :)

Cheers!

<div>
<p>&nbsp; Hi Robert,<br>On Fri, Oct 1, 2010 at 9:41 AM, Robert Osfield <span dir="ltr">&lt;<a href="mailto:robert.osfield@...">robert.osfield <at> gmail.com</a>&gt;</span> wrote:<br></p>
<div class="gmail_quote">
<blockquote class="gmail_quote">
Hi Javier,<br><div class="im">
<br>
On Thu, Sep 30, 2010 at 6:54 PM, Javier Taibo &lt;<a href="mailto:javier.taibo@...">javier.taibo@...</a>&gt; wrote:<br>
&gt; &nbsp; I searched the list and the web but I couldn't found any reference to this<br>
&gt; fact. I was wondering the reason to remove it, just pure curiosity :)<br>
&gt; &nbsp; Is it not the recommended way to define RenderBins anymore?<br><br>
</div>In RenderBin there is now a static method:<br><br>
static void addRenderBinPrototype(const std::string&amp; binName,RenderBin* proto);<br><br>
Which you call :<br><br>
&nbsp;RenderBin::addRenderBinPrototype("MyRenderBinName",new MyRenderBin);<br>
</blockquote>
<div>
<br>&nbsp; Thanks for the answer. Actually, it was the method called by the proxy class RegisterRenderBinProxy.<br><br>&nbsp; It is not indispensable, but was an easy method to automatically register RenderBin's.<br>
Anyway, it can be easily solved including the proxy in my code&nbsp; :)<br><br><br>&nbsp; Cheers!<br><br>
</div>
</div>
</div>