Hello,

I have a non-OSG OpenGL application in which I need to draw an OSG Scene. My OSG scene is required to be drawn in up to 3 places on the screen. What I would like to do is render my OSG scene to an FBO, and have the non-OSG application then draw a polygon with my FBO texture on it.

I have a small test app where I render to an FBO, and draw that texture onto an OSG polygon which works great (similar to the osgfbo example). My problem now is that to do this, I use a SceneView object which draws directly to the main framebuffer. I would like to have none of my code touch the main framebuffer or global state at all, but render only to an FBO.

The goal for now is to have a simple GLUT application, which calls my OSG code to create the scene (to FBO only), then draws a textured quad with my FBO texture on it using raw GL calls (similar to the way it would work in the non-OSG app).

My questions are:
   1. Is there some way to not use a SceneView, and is this desirable?
2. Is there some way to make the SceneView not touch the main frame buffer or global state?
   3. Is an FBO even the right choice for this? Would a pbuffer be better?
4. Am I going to need a whole separate OpenGL context (as with a pbuffer) to do this right?

Thanks for any help.

Alan.

PS: I did something similar before and there are a couple of posts to the mailing list about it sometime last September or October. Like this problem, I had to draw to a non-OSG application, but unlike this problem, I could draw directly to the main framebuffer. In this case, I can't because my image needs to be drawn in up to 3 places in the main application, so I can't use the main framebuffer directly.



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to