[osg-users] Can't resize framebuffer texture attachments

2012-03-19 Thread Sean O'Connell
I'm trying to resize the textures attached to my framebuffer during run-time, 
however the viewport size that the scene is rendered into stays the same.  If 
the framebuffer starts off at 64x64 pixels and I then resize to 512x512, the 
output only contains rendered pixels in the lower left 64x64 region and the 
rest of the image is black.  I've found other forum posts similar to this issue 
but their solutions did not work.  Here's the code I'm using to resize.

colorbuffer-setTextureSize(width, height);
colorbuffer-dirtyTextureObject();

depthbuffer-setTextureSize(width, height);
depthbuffer-dirtyTextureObject();

osg::Camera::setViewport(0, 0, width, height);
osgViewer::Renderer* renderer = (osgViewer::Renderer* 
)osg::Camera::getRenderer();
renderer-getSceneView(0)-getRenderStage()setFrameBufferObject(NULL);
renderer-getSceneView(0)-getRenderStage()setCameraRequiresSetUp(true);

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





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


Re: [osg-users] Rendering without calling osgViewer::frame

2012-02-29 Thread Sean O'Connell
I'm currently working on a project where I have to integrate  library into a 
3rd party application's source code.  The library consists of a custom osg 
Camera that takes 9 snapshots of the user's scene.  The headache's I've run 
into are the following:

1.  I cannot seem to turn off the 3rd party app's main camera in the osgViewer 
class.  I set nodeMask(0) on the camera but then my camera doesn't render.  
Having the main camera enabled adds unnecessary overhead.

2.  The process of taking the 9 snapshots has additional overhead from having 
to re-process and re-run the update, event, cull and render traversals for each 
snapshot.  Since each view orbits about the same point in space, I'd like the 
ability to only run the update, event and cull traversals once and only call 
the render traversal for each snapshot.
[/list]

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





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


Re: [osg-users] Rendering without calling osgViewer::frame

2012-02-29 Thread Sean O'Connell
3.  I don't know if this is related, but when adding my camera to the 3rd party 
app's osgViewer I am unable to change the color and depth buffer resolution.  
Calling setTextureSize and Camera::setViewport will seem to increase the size 
of the texture but the actual contents that get rendered are clipped at the 
origin.  So if the original texture size was 512x512 and I increase it to 
1024x1024, I get the lower left 256x256 area of the 512x512 image in the bottom 
left of the 1024x1024 image (blown up to 512x512) and the rest of the 1024x1024 
image is blank.

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





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


[osg-users] Rendering without calling osgViewer::frame

2012-02-28 Thread Sean O'Connell
In my application I have a bunch of cameras that render to textures.  Is there 
a way for me to trigger them to render without calling osgViewer::frame or 
going through the osgViewer class?  Ideally I could simply call 
camera-renderView() or something similar.  Is this possible?

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





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


Re: [osg-users] OSG 3.0.1 examples not working correctly?

2012-01-20 Thread Sean O'Connell
AlphaPixel's binaries work.  I'll try setting those cmake flags.  Thanks a lot 
guys!

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





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


[osg-users] Save Texture2D to disk

2012-01-20 Thread Sean O'Connell
I'm using a 3rd party library that returns a Texture2D object that represents a 
snapshot of the scene.  However they don't attach an Image object to it.  How 
can I retrieve the pixel data in the Texture2D object and save to disk?  I 
don't see any accessor methods in either Texture2D or Texture that allow me to 
do this.

Thanks.

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





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


[osg-users] OSG 3.0.1 examples not working correctly?

2012-01-19 Thread Sean O'Connell
Hi,

I downloaded OSG 3.0.1, compiled the examples, but none of them seem to run 
correctly.  I can't get the camera mouse controls to work at all; the camera 
simply stays stationary.  In other demos no content is displayed.  In my own, 
extremely simple demo (that worked with OSG 2.8), the camera doesn't work and 
the colors are look like a rainbow.

Has anybody had similar issues?  I'm working under Windows.

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





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


[osg-users] Setting OpenGL state manually then rendering via OSG

2011-12-27 Thread Sean O'Connell
Hi,

I'm a little stuck on solving an issue related to integrating a standalone 
OpenGL-based API with a simple OSG demo.  The OpenGL library sets some states 
in the background, specifically: framebuffer object, multisampling, stencil 
tests, scissor tests and viewport settings.  How do I tell OSG to use these 
default settings when it runs?

The OpenGL library essentially dictates to my application N view points to 
render the scene from, so it passes back to me projection and modelview 
matrices and assumes that I don't change certain states after that point (which 
include the ones I described above).  After I pass the matrices to the current 
Camera class object, how/where would I tell OSG not to change the bound 
framebuffer, mess with enabling/disabling multisampling, and the other OpenGL 
states I mentioned?

I've read that you can integrate OSG into an existing OpenGL application that 
creates its own window and sets state, but I can't seem to find an example to 
show me how to do what I need.

Thank you!

Cheers,
Sean

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





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