|
- 3 -mieee-fp -Wall -Wstrict-prototypes -O3 -mieee-fp -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -c grskidmarks.cpp
- c++ -I/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/export/include -O3 -march=pentium4 -pipe -fomit-frame-pointer -Wall -Wstrict-prototypes -O3 -mieee-fp -Wall -Wstrict-prototypes -O3 -mieee-fp -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -c grloadac.cpp
- c++ -I/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/export/include -O3 -march=pentium4 -pipe -fomit-frame-pointer -Wall -Wstrict-prototypes -O3 -mieee-fp -Wall -Wstrict-prototypes -O3 -mieee-fp -D_SVID_SOURCE -D_BSD_SOURCE -DSHM -c grmultitexstate.cpp
- grmultitexstate.cpp: In member function `virtual void
- grMultiTexState::apply(int)':
- grmultitexstate.cpp:30: error: `glActiveTexture' undeclared (first use this
- function)
- grmultitexstate.cpp:30: error: (Each undeclared identifier is reported only
- once for each function it appears in.)
- make[5]: *** [grmultitexstate.o] Error 1
- make[5]: Leaving directory `/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src/modules/graphic/ssggraph'
- make[4]: *** [subdirs] Error 1
- make[4]: Leaving directory `/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src/modules/graphic'
- make[3]: *** [subdirs] Error 1
- make[3]: Leaving directory `/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src/modules'
- make[2]: *** [subdirs] Error 1
- make[2]: Leaving directory `/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2/src'
- make[1]: *** [subdirs] Error 1
- make[1]: Leaving directory `/var/tmp/portage/torcs-1.2.2/work/torcs-1.2.2'
- make: *** [restart] Error 2
复制代码
编译torcs。提示30行glActiveTexture未定义。但我到看30行的函数是glActiveTextureARB而不是glActiveTexture。
这是出错那个文件
- /***************************************************************************
- file : grmultitexstate.cpp
- created : Fri Mar 22 23:16:44 CET 2002
- copyright : (C) 2001 by Christophe Guionneau
- version : $Id: grmultitexstate.cpp,v 1.2 2002/11/24 20:44:08 torcs Exp $
- ***************************************************************************/
- /***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
- #include <plib/ssg.h>
- #include "grmultitexstate.h"
- #ifdef DMALLOC
- #include "dmalloc.h"
- #endif
- #include "grmain.h"
- void grMultiTexState::apply (int unit)
- {
- if (unit==0) {
- glActiveTextureARB ( GL_TEXTURE0_ARB ) ;
- glEnable ( GL_TEXTURE_2D ) ; /* Enables the second texture map. */
- glBindTexture ( GL_TEXTURE_2D, ssgSimpleState::getTextureHandle() ) ;
- } else if (unit==1) {
- glActiveTextureARB ( GL_TEXTURE1_ARB ) ;
- glEnable ( GL_TEXTURE_2D ) ; /* Enables the second texture map. */
- /* glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);*/
- /*glBlendFunc(GL_ZERO, GL_SRC_COLOR);*/
- glBindTexture ( GL_TEXTURE_2D, ssgSimpleState::getTextureHandle() ) ;
- } else if (unit==2) {
- glActiveTextureARB ( GL_TEXTURE2_ARB ) ;
- glEnable ( GL_TEXTURE_2D ) ; /* Enables the second texture map. */
- glBindTexture ( GL_TEXTURE_2D, ssgSimpleState::getTextureHandle() ) ;
- } else if (unit==3) {
- glActiveTextureARB ( GL_TEXTURE3_ARB ) ;
- glEnable ( GL_TEXTURE_2D ) ; /* Enables the second texture map. */
- glBindTexture ( GL_TEXTURE_2D, ssgSimpleState::getTextureHandle() ) ;
- } else {
- /*glActiveTextureARB ( GL_TEXTURE0_ARB ) ;*/
- glBindTexture ( GL_TEXTURE_2D, getTextureHandle() ) ;
- _ssgCurrentContext->getState()->setTexture ( getTexture () ) ;
- }
- }
复制代码 |
|