X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscreen%2Ftr.cxx;h=e6d8bd7e3f8cf530882706366579a45570547ae4;hb=201cb61f842ef50a19438e3872ba22e588fa1afc;hp=85e9f3a8acc16914bd915b83e5e92d3fec6d1a72;hpb=84dd54b33a6d8b35e57c32194b025f79245f35c4;p=simgear.git diff --git a/simgear/screen/tr.cxx b/simgear/screen/tr.cxx index 85e9f3a8..e6d8bd7e 100644 --- a/simgear/screen/tr.cxx +++ b/simgear/screen/tr.cxx @@ -2,6 +2,21 @@ /* * $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 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 @@ -129,7 +144,7 @@ #include #endif -#include SG_GLU_H +#include #include "tr.h" @@ -393,7 +408,7 @@ void trBeginTile(TRcontext *tr) { GLint matrixMode; GLint tileWidth, tileHeight, border; - GLdouble left, right, bottom, top; +// GLdouble left, right, bottom, top; if (!tr) return; @@ -444,7 +459,9 @@ void trBeginTile(TRcontext *tr) 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; @@ -452,8 +469,8 @@ void trBeginTile(TRcontext *tr) * (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 ); @@ -526,7 +543,6 @@ int trEndTile(TRcontext *tr) return 1; } - /* * Replacement for glRastePos3f() which avoids the problem with invalid * raster pos. @@ -551,7 +567,8 @@ void trRasterPos3f(TRcontext *tr, GLfloat x, GLfloat y, GLfloat z) 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);