X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscreen%2Fjpgfactory.cxx;h=a5160cfc17fd1ccf09479e1241ff10c3023b32f6;hb=cc6179a4dd6c85993680de95259b9ed37535acfa;hp=b21d5adec6f7c744344e6ffcf4754099e522d11c;hpb=a8021531abe793f52de4fc903800b3569cf5ef93;p=simgear.git diff --git a/simgear/screen/jpgfactory.cxx b/simgear/screen/jpgfactory.cxx index b21d5ade..a5160cfc 100644 --- a/simgear/screen/jpgfactory.cxx +++ b/simgear/screen/jpgfactory.cxx @@ -16,20 +16,15 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -// $Id: +// $Id$ #ifdef HAVE_WINDOWS_H # include #endif -#include -#include - -#include - #include "jpgfactory.hxx" @@ -45,6 +40,7 @@ static boolean empty_output_buffer (j_compress_ptr cinfo); } #endif +// OSGFIME: offscreenrendering on osg - completely new context ... typedef struct { struct jpeg_destination_mgr pub; /* public fields */ @@ -57,8 +53,7 @@ typedef struct { typedef my_destination_mgr * my_dest_ptr; -/* Where should this go ?? */ -extern void trRenderFrame( void ); +void (*jpgRenderFrame)(void) = NULL; trJpgFactory::trJpgFactory() { imageWidth = imageHeight = 0; @@ -233,7 +228,7 @@ int trJpgFactory::compress() int trJpgFactory::render() { - if( !tr ) { + if( !tr || !jpgRenderFrame ) { printf("!! NO tr !!\n trJpgFactory::render()\n"); return 0; } @@ -242,7 +237,8 @@ int trJpgFactory::render() glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - sgFrustum *frustum = ssgGetFrustum(); + // OSGFIXME +// sgFrustum *frustum = ssgGetFrustum(); trFrustum(tr, frustum->getLeft(), frustum->getRight(), frustum->getBot(), frustum->getTop(), @@ -253,7 +249,7 @@ int trJpgFactory::render() // printf("\ttrBeginTile(tr)\n"); trBeginTile(tr); - trRenderFrame(); + jpgRenderFrame(); trEndTile(tr); /* just to be safe */