Reverse the declaration order. jpgRenderFrame (formerly known as trRenderFrame) is now declared as a NULL function pointer and assignment of the proper function is now done in FlightGear (jpgRenderFrame=FGRenderer::update).

This commit is contained in:
ehofman
2004-10-06 09:57:31 +00:00
parent a0d0852838
commit 62aa32a417
2 changed files with 6 additions and 4 deletions

View File

@@ -57,8 +57,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 +232,7 @@ int trJpgFactory::compress()
int trJpgFactory::render()
{
if( !tr ) {
if( !tr || !jpgRenderFrame ) {
printf("!! NO tr !!\n trJpgFactory::render()\n");
return 0;
}
@@ -253,7 +252,7 @@ int trJpgFactory::render()
// printf("\ttrBeginTile(tr)\n");
trBeginTile(tr);
trRenderFrame();
jpgRenderFrame();
trEndTile(tr);
/* just to be safe */

View File

@@ -36,6 +36,9 @@ extern "C" {
#include <simgear/screen/tr.h>
extern void (*jpgRenderFrame)(void);
/* should look at how VNC does this */
class trJpgFactory {
private: