From 49fcc799ca048bc85e75b05766dacfe3e948f8ed Mon Sep 17 00:00:00 2001 From: fredb Date: Sat, 16 Dec 2006 17:29:16 +0000 Subject: [PATCH] Port jpgfactory to OSG --- projects/VC7.1/SimGear.vcproj | 6 ++++++ simgear/screen/jpgfactory.cxx | 11 ++++------- simgear/screen/jpgfactory.hxx | 8 ++++++++ 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/projects/VC7.1/SimGear.vcproj b/projects/VC7.1/SimGear.vcproj index d87b8dc7..18e48cb3 100755 --- a/projects/VC7.1/SimGear.vcproj +++ b/projects/VC7.1/SimGear.vcproj @@ -432,6 +432,12 @@ + + + + diff --git a/simgear/screen/jpgfactory.cxx b/simgear/screen/jpgfactory.cxx index a5160cfc..5c260a3f 100644 --- a/simgear/screen/jpgfactory.cxx +++ b/simgear/screen/jpgfactory.cxx @@ -21,6 +21,10 @@ // $Id$ +#ifdef HAVE_CONFIG_H +# include +#endif + #ifdef HAVE_WINDOWS_H # include #endif @@ -237,13 +241,6 @@ int trJpgFactory::render() glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - // OSGFIXME -// sgFrustum *frustum = ssgGetFrustum(); - trFrustum(tr, - frustum->getLeft(), frustum->getRight(), - frustum->getBot(), frustum->getTop(), - frustum->getNear(), frustum->getFar()); - /* just to be safe... */ glPixelStorei(GL_PACK_ALIGNMENT, 1); diff --git a/simgear/screen/jpgfactory.hxx b/simgear/screen/jpgfactory.hxx index abc03186..0e631bb9 100644 --- a/simgear/screen/jpgfactory.hxx +++ b/simgear/screen/jpgfactory.hxx @@ -27,6 +27,10 @@ extern "C" { #endif +#ifdef HAVE_WINDOWS_H +# define XMD_H // to avoid INT32 redefinition +#endif + #include #include #include @@ -72,6 +76,10 @@ class trJpgFactory { void destroy(int error = 0); int render(); + void setFrustum(GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble zNear, GLdouble zFar) { trFrustum(tr, left, right, bottom, top, zNear, zFar); } + unsigned char *data() { return IMAGE ; } struct jpeg_compress_struct *JPGinfo() { return &cinfo ; } -- 2.39.5