Index: configure =================================================================== RCS file: /cvsroot/crystal/CS/configure,v retrieving revision 1.288 retrieving revision 1.289 diff -u -r1.288 -r1.289 --- configure 15 Nov 2004 05:52:31 -0000 1.288 +++ configure 15 Nov 2004 11:56:27 -0000 1.289 @@ -17845,7 +17845,9 @@ #------------------------------------------------------------------------------ # Check for OpenGL and companions. Also check if GLX extensions are supported # and define the (backward) header property CSGL_EXT_STATIC_ASSERTION if they -# are _not_ supported. +# are _not_ supported. Finally, check if the type GLhandleARB is exported by +# the GL headers. It is starting to show up in very modern headers, but is +# absent from most. # # IMPLEMENTATION NOTES # @@ -18452,7 +18454,355 @@ if test $cs_cv_libgl = yes; then - # Check for GLU. + # Check for GLhandleARB. + if test "" != yes; then + echo "$as_me:$LINENO: checking for GLhandleARB" >&5 +echo $ECHO_N "checking for GLhandleARB... $ECHO_C" >&6 +if test "${cs_cv_libgl_glhandlearb+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cs_cflags_save="$CFLAGS" + cs_lflags_save="$LDFLAGS" + cs_libs_save="$LIBS" + cs_build_ok=no + + + for cs_build_item in `echo @@@ | sed 'y% %#%'` + do + + set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" } + { for (i=1; i <= NF; ++i) + { if ($i == "") print "filler"; else print $i } }'` + shift + if test $# -eq 0; then + cs_dummy='' +else + if test "$1" = filler; then + cs_dummy='' +else + cs_dummy=$1 +fi + + shift +fi +if test $# -eq 0; then + cs_cflags_test='' +else + if test "$1" = filler; then + cs_cflags_test='' +else + cs_cflags_test=$1 +fi + + shift +fi +if test $# -eq 0; then + cs_lflags_test='' +else + if test "$1" = filler; then + cs_lflags_test='' +else + cs_lflags_test=$1 +fi + + shift +fi +if test $# -eq 0; then + cs_libs_test='' +else + if test "$1" = filler; then + cs_libs_test='' +else + cs_libs_test=$1 +fi + + shift +fi + + cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'` + cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'` + cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'` + + CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save" + LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save" + LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #if HAVE_WINDOWS_H + #if !HAVE_TYPE_INT32 + typedef long int32; + #endif + #include + #endif + #ifndef CS_HEADER_GLOBAL + #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y) + #define CS_HEADER_GLOBAL_COMPOSE(X,Y) + #endif + #ifdef CS_OPENGL_PATH + #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h) + #else + #include + #endif +int +main () +{ +GLhandleARB x; (void)x; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cs_build_ok=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $cs_build_ok = yes; then + break +fi + + done + + + CFLAGS=$cs_cflags_save + LDFLAGS=$cs_lflags_save + LIBS=$cs_libs_save + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + if test $cs_build_ok = yes; then + cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'` + cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'` + cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'` + cs_cv_libgl_glhandlearb=yes + cs_cv_libgl_glhandlearb_cflags=$cs_build_cflags + cs_cv_libgl_glhandlearb_lflags=$cs_build_lflags + cs_cv_libgl_glhandlearb_libs=$cs_build_libs +else + cs_cv_libgl_glhandlearb=no +fi + +fi +echo "$as_me:$LINENO: result: $cs_cv_libgl_glhandlearb" >&5 +echo "${ECHO_T}$cs_cv_libgl_glhandlearb" >&6 +else + echo "$as_me:$LINENO: checking for GLhandleARB" >&5 +echo $ECHO_N "checking for GLhandleARB... $ECHO_C" >&6 + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cs_cflags_save="$CFLAGS" + cs_lflags_save="$LDFLAGS" + cs_libs_save="$LIBS" + cs_build_ok=no + + + for cs_build_item in `echo @@@ | sed 'y% %#%'` + do + + set filler `echo "$cs_build_item" | awk 'BEGIN { FS="@" } + { for (i=1; i <= NF; ++i) + { if ($i == "") print "filler"; else print $i } }'` + shift + if test $# -eq 0; then + cs_dummy='' +else + if test "$1" = filler; then + cs_dummy='' +else + cs_dummy=$1 +fi + + shift +fi +if test $# -eq 0; then + cs_cflags_test='' +else + if test "$1" = filler; then + cs_cflags_test='' +else + cs_cflags_test=$1 +fi + + shift +fi +if test $# -eq 0; then + cs_lflags_test='' +else + if test "$1" = filler; then + cs_lflags_test='' +else + cs_lflags_test=$1 +fi + + shift +fi +if test $# -eq 0; then + cs_libs_test='' +else + if test "$1" = filler; then + cs_libs_test='' +else + cs_libs_test=$1 +fi + + shift +fi + + cs_cflags_test=`echo $cs_cflags_test | sed 'y%#% %'` + cs_lflags_test=`echo $cs_lflags_test | sed 'y%#% %'` + cs_libs_test=`echo $cs_libs_test | sed 'y%#% %'` + + CFLAGS="$cs_cflags_test $cs_cv_libgl_cflags $cs_cflags_save" + LDFLAGS="$cs_lflags_test $cs_cv_libgl_lflags $cs_lflags_save" + LIBS="$cs_libs_test $cs_cv_libgl_libs $cs_libs_save" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #if HAVE_WINDOWS_H + #if !HAVE_TYPE_INT32 + typedef long int32; + #endif + #include + #endif + #ifndef CS_HEADER_GLOBAL + #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y) + #define CS_HEADER_GLOBAL_COMPOSE(X,Y) + #endif + #ifdef CS_OPENGL_PATH + #include CS_HEADER_GLOBAL(CS_OPENGL_PATH,gl.h) + #else + #include + #endif +int +main () +{ +GLhandleARB x; (void)x; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cs_build_ok=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test $cs_build_ok = yes; then + break +fi + + done + + + CFLAGS=$cs_cflags_save + LDFLAGS=$cs_lflags_save + LIBS=$cs_libs_save + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + if test $cs_build_ok = yes; then + cs_build_cflags=`echo x$cs_cflags_test $cs_cv_libgl_cflags | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'` + cs_build_lflags=`echo x$cs_lflags_test $cs_cv_libgl_lflags | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'` + cs_build_libs=`echo x$cs_libs_test $cs_cv_libgl_libs | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'` + cs_cv_libgl_glhandlearb=yes + cs_cv_libgl_glhandlearb_cflags=$cs_build_cflags + cs_cv_libgl_glhandlearb_lflags=$cs_build_lflags + cs_cv_libgl_glhandlearb_libs=$cs_build_libs +else + cs_cv_libgl_glhandlearb=no +fi + + echo "$as_me:$LINENO: result: $cs_cv_libgl_glhandlearb" >&5 +echo "${ECHO_T}$cs_cv_libgl_glhandlearb" >&6 +fi + + if test $cs_cv_libgl_glhandlearb = yes; then + cs_header_text="${cs_header_text}#define CS_HAS_GLHANDLEARB_T +" +else + cs_cv_libgl_glhandlearb_cflags='' + cs_cv_libgl_glhandlearb_lflags='' + cs_cv_libgl_glhandlearb_libs='' + +fi + + + # Check for GLU. if test "" != yes; then echo "$as_me:$LINENO: checking for GLU" >&5 echo $ECHO_N "checking for GLU... $ECHO_C" >&6 Index: plugins/video/canvas/openglcommon/glextmanager.h =================================================================== RCS file: /cvsroot/crystal/CS/plugins/video/canvas/openglcommon/glextmanager.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- plugins/video/canvas/openglcommon/glextmanager.h 29 Sep 2004 18:22:10 -0000 1.31 +++ plugins/video/canvas/openglcommon/glextmanager.h 15 Nov 2004 11:56:38 -0000 1.32 @@ -111,11 +111,15 @@ #include #endif +//#include "cssysdef.h" + /* Appear in the ARB_shader_objects ext spec. */ typedef char GLcharARB; +#ifndef CS_HAS_GLHANDLEARB_T typedef unsigned int GLhandleARB; +#endif #include "iutil/cmdline.h" #include "iutil/objreg.h"