Hi Robert,

Alrighty, I can try to code something up and submit it.  From what I can
tell, Win32 is the only windowing API currently supported that will have the
problems I'm seeing.  X11 and Carbon both only deal with setting the cursor
in the actual setCursor method, so if that method is never called, it
doesn't cause problems and has default behavior.  In Win32, however, it
needs to respond to all WM_SETCURSOR methods and set the appropriate cursor,
which is what is causing my problems.

I've got a few questions before I get started though:
1)  What is the difference, if any, between calling useCursor(false) and
calling setCursor(GraphicsWindow::NoCursor).  It seems like there isn't a
need for useCursor.
2)  Would setting useCursor(true) and calling
setMouseCursor(GraphicsWindow::InheritCursor) be an appropriate hint to OSG
to leave the cursor management alone?  It looks InheritCursor isn't
currently isn't used anywhere

Thanks!

Jason

On Tue, Apr 15, 2008 at 4:46 AM, Robert Osfield <[EMAIL PROTECTED]>
wrote:

> Hi Jason,
>
> Cursor support in osgViewer is still in it's early days and certainly open
> to revision to help make it more flexible.  Make a suggestion (i.e. modified
> code) on what would work for you and we can discuss it further.  Whichever
> route we take we'll need to make sure that it works consistently across
> platforms as far as possible.
>
> Robert.
>
> On Mon, Apr 14, 2008 at 10:17 PM, Jason Beverage <[EMAIL PROTECTED]>
> wrote:
>
> > Hi all,
> >
> > I'm attempting to use OSG embedded in a C# window like hesicong and
> > Glenn Waldron have recently discussed on the osg-users mailing list.  One
> > issue that I'm running into is changing the Cursor property on my mouse
> > form.  a custom mouse cursor in my form.  GraphicsWindowWin32 manages the
> > current cursor as one of the ones defined in the GraphicsWindow::MouseCursor
> > enumeration so I can't use a custom cursor (as far as I can tell).
> >
> > If I set the cursor manually using ::SetCursor, it gets override by
> > GraphicsWindowWin32 because it calls  ::SetCursor in response to every
> > WM_SETCURSOR call and passes in _currentCursor.
> >
> > I've tried setting useCursor to false in the traits of the graphics
> > context and calling ::SetCursor on my own, but this causes the cursor to
> > flicker very badly because GraphicsWindowWin32 calls ::SetCursor(NULL) if
> > use cursor is set to false.
> >
> > It seems like there needs to be an option to set a custom cursor by
> > passing in an HCURSOR or a way to say "don't manage the mouse cursor" in the
> > Traits class.
> >
> > Any suggestions?
> >
> > Jason
> >
> > _______________________________________________
> > 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