Modifed osgGLUT viewer and messages in SGV to allow for start up in full
screen mode.
This commit is contained in:
parent
54516d1803
commit
9979e80bed
@ -8,6 +8,7 @@
|
|||||||
#include <osgGLUT/Export>
|
#include <osgGLUT/Export>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace osgGLUT
|
namespace osgGLUT
|
||||||
{
|
{
|
||||||
|
@ -43,6 +43,7 @@ void write_usage(std::ostream& out,const std::string& name)
|
|||||||
out <<" -stencil - use a visual with stencil buffer enabled, this "<< std::endl;
|
out <<" -stencil - use a visual with stencil buffer enabled, this "<< std::endl;
|
||||||
out <<" also allows the depth complexity statistics mode"<< std::endl;
|
out <<" also allows the depth complexity statistics mode"<< std::endl;
|
||||||
out <<" to be used (press 'p' three times to cycle to it)."<< std::endl;
|
out <<" to be used (press 'p' three times to cycle to it)."<< std::endl;
|
||||||
|
out <<" -f - start with a full screen, borderless window." << std::endl;
|
||||||
out << std::endl;
|
out << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,6 +161,15 @@ void Viewer::clear()
|
|||||||
/** read the command line string list, removing any matched control sequences.*/
|
/** read the command line string list, removing any matched control sequences.*/
|
||||||
void Viewer::readCommandLine(std::vector<std::string>& commandLine)
|
void Viewer::readCommandLine(std::vector<std::string>& commandLine)
|
||||||
{
|
{
|
||||||
|
std::vector<std::string>::iterator itr = commandLine.begin();
|
||||||
|
for(;itr!=commandLine.end();++itr)
|
||||||
|
{
|
||||||
|
if (*itr=="-f")
|
||||||
|
{
|
||||||
|
_fullscreen = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
_displaySettings->readCommandLine(commandLine);
|
_displaySettings->readCommandLine(commandLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1345,6 +1354,8 @@ void Viewer::help(std::ostream& fout)
|
|||||||
<<"f Toggle between fullscreen and the previous window size. Note, GLUT"<< std::endl
|
<<"f Toggle between fullscreen and the previous window size. Note, GLUT"<< std::endl
|
||||||
<<" fullscreen works properly on Windows and Irix, but on Linux"<< std::endl
|
<<" fullscreen works properly on Windows and Irix, but on Linux"<< std::endl
|
||||||
<<" it just maximizes the window and leaves the window's borders."<< std::endl
|
<<" it just maximizes the window and leaves the window's borders."<< std::endl
|
||||||
|
<<" If started in full screen mode on Linux, window will be borderless"<< std::endl
|
||||||
|
<<" and will resize down, but will remain borderless."<< std::endl
|
||||||
<<"Space Reset scene to the default view."<< std::endl
|
<<"Space Reset scene to the default view."<< std::endl
|
||||||
<<"Esc Exit sgv."<< std::endl;
|
<<"Esc Exit sgv."<< std::endl;
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@ Window::~Window()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Window::clear()
|
void Window::clear()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -81,6 +82,13 @@ bool Window::open()
|
|||||||
glutSpaceballRotateFunc( spaceballRotateCB );
|
glutSpaceballRotateFunc( spaceballRotateCB );
|
||||||
glutSpaceballButtonFunc( spaceballButtonCB );
|
glutSpaceballButtonFunc( spaceballButtonCB );
|
||||||
|
|
||||||
|
if( _fullscreen )
|
||||||
|
{
|
||||||
|
_saved_ww = _ww;
|
||||||
|
_saved_wh = _wh;
|
||||||
|
glutFullScreen();
|
||||||
|
}
|
||||||
|
|
||||||
_is_open = 1;
|
_is_open = 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user