#7 Compile Togl with Visual C++ 6.0 (Part2)

closed
None
5
2005-09-17
2005-05-06
No

The function Togl_StereoFrustum:

void
Togl_StereoFrustum(GLfloat left, GLfloat right, GLfloat
bottom, GLfloat top, GLfloat near, GLfloat far, GLfloat
eyeDist, GLfloat eyeOffset)

gives the following error mesages, when compiled with
Visual C++ 6.0:

cl -DPACKAGE_NAME=\"Togl\" -
DPACKAGE_TARNAME=\"togl\" -
DPACKAGE_VERSION=\"1.7\" -
DPACKAGE_STRING=\"Togl\ 1.7\" -
DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -
DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -
DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -
DHAVE_MEMORY_H=1 -DTOGL_WGL=1 -DLIBGLU=-
lGLU -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 -I"/
c/Programme/Tcl/include" -I"/w/poSoft/tclSrc/tk8.4.5/
generic" -I"/w/poSoft/tclSrc/tk8.4.5/win" -I"/w/poSoft/
tclSrc/tk8.4.5/xlib" -nologo -O2 -W2 -MD -c `echo
togl.c` -o togl.obj
togl.c
togl.c(4021) : error C4226: Nicht dem Standard
entsprechende Erweiterung : 'near' ist ein veraltetes
Schluesselwort
togl.c(4021) : error C4226: Nicht dem Standard
entsprechende Erweiterung : 'far' ist ein veraltetes
Schluesselwort

(Translation of german error message:
Extension not corresponding to standard: 'near' is an out-
of-date keyword)

A workaround like the following works:

void
Togl_StereoFrustum(GLfloat left, GLfloat right, GLfloat
bottom, GLfloat top, GLfloat nearPlane, GLfloat farPlane,
GLfloat eyeDist, GLfloat eyeOffset)
{
GLfloat eyeShift = (eyeDist - nearPlane) * (eyeOffset /
eyeDist);

glFrustum(left + eyeShift, right + eyeShift, bottom,
top, nearPlane, farPlane);
glTranslatef(-eyeShift, 0, 0);
}

Greetings Paul

Discussion

  • Greg Couch

    Greg Couch - 2005-09-13
    • assigned_to: nobody --> gregcouch
     
  • Greg Couch

    Greg Couch - 2005-09-17
    • status: open --> closed
     
  • Greg Couch

    Greg Couch - 2005-09-17

    Logged In: YES
    user_id=131838

    Done.

     

Log in to post a comment.