Hi Robert,

Thanks so much for getting back to me.. However..

I think you misunderstand my email..

I have entirely removed SDL. It was only a windowing solution for this  
code.

I have now placed this code inside the osghud example and am using OSG  
(at the moment) as simply a windowing solution.
I have had to run it SingleThreaded to get round a crash (not related  
to SDL).

I am hoping later to augment the OpenGL base environment engine with a  
scene graph for more dynamic objects in the simulation.

I use multiple framebuffer objects, glsl shaders, and textures in the  
OpenGL code.

My question was simply is there anything I need to be aware of other  
than the usual push'es and pops that we do then splicing pure openGL  
and OSG together?

And in the old OSG demo main loops we had several calls. cull, draw  
etc. Now we only have one call.
When is it save to manipulate the OpenGL pipeline, should we do any  
waiting before or after the viewer.frame() call?
OR can we just blast away at OpenGL as we wish outside of this call?

Kind regards,
Stephen.

On Jan 23, 2008, at 4:18 PM, Robert Osfield wrote:

> Hi Stephan,
>
> SDL and threading of OpenGL doesn't mix.  If you want to use the OSG
> within an SDL window you'll need to select single threading.  See the
> osgviewerSDL example.
>
> Robert.
>
> On Jan 23, 2008 3:45 AM, Stephen Northcott <[EMAIL PROTECTED] 
> > wrote:
>> I was really hoping for some kind of reply from my last email about
>> this.. but perhaps my question was too vague..
>>
>> To summarize:
>>
>> I have a complex OpenGL program which used to run in SDL on OS X.
>>
>> I am trying to change that to run inside the OSG Viewer system on  
>> OS X.
>> I have done this the other way around many times without any  
>> problems.
>> i.e. OSG inside an OpenGL program, where it used the graphics context
>> provided by that program.
>> I don't want to do that in this case as SDL has various issues I need
>> to get away from.
>>
>> By changing OSG to SingleThreaded I have removed the crash, and  
>> wonder
>> if the new 'main loop' in 2.2 with only one call has anything to do
>> with this. Perhaps my OpenGL and OSG are conflicting somehow. My code
>> is not multi-threaded either.
>>
>> I am obviously preserving OpenGL settings on the stack between my
>> OpenGL and OSG's code.
>> OSG is handling the display updating, and simply drawing a HUD and
>> some triangles - this is based on the OSG Hud example.
>>
>> Currently I get one frame of both OSG and my OpenGL before my OpenGL
>> stuff appears to disappear.
>> I am not getting any OpenGL errors, and my OpenGL code is still
>> clearing the screen.
>> I have turned that off in OSG and it just draws any objects I give  
>> it.
>>
>> I make extensive use of FrameBuffers and textures in my OpenGL code..
>> Could this be the cause of any problem?
>> Do I need to do anything clever if I am using multiple FrameBuffers
>> outside of OSG?
>>
>> Kind regards,
>> Stephen.
>>
>>
>>
>> _______________________________________________
>> 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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to