Hello Sebastian,

[EMAIL PROTECTED] wrote:
>>> I am looking for a method to draw simple lines between two points.
>> Depending on how you have set up you application you can also issue
>> OpenGL calls directly. If you are using the SimpleSceneManager this is a
>> bit tricky, because it does the buffer swapping internally, when you
>> call redraw(). Therefore you need to replace
>>
>> mgr->redraw();
>>
>> with:
>>
>> mgr->getWindow()->activate();
>> mgr->getWindow()->frameInit();
>> mgr->getWindow()->renderAllViewports(
>>      dynamic_cast<RenderActionBase *>(mgr->getAction()));
>>
>> // your OpenGL calls here
>>
>> mgr->getWindow()->swap();
>> mgr->getWindow()->frameExit();
>>
> 
> Thanks for the answere.
> I got the programm to build succesfull and also it runs this way.
> But now the objects in my scenegraph are not drawn anymore...
> Any ideas why not?

hm, this is hard to say. Maybe it is one of the following:
- a call to glClear(), which erases the scene just rendered?
- another swap call that makes you draw into a different buffer than the 
scene?
- do you modify any OpenGL state? Do you set it back to its initial 
values? This is necessary, otherwise OpenSG can know what state is active.
- maybe I got the dynamic_cast wrong and it fails, returning a NULL 
pointer, can you verify that something sensible comes out of that cast?

        Hope it helps,
                Carsten

Hint, hint: you might want to revisit building a geometry for your line, 
it is a less daunting task as it may seem ;)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to