Hi Robert, > > Concerning local display variable, I considered using display and > > _display with complete different content that user must not mix - it is > > too easy to overlook by other programmers and to misuse / mix them, > > resulting in very hard to find bugs. Thus, I explicitly changed the name > > to be clear about the existence of the two X-server connections that the > > programmer have to use correctly. > > Hardwiring to _eventDisplay is not entirely safely as it depends upon > which thread the > calling code is from as to which display variable to use, so being > able to dynamically > assign this is best, so a local variable provides this flexibility. > Using a more specific > local variable name might be better though as _display and display are > rather close > and could easily be confused.
I see. In that case, let's leave it as it is now. Changing of the display local variable can be done in the future.... > > - missing OSGVIEWER_EXPORT for graphicswindow_X11(), currently line 2116. > > The same problem exists for graphicswindow_Win32() on line 2696 in > > GraphicsWindowWin32.cpp, making it not possible to call the funtion from > > the application code through OSG DLL api. Please, change both (soorry > > for not sending you GraphicsWindowWin32.cpp as I have more local changes > > inside it that are not ready for submission. > > Why is the export required for graphicswindow_X11()? Are you building > X11 under Windows? > > What is your suggestion for synatax? I don't want to add something > that might not work under Windows > as no matter what I add under Linux it'll just disappear once the > macro is expanded. For X11 - you can forget about it, it was meant just for completeness. The problem is with graphicswindow_Win32(). It should include OSGVIEWER_EXPORT otherwise it can not be called from the application code outside the DLL. Syntax should be (on line 2696 in GraphicsWindowWin32.cpp): extern "C" void OSGVIEWER_EXPORT graphicswindow_Win32(void) Thx, John _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
