Re: [osg-users] preDrawCallback?

2009-05-04 Thread Cory Riddell
Thanks Robert and Paul. I just assumed that a direct GDI call would be faster, but when I think about it, that can't be true (assuming a decent OpenGL driver). I did as you suggested and it works very well. Mostly. If I resize the window and make it wide and short, my background gradient

Re: [osg-users] preDrawCallback?

2009-05-04 Thread Robert Osfield
On Mon, May 4, 2009 at 3:08 PM, Cory Riddell c...@codeware.com wrote: Thanks Robert and Paul. I just assumed that a direct GDI call would be faster, but when I think about it, that can't be true (assuming a decent OpenGL driver). I did as you suggested and it works very well. Mostly. If I

Re: [osg-users] preDrawCallback?

2009-05-04 Thread Cory Riddell
I'm confused about the code that does the resize in GraphicsContext.cpp (part is pasted below). In my case, my background camera is a slave camera with an absolute reference frame. So, it isn't going to be caught in the if statement on line 7 and will fall through to the else. In this block,

Re: [osg-users] preDrawCallback?

2009-05-04 Thread Cory Riddell
I changed the if statement on line 7 into a nested if and now things are working for me. I changed lines 7-9 to: if (slave) { if (camera-getReferenceFrame()==osg::Transform::RELATIVE_RF) { switch(view-getCamera()-getProjectionResizePolicy()) and now everything is working correctly

Re: [osg-users] preDrawCallback?

2009-05-02 Thread Robert Osfield
Hi Cory, OpenGL calls used to fill a background colour will be the faster way to accomplish a gradient background and it'll be a portable solution. Robert. On Sat, May 2, 2009 at 1:24 AM, Cory Riddell c...@codeware.com wrote: If I want to draw something in the client area of the window OSG is

Re: [osg-users] preDrawCallback?

2009-05-02 Thread Paul Martz
] On Behalf Of Cory Riddell Sent: Friday, May 01, 2009 6:25 PM To: OpenSceneGraph Users Subject: [osg-users] preDrawCallback? If I want to draw something in the client area of the window OSG is rendering into (via Windows GDI calls), would I do this in a preDrawCallback? (after setting an appropriate

[osg-users] preDrawCallback?

2009-05-01 Thread Cory Riddell
If I want to draw something in the client area of the window OSG is rendering into (via Windows GDI calls), would I do this in a preDrawCallback? (after setting an appropriate ClearMask in the camera) I want to have a gradient background and I'm thinking that I could do this easily with the