From cc66c8fdcac4c3e3d579035409db227b22854796 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 27 Sep 2004 02:39:54 +0000 Subject: [PATCH] Activate the hi res screen capture functionality again, however it is no longer working 100% correctly. :-( --- src/GUI/gui.h | 1 + src/GUI/gui_funcs.cxx | 7 +++++-- src/Main/fg_commands.cxx | 12 ++++++++++++ src/Main/renderer.cxx | 4 ++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/GUI/gui.h b/src/GUI/gui.h index 1683e15c9..2ce8bd6a2 100644 --- a/src/GUI/gui.h +++ b/src/GUI/gui.h @@ -60,6 +60,7 @@ extern void reInit(puObject *); extern void dumpSnapShot(puObject *); #ifdef TR_HIRES_SNAP extern void dumpHiResSnapShot(puObject *); +extern void fgHiResDump(); #endif #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) extern void printScreen(puObject *); diff --git a/src/GUI/gui_funcs.cxx b/src/GUI/gui_funcs.cxx index 7989cd0f7..0672588d8 100644 --- a/src/GUI/gui_funcs.cxx +++ b/src/GUI/gui_funcs.cxx @@ -521,7 +521,7 @@ void fgHiResDump() static int count = 1; static const SGPropertyNode *master_freeze - = fgGetNode("/sim/freeze/master"); + = fgGetNode("/sim/freeze/master"); bool freeze = master_freeze->getBoolValue(); if ( !freeze ) { @@ -550,6 +550,9 @@ void fgHiResDump() ssgSetCamera( (sgVec4 *)globals->get_current_view()->get_VIEW() ); ssgSetFOV( globals->get_current_view()->get_h_fov(), globals->get_current_view()->get_v_fov() ); + cout << "FOV = " << globals->get_current_view()->get_h_fov() + << ", " << globals->get_current_view()->get_v_fov() << endl; + // ssgSetNearFar( 10.0f, 120000.0f ); ssgSetNearFar( 0.5f, 1200000.0f ); @@ -559,7 +562,7 @@ void fgHiResDump() // support any image size // This should be a requester to get multiplier from user - int multiplier = 3; + int multiplier = fgGetInt("/sim/startup/hires-multiplier", 3); int width = fgGetInt("/sim/startup/xsize"); int height = fgGetInt("/sim/startup/ysize"); diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index ca3171f8b..da40d0053 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -456,6 +456,17 @@ do_screen_capture (const SGPropertyNode * arg) } +/** + * Built-in command: hires capture screen. + */ +static bool +do_hires_screen_capture (const SGPropertyNode * arg) +{ + fgHiResDump(); + return true; +} + + /** * Reload the tile cache. */ @@ -1244,6 +1255,7 @@ static struct { { "preferences-load", do_preferences_load }, { "view-cycle", do_view_cycle }, { "screen-capture", do_screen_capture }, + { "hires-screen-capture", do_hires_screen_capture }, { "tile-cache-reload", do_tile_cache_reload }, { "set-sea-level-air-temp-degc", do_set_sea_level_degc }, { "set-outside-air-temp-degc", do_set_oat_degc }, diff --git a/src/Main/renderer.cxx b/src/Main/renderer.cxx index 6fcbe0165..e03ae8d26 100644 --- a/src/Main/renderer.cxx +++ b/src/Main/renderer.cxx @@ -908,11 +908,11 @@ FGRenderer::resize( int width, int height ) { } ssgSetFOV( viewmgr->get_current_view()->get_h_fov(), - viewmgr->get_current_view()->get_v_fov() ); + viewmgr->get_current_view()->get_v_fov() ); #ifdef FG_USE_CLOUDS_3D sgClouds3d->Resize( viewmgr->get_current_view()->get_h_fov(), - viewmgr->get_current_view()->get_v_fov() ); + viewmgr->get_current_view()->get_v_fov() ); #endif }