/*
* $Log$
+ * Revision 1.5 2008/07/27 16:10:37 ehofman
+ *
+ *
+ * - remove the SG_GLxxxx_H #defines, since OSG provides its own versions
+ * - this exposed a bizarre issue on Mac where dragging in <AGL/agl.h> in
+ * extensions.hxx was pulling in all of Carbon to the global namespace
+ * - very scary. As a result, I now need to explicitly include CoreFoundation
+ * in fg_init.cxx.
+ * - change SG_USING_STD(x) to using std::x
+ *
+ * Issues:
+ *
+ * - the logic for X11 and Win32 in RenderTexture and extensions is tortured,
+ * please see if you agree I got all the ifdefs correct.
+ *
* Revision 1.4 2006/10/29 19:27:11 frohlich
* Modified Files:
* configure.ac simgear/environment/visual_enviro.cxx
#include <windows.h>
#endif
-#include SG_GLU_H
+#include <simgear/scene/util/project.hxx>
#include "tr.h"
{
GLint matrixMode;
GLint tileWidth, tileHeight, border;
- GLdouble left, right, bottom, top;
+// GLdouble left, right, bottom, top;
if (!tr)
return;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
+ // OSGFIXME
/* compute projection parameters */
+ /*
left = tr->Left + (tr->Right - tr->Left)
* (tr->CurrentColumn * tr->TileWidthNB - border) / tr->ImageWidth;
right = left + (tr->Right - tr->Left) * tileWidth / tr->ImageWidth;
* (tr->CurrentRow * tr->TileHeightNB - border) / tr->ImageHeight;
top = bottom + (tr->Top - tr->Bottom) * tileHeight / tr->ImageHeight;
- // OSGFIXME
-// ssgSetFrustum ( left, right, bottom, top, tr->Near, tr->Far );
+ ssgSetFrustum ( left, right, bottom, top, tr->Near, tr->Far );
+ */
/* restore user's matrix mode */
glMatrixMode( (GLenum)matrixMode );
return 1;
}
-
/*
* Replacement for glRastePos3f() which avoids the problem with invalid
* raster pos.
viewport[3] = tr->CurrentTileHeight;
/* Project object coord to window coordinate */
- if (gluProject(x, y, z, modelview, proj, viewport, &winX, &winY, &winZ)){
+ if (simgear::project(x, y, z, modelview, proj, viewport,
+ &winX, &winY, &winZ)){
/* set raster pos to window coord (0,0) */
glMatrixMode(GL_MODELVIEW);