Hi,Nick
Thinks for your help!
I will try to do it and tell you the result.Think you!
Best,
xulie
----- 原始邮件 -----
发件人:Trajce Nikolov <[email protected]>
收件人:OpenSceneGraph Users <[email protected]>
主题:Re: [osg-users] Combine the OSG and OpenGL
日期:2010-1-24 19:10:32

Hi xulie,

I would do this with cutom drawable where you set your GL code in the
drawImplementation. Give it a try. It should work

Nick

http://www.linkedin.com/in/tnick
Sent from Ünalan, İstanbul, Turkey

2010/1/24 <[email protected]>

> Hi,Robert
>
> I am glad for your reply.
>
> I'm so sorry that I didn't sign my name.My name is xulie.
>
> I want to have my own frame loop,and I'm trying to do it.My frame loop is
> as follow:
>
> my_render_frame
>
> //in the main thread,and I test the frame loop in OnLButtonDown().
>
> //and render a frame when I press the left button a time
>
> {
>
> glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
>
> glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);//I want to clear the
> window
>
> DrawBackground();//use the OpenGL to draw the Terrain
>
> ResumeThread(m_osgThread);//I use SuspendThread to suspend the OSG thread
> in OSG class like the example of osgviewerMFC
>
> }
>
> But I found that glClearColor(),glClear() and DrawBackground() don't work.
>
> Would you tell me why then don't work?
>
> Think you!
>
> Best,
>
> xulie
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to