]> git.mxchange.org Git - simgear.git/blobdiff - simgear/screen/jpgfactory.cxx
make headers include headers they depend on, don't rely on the c(xx)
[simgear.git] / simgear / screen / jpgfactory.cxx
index b21d5adec6f7c744344e6ffcf4754099e522d11c..49621fe5a22f8a2a9fd4a50531ec139611aa08b6 100644 (file)
 //
 // 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 <windows.h>
 #endif
 
-#include <stdlib.h>
-#include <stdio.h>
-
 #include <plib/ssg.h>
 
 #include "jpgfactory.hxx"
@@ -57,8 +54,7 @@ typedef struct {
 
 typedef my_destination_mgr * my_dest_ptr;
 
-/* Where should this go <simgear/screen/tr.h> ?? */
-extern void trRenderFrame( void );
+void (*jpgRenderFrame)(void) = NULL;
 
 trJpgFactory::trJpgFactory() {
     imageWidth = imageHeight = 0;
@@ -233,7 +229,7 @@ int trJpgFactory::compress()
 
 int trJpgFactory::render()
 {
-    if( !tr ) {
+    if( !tr || !jpgRenderFrame ) {
         printf("!! NO tr !!\n   trJpgFactory::render()\n");
         return 0;
     }
@@ -253,7 +249,7 @@ int trJpgFactory::render()
 
     // printf("\ttrBeginTile(tr)\n");
     trBeginTile(tr);
-    trRenderFrame();
+    jpgRenderFrame();
     trEndTile(tr);
 
     /* just to be safe */