Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r987 - in trunk/fox: FManta dm_demo
- Date: Tue, 14 Mar 2006 09:24:23 -0700 (MST)
Author: abe
Date: Tue Mar 14 09:24:23 2006
New Revision: 987
Modified:
trunk/fox/FManta/FMantaImageFrame.cc
trunk/fox/dm_demo/dm_demo.cc
Log:
Added -res WxH parameter to dm_demo. Note that resizing the window is
currently broken.
M fox/dm_demo/dm_demo.cc
M fox/FManta/FMantaImageFrame.cc
Modified: trunk/fox/FManta/FMantaImageFrame.cc
==============================================================================
--- trunk/fox/FManta/FMantaImageFrame.cc (original)
+++ trunk/fox/FManta/FMantaImageFrame.cc Tue Mar 14 09:24:23 2006
@@ -56,8 +56,8 @@
// Fox event on window resize.
long FMantaImageFrame::onConfigure ( FXObject *sender, FXSelector sel, void
*data ) {
- // std::cerr << "ImageFrame resize" << std::endl;
-
+ std::cerr << "Warning resize is broken." << std::endl;
+#if 0
if (shown()) {
// Send a transaction to manta, notifying change resolution.
@@ -69,6 +69,7 @@
getHeight(),
true ) );
}
+#endif
return 1;
}
Modified: trunk/fox/dm_demo/dm_demo.cc
==============================================================================
--- trunk/fox/dm_demo/dm_demo.cc (original)
+++ trunk/fox/dm_demo/dm_demo.cc Tue Mar 14 09:24:23 2006
@@ -99,7 +99,9 @@
bool use_stereo = false;
-
+ int xres = 512;
+ int yres = 512;
+
// Look for specific args.
for (int i=0;i<argc;++i) {
string arg = argv[i];
@@ -121,7 +123,12 @@
else if (arg == "-stack") {
stack_file = argv[++i];
}
- }
+ else if(arg == "-res"){
+ if(!getResolutionArg( (argv[++i]), xres, yres)){
+ std::cerr << "Error parsing resolution should be in form NxM" <<
std::endl;
+ }
+ }
+ }
std::cerr << "Using " << np << " workers plus one gui thread." <<
std::endl;
@@ -130,14 +137,12 @@
FXApp app( "", "Abe Stephens -- SGI" );
app.init( argc, argv );
- int width = 512;
- int height = 512;
// Add an FMantaWindow.
FMantaWindow manta_window( &app,
argv[0],
true,
- width, height );
+ xres, yres );
// Create the application's windows.
app.create();
@@ -274,7 +279,7 @@
// Create manta channel for the interface.
int manta_channel = 0; // !!! See XWindowUI.cc line: 586
- manta_interface->createChannel( glx_image_display, camera, use_stereo,
width, height );
+ manta_interface->createChannel( glx_image_display, camera, use_stereo,
xres, yres );
// Set the manta interface for the application.
manta_window.setMantaInterface( manta_interface, manta_channel );
- [MANTA] r987 - in trunk/fox: FManta dm_demo, abe, 03/14/2006
Archive powered by MHonArc 2.6.16.