]> git.mxchange.org Git - simgear.git/commitdiff
Port jpgfactory to OSG
authorfredb <fredb>
Sat, 16 Dec 2006 17:29:16 +0000 (17:29 +0000)
committerfredb <fredb>
Sat, 16 Dec 2006 17:29:16 +0000 (17:29 +0000)
projects/VC7.1/SimGear.vcproj
simgear/screen/jpgfactory.cxx
simgear/screen/jpgfactory.hxx

index d87b8dc77d1901e2230a1e7b5e427e8a64faf457..18e48cb335c177ad67fa9005bef6325bca846865 100755 (executable)
                        <File
                                RelativePath="..\..\simgear\screen\GLBitmaps.h">
                        </File>
+                       <File
+                               RelativePath="..\..\simgear\screen\jpgfactory.cxx">
+                       </File>
+                       <File
+                               RelativePath="..\..\simgear\screen\jpgfactory.hxx">
+                       </File>
                        <File
                                RelativePath="..\..\simgear\screen\RenderTexture.cpp">
                        </File>
index a5160cfc17fd1ccf09479e1241ff10c3023b32f6..5c260a3f83fb8c100bb0baf63a7c15e541e00936 100644 (file)
 // $Id$
 
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #ifdef HAVE_WINDOWS_H
 #  include <windows.h>
 #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);
 
index abc0318670fcd69af3a34942988f03cc38fed655..0e631bb941eea398b6b1c6df0313a064190b6d7a 100644 (file)
 extern "C" {
 #endif
 
+#ifdef HAVE_WINDOWS_H
+#  define XMD_H // to avoid INT32 redefinition
+#endif
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <jpeglib.h>
@@ -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 ; }