linux_qgl.c 177 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. /*
  19. ** LINUX_QGL.C
  20. **
  21. ** This file implements the operating system binding of GL to QGL function
  22. ** pointers. When doing a port of Quake2 you must implement the following
  23. ** two functions:
  24. **
  25. ** QGL_Init() - loads libraries, assigns function pointers, etc.
  26. ** QGL_Shutdown() - unloads libraries, NULLs function pointers
  27. */
  28. // bk001204
  29. #include <unistd.h>
  30. #include <sys/types.h>
  31. #include <float.h>
  32. #include "../renderer/tr_local.h"
  33. #include "unix_glw.h"
  34. // bk001129 - from cvs1.17 (mkv)
  35. //#if defined(__FX__)
  36. //#include <GL/fxmesa.h>
  37. //#endif
  38. //#include <GL/glx.h> // bk010216 - FIXME: all of the above redundant? renderer/qgl.h
  39. #include <dlfcn.h>
  40. // bk001129 - from cvs1.17 (mkv)
  41. #if defined(__FX__)
  42. //FX Mesa Functions
  43. fxMesaContext (*qfxMesaCreateContext)(GLuint win, GrScreenResolution_t, GrScreenRefresh_t, const GLint attribList[]);
  44. fxMesaContext (*qfxMesaCreateBestContext)(GLuint win, GLint width, GLint height, const GLint attribList[]);
  45. void (*qfxMesaDestroyContext)(fxMesaContext ctx);
  46. void (*qfxMesaMakeCurrent)(fxMesaContext ctx);
  47. fxMesaContext (*qfxMesaGetCurrentContext)(void);
  48. void (*qfxMesaSwapBuffers)(void);
  49. #endif
  50. //GLX Functions
  51. XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList );
  52. GLXContext (*qglXCreateContext)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
  53. void (*qglXDestroyContext)( Display *dpy, GLXContext ctx );
  54. Bool (*qglXMakeCurrent)( Display *dpy, GLXDrawable drawable, GLXContext ctx);
  55. void (*qglXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, GLuint mask );
  56. void (*qglXSwapBuffers)( Display *dpy, GLXDrawable drawable );
  57. void ( APIENTRY * qglAccum )(GLenum op, GLfloat value);
  58. void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref);
  59. GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences);
  60. void ( APIENTRY * qglArrayElement )(GLint i);
  61. void ( APIENTRY * qglBegin )(GLenum mode);
  62. void ( APIENTRY * qglBindTexture )(GLenum target, GLuint texture);
  63. void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
  64. void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor);
  65. void ( APIENTRY * qglCallList )(GLuint list);
  66. void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists);
  67. void ( APIENTRY * qglClear )(GLbitfield mask);
  68. void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  69. void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  70. void ( APIENTRY * qglClearDepth )(GLclampd depth);
  71. void ( APIENTRY * qglClearIndex )(GLfloat c);
  72. void ( APIENTRY * qglClearStencil )(GLint s);
  73. void ( APIENTRY * qglClipPlane )(GLenum plane, const GLdouble *equation);
  74. void ( APIENTRY * qglColor3b )(GLbyte red, GLbyte green, GLbyte blue);
  75. void ( APIENTRY * qglColor3bv )(const GLbyte *v);
  76. void ( APIENTRY * qglColor3d )(GLdouble red, GLdouble green, GLdouble blue);
  77. void ( APIENTRY * qglColor3dv )(const GLdouble *v);
  78. void ( APIENTRY * qglColor3f )(GLfloat red, GLfloat green, GLfloat blue);
  79. void ( APIENTRY * qglColor3fv )(const GLfloat *v);
  80. void ( APIENTRY * qglColor3i )(GLint red, GLint green, GLint blue);
  81. void ( APIENTRY * qglColor3iv )(const GLint *v);
  82. void ( APIENTRY * qglColor3s )(GLshort red, GLshort green, GLshort blue);
  83. void ( APIENTRY * qglColor3sv )(const GLshort *v);
  84. void ( APIENTRY * qglColor3ub )(GLubyte red, GLubyte green, GLubyte blue);
  85. void ( APIENTRY * qglColor3ubv )(const GLubyte *v);
  86. void ( APIENTRY * qglColor3ui )(GLuint red, GLuint green, GLuint blue);
  87. void ( APIENTRY * qglColor3uiv )(const GLuint *v);
  88. void ( APIENTRY * qglColor3us )(GLushort red, GLushort green, GLushort blue);
  89. void ( APIENTRY * qglColor3usv )(const GLushort *v);
  90. void ( APIENTRY * qglColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
  91. void ( APIENTRY * qglColor4bv )(const GLbyte *v);
  92. void ( APIENTRY * qglColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
  93. void ( APIENTRY * qglColor4dv )(const GLdouble *v);
  94. void ( APIENTRY * qglColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  95. void ( APIENTRY * qglColor4fv )(const GLfloat *v);
  96. void ( APIENTRY * qglColor4i )(GLint red, GLint green, GLint blue, GLint alpha);
  97. void ( APIENTRY * qglColor4iv )(const GLint *v);
  98. void ( APIENTRY * qglColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha);
  99. void ( APIENTRY * qglColor4sv )(const GLshort *v);
  100. void ( APIENTRY * qglColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
  101. void ( APIENTRY * qglColor4ubv )(const GLubyte *v);
  102. void ( APIENTRY * qglColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha);
  103. void ( APIENTRY * qglColor4uiv )(const GLuint *v);
  104. void ( APIENTRY * qglColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha);
  105. void ( APIENTRY * qglColor4usv )(const GLushort *v);
  106. void ( APIENTRY * qglColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  107. void ( APIENTRY * qglColorMaterial )(GLenum face, GLenum mode);
  108. void ( APIENTRY * qglColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  109. void ( APIENTRY * qglCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
  110. void ( APIENTRY * qglCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
  111. void ( APIENTRY * qglCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  112. void ( APIENTRY * qglCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
  113. void ( APIENTRY * qglCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  114. void ( APIENTRY * qglCullFace )(GLenum mode);
  115. void ( APIENTRY * qglDeleteLists )(GLuint list, GLsizei range);
  116. void ( APIENTRY * qglDeleteTextures )(GLsizei n, const GLuint *textures);
  117. void ( APIENTRY * qglDepthFunc )(GLenum func);
  118. void ( APIENTRY * qglDepthMask )(GLboolean flag);
  119. void ( APIENTRY * qglDepthRange )(GLclampd zNear, GLclampd zFar);
  120. void ( APIENTRY * qglDisable )(GLenum cap);
  121. void ( APIENTRY * qglDisableClientState )(GLenum array);
  122. void ( APIENTRY * qglDrawArrays )(GLenum mode, GLint first, GLsizei count);
  123. void ( APIENTRY * qglDrawBuffer )(GLenum mode);
  124. void ( APIENTRY * qglDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
  125. void ( APIENTRY * qglDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  126. void ( APIENTRY * qglEdgeFlag )(GLboolean flag);
  127. void ( APIENTRY * qglEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer);
  128. void ( APIENTRY * qglEdgeFlagv )(const GLboolean *flag);
  129. void ( APIENTRY * qglEnable )(GLenum cap);
  130. void ( APIENTRY * qglEnableClientState )(GLenum array);
  131. void ( APIENTRY * qglEnd )(void);
  132. void ( APIENTRY * qglEndList )(void);
  133. void ( APIENTRY * qglEvalCoord1d )(GLdouble u);
  134. void ( APIENTRY * qglEvalCoord1dv )(const GLdouble *u);
  135. void ( APIENTRY * qglEvalCoord1f )(GLfloat u);
  136. void ( APIENTRY * qglEvalCoord1fv )(const GLfloat *u);
  137. void ( APIENTRY * qglEvalCoord2d )(GLdouble u, GLdouble v);
  138. void ( APIENTRY * qglEvalCoord2dv )(const GLdouble *u);
  139. void ( APIENTRY * qglEvalCoord2f )(GLfloat u, GLfloat v);
  140. void ( APIENTRY * qglEvalCoord2fv )(const GLfloat *u);
  141. void ( APIENTRY * qglEvalMesh1 )(GLenum mode, GLint i1, GLint i2);
  142. void ( APIENTRY * qglEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
  143. void ( APIENTRY * qglEvalPoint1 )(GLint i);
  144. void ( APIENTRY * qglEvalPoint2 )(GLint i, GLint j);
  145. void ( APIENTRY * qglFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer);
  146. void ( APIENTRY * qglFinish )(void);
  147. void ( APIENTRY * qglFlush )(void);
  148. void ( APIENTRY * qglFogf )(GLenum pname, GLfloat param);
  149. void ( APIENTRY * qglFogfv )(GLenum pname, const GLfloat *params);
  150. void ( APIENTRY * qglFogi )(GLenum pname, GLint param);
  151. void ( APIENTRY * qglFogiv )(GLenum pname, const GLint *params);
  152. void ( APIENTRY * qglFrontFace )(GLenum mode);
  153. void ( APIENTRY * qglFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  154. GLuint ( APIENTRY * qglGenLists )(GLsizei range);
  155. void ( APIENTRY * qglGenTextures )(GLsizei n, GLuint *textures);
  156. void ( APIENTRY * qglGetBooleanv )(GLenum pname, GLboolean *params);
  157. void ( APIENTRY * qglGetClipPlane )(GLenum plane, GLdouble *equation);
  158. void ( APIENTRY * qglGetDoublev )(GLenum pname, GLdouble *params);
  159. GLenum ( APIENTRY * qglGetError )(void);
  160. void ( APIENTRY * qglGetFloatv )(GLenum pname, GLfloat *params);
  161. void ( APIENTRY * qglGetIntegerv )(GLenum pname, GLint *params);
  162. void ( APIENTRY * qglGetLightfv )(GLenum light, GLenum pname, GLfloat *params);
  163. void ( APIENTRY * qglGetLightiv )(GLenum light, GLenum pname, GLint *params);
  164. void ( APIENTRY * qglGetMapdv )(GLenum target, GLenum query, GLdouble *v);
  165. void ( APIENTRY * qglGetMapfv )(GLenum target, GLenum query, GLfloat *v);
  166. void ( APIENTRY * qglGetMapiv )(GLenum target, GLenum query, GLint *v);
  167. void ( APIENTRY * qglGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params);
  168. void ( APIENTRY * qglGetMaterialiv )(GLenum face, GLenum pname, GLint *params);
  169. void ( APIENTRY * qglGetPixelMapfv )(GLenum map, GLfloat *values);
  170. void ( APIENTRY * qglGetPixelMapuiv )(GLenum map, GLuint *values);
  171. void ( APIENTRY * qglGetPixelMapusv )(GLenum map, GLushort *values);
  172. void ( APIENTRY * qglGetPointerv )(GLenum pname, GLvoid* *params);
  173. void ( APIENTRY * qglGetPolygonStipple )(GLubyte *mask);
  174. const GLubyte * ( APIENTRY * qglGetString )(GLenum name);
  175. void ( APIENTRY * qglGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params);
  176. void ( APIENTRY * qglGetTexEnviv )(GLenum target, GLenum pname, GLint *params);
  177. void ( APIENTRY * qglGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params);
  178. void ( APIENTRY * qglGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params);
  179. void ( APIENTRY * qglGetTexGeniv )(GLenum coord, GLenum pname, GLint *params);
  180. void ( APIENTRY * qglGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
  181. void ( APIENTRY * qglGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params);
  182. void ( APIENTRY * qglGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params);
  183. void ( APIENTRY * qglGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params);
  184. void ( APIENTRY * qglGetTexParameteriv )(GLenum target, GLenum pname, GLint *params);
  185. void ( APIENTRY * qglHint )(GLenum target, GLenum mode);
  186. void ( APIENTRY * qglIndexMask )(GLuint mask);
  187. void ( APIENTRY * qglIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
  188. void ( APIENTRY * qglIndexd )(GLdouble c);
  189. void ( APIENTRY * qglIndexdv )(const GLdouble *c);
  190. void ( APIENTRY * qglIndexf )(GLfloat c);
  191. void ( APIENTRY * qglIndexfv )(const GLfloat *c);
  192. void ( APIENTRY * qglIndexi )(GLint c);
  193. void ( APIENTRY * qglIndexiv )(const GLint *c);
  194. void ( APIENTRY * qglIndexs )(GLshort c);
  195. void ( APIENTRY * qglIndexsv )(const GLshort *c);
  196. void ( APIENTRY * qglIndexub )(GLubyte c);
  197. void ( APIENTRY * qglIndexubv )(const GLubyte *c);
  198. void ( APIENTRY * qglInitNames )(void);
  199. void ( APIENTRY * qglInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer);
  200. GLboolean ( APIENTRY * qglIsEnabled )(GLenum cap);
  201. GLboolean ( APIENTRY * qglIsList )(GLuint list);
  202. GLboolean ( APIENTRY * qglIsTexture )(GLuint texture);
  203. void ( APIENTRY * qglLightModelf )(GLenum pname, GLfloat param);
  204. void ( APIENTRY * qglLightModelfv )(GLenum pname, const GLfloat *params);
  205. void ( APIENTRY * qglLightModeli )(GLenum pname, GLint param);
  206. void ( APIENTRY * qglLightModeliv )(GLenum pname, const GLint *params);
  207. void ( APIENTRY * qglLightf )(GLenum light, GLenum pname, GLfloat param);
  208. void ( APIENTRY * qglLightfv )(GLenum light, GLenum pname, const GLfloat *params);
  209. void ( APIENTRY * qglLighti )(GLenum light, GLenum pname, GLint param);
  210. void ( APIENTRY * qglLightiv )(GLenum light, GLenum pname, const GLint *params);
  211. void ( APIENTRY * qglLineStipple )(GLint factor, GLushort pattern);
  212. void ( APIENTRY * qglLineWidth )(GLfloat width);
  213. void ( APIENTRY * qglListBase )(GLuint base);
  214. void ( APIENTRY * qglLoadIdentity )(void);
  215. void ( APIENTRY * qglLoadMatrixd )(const GLdouble *m);
  216. void ( APIENTRY * qglLoadMatrixf )(const GLfloat *m);
  217. void ( APIENTRY * qglLoadName )(GLuint name);
  218. void ( APIENTRY * qglLogicOp )(GLenum opcode);
  219. void ( APIENTRY * qglMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
  220. void ( APIENTRY * qglMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
  221. void ( APIENTRY * qglMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
  222. void ( APIENTRY * qglMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
  223. void ( APIENTRY * qglMapGrid1d )(GLint un, GLdouble u1, GLdouble u2);
  224. void ( APIENTRY * qglMapGrid1f )(GLint un, GLfloat u1, GLfloat u2);
  225. void ( APIENTRY * qglMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
  226. void ( APIENTRY * qglMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
  227. void ( APIENTRY * qglMaterialf )(GLenum face, GLenum pname, GLfloat param);
  228. void ( APIENTRY * qglMaterialfv )(GLenum face, GLenum pname, const GLfloat *params);
  229. void ( APIENTRY * qglMateriali )(GLenum face, GLenum pname, GLint param);
  230. void ( APIENTRY * qglMaterialiv )(GLenum face, GLenum pname, const GLint *params);
  231. void ( APIENTRY * qglMatrixMode )(GLenum mode);
  232. void ( APIENTRY * qglMultMatrixd )(const GLdouble *m);
  233. void ( APIENTRY * qglMultMatrixf )(const GLfloat *m);
  234. void ( APIENTRY * qglNewList )(GLuint list, GLenum mode);
  235. void ( APIENTRY * qglNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz);
  236. void ( APIENTRY * qglNormal3bv )(const GLbyte *v);
  237. void ( APIENTRY * qglNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz);
  238. void ( APIENTRY * qglNormal3dv )(const GLdouble *v);
  239. void ( APIENTRY * qglNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz);
  240. void ( APIENTRY * qglNormal3fv )(const GLfloat *v);
  241. void ( APIENTRY * qglNormal3i )(GLint nx, GLint ny, GLint nz);
  242. void ( APIENTRY * qglNormal3iv )(const GLint *v);
  243. void ( APIENTRY * qglNormal3s )(GLshort nx, GLshort ny, GLshort nz);
  244. void ( APIENTRY * qglNormal3sv )(const GLshort *v);
  245. void ( APIENTRY * qglNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
  246. void ( APIENTRY * qglOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  247. void ( APIENTRY * qglPassThrough )(GLfloat token);
  248. void ( APIENTRY * qglPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values);
  249. void ( APIENTRY * qglPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values);
  250. void ( APIENTRY * qglPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values);
  251. void ( APIENTRY * qglPixelStoref )(GLenum pname, GLfloat param);
  252. void ( APIENTRY * qglPixelStorei )(GLenum pname, GLint param);
  253. void ( APIENTRY * qglPixelTransferf )(GLenum pname, GLfloat param);
  254. void ( APIENTRY * qglPixelTransferi )(GLenum pname, GLint param);
  255. void ( APIENTRY * qglPixelZoom )(GLfloat xfactor, GLfloat yfactor);
  256. void ( APIENTRY * qglPointSize )(GLfloat size);
  257. void ( APIENTRY * qglPolygonMode )(GLenum face, GLenum mode);
  258. void ( APIENTRY * qglPolygonOffset )(GLfloat factor, GLfloat units);
  259. void ( APIENTRY * qglPolygonStipple )(const GLubyte *mask);
  260. void ( APIENTRY * qglPopAttrib )(void);
  261. void ( APIENTRY * qglPopClientAttrib )(void);
  262. void ( APIENTRY * qglPopMatrix )(void);
  263. void ( APIENTRY * qglPopName )(void);
  264. void ( APIENTRY * qglPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities);
  265. void ( APIENTRY * qglPushAttrib )(GLbitfield mask);
  266. void ( APIENTRY * qglPushClientAttrib )(GLbitfield mask);
  267. void ( APIENTRY * qglPushMatrix )(void);
  268. void ( APIENTRY * qglPushName )(GLuint name);
  269. void ( APIENTRY * qglRasterPos2d )(GLdouble x, GLdouble y);
  270. void ( APIENTRY * qglRasterPos2dv )(const GLdouble *v);
  271. void ( APIENTRY * qglRasterPos2f )(GLfloat x, GLfloat y);
  272. void ( APIENTRY * qglRasterPos2fv )(const GLfloat *v);
  273. void ( APIENTRY * qglRasterPos2i )(GLint x, GLint y);
  274. void ( APIENTRY * qglRasterPos2iv )(const GLint *v);
  275. void ( APIENTRY * qglRasterPos2s )(GLshort x, GLshort y);
  276. void ( APIENTRY * qglRasterPos2sv )(const GLshort *v);
  277. void ( APIENTRY * qglRasterPos3d )(GLdouble x, GLdouble y, GLdouble z);
  278. void ( APIENTRY * qglRasterPos3dv )(const GLdouble *v);
  279. void ( APIENTRY * qglRasterPos3f )(GLfloat x, GLfloat y, GLfloat z);
  280. void ( APIENTRY * qglRasterPos3fv )(const GLfloat *v);
  281. void ( APIENTRY * qglRasterPos3i )(GLint x, GLint y, GLint z);
  282. void ( APIENTRY * qglRasterPos3iv )(const GLint *v);
  283. void ( APIENTRY * qglRasterPos3s )(GLshort x, GLshort y, GLshort z);
  284. void ( APIENTRY * qglRasterPos3sv )(const GLshort *v);
  285. void ( APIENTRY * qglRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  286. void ( APIENTRY * qglRasterPos4dv )(const GLdouble *v);
  287. void ( APIENTRY * qglRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  288. void ( APIENTRY * qglRasterPos4fv )(const GLfloat *v);
  289. void ( APIENTRY * qglRasterPos4i )(GLint x, GLint y, GLint z, GLint w);
  290. void ( APIENTRY * qglRasterPos4iv )(const GLint *v);
  291. void ( APIENTRY * qglRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w);
  292. void ( APIENTRY * qglRasterPos4sv )(const GLshort *v);
  293. void ( APIENTRY * qglReadBuffer )(GLenum mode);
  294. void ( APIENTRY * qglReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
  295. void ( APIENTRY * qglRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
  296. void ( APIENTRY * qglRectdv )(const GLdouble *v1, const GLdouble *v2);
  297. void ( APIENTRY * qglRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
  298. void ( APIENTRY * qglRectfv )(const GLfloat *v1, const GLfloat *v2);
  299. void ( APIENTRY * qglRecti )(GLint x1, GLint y1, GLint x2, GLint y2);
  300. void ( APIENTRY * qglRectiv )(const GLint *v1, const GLint *v2);
  301. void ( APIENTRY * qglRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
  302. void ( APIENTRY * qglRectsv )(const GLshort *v1, const GLshort *v2);
  303. GLint ( APIENTRY * qglRenderMode )(GLenum mode);
  304. void ( APIENTRY * qglRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
  305. void ( APIENTRY * qglRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
  306. void ( APIENTRY * qglScaled )(GLdouble x, GLdouble y, GLdouble z);
  307. void ( APIENTRY * qglScalef )(GLfloat x, GLfloat y, GLfloat z);
  308. void ( APIENTRY * qglScissor )(GLint x, GLint y, GLsizei width, GLsizei height);
  309. void ( APIENTRY * qglSelectBuffer )(GLsizei size, GLuint *buffer);
  310. void ( APIENTRY * qglShadeModel )(GLenum mode);
  311. void ( APIENTRY * qglStencilFunc )(GLenum func, GLint ref, GLuint mask);
  312. void ( APIENTRY * qglStencilMask )(GLuint mask);
  313. void ( APIENTRY * qglStencilOp )(GLenum fail, GLenum zfail, GLenum zpass);
  314. void ( APIENTRY * qglTexCoord1d )(GLdouble s);
  315. void ( APIENTRY * qglTexCoord1dv )(const GLdouble *v);
  316. void ( APIENTRY * qglTexCoord1f )(GLfloat s);
  317. void ( APIENTRY * qglTexCoord1fv )(const GLfloat *v);
  318. void ( APIENTRY * qglTexCoord1i )(GLint s);
  319. void ( APIENTRY * qglTexCoord1iv )(const GLint *v);
  320. void ( APIENTRY * qglTexCoord1s )(GLshort s);
  321. void ( APIENTRY * qglTexCoord1sv )(const GLshort *v);
  322. void ( APIENTRY * qglTexCoord2d )(GLdouble s, GLdouble t);
  323. void ( APIENTRY * qglTexCoord2dv )(const GLdouble *v);
  324. void ( APIENTRY * qglTexCoord2f )(GLfloat s, GLfloat t);
  325. void ( APIENTRY * qglTexCoord2fv )(const GLfloat *v);
  326. void ( APIENTRY * qglTexCoord2i )(GLint s, GLint t);
  327. void ( APIENTRY * qglTexCoord2iv )(const GLint *v);
  328. void ( APIENTRY * qglTexCoord2s )(GLshort s, GLshort t);
  329. void ( APIENTRY * qglTexCoord2sv )(const GLshort *v);
  330. void ( APIENTRY * qglTexCoord3d )(GLdouble s, GLdouble t, GLdouble r);
  331. void ( APIENTRY * qglTexCoord3dv )(const GLdouble *v);
  332. void ( APIENTRY * qglTexCoord3f )(GLfloat s, GLfloat t, GLfloat r);
  333. void ( APIENTRY * qglTexCoord3fv )(const GLfloat *v);
  334. void ( APIENTRY * qglTexCoord3i )(GLint s, GLint t, GLint r);
  335. void ( APIENTRY * qglTexCoord3iv )(const GLint *v);
  336. void ( APIENTRY * qglTexCoord3s )(GLshort s, GLshort t, GLshort r);
  337. void ( APIENTRY * qglTexCoord3sv )(const GLshort *v);
  338. void ( APIENTRY * qglTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
  339. void ( APIENTRY * qglTexCoord4dv )(const GLdouble *v);
  340. void ( APIENTRY * qglTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
  341. void ( APIENTRY * qglTexCoord4fv )(const GLfloat *v);
  342. void ( APIENTRY * qglTexCoord4i )(GLint s, GLint t, GLint r, GLint q);
  343. void ( APIENTRY * qglTexCoord4iv )(const GLint *v);
  344. void ( APIENTRY * qglTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q);
  345. void ( APIENTRY * qglTexCoord4sv )(const GLshort *v);
  346. void ( APIENTRY * qglTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  347. void ( APIENTRY * qglTexEnvf )(GLenum target, GLenum pname, GLfloat param);
  348. void ( APIENTRY * qglTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params);
  349. void ( APIENTRY * qglTexEnvi )(GLenum target, GLenum pname, GLint param);
  350. void ( APIENTRY * qglTexEnviv )(GLenum target, GLenum pname, const GLint *params);
  351. void ( APIENTRY * qglTexGend )(GLenum coord, GLenum pname, GLdouble param);
  352. void ( APIENTRY * qglTexGendv )(GLenum coord, GLenum pname, const GLdouble *params);
  353. void ( APIENTRY * qglTexGenf )(GLenum coord, GLenum pname, GLfloat param);
  354. void ( APIENTRY * qglTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params);
  355. void ( APIENTRY * qglTexGeni )(GLenum coord, GLenum pname, GLint param);
  356. void ( APIENTRY * qglTexGeniv )(GLenum coord, GLenum pname, const GLint *params);
  357. void ( APIENTRY * qglTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  358. void ( APIENTRY * qglTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  359. void ( APIENTRY * qglTexParameterf )(GLenum target, GLenum pname, GLfloat param);
  360. void ( APIENTRY * qglTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params);
  361. void ( APIENTRY * qglTexParameteri )(GLenum target, GLenum pname, GLint param);
  362. void ( APIENTRY * qglTexParameteriv )(GLenum target, GLenum pname, const GLint *params);
  363. void ( APIENTRY * qglTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
  364. void ( APIENTRY * qglTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  365. void ( APIENTRY * qglTranslated )(GLdouble x, GLdouble y, GLdouble z);
  366. void ( APIENTRY * qglTranslatef )(GLfloat x, GLfloat y, GLfloat z);
  367. void ( APIENTRY * qglVertex2d )(GLdouble x, GLdouble y);
  368. void ( APIENTRY * qglVertex2dv )(const GLdouble *v);
  369. void ( APIENTRY * qglVertex2f )(GLfloat x, GLfloat y);
  370. void ( APIENTRY * qglVertex2fv )(const GLfloat *v);
  371. void ( APIENTRY * qglVertex2i )(GLint x, GLint y);
  372. void ( APIENTRY * qglVertex2iv )(const GLint *v);
  373. void ( APIENTRY * qglVertex2s )(GLshort x, GLshort y);
  374. void ( APIENTRY * qglVertex2sv )(const GLshort *v);
  375. void ( APIENTRY * qglVertex3d )(GLdouble x, GLdouble y, GLdouble z);
  376. void ( APIENTRY * qglVertex3dv )(const GLdouble *v);
  377. void ( APIENTRY * qglVertex3f )(GLfloat x, GLfloat y, GLfloat z);
  378. void ( APIENTRY * qglVertex3fv )(const GLfloat *v);
  379. void ( APIENTRY * qglVertex3i )(GLint x, GLint y, GLint z);
  380. void ( APIENTRY * qglVertex3iv )(const GLint *v);
  381. void ( APIENTRY * qglVertex3s )(GLshort x, GLshort y, GLshort z);
  382. void ( APIENTRY * qglVertex3sv )(const GLshort *v);
  383. void ( APIENTRY * qglVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  384. void ( APIENTRY * qglVertex4dv )(const GLdouble *v);
  385. void ( APIENTRY * qglVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  386. void ( APIENTRY * qglVertex4fv )(const GLfloat *v);
  387. void ( APIENTRY * qglVertex4i )(GLint x, GLint y, GLint z, GLint w);
  388. void ( APIENTRY * qglVertex4iv )(const GLint *v);
  389. void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w);
  390. void ( APIENTRY * qglVertex4sv )(const GLshort *v);
  391. void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  392. void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
  393. void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
  394. void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
  395. void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture );
  396. void ( APIENTRY * qglLockArraysEXT)( int, int);
  397. void ( APIENTRY * qglUnlockArraysEXT) ( void );
  398. void ( APIENTRY * qglPointParameterfEXT)( GLenum param, GLfloat value );
  399. void ( APIENTRY * qglPointParameterfvEXT)( GLenum param, const GLfloat *value );
  400. void ( APIENTRY * qglColorTableEXT)( int, int, int, int, int, const void * );
  401. void ( APIENTRY * qgl3DfxSetPaletteEXT)( GLuint * );
  402. void ( APIENTRY * qglSelectTextureSGIS)( GLenum );
  403. void ( APIENTRY * qglMTexCoord2fSGIS)( GLenum, GLfloat, GLfloat );
  404. static void ( APIENTRY * dllAccum )(GLenum op, GLfloat value);
  405. static void ( APIENTRY * dllAlphaFunc )(GLenum func, GLclampf ref);
  406. GLboolean ( APIENTRY * dllAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences);
  407. static void ( APIENTRY * dllArrayElement )(GLint i);
  408. static void ( APIENTRY * dllBegin )(GLenum mode);
  409. static void ( APIENTRY * dllBindTexture )(GLenum target, GLuint texture);
  410. static void ( APIENTRY * dllBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
  411. static void ( APIENTRY * dllBlendFunc )(GLenum sfactor, GLenum dfactor);
  412. static void ( APIENTRY * dllCallList )(GLuint list);
  413. static void ( APIENTRY * dllCallLists )(GLsizei n, GLenum type, const GLvoid *lists);
  414. static void ( APIENTRY * dllClear )(GLbitfield mask);
  415. static void ( APIENTRY * dllClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  416. static void ( APIENTRY * dllClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
  417. static void ( APIENTRY * dllClearDepth )(GLclampd depth);
  418. static void ( APIENTRY * dllClearIndex )(GLfloat c);
  419. static void ( APIENTRY * dllClearStencil )(GLint s);
  420. static void ( APIENTRY * dllClipPlane )(GLenum plane, const GLdouble *equation);
  421. static void ( APIENTRY * dllColor3b )(GLbyte red, GLbyte green, GLbyte blue);
  422. static void ( APIENTRY * dllColor3bv )(const GLbyte *v);
  423. static void ( APIENTRY * dllColor3d )(GLdouble red, GLdouble green, GLdouble blue);
  424. static void ( APIENTRY * dllColor3dv )(const GLdouble *v);
  425. static void ( APIENTRY * dllColor3f )(GLfloat red, GLfloat green, GLfloat blue);
  426. static void ( APIENTRY * dllColor3fv )(const GLfloat *v);
  427. static void ( APIENTRY * dllColor3i )(GLint red, GLint green, GLint blue);
  428. static void ( APIENTRY * dllColor3iv )(const GLint *v);
  429. static void ( APIENTRY * dllColor3s )(GLshort red, GLshort green, GLshort blue);
  430. static void ( APIENTRY * dllColor3sv )(const GLshort *v);
  431. static void ( APIENTRY * dllColor3ub )(GLubyte red, GLubyte green, GLubyte blue);
  432. static void ( APIENTRY * dllColor3ubv )(const GLubyte *v);
  433. static void ( APIENTRY * dllColor3ui )(GLuint red, GLuint green, GLuint blue);
  434. static void ( APIENTRY * dllColor3uiv )(const GLuint *v);
  435. static void ( APIENTRY * dllColor3us )(GLushort red, GLushort green, GLushort blue);
  436. static void ( APIENTRY * dllColor3usv )(const GLushort *v);
  437. static void ( APIENTRY * dllColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
  438. static void ( APIENTRY * dllColor4bv )(const GLbyte *v);
  439. static void ( APIENTRY * dllColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
  440. static void ( APIENTRY * dllColor4dv )(const GLdouble *v);
  441. static void ( APIENTRY * dllColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
  442. static void ( APIENTRY * dllColor4fv )(const GLfloat *v);
  443. static void ( APIENTRY * dllColor4i )(GLint red, GLint green, GLint blue, GLint alpha);
  444. static void ( APIENTRY * dllColor4iv )(const GLint *v);
  445. static void ( APIENTRY * dllColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha);
  446. static void ( APIENTRY * dllColor4sv )(const GLshort *v);
  447. static void ( APIENTRY * dllColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
  448. static void ( APIENTRY * dllColor4ubv )(const GLubyte *v);
  449. static void ( APIENTRY * dllColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha);
  450. static void ( APIENTRY * dllColor4uiv )(const GLuint *v);
  451. static void ( APIENTRY * dllColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha);
  452. static void ( APIENTRY * dllColor4usv )(const GLushort *v);
  453. static void ( APIENTRY * dllColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
  454. static void ( APIENTRY * dllColorMaterial )(GLenum face, GLenum mode);
  455. static void ( APIENTRY * dllColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  456. static void ( APIENTRY * dllCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
  457. static void ( APIENTRY * dllCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
  458. static void ( APIENTRY * dllCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
  459. static void ( APIENTRY * dllCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
  460. static void ( APIENTRY * dllCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
  461. static void ( APIENTRY * dllCullFace )(GLenum mode);
  462. static void ( APIENTRY * dllDeleteLists )(GLuint list, GLsizei range);
  463. static void ( APIENTRY * dllDeleteTextures )(GLsizei n, const GLuint *textures);
  464. static void ( APIENTRY * dllDepthFunc )(GLenum func);
  465. static void ( APIENTRY * dllDepthMask )(GLboolean flag);
  466. static void ( APIENTRY * dllDepthRange )(GLclampd zNear, GLclampd zFar);
  467. static void ( APIENTRY * dllDisable )(GLenum cap);
  468. static void ( APIENTRY * dllDisableClientState )(GLenum array);
  469. static void ( APIENTRY * dllDrawArrays )(GLenum mode, GLint first, GLsizei count);
  470. static void ( APIENTRY * dllDrawBuffer )(GLenum mode);
  471. static void ( APIENTRY * dllDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
  472. static void ( APIENTRY * dllDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  473. static void ( APIENTRY * dllEdgeFlag )(GLboolean flag);
  474. static void ( APIENTRY * dllEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer);
  475. static void ( APIENTRY * dllEdgeFlagv )(const GLboolean *flag);
  476. static void ( APIENTRY * dllEnable )(GLenum cap);
  477. static void ( APIENTRY * dllEnableClientState )(GLenum array);
  478. static void ( APIENTRY * dllEnd )(void);
  479. static void ( APIENTRY * dllEndList )(void);
  480. static void ( APIENTRY * dllEvalCoord1d )(GLdouble u);
  481. static void ( APIENTRY * dllEvalCoord1dv )(const GLdouble *u);
  482. static void ( APIENTRY * dllEvalCoord1f )(GLfloat u);
  483. static void ( APIENTRY * dllEvalCoord1fv )(const GLfloat *u);
  484. static void ( APIENTRY * dllEvalCoord2d )(GLdouble u, GLdouble v);
  485. static void ( APIENTRY * dllEvalCoord2dv )(const GLdouble *u);
  486. static void ( APIENTRY * dllEvalCoord2f )(GLfloat u, GLfloat v);
  487. static void ( APIENTRY * dllEvalCoord2fv )(const GLfloat *u);
  488. static void ( APIENTRY * dllEvalMesh1 )(GLenum mode, GLint i1, GLint i2);
  489. static void ( APIENTRY * dllEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
  490. static void ( APIENTRY * dllEvalPoint1 )(GLint i);
  491. static void ( APIENTRY * dllEvalPoint2 )(GLint i, GLint j);
  492. static void ( APIENTRY * dllFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer);
  493. static void ( APIENTRY * dllFinish )(void);
  494. static void ( APIENTRY * dllFlush )(void);
  495. static void ( APIENTRY * dllFogf )(GLenum pname, GLfloat param);
  496. static void ( APIENTRY * dllFogfv )(GLenum pname, const GLfloat *params);
  497. static void ( APIENTRY * dllFogi )(GLenum pname, GLint param);
  498. static void ( APIENTRY * dllFogiv )(GLenum pname, const GLint *params);
  499. static void ( APIENTRY * dllFrontFace )(GLenum mode);
  500. static void ( APIENTRY * dllFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  501. GLuint ( APIENTRY * dllGenLists )(GLsizei range);
  502. static void ( APIENTRY * dllGenTextures )(GLsizei n, GLuint *textures);
  503. static void ( APIENTRY * dllGetBooleanv )(GLenum pname, GLboolean *params);
  504. static void ( APIENTRY * dllGetClipPlane )(GLenum plane, GLdouble *equation);
  505. static void ( APIENTRY * dllGetDoublev )(GLenum pname, GLdouble *params);
  506. GLenum ( APIENTRY * dllGetError )(void);
  507. static void ( APIENTRY * dllGetFloatv )(GLenum pname, GLfloat *params);
  508. static void ( APIENTRY * dllGetIntegerv )(GLenum pname, GLint *params);
  509. static void ( APIENTRY * dllGetLightfv )(GLenum light, GLenum pname, GLfloat *params);
  510. static void ( APIENTRY * dllGetLightiv )(GLenum light, GLenum pname, GLint *params);
  511. static void ( APIENTRY * dllGetMapdv )(GLenum target, GLenum query, GLdouble *v);
  512. static void ( APIENTRY * dllGetMapfv )(GLenum target, GLenum query, GLfloat *v);
  513. static void ( APIENTRY * dllGetMapiv )(GLenum target, GLenum query, GLint *v);
  514. static void ( APIENTRY * dllGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params);
  515. static void ( APIENTRY * dllGetMaterialiv )(GLenum face, GLenum pname, GLint *params);
  516. static void ( APIENTRY * dllGetPixelMapfv )(GLenum map, GLfloat *values);
  517. static void ( APIENTRY * dllGetPixelMapuiv )(GLenum map, GLuint *values);
  518. static void ( APIENTRY * dllGetPixelMapusv )(GLenum map, GLushort *values);
  519. static void ( APIENTRY * dllGetPointerv )(GLenum pname, GLvoid* *params);
  520. static void ( APIENTRY * dllGetPolygonStipple )(GLubyte *mask);
  521. const GLubyte * ( APIENTRY * dllGetString )(GLenum name);
  522. static void ( APIENTRY * dllGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params);
  523. static void ( APIENTRY * dllGetTexEnviv )(GLenum target, GLenum pname, GLint *params);
  524. static void ( APIENTRY * dllGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params);
  525. static void ( APIENTRY * dllGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params);
  526. static void ( APIENTRY * dllGetTexGeniv )(GLenum coord, GLenum pname, GLint *params);
  527. static void ( APIENTRY * dllGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
  528. static void ( APIENTRY * dllGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params);
  529. static void ( APIENTRY * dllGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params);
  530. static void ( APIENTRY * dllGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params);
  531. static void ( APIENTRY * dllGetTexParameteriv )(GLenum target, GLenum pname, GLint *params);
  532. static void ( APIENTRY * dllHint )(GLenum target, GLenum mode);
  533. static void ( APIENTRY * dllIndexMask )(GLuint mask);
  534. static void ( APIENTRY * dllIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
  535. static void ( APIENTRY * dllIndexd )(GLdouble c);
  536. static void ( APIENTRY * dllIndexdv )(const GLdouble *c);
  537. static void ( APIENTRY * dllIndexf )(GLfloat c);
  538. static void ( APIENTRY * dllIndexfv )(const GLfloat *c);
  539. static void ( APIENTRY * dllIndexi )(GLint c);
  540. static void ( APIENTRY * dllIndexiv )(const GLint *c);
  541. static void ( APIENTRY * dllIndexs )(GLshort c);
  542. static void ( APIENTRY * dllIndexsv )(const GLshort *c);
  543. static void ( APIENTRY * dllIndexub )(GLubyte c);
  544. static void ( APIENTRY * dllIndexubv )(const GLubyte *c);
  545. static void ( APIENTRY * dllInitNames )(void);
  546. static void ( APIENTRY * dllInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer);
  547. GLboolean ( APIENTRY * dllIsEnabled )(GLenum cap);
  548. GLboolean ( APIENTRY * dllIsList )(GLuint list);
  549. GLboolean ( APIENTRY * dllIsTexture )(GLuint texture);
  550. static void ( APIENTRY * dllLightModelf )(GLenum pname, GLfloat param);
  551. static void ( APIENTRY * dllLightModelfv )(GLenum pname, const GLfloat *params);
  552. static void ( APIENTRY * dllLightModeli )(GLenum pname, GLint param);
  553. static void ( APIENTRY * dllLightModeliv )(GLenum pname, const GLint *params);
  554. static void ( APIENTRY * dllLightf )(GLenum light, GLenum pname, GLfloat param);
  555. static void ( APIENTRY * dllLightfv )(GLenum light, GLenum pname, const GLfloat *params);
  556. static void ( APIENTRY * dllLighti )(GLenum light, GLenum pname, GLint param);
  557. static void ( APIENTRY * dllLightiv )(GLenum light, GLenum pname, const GLint *params);
  558. static void ( APIENTRY * dllLineStipple )(GLint factor, GLushort pattern);
  559. static void ( APIENTRY * dllLineWidth )(GLfloat width);
  560. static void ( APIENTRY * dllListBase )(GLuint base);
  561. static void ( APIENTRY * dllLoadIdentity )(void);
  562. static void ( APIENTRY * dllLoadMatrixd )(const GLdouble *m);
  563. static void ( APIENTRY * dllLoadMatrixf )(const GLfloat *m);
  564. static void ( APIENTRY * dllLoadName )(GLuint name);
  565. static void ( APIENTRY * dllLogicOp )(GLenum opcode);
  566. static void ( APIENTRY * dllMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
  567. static void ( APIENTRY * dllMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
  568. static void ( APIENTRY * dllMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
  569. static void ( APIENTRY * dllMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
  570. static void ( APIENTRY * dllMapGrid1d )(GLint un, GLdouble u1, GLdouble u2);
  571. static void ( APIENTRY * dllMapGrid1f )(GLint un, GLfloat u1, GLfloat u2);
  572. static void ( APIENTRY * dllMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
  573. static void ( APIENTRY * dllMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
  574. static void ( APIENTRY * dllMaterialf )(GLenum face, GLenum pname, GLfloat param);
  575. static void ( APIENTRY * dllMaterialfv )(GLenum face, GLenum pname, const GLfloat *params);
  576. static void ( APIENTRY * dllMateriali )(GLenum face, GLenum pname, GLint param);
  577. static void ( APIENTRY * dllMaterialiv )(GLenum face, GLenum pname, const GLint *params);
  578. static void ( APIENTRY * dllMatrixMode )(GLenum mode);
  579. static void ( APIENTRY * dllMultMatrixd )(const GLdouble *m);
  580. static void ( APIENTRY * dllMultMatrixf )(const GLfloat *m);
  581. static void ( APIENTRY * dllNewList )(GLuint list, GLenum mode);
  582. static void ( APIENTRY * dllNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz);
  583. static void ( APIENTRY * dllNormal3bv )(const GLbyte *v);
  584. static void ( APIENTRY * dllNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz);
  585. static void ( APIENTRY * dllNormal3dv )(const GLdouble *v);
  586. static void ( APIENTRY * dllNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz);
  587. static void ( APIENTRY * dllNormal3fv )(const GLfloat *v);
  588. static void ( APIENTRY * dllNormal3i )(GLint nx, GLint ny, GLint nz);
  589. static void ( APIENTRY * dllNormal3iv )(const GLint *v);
  590. static void ( APIENTRY * dllNormal3s )(GLshort nx, GLshort ny, GLshort nz);
  591. static void ( APIENTRY * dllNormal3sv )(const GLshort *v);
  592. static void ( APIENTRY * dllNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
  593. static void ( APIENTRY * dllOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
  594. static void ( APIENTRY * dllPassThrough )(GLfloat token);
  595. static void ( APIENTRY * dllPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values);
  596. static void ( APIENTRY * dllPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values);
  597. static void ( APIENTRY * dllPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values);
  598. static void ( APIENTRY * dllPixelStoref )(GLenum pname, GLfloat param);
  599. static void ( APIENTRY * dllPixelStorei )(GLenum pname, GLint param);
  600. static void ( APIENTRY * dllPixelTransferf )(GLenum pname, GLfloat param);
  601. static void ( APIENTRY * dllPixelTransferi )(GLenum pname, GLint param);
  602. static void ( APIENTRY * dllPixelZoom )(GLfloat xfactor, GLfloat yfactor);
  603. static void ( APIENTRY * dllPointSize )(GLfloat size);
  604. static void ( APIENTRY * dllPolygonMode )(GLenum face, GLenum mode);
  605. static void ( APIENTRY * dllPolygonOffset )(GLfloat factor, GLfloat units);
  606. static void ( APIENTRY * dllPolygonStipple )(const GLubyte *mask);
  607. static void ( APIENTRY * dllPopAttrib )(void);
  608. static void ( APIENTRY * dllPopClientAttrib )(void);
  609. static void ( APIENTRY * dllPopMatrix )(void);
  610. static void ( APIENTRY * dllPopName )(void);
  611. static void ( APIENTRY * dllPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities);
  612. static void ( APIENTRY * dllPushAttrib )(GLbitfield mask);
  613. static void ( APIENTRY * dllPushClientAttrib )(GLbitfield mask);
  614. static void ( APIENTRY * dllPushMatrix )(void);
  615. static void ( APIENTRY * dllPushName )(GLuint name);
  616. static void ( APIENTRY * dllRasterPos2d )(GLdouble x, GLdouble y);
  617. static void ( APIENTRY * dllRasterPos2dv )(const GLdouble *v);
  618. static void ( APIENTRY * dllRasterPos2f )(GLfloat x, GLfloat y);
  619. static void ( APIENTRY * dllRasterPos2fv )(const GLfloat *v);
  620. static void ( APIENTRY * dllRasterPos2i )(GLint x, GLint y);
  621. static void ( APIENTRY * dllRasterPos2iv )(const GLint *v);
  622. static void ( APIENTRY * dllRasterPos2s )(GLshort x, GLshort y);
  623. static void ( APIENTRY * dllRasterPos2sv )(const GLshort *v);
  624. static void ( APIENTRY * dllRasterPos3d )(GLdouble x, GLdouble y, GLdouble z);
  625. static void ( APIENTRY * dllRasterPos3dv )(const GLdouble *v);
  626. static void ( APIENTRY * dllRasterPos3f )(GLfloat x, GLfloat y, GLfloat z);
  627. static void ( APIENTRY * dllRasterPos3fv )(const GLfloat *v);
  628. static void ( APIENTRY * dllRasterPos3i )(GLint x, GLint y, GLint z);
  629. static void ( APIENTRY * dllRasterPos3iv )(const GLint *v);
  630. static void ( APIENTRY * dllRasterPos3s )(GLshort x, GLshort y, GLshort z);
  631. static void ( APIENTRY * dllRasterPos3sv )(const GLshort *v);
  632. static void ( APIENTRY * dllRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  633. static void ( APIENTRY * dllRasterPos4dv )(const GLdouble *v);
  634. static void ( APIENTRY * dllRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  635. static void ( APIENTRY * dllRasterPos4fv )(const GLfloat *v);
  636. static void ( APIENTRY * dllRasterPos4i )(GLint x, GLint y, GLint z, GLint w);
  637. static void ( APIENTRY * dllRasterPos4iv )(const GLint *v);
  638. static void ( APIENTRY * dllRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w);
  639. static void ( APIENTRY * dllRasterPos4sv )(const GLshort *v);
  640. static void ( APIENTRY * dllReadBuffer )(GLenum mode);
  641. static void ( APIENTRY * dllReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
  642. static void ( APIENTRY * dllRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
  643. static void ( APIENTRY * dllRectdv )(const GLdouble *v1, const GLdouble *v2);
  644. static void ( APIENTRY * dllRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
  645. static void ( APIENTRY * dllRectfv )(const GLfloat *v1, const GLfloat *v2);
  646. static void ( APIENTRY * dllRecti )(GLint x1, GLint y1, GLint x2, GLint y2);
  647. static void ( APIENTRY * dllRectiv )(const GLint *v1, const GLint *v2);
  648. static void ( APIENTRY * dllRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
  649. static void ( APIENTRY * dllRectsv )(const GLshort *v1, const GLshort *v2);
  650. GLint ( APIENTRY * dllRenderMode )(GLenum mode);
  651. static void ( APIENTRY * dllRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
  652. static void ( APIENTRY * dllRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
  653. static void ( APIENTRY * dllScaled )(GLdouble x, GLdouble y, GLdouble z);
  654. static void ( APIENTRY * dllScalef )(GLfloat x, GLfloat y, GLfloat z);
  655. static void ( APIENTRY * dllScissor )(GLint x, GLint y, GLsizei width, GLsizei height);
  656. static void ( APIENTRY * dllSelectBuffer )(GLsizei size, GLuint *buffer);
  657. static void ( APIENTRY * dllShadeModel )(GLenum mode);
  658. static void ( APIENTRY * dllStencilFunc )(GLenum func, GLint ref, GLuint mask);
  659. static void ( APIENTRY * dllStencilMask )(GLuint mask);
  660. static void ( APIENTRY * dllStencilOp )(GLenum fail, GLenum zfail, GLenum zpass);
  661. static void ( APIENTRY * dllTexCoord1d )(GLdouble s);
  662. static void ( APIENTRY * dllTexCoord1dv )(const GLdouble *v);
  663. static void ( APIENTRY * dllTexCoord1f )(GLfloat s);
  664. static void ( APIENTRY * dllTexCoord1fv )(const GLfloat *v);
  665. static void ( APIENTRY * dllTexCoord1i )(GLint s);
  666. static void ( APIENTRY * dllTexCoord1iv )(const GLint *v);
  667. static void ( APIENTRY * dllTexCoord1s )(GLshort s);
  668. static void ( APIENTRY * dllTexCoord1sv )(const GLshort *v);
  669. static void ( APIENTRY * dllTexCoord2d )(GLdouble s, GLdouble t);
  670. static void ( APIENTRY * dllTexCoord2dv )(const GLdouble *v);
  671. static void ( APIENTRY * dllTexCoord2f )(GLfloat s, GLfloat t);
  672. static void ( APIENTRY * dllTexCoord2fv )(const GLfloat *v);
  673. static void ( APIENTRY * dllTexCoord2i )(GLint s, GLint t);
  674. static void ( APIENTRY * dllTexCoord2iv )(const GLint *v);
  675. static void ( APIENTRY * dllTexCoord2s )(GLshort s, GLshort t);
  676. static void ( APIENTRY * dllTexCoord2sv )(const GLshort *v);
  677. static void ( APIENTRY * dllTexCoord3d )(GLdouble s, GLdouble t, GLdouble r);
  678. static void ( APIENTRY * dllTexCoord3dv )(const GLdouble *v);
  679. static void ( APIENTRY * dllTexCoord3f )(GLfloat s, GLfloat t, GLfloat r);
  680. static void ( APIENTRY * dllTexCoord3fv )(const GLfloat *v);
  681. static void ( APIENTRY * dllTexCoord3i )(GLint s, GLint t, GLint r);
  682. static void ( APIENTRY * dllTexCoord3iv )(const GLint *v);
  683. static void ( APIENTRY * dllTexCoord3s )(GLshort s, GLshort t, GLshort r);
  684. static void ( APIENTRY * dllTexCoord3sv )(const GLshort *v);
  685. static void ( APIENTRY * dllTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
  686. static void ( APIENTRY * dllTexCoord4dv )(const GLdouble *v);
  687. static void ( APIENTRY * dllTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
  688. static void ( APIENTRY * dllTexCoord4fv )(const GLfloat *v);
  689. static void ( APIENTRY * dllTexCoord4i )(GLint s, GLint t, GLint r, GLint q);
  690. static void ( APIENTRY * dllTexCoord4iv )(const GLint *v);
  691. static void ( APIENTRY * dllTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q);
  692. static void ( APIENTRY * dllTexCoord4sv )(const GLshort *v);
  693. static void ( APIENTRY * dllTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  694. static void ( APIENTRY * dllTexEnvf )(GLenum target, GLenum pname, GLfloat param);
  695. static void ( APIENTRY * dllTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params);
  696. static void ( APIENTRY * dllTexEnvi )(GLenum target, GLenum pname, GLint param);
  697. static void ( APIENTRY * dllTexEnviv )(GLenum target, GLenum pname, const GLint *params);
  698. static void ( APIENTRY * dllTexGend )(GLenum coord, GLenum pname, GLdouble param);
  699. static void ( APIENTRY * dllTexGendv )(GLenum coord, GLenum pname, const GLdouble *params);
  700. static void ( APIENTRY * dllTexGenf )(GLenum coord, GLenum pname, GLfloat param);
  701. static void ( APIENTRY * dllTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params);
  702. static void ( APIENTRY * dllTexGeni )(GLenum coord, GLenum pname, GLint param);
  703. static void ( APIENTRY * dllTexGeniv )(GLenum coord, GLenum pname, const GLint *params);
  704. static void ( APIENTRY * dllTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  705. static void ( APIENTRY * dllTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
  706. static void ( APIENTRY * dllTexParameterf )(GLenum target, GLenum pname, GLfloat param);
  707. static void ( APIENTRY * dllTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params);
  708. static void ( APIENTRY * dllTexParameteri )(GLenum target, GLenum pname, GLint param);
  709. static void ( APIENTRY * dllTexParameteriv )(GLenum target, GLenum pname, const GLint *params);
  710. static void ( APIENTRY * dllTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
  711. static void ( APIENTRY * dllTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
  712. static void ( APIENTRY * dllTranslated )(GLdouble x, GLdouble y, GLdouble z);
  713. static void ( APIENTRY * dllTranslatef )(GLfloat x, GLfloat y, GLfloat z);
  714. static void ( APIENTRY * dllVertex2d )(GLdouble x, GLdouble y);
  715. static void ( APIENTRY * dllVertex2dv )(const GLdouble *v);
  716. static void ( APIENTRY * dllVertex2f )(GLfloat x, GLfloat y);
  717. static void ( APIENTRY * dllVertex2fv )(const GLfloat *v);
  718. static void ( APIENTRY * dllVertex2i )(GLint x, GLint y);
  719. static void ( APIENTRY * dllVertex2iv )(const GLint *v);
  720. static void ( APIENTRY * dllVertex2s )(GLshort x, GLshort y);
  721. static void ( APIENTRY * dllVertex2sv )(const GLshort *v);
  722. static void ( APIENTRY * dllVertex3d )(GLdouble x, GLdouble y, GLdouble z);
  723. static void ( APIENTRY * dllVertex3dv )(const GLdouble *v);
  724. static void ( APIENTRY * dllVertex3f )(GLfloat x, GLfloat y, GLfloat z);
  725. static void ( APIENTRY * dllVertex3fv )(const GLfloat *v);
  726. static void ( APIENTRY * dllVertex3i )(GLint x, GLint y, GLint z);
  727. static void ( APIENTRY * dllVertex3iv )(const GLint *v);
  728. static void ( APIENTRY * dllVertex3s )(GLshort x, GLshort y, GLshort z);
  729. static void ( APIENTRY * dllVertex3sv )(const GLshort *v);
  730. static void ( APIENTRY * dllVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
  731. static void ( APIENTRY * dllVertex4dv )(const GLdouble *v);
  732. static void ( APIENTRY * dllVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
  733. static void ( APIENTRY * dllVertex4fv )(const GLfloat *v);
  734. static void ( APIENTRY * dllVertex4i )(GLint x, GLint y, GLint z, GLint w);
  735. static void ( APIENTRY * dllVertex4iv )(const GLint *v);
  736. static void ( APIENTRY * dllVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w);
  737. static void ( APIENTRY * dllVertex4sv )(const GLshort *v);
  738. static void ( APIENTRY * dllVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
  739. static void ( APIENTRY * dllViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
  740. static void APIENTRY logAccum(GLenum op, GLfloat value)
  741. {
  742. fprintf( glw_state.log_fp, "glAccum\n" );
  743. dllAccum( op, value );
  744. }
  745. static void APIENTRY logAlphaFunc(GLenum func, GLclampf ref)
  746. {
  747. fprintf( glw_state.log_fp, "glAlphaFunc( 0x%x, %f )\n", func, ref );
  748. dllAlphaFunc( func, ref );
  749. }
  750. static GLboolean APIENTRY logAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
  751. {
  752. fprintf( glw_state.log_fp, "glAreTexturesResident\n" );
  753. return dllAreTexturesResident( n, textures, residences );
  754. }
  755. static void APIENTRY logArrayElement(GLint i)
  756. {
  757. fprintf( glw_state.log_fp, "glArrayElement\n" );
  758. dllArrayElement( i );
  759. }
  760. static void APIENTRY logBegin(GLenum mode)
  761. {
  762. fprintf( glw_state.log_fp, "glBegin( 0x%x )\n", mode );
  763. dllBegin( mode );
  764. }
  765. static void APIENTRY logBindTexture(GLenum target, GLuint texture)
  766. {
  767. fprintf( glw_state.log_fp, "glBindTexture( 0x%x, %u )\n", target, texture );
  768. dllBindTexture( target, texture );
  769. }
  770. static void APIENTRY logBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
  771. {
  772. fprintf( glw_state.log_fp, "glBitmap\n" );
  773. dllBitmap( width, height, xorig, yorig, xmove, ymove, bitmap );
  774. }
  775. static void APIENTRY logBlendFunc(GLenum sfactor, GLenum dfactor)
  776. {
  777. fprintf( glw_state.log_fp, "glBlendFunc( 0x%x, 0x%x )\n", sfactor, dfactor );
  778. dllBlendFunc( sfactor, dfactor );
  779. }
  780. static void APIENTRY logCallList(GLuint list)
  781. {
  782. fprintf( glw_state.log_fp, "glCallList( %u )\n", list );
  783. dllCallList( list );
  784. }
  785. static void APIENTRY logCallLists(GLsizei n, GLenum type, const void *lists)
  786. {
  787. fprintf( glw_state.log_fp, "glCallLists\n" );
  788. dllCallLists( n, type, lists );
  789. }
  790. static void APIENTRY logClear(GLbitfield mask)
  791. {
  792. fprintf( glw_state.log_fp, "glClear\n" );
  793. dllClear( mask );
  794. }
  795. static void APIENTRY logClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  796. {
  797. fprintf( glw_state.log_fp, "glClearAccum\n" );
  798. dllClearAccum( red, green, blue, alpha );
  799. }
  800. static void APIENTRY logClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  801. {
  802. fprintf( glw_state.log_fp, "glClearColor\n" );
  803. dllClearColor( red, green, blue, alpha );
  804. }
  805. static void APIENTRY logClearDepth(GLclampd depth)
  806. {
  807. fprintf( glw_state.log_fp, "glClearDepth\n" );
  808. dllClearDepth( depth );
  809. }
  810. static void APIENTRY logClearIndex(GLfloat c)
  811. {
  812. fprintf( glw_state.log_fp, "glClearIndex\n" );
  813. dllClearIndex( c );
  814. }
  815. static void APIENTRY logClearStencil(GLint s)
  816. {
  817. fprintf( glw_state.log_fp, "glClearStencil\n" );
  818. dllClearStencil( s );
  819. }
  820. static void APIENTRY logClipPlane(GLenum plane, const GLdouble *equation)
  821. {
  822. fprintf( glw_state.log_fp, "glClipPlane\n" );
  823. dllClipPlane( plane, equation );
  824. }
  825. static void APIENTRY logColor3b(GLbyte red, GLbyte green, GLbyte blue)
  826. {
  827. fprintf( glw_state.log_fp, "glColor3b\n" );
  828. dllColor3b( red, green, blue );
  829. }
  830. static void APIENTRY logColor3bv(const GLbyte *v)
  831. {
  832. fprintf( glw_state.log_fp, "glColor3bv\n" );
  833. dllColor3bv( v );
  834. }
  835. static void APIENTRY logColor3d(GLdouble red, GLdouble green, GLdouble blue)
  836. {
  837. fprintf( glw_state.log_fp, "glColor3d\n" );
  838. dllColor3d( red, green, blue );
  839. }
  840. static void APIENTRY logColor3dv(const GLdouble *v)
  841. {
  842. fprintf( glw_state.log_fp, "glColor3dv\n" );
  843. dllColor3dv( v );
  844. }
  845. static void APIENTRY logColor3f(GLfloat red, GLfloat green, GLfloat blue)
  846. {
  847. fprintf( glw_state.log_fp, "glColor3f\n" );
  848. dllColor3f( red, green, blue );
  849. }
  850. static void APIENTRY logColor3fv(const GLfloat *v)
  851. {
  852. fprintf( glw_state.log_fp, "glColor3fv\n" );
  853. dllColor3fv( v );
  854. }
  855. static void APIENTRY logColor3i(GLint red, GLint green, GLint blue)
  856. {
  857. fprintf( glw_state.log_fp, "glColor3i\n" );
  858. dllColor3i( red, green, blue );
  859. }
  860. static void APIENTRY logColor3iv(const GLint *v)
  861. {
  862. fprintf( glw_state.log_fp, "glColor3iv\n" );
  863. dllColor3iv( v );
  864. }
  865. static void APIENTRY logColor3s(GLshort red, GLshort green, GLshort blue)
  866. {
  867. fprintf( glw_state.log_fp, "glColor3s\n" );
  868. dllColor3s( red, green, blue );
  869. }
  870. static void APIENTRY logColor3sv(const GLshort *v)
  871. {
  872. fprintf( glw_state.log_fp, "glColor3sv\n" );
  873. dllColor3sv( v );
  874. }
  875. static void APIENTRY logColor3ub(GLubyte red, GLubyte green, GLubyte blue)
  876. {
  877. fprintf( glw_state.log_fp, "glColor3ub\n" );
  878. dllColor3ub( red, green, blue );
  879. }
  880. static void APIENTRY logColor3ubv(const GLubyte *v)
  881. {
  882. fprintf( glw_state.log_fp, "glColor3ubv\n" );
  883. dllColor3ubv( v );
  884. }
  885. #define SIG( x ) fprintf( glw_state.log_fp, x "\n" )
  886. static void APIENTRY logColor3ui(GLuint red, GLuint green, GLuint blue)
  887. {
  888. SIG( "glColor3ui" );
  889. dllColor3ui( red, green, blue );
  890. }
  891. static void APIENTRY logColor3uiv(const GLuint *v)
  892. {
  893. SIG( "glColor3uiv" );
  894. dllColor3uiv( v );
  895. }
  896. static void APIENTRY logColor3us(GLushort red, GLushort green, GLushort blue)
  897. {
  898. SIG( "glColor3us" );
  899. dllColor3us( red, green, blue );
  900. }
  901. static void APIENTRY logColor3usv(const GLushort *v)
  902. {
  903. SIG( "glColor3usv" );
  904. dllColor3usv( v );
  905. }
  906. static void APIENTRY logColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
  907. {
  908. SIG( "glColor4b" );
  909. dllColor4b( red, green, blue, alpha );
  910. }
  911. static void APIENTRY logColor4bv(const GLbyte *v)
  912. {
  913. SIG( "glColor4bv" );
  914. dllColor4bv( v );
  915. }
  916. static void APIENTRY logColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
  917. {
  918. SIG( "glColor4d" );
  919. dllColor4d( red, green, blue, alpha );
  920. }
  921. static void APIENTRY logColor4dv(const GLdouble *v)
  922. {
  923. SIG( "glColor4dv" );
  924. dllColor4dv( v );
  925. }
  926. static void APIENTRY logColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  927. {
  928. fprintf( glw_state.log_fp, "glColor4f( %f,%f,%f,%f )\n", red, green, blue, alpha );
  929. dllColor4f( red, green, blue, alpha );
  930. }
  931. static void APIENTRY logColor4fv(const GLfloat *v)
  932. {
  933. fprintf( glw_state.log_fp, "glColor4fv( %f,%f,%f,%f )\n", v[0], v[1], v[2], v[3] );
  934. dllColor4fv( v );
  935. }
  936. static void APIENTRY logColor4i(GLint red, GLint green, GLint blue, GLint alpha)
  937. {
  938. SIG( "glColor4i" );
  939. dllColor4i( red, green, blue, alpha );
  940. }
  941. static void APIENTRY logColor4iv(const GLint *v)
  942. {
  943. SIG( "glColor4iv" );
  944. dllColor4iv( v );
  945. }
  946. static void APIENTRY logColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
  947. {
  948. SIG( "glColor4s" );
  949. dllColor4s( red, green, blue, alpha );
  950. }
  951. static void APIENTRY logColor4sv(const GLshort *v)
  952. {
  953. SIG( "glColor4sv" );
  954. dllColor4sv( v );
  955. }
  956. static void APIENTRY logColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
  957. {
  958. SIG( "glColor4b" );
  959. dllColor4b( red, green, blue, alpha );
  960. }
  961. static void APIENTRY logColor4ubv(const GLubyte *v)
  962. {
  963. SIG( "glColor4ubv" );
  964. dllColor4ubv( v );
  965. }
  966. static void APIENTRY logColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
  967. {
  968. SIG( "glColor4ui" );
  969. dllColor4ui( red, green, blue, alpha );
  970. }
  971. static void APIENTRY logColor4uiv(const GLuint *v)
  972. {
  973. SIG( "glColor4uiv" );
  974. dllColor4uiv( v );
  975. }
  976. static void APIENTRY logColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
  977. {
  978. SIG( "glColor4us" );
  979. dllColor4us( red, green, blue, alpha );
  980. }
  981. static void APIENTRY logColor4usv(const GLushort *v)
  982. {
  983. SIG( "glColor4usv" );
  984. dllColor4usv( v );
  985. }
  986. static void APIENTRY logColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
  987. {
  988. SIG( "glColorMask" );
  989. dllColorMask( red, green, blue, alpha );
  990. }
  991. static void APIENTRY logColorMaterial(GLenum face, GLenum mode)
  992. {
  993. SIG( "glColorMaterial" );
  994. dllColorMaterial( face, mode );
  995. }
  996. static void APIENTRY logColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
  997. {
  998. SIG( "glColorPointer" );
  999. dllColorPointer( size, type, stride, pointer );
  1000. }
  1001. static void APIENTRY logCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
  1002. {
  1003. SIG( "glCopyPixels" );
  1004. dllCopyPixels( x, y, width, height, type );
  1005. }
  1006. static void APIENTRY logCopyTexImage1D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border)
  1007. {
  1008. SIG( "glCopyTexImage1D" );
  1009. dllCopyTexImage1D( target, level, internalFormat, x, y, width, border );
  1010. }
  1011. static void APIENTRY logCopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
  1012. {
  1013. SIG( "glCopyTexImage2D" );
  1014. dllCopyTexImage2D( target, level, internalFormat, x, y, width, height, border );
  1015. }
  1016. static void APIENTRY logCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
  1017. {
  1018. SIG( "glCopyTexSubImage1D" );
  1019. dllCopyTexSubImage1D( target, level, xoffset, x, y, width );
  1020. }
  1021. static void APIENTRY logCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  1022. {
  1023. SIG( "glCopyTexSubImage2D" );
  1024. dllCopyTexSubImage2D( target, level, xoffset, yoffset, x, y, width, height );
  1025. }
  1026. static void APIENTRY logCullFace(GLenum mode)
  1027. {
  1028. SIG( "glCullFace" );
  1029. dllCullFace( mode );
  1030. }
  1031. static void APIENTRY logDeleteLists(GLuint list, GLsizei range)
  1032. {
  1033. SIG( "glDeleteLists" );
  1034. dllDeleteLists( list, range );
  1035. }
  1036. static void APIENTRY logDeleteTextures(GLsizei n, const GLuint *textures)
  1037. {
  1038. SIG( "glDeleteTextures" );
  1039. dllDeleteTextures( n, textures );
  1040. }
  1041. static void APIENTRY logDepthFunc(GLenum func)
  1042. {
  1043. SIG( "glDepthFunc" );
  1044. dllDepthFunc( func );
  1045. }
  1046. static void APIENTRY logDepthMask(GLboolean flag)
  1047. {
  1048. SIG( "glDepthMask" );
  1049. dllDepthMask( flag );
  1050. }
  1051. static void APIENTRY logDepthRange(GLclampd zNear, GLclampd zFar)
  1052. {
  1053. SIG( "glDepthRange" );
  1054. dllDepthRange( zNear, zFar );
  1055. }
  1056. static void APIENTRY logDisable(GLenum cap)
  1057. {
  1058. fprintf( glw_state.log_fp, "glDisable( 0x%x )\n", cap );
  1059. dllDisable( cap );
  1060. }
  1061. static void APIENTRY logDisableClientState(GLenum array)
  1062. {
  1063. SIG( "glDisableClientState" );
  1064. dllDisableClientState( array );
  1065. }
  1066. static void APIENTRY logDrawArrays(GLenum mode, GLint first, GLsizei count)
  1067. {
  1068. SIG( "glDrawArrays" );
  1069. dllDrawArrays( mode, first, count );
  1070. }
  1071. static void APIENTRY logDrawBuffer(GLenum mode)
  1072. {
  1073. SIG( "glDrawBuffer" );
  1074. dllDrawBuffer( mode );
  1075. }
  1076. static void APIENTRY logDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
  1077. {
  1078. SIG( "glDrawElements" );
  1079. dllDrawElements( mode, count, type, indices );
  1080. }
  1081. static void APIENTRY logDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
  1082. {
  1083. SIG( "glDrawPixels" );
  1084. dllDrawPixels( width, height, format, type, pixels );
  1085. }
  1086. static void APIENTRY logEdgeFlag(GLboolean flag)
  1087. {
  1088. SIG( "glEdgeFlag" );
  1089. dllEdgeFlag( flag );
  1090. }
  1091. static void APIENTRY logEdgeFlagPointer(GLsizei stride, const void *pointer)
  1092. {
  1093. SIG( "glEdgeFlagPointer" );
  1094. dllEdgeFlagPointer( stride, pointer );
  1095. }
  1096. static void APIENTRY logEdgeFlagv(const GLboolean *flag)
  1097. {
  1098. SIG( "glEdgeFlagv" );
  1099. dllEdgeFlagv( flag );
  1100. }
  1101. static void APIENTRY logEnable(GLenum cap)
  1102. {
  1103. fprintf( glw_state.log_fp, "glEnable( 0x%x )\n", cap );
  1104. dllEnable( cap );
  1105. }
  1106. static void APIENTRY logEnableClientState(GLenum array)
  1107. {
  1108. SIG( "glEnableClientState" );
  1109. dllEnableClientState( array );
  1110. }
  1111. static void APIENTRY logEnd(void)
  1112. {
  1113. SIG( "glEnd" );
  1114. dllEnd();
  1115. }
  1116. static void APIENTRY logEndList(void)
  1117. {
  1118. SIG( "glEndList" );
  1119. dllEndList();
  1120. }
  1121. static void APIENTRY logEvalCoord1d(GLdouble u)
  1122. {
  1123. SIG( "glEvalCoord1d" );
  1124. dllEvalCoord1d( u );
  1125. }
  1126. static void APIENTRY logEvalCoord1dv(const GLdouble *u)
  1127. {
  1128. SIG( "glEvalCoord1dv" );
  1129. dllEvalCoord1dv( u );
  1130. }
  1131. static void APIENTRY logEvalCoord1f(GLfloat u)
  1132. {
  1133. SIG( "glEvalCoord1f" );
  1134. dllEvalCoord1f( u );
  1135. }
  1136. static void APIENTRY logEvalCoord1fv(const GLfloat *u)
  1137. {
  1138. SIG( "glEvalCoord1fv" );
  1139. dllEvalCoord1fv( u );
  1140. }
  1141. static void APIENTRY logEvalCoord2d(GLdouble u, GLdouble v)
  1142. {
  1143. SIG( "glEvalCoord2d" );
  1144. dllEvalCoord2d( u, v );
  1145. }
  1146. static void APIENTRY logEvalCoord2dv(const GLdouble *u)
  1147. {
  1148. SIG( "glEvalCoord2dv" );
  1149. dllEvalCoord2dv( u );
  1150. }
  1151. static void APIENTRY logEvalCoord2f(GLfloat u, GLfloat v)
  1152. {
  1153. SIG( "glEvalCoord2f" );
  1154. dllEvalCoord2f( u, v );
  1155. }
  1156. static void APIENTRY logEvalCoord2fv(const GLfloat *u)
  1157. {
  1158. SIG( "glEvalCoord2fv" );
  1159. dllEvalCoord2fv( u );
  1160. }
  1161. static void APIENTRY logEvalMesh1(GLenum mode, GLint i1, GLint i2)
  1162. {
  1163. SIG( "glEvalMesh1" );
  1164. dllEvalMesh1( mode, i1, i2 );
  1165. }
  1166. static void APIENTRY logEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
  1167. {
  1168. SIG( "glEvalMesh2" );
  1169. dllEvalMesh2( mode, i1, i2, j1, j2 );
  1170. }
  1171. static void APIENTRY logEvalPoint1(GLint i)
  1172. {
  1173. SIG( "glEvalPoint1" );
  1174. dllEvalPoint1( i );
  1175. }
  1176. static void APIENTRY logEvalPoint2(GLint i, GLint j)
  1177. {
  1178. SIG( "glEvalPoint2" );
  1179. dllEvalPoint2( i, j );
  1180. }
  1181. static void APIENTRY logFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer)
  1182. {
  1183. SIG( "glFeedbackBuffer" );
  1184. dllFeedbackBuffer( size, type, buffer );
  1185. }
  1186. static void APIENTRY logFinish(void)
  1187. {
  1188. SIG( "glFinish" );
  1189. dllFinish();
  1190. }
  1191. static void APIENTRY logFlush(void)
  1192. {
  1193. SIG( "glFlush" );
  1194. dllFlush();
  1195. }
  1196. static void APIENTRY logFogf(GLenum pname, GLfloat param)
  1197. {
  1198. SIG( "glFogf" );
  1199. dllFogf( pname, param );
  1200. }
  1201. static void APIENTRY logFogfv(GLenum pname, const GLfloat *params)
  1202. {
  1203. SIG( "glFogfv" );
  1204. dllFogfv( pname, params );
  1205. }
  1206. static void APIENTRY logFogi(GLenum pname, GLint param)
  1207. {
  1208. SIG( "glFogi" );
  1209. dllFogi( pname, param );
  1210. }
  1211. static void APIENTRY logFogiv(GLenum pname, const GLint *params)
  1212. {
  1213. SIG( "glFogiv" );
  1214. dllFogiv( pname, params );
  1215. }
  1216. static void APIENTRY logFrontFace(GLenum mode)
  1217. {
  1218. SIG( "glFrontFace" );
  1219. dllFrontFace( mode );
  1220. }
  1221. static void APIENTRY logFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
  1222. {
  1223. SIG( "glFrustum" );
  1224. dllFrustum( left, right, bottom, top, zNear, zFar );
  1225. }
  1226. static GLuint APIENTRY logGenLists(GLsizei range)
  1227. {
  1228. SIG( "glGenLists" );
  1229. return dllGenLists( range );
  1230. }
  1231. static void APIENTRY logGenTextures(GLsizei n, GLuint *textures)
  1232. {
  1233. SIG( "glGenTextures" );
  1234. dllGenTextures( n, textures );
  1235. }
  1236. static void APIENTRY logGetBooleanv(GLenum pname, GLboolean *params)
  1237. {
  1238. SIG( "glGetBooleanv" );
  1239. dllGetBooleanv( pname, params );
  1240. }
  1241. static void APIENTRY logGetClipPlane(GLenum plane, GLdouble *equation)
  1242. {
  1243. SIG( "glGetClipPlane" );
  1244. dllGetClipPlane( plane, equation );
  1245. }
  1246. static void APIENTRY logGetDoublev(GLenum pname, GLdouble *params)
  1247. {
  1248. SIG( "glGetDoublev" );
  1249. dllGetDoublev( pname, params );
  1250. }
  1251. static GLenum APIENTRY logGetError(void)
  1252. {
  1253. SIG( "glGetError" );
  1254. return dllGetError();
  1255. }
  1256. static void APIENTRY logGetFloatv(GLenum pname, GLfloat *params)
  1257. {
  1258. SIG( "glGetFloatv" );
  1259. dllGetFloatv( pname, params );
  1260. }
  1261. static void APIENTRY logGetIntegerv(GLenum pname, GLint *params)
  1262. {
  1263. SIG( "glGetIntegerv" );
  1264. dllGetIntegerv( pname, params );
  1265. }
  1266. static void APIENTRY logGetLightfv(GLenum light, GLenum pname, GLfloat *params)
  1267. {
  1268. SIG( "glGetLightfv" );
  1269. dllGetLightfv( light, pname, params );
  1270. }
  1271. static void APIENTRY logGetLightiv(GLenum light, GLenum pname, GLint *params)
  1272. {
  1273. SIG( "glGetLightiv" );
  1274. dllGetLightiv( light, pname, params );
  1275. }
  1276. static void APIENTRY logGetMapdv(GLenum target, GLenum query, GLdouble *v)
  1277. {
  1278. SIG( "glGetMapdv" );
  1279. dllGetMapdv( target, query, v );
  1280. }
  1281. static void APIENTRY logGetMapfv(GLenum target, GLenum query, GLfloat *v)
  1282. {
  1283. SIG( "glGetMapfv" );
  1284. dllGetMapfv( target, query, v );
  1285. }
  1286. static void APIENTRY logGetMapiv(GLenum target, GLenum query, GLint *v)
  1287. {
  1288. SIG( "glGetMapiv" );
  1289. dllGetMapiv( target, query, v );
  1290. }
  1291. static void APIENTRY logGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
  1292. {
  1293. SIG( "glGetMaterialfv" );
  1294. dllGetMaterialfv( face, pname, params );
  1295. }
  1296. static void APIENTRY logGetMaterialiv(GLenum face, GLenum pname, GLint *params)
  1297. {
  1298. SIG( "glGetMaterialiv" );
  1299. dllGetMaterialiv( face, pname, params );
  1300. }
  1301. static void APIENTRY logGetPixelMapfv(GLenum map, GLfloat *values)
  1302. {
  1303. SIG( "glGetPixelMapfv" );
  1304. dllGetPixelMapfv( map, values );
  1305. }
  1306. static void APIENTRY logGetPixelMapuiv(GLenum map, GLuint *values)
  1307. {
  1308. SIG( "glGetPixelMapuiv" );
  1309. dllGetPixelMapuiv( map, values );
  1310. }
  1311. static void APIENTRY logGetPixelMapusv(GLenum map, GLushort *values)
  1312. {
  1313. SIG( "glGetPixelMapusv" );
  1314. dllGetPixelMapusv( map, values );
  1315. }
  1316. static void APIENTRY logGetPointerv(GLenum pname, GLvoid* *params)
  1317. {
  1318. SIG( "glGetPointerv" );
  1319. dllGetPointerv( pname, params );
  1320. }
  1321. static void APIENTRY logGetPolygonStipple(GLubyte *mask)
  1322. {
  1323. SIG( "glGetPolygonStipple" );
  1324. dllGetPolygonStipple( mask );
  1325. }
  1326. static const GLubyte * APIENTRY logGetString(GLenum name)
  1327. {
  1328. SIG( "glGetString" );
  1329. return dllGetString( name );
  1330. }
  1331. static void APIENTRY logGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
  1332. {
  1333. SIG( "glGetTexEnvfv" );
  1334. dllGetTexEnvfv( target, pname, params );
  1335. }
  1336. static void APIENTRY logGetTexEnviv(GLenum target, GLenum pname, GLint *params)
  1337. {
  1338. SIG( "glGetTexEnviv" );
  1339. dllGetTexEnviv( target, pname, params );
  1340. }
  1341. static void APIENTRY logGetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
  1342. {
  1343. SIG( "glGetTexGendv" );
  1344. dllGetTexGendv( coord, pname, params );
  1345. }
  1346. static void APIENTRY logGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
  1347. {
  1348. SIG( "glGetTexGenfv" );
  1349. dllGetTexGenfv( coord, pname, params );
  1350. }
  1351. static void APIENTRY logGetTexGeniv(GLenum coord, GLenum pname, GLint *params)
  1352. {
  1353. SIG( "glGetTexGeniv" );
  1354. dllGetTexGeniv( coord, pname, params );
  1355. }
  1356. static void APIENTRY logGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
  1357. {
  1358. SIG( "glGetTexImage" );
  1359. dllGetTexImage( target, level, format, type, pixels );
  1360. }
  1361. static void APIENTRY logGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params )
  1362. {
  1363. SIG( "glGetTexLevelParameterfv" );
  1364. dllGetTexLevelParameterfv( target, level, pname, params );
  1365. }
  1366. static void APIENTRY logGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
  1367. {
  1368. SIG( "glGetTexLevelParameteriv" );
  1369. dllGetTexLevelParameteriv( target, level, pname, params );
  1370. }
  1371. static void APIENTRY logGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
  1372. {
  1373. SIG( "glGetTexParameterfv" );
  1374. dllGetTexParameterfv( target, pname, params );
  1375. }
  1376. static void APIENTRY logGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
  1377. {
  1378. SIG( "glGetTexParameteriv" );
  1379. dllGetTexParameteriv( target, pname, params );
  1380. }
  1381. static void APIENTRY logHint(GLenum target, GLenum mode)
  1382. {
  1383. fprintf( glw_state.log_fp, "glHint( 0x%x, 0x%x )\n", target, mode );
  1384. dllHint( target, mode );
  1385. }
  1386. static void APIENTRY logIndexMask(GLuint mask)
  1387. {
  1388. SIG( "glIndexMask" );
  1389. dllIndexMask( mask );
  1390. }
  1391. static void APIENTRY logIndexPointer(GLenum type, GLsizei stride, const void *pointer)
  1392. {
  1393. SIG( "glIndexPointer" );
  1394. dllIndexPointer( type, stride, pointer );
  1395. }
  1396. static void APIENTRY logIndexd(GLdouble c)
  1397. {
  1398. SIG( "glIndexd" );
  1399. dllIndexd( c );
  1400. }
  1401. static void APIENTRY logIndexdv(const GLdouble *c)
  1402. {
  1403. SIG( "glIndexdv" );
  1404. dllIndexdv( c );
  1405. }
  1406. static void APIENTRY logIndexf(GLfloat c)
  1407. {
  1408. SIG( "glIndexf" );
  1409. dllIndexf( c );
  1410. }
  1411. static void APIENTRY logIndexfv(const GLfloat *c)
  1412. {
  1413. SIG( "glIndexfv" );
  1414. dllIndexfv( c );
  1415. }
  1416. static void APIENTRY logIndexi(GLint c)
  1417. {
  1418. SIG( "glIndexi" );
  1419. dllIndexi( c );
  1420. }
  1421. static void APIENTRY logIndexiv(const GLint *c)
  1422. {
  1423. SIG( "glIndexiv" );
  1424. dllIndexiv( c );
  1425. }
  1426. static void APIENTRY logIndexs(GLshort c)
  1427. {
  1428. SIG( "glIndexs" );
  1429. dllIndexs( c );
  1430. }
  1431. static void APIENTRY logIndexsv(const GLshort *c)
  1432. {
  1433. SIG( "glIndexsv" );
  1434. dllIndexsv( c );
  1435. }
  1436. static void APIENTRY logIndexub(GLubyte c)
  1437. {
  1438. SIG( "glIndexub" );
  1439. dllIndexub( c );
  1440. }
  1441. static void APIENTRY logIndexubv(const GLubyte *c)
  1442. {
  1443. SIG( "glIndexubv" );
  1444. dllIndexubv( c );
  1445. }
  1446. static void APIENTRY logInitNames(void)
  1447. {
  1448. SIG( "glInitNames" );
  1449. dllInitNames();
  1450. }
  1451. static void APIENTRY logInterleavedArrays(GLenum format, GLsizei stride, const void *pointer)
  1452. {
  1453. SIG( "glInterleavedArrays" );
  1454. dllInterleavedArrays( format, stride, pointer );
  1455. }
  1456. static GLboolean APIENTRY logIsEnabled(GLenum cap)
  1457. {
  1458. SIG( "glIsEnabled" );
  1459. return dllIsEnabled( cap );
  1460. }
  1461. static GLboolean APIENTRY logIsList(GLuint list)
  1462. {
  1463. SIG( "glIsList" );
  1464. return dllIsList( list );
  1465. }
  1466. static GLboolean APIENTRY logIsTexture(GLuint texture)
  1467. {
  1468. SIG( "glIsTexture" );
  1469. return dllIsTexture( texture );
  1470. }
  1471. static void APIENTRY logLightModelf(GLenum pname, GLfloat param)
  1472. {
  1473. SIG( "glLightModelf" );
  1474. dllLightModelf( pname, param );
  1475. }
  1476. static void APIENTRY logLightModelfv(GLenum pname, const GLfloat *params)
  1477. {
  1478. SIG( "glLightModelfv" );
  1479. dllLightModelfv( pname, params );
  1480. }
  1481. static void APIENTRY logLightModeli(GLenum pname, GLint param)
  1482. {
  1483. SIG( "glLightModeli" );
  1484. dllLightModeli( pname, param );
  1485. }
  1486. static void APIENTRY logLightModeliv(GLenum pname, const GLint *params)
  1487. {
  1488. SIG( "glLightModeliv" );
  1489. dllLightModeliv( pname, params );
  1490. }
  1491. static void APIENTRY logLightf(GLenum light, GLenum pname, GLfloat param)
  1492. {
  1493. SIG( "glLightf" );
  1494. dllLightf( light, pname, param );
  1495. }
  1496. static void APIENTRY logLightfv(GLenum light, GLenum pname, const GLfloat *params)
  1497. {
  1498. SIG( "glLightfv" );
  1499. dllLightfv( light, pname, params );
  1500. }
  1501. static void APIENTRY logLighti(GLenum light, GLenum pname, GLint param)
  1502. {
  1503. SIG( "glLighti" );
  1504. dllLighti( light, pname, param );
  1505. }
  1506. static void APIENTRY logLightiv(GLenum light, GLenum pname, const GLint *params)
  1507. {
  1508. SIG( "glLightiv" );
  1509. dllLightiv( light, pname, params );
  1510. }
  1511. static void APIENTRY logLineStipple(GLint factor, GLushort pattern)
  1512. {
  1513. SIG( "glLineStipple" );
  1514. dllLineStipple( factor, pattern );
  1515. }
  1516. static void APIENTRY logLineWidth(GLfloat width)
  1517. {
  1518. SIG( "glLineWidth" );
  1519. dllLineWidth( width );
  1520. }
  1521. static void APIENTRY logListBase(GLuint base)
  1522. {
  1523. SIG( "glListBase" );
  1524. dllListBase( base );
  1525. }
  1526. static void APIENTRY logLoadIdentity(void)
  1527. {
  1528. SIG( "glLoadIdentity" );
  1529. dllLoadIdentity();
  1530. }
  1531. static void APIENTRY logLoadMatrixd(const GLdouble *m)
  1532. {
  1533. SIG( "glLoadMatrixd" );
  1534. dllLoadMatrixd( m );
  1535. }
  1536. static void APIENTRY logLoadMatrixf(const GLfloat *m)
  1537. {
  1538. SIG( "glLoadMatrixf" );
  1539. dllLoadMatrixf( m );
  1540. }
  1541. static void APIENTRY logLoadName(GLuint name)
  1542. {
  1543. SIG( "glLoadName" );
  1544. dllLoadName( name );
  1545. }
  1546. static void APIENTRY logLogicOp(GLenum opcode)
  1547. {
  1548. SIG( "glLogicOp" );
  1549. dllLogicOp( opcode );
  1550. }
  1551. static void APIENTRY logMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
  1552. {
  1553. SIG( "glMap1d" );
  1554. dllMap1d( target, u1, u2, stride, order, points );
  1555. }
  1556. static void APIENTRY logMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
  1557. {
  1558. SIG( "glMap1f" );
  1559. dllMap1f( target, u1, u2, stride, order, points );
  1560. }
  1561. static void APIENTRY logMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
  1562. {
  1563. SIG( "glMap2d" );
  1564. dllMap2d( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points );
  1565. }
  1566. static void APIENTRY logMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
  1567. {
  1568. SIG( "glMap2f" );
  1569. dllMap2f( target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points );
  1570. }
  1571. static void APIENTRY logMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
  1572. {
  1573. SIG( "glMapGrid1d" );
  1574. dllMapGrid1d( un, u1, u2 );
  1575. }
  1576. static void APIENTRY logMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
  1577. {
  1578. SIG( "glMapGrid1f" );
  1579. dllMapGrid1f( un, u1, u2 );
  1580. }
  1581. static void APIENTRY logMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
  1582. {
  1583. SIG( "glMapGrid2d" );
  1584. dllMapGrid2d( un, u1, u2, vn, v1, v2 );
  1585. }
  1586. static void APIENTRY logMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
  1587. {
  1588. SIG( "glMapGrid2f" );
  1589. dllMapGrid2f( un, u1, u2, vn, v1, v2 );
  1590. }
  1591. static void APIENTRY logMaterialf(GLenum face, GLenum pname, GLfloat param)
  1592. {
  1593. SIG( "glMaterialf" );
  1594. dllMaterialf( face, pname, param );
  1595. }
  1596. static void APIENTRY logMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
  1597. {
  1598. SIG( "glMaterialfv" );
  1599. dllMaterialfv( face, pname, params );
  1600. }
  1601. static void APIENTRY logMateriali(GLenum face, GLenum pname, GLint param)
  1602. {
  1603. SIG( "glMateriali" );
  1604. dllMateriali( face, pname, param );
  1605. }
  1606. static void APIENTRY logMaterialiv(GLenum face, GLenum pname, const GLint *params)
  1607. {
  1608. SIG( "glMaterialiv" );
  1609. dllMaterialiv( face, pname, params );
  1610. }
  1611. static void APIENTRY logMatrixMode(GLenum mode)
  1612. {
  1613. SIG( "glMatrixMode" );
  1614. dllMatrixMode( mode );
  1615. }
  1616. static void APIENTRY logMultMatrixd(const GLdouble *m)
  1617. {
  1618. SIG( "glMultMatrixd" );
  1619. dllMultMatrixd( m );
  1620. }
  1621. static void APIENTRY logMultMatrixf(const GLfloat *m)
  1622. {
  1623. SIG( "glMultMatrixf" );
  1624. dllMultMatrixf( m );
  1625. }
  1626. static void APIENTRY logNewList(GLuint list, GLenum mode)
  1627. {
  1628. SIG( "glNewList" );
  1629. dllNewList( list, mode );
  1630. }
  1631. static void APIENTRY logNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
  1632. {
  1633. SIG ("glNormal3b" );
  1634. dllNormal3b( nx, ny, nz );
  1635. }
  1636. static void APIENTRY logNormal3bv(const GLbyte *v)
  1637. {
  1638. SIG( "glNormal3bv" );
  1639. dllNormal3bv( v );
  1640. }
  1641. static void APIENTRY logNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
  1642. {
  1643. SIG( "glNormal3d" );
  1644. dllNormal3d( nx, ny, nz );
  1645. }
  1646. static void APIENTRY logNormal3dv(const GLdouble *v)
  1647. {
  1648. SIG( "glNormal3dv" );
  1649. dllNormal3dv( v );
  1650. }
  1651. static void APIENTRY logNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
  1652. {
  1653. SIG( "glNormal3f" );
  1654. dllNormal3f( nx, ny, nz );
  1655. }
  1656. static void APIENTRY logNormal3fv(const GLfloat *v)
  1657. {
  1658. SIG( "glNormal3fv" );
  1659. dllNormal3fv( v );
  1660. }
  1661. static void APIENTRY logNormal3i(GLint nx, GLint ny, GLint nz)
  1662. {
  1663. SIG( "glNormal3i" );
  1664. dllNormal3i( nx, ny, nz );
  1665. }
  1666. static void APIENTRY logNormal3iv(const GLint *v)
  1667. {
  1668. SIG( "glNormal3iv" );
  1669. dllNormal3iv( v );
  1670. }
  1671. static void APIENTRY logNormal3s(GLshort nx, GLshort ny, GLshort nz)
  1672. {
  1673. SIG( "glNormal3s" );
  1674. dllNormal3s( nx, ny, nz );
  1675. }
  1676. static void APIENTRY logNormal3sv(const GLshort *v)
  1677. {
  1678. SIG( "glNormal3sv" );
  1679. dllNormal3sv( v );
  1680. }
  1681. static void APIENTRY logNormalPointer(GLenum type, GLsizei stride, const void *pointer)
  1682. {
  1683. SIG( "glNormalPointer" );
  1684. dllNormalPointer( type, stride, pointer );
  1685. }
  1686. static void APIENTRY logOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
  1687. {
  1688. SIG( "glOrtho" );
  1689. dllOrtho( left, right, bottom, top, zNear, zFar );
  1690. }
  1691. static void APIENTRY logPassThrough(GLfloat token)
  1692. {
  1693. SIG( "glPassThrough" );
  1694. dllPassThrough( token );
  1695. }
  1696. static void APIENTRY logPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values)
  1697. {
  1698. SIG( "glPixelMapfv" );
  1699. dllPixelMapfv( map, mapsize, values );
  1700. }
  1701. static void APIENTRY logPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values)
  1702. {
  1703. SIG( "glPixelMapuiv" );
  1704. dllPixelMapuiv( map, mapsize, values );
  1705. }
  1706. static void APIENTRY logPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values)
  1707. {
  1708. SIG( "glPixelMapusv" );
  1709. dllPixelMapusv( map, mapsize, values );
  1710. }
  1711. static void APIENTRY logPixelStoref(GLenum pname, GLfloat param)
  1712. {
  1713. SIG( "glPixelStoref" );
  1714. dllPixelStoref( pname, param );
  1715. }
  1716. static void APIENTRY logPixelStorei(GLenum pname, GLint param)
  1717. {
  1718. SIG( "glPixelStorei" );
  1719. dllPixelStorei( pname, param );
  1720. }
  1721. static void APIENTRY logPixelTransferf(GLenum pname, GLfloat param)
  1722. {
  1723. SIG( "glPixelTransferf" );
  1724. dllPixelTransferf( pname, param );
  1725. }
  1726. static void APIENTRY logPixelTransferi(GLenum pname, GLint param)
  1727. {
  1728. SIG( "glPixelTransferi" );
  1729. dllPixelTransferi( pname, param );
  1730. }
  1731. static void APIENTRY logPixelZoom(GLfloat xfactor, GLfloat yfactor)
  1732. {
  1733. SIG( "glPixelZoom" );
  1734. dllPixelZoom( xfactor, yfactor );
  1735. }
  1736. static void APIENTRY logPointSize(GLfloat size)
  1737. {
  1738. SIG( "glPointSize" );
  1739. dllPointSize( size );
  1740. }
  1741. static void APIENTRY logPolygonMode(GLenum face, GLenum mode)
  1742. {
  1743. fprintf( glw_state.log_fp, "glPolygonMode( 0x%x, 0x%x )\n", face, mode );
  1744. dllPolygonMode( face, mode );
  1745. }
  1746. static void APIENTRY logPolygonOffset(GLfloat factor, GLfloat units)
  1747. {
  1748. SIG( "glPolygonOffset" );
  1749. dllPolygonOffset( factor, units );
  1750. }
  1751. static void APIENTRY logPolygonStipple(const GLubyte *mask )
  1752. {
  1753. SIG( "glPolygonStipple" );
  1754. dllPolygonStipple( mask );
  1755. }
  1756. static void APIENTRY logPopAttrib(void)
  1757. {
  1758. SIG( "glPopAttrib" );
  1759. dllPopAttrib();
  1760. }
  1761. static void APIENTRY logPopClientAttrib(void)
  1762. {
  1763. SIG( "glPopClientAttrib" );
  1764. dllPopClientAttrib();
  1765. }
  1766. static void APIENTRY logPopMatrix(void)
  1767. {
  1768. SIG( "glPopMatrix" );
  1769. dllPopMatrix();
  1770. }
  1771. static void APIENTRY logPopName(void)
  1772. {
  1773. SIG( "glPopName" );
  1774. dllPopName();
  1775. }
  1776. static void APIENTRY logPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities)
  1777. {
  1778. SIG( "glPrioritizeTextures" );
  1779. dllPrioritizeTextures( n, textures, priorities );
  1780. }
  1781. static void APIENTRY logPushAttrib(GLbitfield mask)
  1782. {
  1783. SIG( "glPushAttrib" );
  1784. dllPushAttrib( mask );
  1785. }
  1786. static void APIENTRY logPushClientAttrib(GLbitfield mask)
  1787. {
  1788. SIG( "glPushClientAttrib" );
  1789. dllPushClientAttrib( mask );
  1790. }
  1791. static void APIENTRY logPushMatrix(void)
  1792. {
  1793. SIG( "glPushMatrix" );
  1794. dllPushMatrix();
  1795. }
  1796. static void APIENTRY logPushName(GLuint name)
  1797. {
  1798. SIG( "glPushName" );
  1799. dllPushName( name );
  1800. }
  1801. static void APIENTRY logRasterPos2d(GLdouble x, GLdouble y)
  1802. {
  1803. SIG ("glRasterPot2d" );
  1804. dllRasterPos2d( x, y );
  1805. }
  1806. static void APIENTRY logRasterPos2dv(const GLdouble *v)
  1807. {
  1808. SIG( "glRasterPos2dv" );
  1809. dllRasterPos2dv( v );
  1810. }
  1811. static void APIENTRY logRasterPos2f(GLfloat x, GLfloat y)
  1812. {
  1813. SIG( "glRasterPos2f" );
  1814. dllRasterPos2f( x, y );
  1815. }
  1816. static void APIENTRY logRasterPos2fv(const GLfloat *v)
  1817. {
  1818. SIG( "glRasterPos2dv" );
  1819. dllRasterPos2fv( v );
  1820. }
  1821. static void APIENTRY logRasterPos2i(GLint x, GLint y)
  1822. {
  1823. SIG( "glRasterPos2if" );
  1824. dllRasterPos2i( x, y );
  1825. }
  1826. static void APIENTRY logRasterPos2iv(const GLint *v)
  1827. {
  1828. SIG( "glRasterPos2iv" );
  1829. dllRasterPos2iv( v );
  1830. }
  1831. static void APIENTRY logRasterPos2s(GLshort x, GLshort y)
  1832. {
  1833. SIG( "glRasterPos2s" );
  1834. dllRasterPos2s( x, y );
  1835. }
  1836. static void APIENTRY logRasterPos2sv(const GLshort *v)
  1837. {
  1838. SIG( "glRasterPos2sv" );
  1839. dllRasterPos2sv( v );
  1840. }
  1841. static void APIENTRY logRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
  1842. {
  1843. SIG( "glRasterPos3d" );
  1844. dllRasterPos3d( x, y, z );
  1845. }
  1846. static void APIENTRY logRasterPos3dv(const GLdouble *v)
  1847. {
  1848. SIG( "glRasterPos3dv" );
  1849. dllRasterPos3dv( v );
  1850. }
  1851. static void APIENTRY logRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
  1852. {
  1853. SIG( "glRasterPos3f" );
  1854. dllRasterPos3f( x, y, z );
  1855. }
  1856. static void APIENTRY logRasterPos3fv(const GLfloat *v)
  1857. {
  1858. SIG( "glRasterPos3fv" );
  1859. dllRasterPos3fv( v );
  1860. }
  1861. static void APIENTRY logRasterPos3i(GLint x, GLint y, GLint z)
  1862. {
  1863. SIG( "glRasterPos3i" );
  1864. dllRasterPos3i( x, y, z );
  1865. }
  1866. static void APIENTRY logRasterPos3iv(const GLint *v)
  1867. {
  1868. SIG( "glRasterPos3iv" );
  1869. dllRasterPos3iv( v );
  1870. }
  1871. static void APIENTRY logRasterPos3s(GLshort x, GLshort y, GLshort z)
  1872. {
  1873. SIG( "glRasterPos3s" );
  1874. dllRasterPos3s( x, y, z );
  1875. }
  1876. static void APIENTRY logRasterPos3sv(const GLshort *v)
  1877. {
  1878. SIG( "glRasterPos3sv" );
  1879. dllRasterPos3sv( v );
  1880. }
  1881. static void APIENTRY logRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  1882. {
  1883. SIG( "glRasterPos4d" );
  1884. dllRasterPos4d( x, y, z, w );
  1885. }
  1886. static void APIENTRY logRasterPos4dv(const GLdouble *v)
  1887. {
  1888. SIG( "glRasterPos4dv" );
  1889. dllRasterPos4dv( v );
  1890. }
  1891. static void APIENTRY logRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  1892. {
  1893. SIG( "glRasterPos4f" );
  1894. dllRasterPos4f( x, y, z, w );
  1895. }
  1896. static void APIENTRY logRasterPos4fv(const GLfloat *v)
  1897. {
  1898. SIG( "glRasterPos4fv" );
  1899. dllRasterPos4fv( v );
  1900. }
  1901. static void APIENTRY logRasterPos4i(GLint x, GLint y, GLint z, GLint w)
  1902. {
  1903. SIG( "glRasterPos4i" );
  1904. dllRasterPos4i( x, y, z, w );
  1905. }
  1906. static void APIENTRY logRasterPos4iv(const GLint *v)
  1907. {
  1908. SIG( "glRasterPos4iv" );
  1909. dllRasterPos4iv( v );
  1910. }
  1911. static void APIENTRY logRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
  1912. {
  1913. SIG( "glRasterPos4s" );
  1914. dllRasterPos4s( x, y, z, w );
  1915. }
  1916. static void APIENTRY logRasterPos4sv(const GLshort *v)
  1917. {
  1918. SIG( "glRasterPos4sv" );
  1919. dllRasterPos4sv( v );
  1920. }
  1921. static void APIENTRY logReadBuffer(GLenum mode)
  1922. {
  1923. SIG( "glReadBuffer" );
  1924. dllReadBuffer( mode );
  1925. }
  1926. static void APIENTRY logReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
  1927. {
  1928. SIG( "glReadPixels" );
  1929. dllReadPixels( x, y, width, height, format, type, pixels );
  1930. }
  1931. static void APIENTRY logRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
  1932. {
  1933. SIG( "glRectd" );
  1934. dllRectd( x1, y1, x2, y2 );
  1935. }
  1936. static void APIENTRY logRectdv(const GLdouble *v1, const GLdouble *v2)
  1937. {
  1938. SIG( "glRectdv" );
  1939. dllRectdv( v1, v2 );
  1940. }
  1941. static void APIENTRY logRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
  1942. {
  1943. SIG( "glRectf" );
  1944. dllRectf( x1, y1, x2, y2 );
  1945. }
  1946. static void APIENTRY logRectfv(const GLfloat *v1, const GLfloat *v2)
  1947. {
  1948. SIG( "glRectfv" );
  1949. dllRectfv( v1, v2 );
  1950. }
  1951. static void APIENTRY logRecti(GLint x1, GLint y1, GLint x2, GLint y2)
  1952. {
  1953. SIG( "glRecti" );
  1954. dllRecti( x1, y1, x2, y2 );
  1955. }
  1956. static void APIENTRY logRectiv(const GLint *v1, const GLint *v2)
  1957. {
  1958. SIG( "glRectiv" );
  1959. dllRectiv( v1, v2 );
  1960. }
  1961. static void APIENTRY logRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
  1962. {
  1963. SIG( "glRects" );
  1964. dllRects( x1, y1, x2, y2 );
  1965. }
  1966. static void APIENTRY logRectsv(const GLshort *v1, const GLshort *v2)
  1967. {
  1968. SIG( "glRectsv" );
  1969. dllRectsv( v1, v2 );
  1970. }
  1971. static GLint APIENTRY logRenderMode(GLenum mode)
  1972. {
  1973. SIG( "glRenderMode" );
  1974. return dllRenderMode( mode );
  1975. }
  1976. static void APIENTRY logRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
  1977. {
  1978. SIG( "glRotated" );
  1979. dllRotated( angle, x, y, z );
  1980. }
  1981. static void APIENTRY logRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
  1982. {
  1983. SIG( "glRotatef" );
  1984. dllRotatef( angle, x, y, z );
  1985. }
  1986. static void APIENTRY logScaled(GLdouble x, GLdouble y, GLdouble z)
  1987. {
  1988. SIG( "glScaled" );
  1989. dllScaled( x, y, z );
  1990. }
  1991. static void APIENTRY logScalef(GLfloat x, GLfloat y, GLfloat z)
  1992. {
  1993. SIG( "glScalef" );
  1994. dllScalef( x, y, z );
  1995. }
  1996. static void APIENTRY logScissor(GLint x, GLint y, GLsizei width, GLsizei height)
  1997. {
  1998. SIG( "glScissor" );
  1999. dllScissor( x, y, width, height );
  2000. }
  2001. static void APIENTRY logSelectBuffer(GLsizei size, GLuint *buffer)
  2002. {
  2003. SIG( "glSelectBuffer" );
  2004. dllSelectBuffer( size, buffer );
  2005. }
  2006. static void APIENTRY logShadeModel(GLenum mode)
  2007. {
  2008. SIG( "glShadeModel" );
  2009. dllShadeModel( mode );
  2010. }
  2011. static void APIENTRY logStencilFunc(GLenum func, GLint ref, GLuint mask)
  2012. {
  2013. SIG( "glStencilFunc" );
  2014. dllStencilFunc( func, ref, mask );
  2015. }
  2016. static void APIENTRY logStencilMask(GLuint mask)
  2017. {
  2018. SIG( "glStencilMask" );
  2019. dllStencilMask( mask );
  2020. }
  2021. static void APIENTRY logStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
  2022. {
  2023. SIG( "glStencilOp" );
  2024. dllStencilOp( fail, zfail, zpass );
  2025. }
  2026. static void APIENTRY logTexCoord1d(GLdouble s)
  2027. {
  2028. SIG( "glTexCoord1d" );
  2029. dllTexCoord1d( s );
  2030. }
  2031. static void APIENTRY logTexCoord1dv(const GLdouble *v)
  2032. {
  2033. SIG( "glTexCoord1dv" );
  2034. dllTexCoord1dv( v );
  2035. }
  2036. static void APIENTRY logTexCoord1f(GLfloat s)
  2037. {
  2038. SIG( "glTexCoord1f" );
  2039. dllTexCoord1f( s );
  2040. }
  2041. static void APIENTRY logTexCoord1fv(const GLfloat *v)
  2042. {
  2043. SIG( "glTexCoord1fv" );
  2044. dllTexCoord1fv( v );
  2045. }
  2046. static void APIENTRY logTexCoord1i(GLint s)
  2047. {
  2048. SIG( "glTexCoord1i" );
  2049. dllTexCoord1i( s );
  2050. }
  2051. static void APIENTRY logTexCoord1iv(const GLint *v)
  2052. {
  2053. SIG( "glTexCoord1iv" );
  2054. dllTexCoord1iv( v );
  2055. }
  2056. static void APIENTRY logTexCoord1s(GLshort s)
  2057. {
  2058. SIG( "glTexCoord1s" );
  2059. dllTexCoord1s( s );
  2060. }
  2061. static void APIENTRY logTexCoord1sv(const GLshort *v)
  2062. {
  2063. SIG( "glTexCoord1sv" );
  2064. dllTexCoord1sv( v );
  2065. }
  2066. static void APIENTRY logTexCoord2d(GLdouble s, GLdouble t)
  2067. {
  2068. SIG( "glTexCoord2d" );
  2069. dllTexCoord2d( s, t );
  2070. }
  2071. static void APIENTRY logTexCoord2dv(const GLdouble *v)
  2072. {
  2073. SIG( "glTexCoord2dv" );
  2074. dllTexCoord2dv( v );
  2075. }
  2076. static void APIENTRY logTexCoord2f(GLfloat s, GLfloat t)
  2077. {
  2078. SIG( "glTexCoord2f" );
  2079. dllTexCoord2f( s, t );
  2080. }
  2081. static void APIENTRY logTexCoord2fv(const GLfloat *v)
  2082. {
  2083. SIG( "glTexCoord2fv" );
  2084. dllTexCoord2fv( v );
  2085. }
  2086. static void APIENTRY logTexCoord2i(GLint s, GLint t)
  2087. {
  2088. SIG( "glTexCoord2i" );
  2089. dllTexCoord2i( s, t );
  2090. }
  2091. static void APIENTRY logTexCoord2iv(const GLint *v)
  2092. {
  2093. SIG( "glTexCoord2iv" );
  2094. dllTexCoord2iv( v );
  2095. }
  2096. static void APIENTRY logTexCoord2s(GLshort s, GLshort t)
  2097. {
  2098. SIG( "glTexCoord2s" );
  2099. dllTexCoord2s( s, t );
  2100. }
  2101. static void APIENTRY logTexCoord2sv(const GLshort *v)
  2102. {
  2103. SIG( "glTexCoord2sv" );
  2104. dllTexCoord2sv( v );
  2105. }
  2106. static void APIENTRY logTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
  2107. {
  2108. SIG( "glTexCoord3d" );
  2109. dllTexCoord3d( s, t, r );
  2110. }
  2111. static void APIENTRY logTexCoord3dv(const GLdouble *v)
  2112. {
  2113. SIG( "glTexCoord3dv" );
  2114. dllTexCoord3dv( v );
  2115. }
  2116. static void APIENTRY logTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
  2117. {
  2118. SIG( "glTexCoord3f" );
  2119. dllTexCoord3f( s, t, r );
  2120. }
  2121. static void APIENTRY logTexCoord3fv(const GLfloat *v)
  2122. {
  2123. SIG( "glTexCoord3fv" );
  2124. dllTexCoord3fv( v );
  2125. }
  2126. static void APIENTRY logTexCoord3i(GLint s, GLint t, GLint r)
  2127. {
  2128. SIG( "glTexCoord3i" );
  2129. dllTexCoord3i( s, t, r );
  2130. }
  2131. static void APIENTRY logTexCoord3iv(const GLint *v)
  2132. {
  2133. SIG( "glTexCoord3iv" );
  2134. dllTexCoord3iv( v );
  2135. }
  2136. static void APIENTRY logTexCoord3s(GLshort s, GLshort t, GLshort r)
  2137. {
  2138. SIG( "glTexCoord3s" );
  2139. dllTexCoord3s( s, t, r );
  2140. }
  2141. static void APIENTRY logTexCoord3sv(const GLshort *v)
  2142. {
  2143. SIG( "glTexCoord3sv" );
  2144. dllTexCoord3sv( v );
  2145. }
  2146. static void APIENTRY logTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  2147. {
  2148. SIG( "glTexCoord4d" );
  2149. dllTexCoord4d( s, t, r, q );
  2150. }
  2151. static void APIENTRY logTexCoord4dv(const GLdouble *v)
  2152. {
  2153. SIG( "glTexCoord4dv" );
  2154. dllTexCoord4dv( v );
  2155. }
  2156. static void APIENTRY logTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  2157. {
  2158. SIG( "glTexCoord4f" );
  2159. dllTexCoord4f( s, t, r, q );
  2160. }
  2161. static void APIENTRY logTexCoord4fv(const GLfloat *v)
  2162. {
  2163. SIG( "glTexCoord4fv" );
  2164. dllTexCoord4fv( v );
  2165. }
  2166. static void APIENTRY logTexCoord4i(GLint s, GLint t, GLint r, GLint q)
  2167. {
  2168. SIG( "glTexCoord4i" );
  2169. dllTexCoord4i( s, t, r, q );
  2170. }
  2171. static void APIENTRY logTexCoord4iv(const GLint *v)
  2172. {
  2173. SIG( "glTexCoord4iv" );
  2174. dllTexCoord4iv( v );
  2175. }
  2176. static void APIENTRY logTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
  2177. {
  2178. SIG( "glTexCoord4s" );
  2179. dllTexCoord4s( s, t, r, q );
  2180. }
  2181. static void APIENTRY logTexCoord4sv(const GLshort *v)
  2182. {
  2183. SIG( "glTexCoord4sv" );
  2184. dllTexCoord4sv( v );
  2185. }
  2186. static void APIENTRY logTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
  2187. {
  2188. SIG( "glTexCoordPointer" );
  2189. dllTexCoordPointer( size, type, stride, pointer );
  2190. }
  2191. static void APIENTRY logTexEnvf(GLenum target, GLenum pname, GLfloat param)
  2192. {
  2193. fprintf( glw_state.log_fp, "glTexEnvf( 0x%x, 0x%x, %f )\n", target, pname, param );
  2194. dllTexEnvf( target, pname, param );
  2195. }
  2196. static void APIENTRY logTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
  2197. {
  2198. SIG( "glTexEnvfv" );
  2199. dllTexEnvfv( target, pname, params );
  2200. }
  2201. static void APIENTRY logTexEnvi(GLenum target, GLenum pname, GLint param)
  2202. {
  2203. fprintf( glw_state.log_fp, "glTexEnvi( 0x%x, 0x%x, 0x%x )\n", target, pname, param );
  2204. dllTexEnvi( target, pname, param );
  2205. }
  2206. static void APIENTRY logTexEnviv(GLenum target, GLenum pname, const GLint *params)
  2207. {
  2208. SIG( "glTexEnviv" );
  2209. dllTexEnviv( target, pname, params );
  2210. }
  2211. static void APIENTRY logTexGend(GLenum coord, GLenum pname, GLdouble param)
  2212. {
  2213. SIG( "glTexGend" );
  2214. dllTexGend( coord, pname, param );
  2215. }
  2216. static void APIENTRY logTexGendv(GLenum coord, GLenum pname, const GLdouble *params)
  2217. {
  2218. SIG( "glTexGendv" );
  2219. dllTexGendv( coord, pname, params );
  2220. }
  2221. static void APIENTRY logTexGenf(GLenum coord, GLenum pname, GLfloat param)
  2222. {
  2223. SIG( "glTexGenf" );
  2224. dllTexGenf( coord, pname, param );
  2225. }
  2226. static void APIENTRY logTexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
  2227. {
  2228. SIG( "glTexGenfv" );
  2229. dllTexGenfv( coord, pname, params );
  2230. }
  2231. static void APIENTRY logTexGeni(GLenum coord, GLenum pname, GLint param)
  2232. {
  2233. SIG( "glTexGeni" );
  2234. dllTexGeni( coord, pname, param );
  2235. }
  2236. static void APIENTRY logTexGeniv(GLenum coord, GLenum pname, const GLint *params)
  2237. {
  2238. SIG( "glTexGeniv" );
  2239. dllTexGeniv( coord, pname, params );
  2240. }
  2241. static void APIENTRY logTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels)
  2242. {
  2243. SIG( "glTexImage1D" );
  2244. dllTexImage1D( target, level, internalformat, width, border, format, type, pixels );
  2245. }
  2246. static void APIENTRY logTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
  2247. {
  2248. SIG( "glTexImage2D" );
  2249. dllTexImage2D( target, level, internalformat, width, height, border, format, type, pixels );
  2250. }
  2251. static void APIENTRY logTexParameterf(GLenum target, GLenum pname, GLfloat param)
  2252. {
  2253. fprintf( glw_state.log_fp, "glTexParameterf( 0x%x, 0x%x, %f )\n", target, pname, param );
  2254. dllTexParameterf( target, pname, param );
  2255. }
  2256. static void APIENTRY logTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
  2257. {
  2258. SIG( "glTexParameterfv" );
  2259. dllTexParameterfv( target, pname, params );
  2260. }
  2261. static void APIENTRY logTexParameteri(GLenum target, GLenum pname, GLint param)
  2262. {
  2263. fprintf( glw_state.log_fp, "glTexParameteri( 0x%x, 0x%x, 0x%x )\n", target, pname, param );
  2264. dllTexParameteri( target, pname, param );
  2265. }
  2266. static void APIENTRY logTexParameteriv(GLenum target, GLenum pname, const GLint *params)
  2267. {
  2268. SIG( "glTexParameteriv" );
  2269. dllTexParameteriv( target, pname, params );
  2270. }
  2271. static void APIENTRY logTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
  2272. {
  2273. SIG( "glTexSubImage1D" );
  2274. dllTexSubImage1D( target, level, xoffset, width, format, type, pixels );
  2275. }
  2276. static void APIENTRY logTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
  2277. {
  2278. SIG( "glTexSubImage2D" );
  2279. dllTexSubImage2D( target, level, xoffset, yoffset, width, height, format, type, pixels );
  2280. }
  2281. static void APIENTRY logTranslated(GLdouble x, GLdouble y, GLdouble z)
  2282. {
  2283. SIG( "glTranslated" );
  2284. dllTranslated( x, y, z );
  2285. }
  2286. static void APIENTRY logTranslatef(GLfloat x, GLfloat y, GLfloat z)
  2287. {
  2288. SIG( "glTranslatef" );
  2289. dllTranslatef( x, y, z );
  2290. }
  2291. static void APIENTRY logVertex2d(GLdouble x, GLdouble y)
  2292. {
  2293. SIG( "glVertex2d" );
  2294. dllVertex2d( x, y );
  2295. }
  2296. static void APIENTRY logVertex2dv(const GLdouble *v)
  2297. {
  2298. SIG( "glVertex2dv" );
  2299. dllVertex2dv( v );
  2300. }
  2301. static void APIENTRY logVertex2f(GLfloat x, GLfloat y)
  2302. {
  2303. SIG( "glVertex2f" );
  2304. dllVertex2f( x, y );
  2305. }
  2306. static void APIENTRY logVertex2fv(const GLfloat *v)
  2307. {
  2308. SIG( "glVertex2fv" );
  2309. dllVertex2fv( v );
  2310. }
  2311. static void APIENTRY logVertex2i(GLint x, GLint y)
  2312. {
  2313. SIG( "glVertex2i" );
  2314. dllVertex2i( x, y );
  2315. }
  2316. static void APIENTRY logVertex2iv(const GLint *v)
  2317. {
  2318. SIG( "glVertex2iv" );
  2319. dllVertex2iv( v );
  2320. }
  2321. static void APIENTRY logVertex2s(GLshort x, GLshort y)
  2322. {
  2323. SIG( "glVertex2s" );
  2324. dllVertex2s( x, y );
  2325. }
  2326. static void APIENTRY logVertex2sv(const GLshort *v)
  2327. {
  2328. SIG( "glVertex2sv" );
  2329. dllVertex2sv( v );
  2330. }
  2331. static void APIENTRY logVertex3d(GLdouble x, GLdouble y, GLdouble z)
  2332. {
  2333. SIG( "glVertex3d" );
  2334. dllVertex3d( x, y, z );
  2335. }
  2336. static void APIENTRY logVertex3dv(const GLdouble *v)
  2337. {
  2338. SIG( "glVertex3dv" );
  2339. dllVertex3dv( v );
  2340. }
  2341. static void APIENTRY logVertex3f(GLfloat x, GLfloat y, GLfloat z)
  2342. {
  2343. SIG( "glVertex3f" );
  2344. dllVertex3f( x, y, z );
  2345. }
  2346. static void APIENTRY logVertex3fv(const GLfloat *v)
  2347. {
  2348. SIG( "glVertex3fv" );
  2349. dllVertex3fv( v );
  2350. }
  2351. static void APIENTRY logVertex3i(GLint x, GLint y, GLint z)
  2352. {
  2353. SIG( "glVertex3i" );
  2354. dllVertex3i( x, y, z );
  2355. }
  2356. static void APIENTRY logVertex3iv(const GLint *v)
  2357. {
  2358. SIG( "glVertex3iv" );
  2359. dllVertex3iv( v );
  2360. }
  2361. static void APIENTRY logVertex3s(GLshort x, GLshort y, GLshort z)
  2362. {
  2363. SIG( "glVertex3s" );
  2364. dllVertex3s( x, y, z );
  2365. }
  2366. static void APIENTRY logVertex3sv(const GLshort *v)
  2367. {
  2368. SIG( "glVertex3sv" );
  2369. dllVertex3sv( v );
  2370. }
  2371. static void APIENTRY logVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  2372. {
  2373. SIG( "glVertex4d" );
  2374. dllVertex4d( x, y, z, w );
  2375. }
  2376. static void APIENTRY logVertex4dv(const GLdouble *v)
  2377. {
  2378. SIG( "glVertex4dv" );
  2379. dllVertex4dv( v );
  2380. }
  2381. static void APIENTRY logVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  2382. {
  2383. SIG( "glVertex4f" );
  2384. dllVertex4f( x, y, z, w );
  2385. }
  2386. static void APIENTRY logVertex4fv(const GLfloat *v)
  2387. {
  2388. SIG( "glVertex4fv" );
  2389. dllVertex4fv( v );
  2390. }
  2391. static void APIENTRY logVertex4i(GLint x, GLint y, GLint z, GLint w)
  2392. {
  2393. SIG( "glVertex4i" );
  2394. dllVertex4i( x, y, z, w );
  2395. }
  2396. static void APIENTRY logVertex4iv(const GLint *v)
  2397. {
  2398. SIG( "glVertex4iv" );
  2399. dllVertex4iv( v );
  2400. }
  2401. static void APIENTRY logVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
  2402. {
  2403. SIG( "glVertex4s" );
  2404. dllVertex4s( x, y, z, w );
  2405. }
  2406. static void APIENTRY logVertex4sv(const GLshort *v)
  2407. {
  2408. SIG( "glVertex4sv" );
  2409. dllVertex4sv( v );
  2410. }
  2411. static void APIENTRY logVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
  2412. {
  2413. SIG( "glVertexPointer" );
  2414. dllVertexPointer( size, type, stride, pointer );
  2415. }
  2416. static void APIENTRY logViewport(GLint x, GLint y, GLsizei width, GLsizei height)
  2417. {
  2418. SIG( "glViewport" );
  2419. dllViewport( x, y, width, height );
  2420. }
  2421. /*
  2422. ** QGL_Shutdown
  2423. **
  2424. ** Unloads the specified DLL then nulls out all the proc pointers.
  2425. */
  2426. void QGL_Shutdown( void )
  2427. {
  2428. if ( glw_state.OpenGLLib )
  2429. {
  2430. dlclose ( glw_state.OpenGLLib );
  2431. glw_state.OpenGLLib = NULL;
  2432. }
  2433. glw_state.OpenGLLib = NULL;
  2434. qglAccum = NULL;
  2435. qglAlphaFunc = NULL;
  2436. qglAreTexturesResident = NULL;
  2437. qglArrayElement = NULL;
  2438. qglBegin = NULL;
  2439. qglBindTexture = NULL;
  2440. qglBitmap = NULL;
  2441. qglBlendFunc = NULL;
  2442. qglCallList = NULL;
  2443. qglCallLists = NULL;
  2444. qglClear = NULL;
  2445. qglClearAccum = NULL;
  2446. qglClearColor = NULL;
  2447. qglClearDepth = NULL;
  2448. qglClearIndex = NULL;
  2449. qglClearStencil = NULL;
  2450. qglClipPlane = NULL;
  2451. qglColor3b = NULL;
  2452. qglColor3bv = NULL;
  2453. qglColor3d = NULL;
  2454. qglColor3dv = NULL;
  2455. qglColor3f = NULL;
  2456. qglColor3fv = NULL;
  2457. qglColor3i = NULL;
  2458. qglColor3iv = NULL;
  2459. qglColor3s = NULL;
  2460. qglColor3sv = NULL;
  2461. qglColor3ub = NULL;
  2462. qglColor3ubv = NULL;
  2463. qglColor3ui = NULL;
  2464. qglColor3uiv = NULL;
  2465. qglColor3us = NULL;
  2466. qglColor3usv = NULL;
  2467. qglColor4b = NULL;
  2468. qglColor4bv = NULL;
  2469. qglColor4d = NULL;
  2470. qglColor4dv = NULL;
  2471. qglColor4f = NULL;
  2472. qglColor4fv = NULL;
  2473. qglColor4i = NULL;
  2474. qglColor4iv = NULL;
  2475. qglColor4s = NULL;
  2476. qglColor4sv = NULL;
  2477. qglColor4ub = NULL;
  2478. qglColor4ubv = NULL;
  2479. qglColor4ui = NULL;
  2480. qglColor4uiv = NULL;
  2481. qglColor4us = NULL;
  2482. qglColor4usv = NULL;
  2483. qglColorMask = NULL;
  2484. qglColorMaterial = NULL;
  2485. qglColorPointer = NULL;
  2486. qglCopyPixels = NULL;
  2487. qglCopyTexImage1D = NULL;
  2488. qglCopyTexImage2D = NULL;
  2489. qglCopyTexSubImage1D = NULL;
  2490. qglCopyTexSubImage2D = NULL;
  2491. qglCullFace = NULL;
  2492. qglDeleteLists = NULL;
  2493. qglDeleteTextures = NULL;
  2494. qglDepthFunc = NULL;
  2495. qglDepthMask = NULL;
  2496. qglDepthRange = NULL;
  2497. qglDisable = NULL;
  2498. qglDisableClientState = NULL;
  2499. qglDrawArrays = NULL;
  2500. qglDrawBuffer = NULL;
  2501. qglDrawElements = NULL;
  2502. qglDrawPixels = NULL;
  2503. qglEdgeFlag = NULL;
  2504. qglEdgeFlagPointer = NULL;
  2505. qglEdgeFlagv = NULL;
  2506. qglEnable = NULL;
  2507. qglEnableClientState = NULL;
  2508. qglEnd = NULL;
  2509. qglEndList = NULL;
  2510. qglEvalCoord1d = NULL;
  2511. qglEvalCoord1dv = NULL;
  2512. qglEvalCoord1f = NULL;
  2513. qglEvalCoord1fv = NULL;
  2514. qglEvalCoord2d = NULL;
  2515. qglEvalCoord2dv = NULL;
  2516. qglEvalCoord2f = NULL;
  2517. qglEvalCoord2fv = NULL;
  2518. qglEvalMesh1 = NULL;
  2519. qglEvalMesh2 = NULL;
  2520. qglEvalPoint1 = NULL;
  2521. qglEvalPoint2 = NULL;
  2522. qglFeedbackBuffer = NULL;
  2523. qglFinish = NULL;
  2524. qglFlush = NULL;
  2525. qglFogf = NULL;
  2526. qglFogfv = NULL;
  2527. qglFogi = NULL;
  2528. qglFogiv = NULL;
  2529. qglFrontFace = NULL;
  2530. qglFrustum = NULL;
  2531. qglGenLists = NULL;
  2532. qglGenTextures = NULL;
  2533. qglGetBooleanv = NULL;
  2534. qglGetClipPlane = NULL;
  2535. qglGetDoublev = NULL;
  2536. qglGetError = NULL;
  2537. qglGetFloatv = NULL;
  2538. qglGetIntegerv = NULL;
  2539. qglGetLightfv = NULL;
  2540. qglGetLightiv = NULL;
  2541. qglGetMapdv = NULL;
  2542. qglGetMapfv = NULL;
  2543. qglGetMapiv = NULL;
  2544. qglGetMaterialfv = NULL;
  2545. qglGetMaterialiv = NULL;
  2546. qglGetPixelMapfv = NULL;
  2547. qglGetPixelMapuiv = NULL;
  2548. qglGetPixelMapusv = NULL;
  2549. qglGetPointerv = NULL;
  2550. qglGetPolygonStipple = NULL;
  2551. qglGetString = NULL;
  2552. qglGetTexEnvfv = NULL;
  2553. qglGetTexEnviv = NULL;
  2554. qglGetTexGendv = NULL;
  2555. qglGetTexGenfv = NULL;
  2556. qglGetTexGeniv = NULL;
  2557. qglGetTexImage = NULL;
  2558. qglGetTexLevelParameterfv = NULL;
  2559. qglGetTexLevelParameteriv = NULL;
  2560. qglGetTexParameterfv = NULL;
  2561. qglGetTexParameteriv = NULL;
  2562. qglHint = NULL;
  2563. qglIndexMask = NULL;
  2564. qglIndexPointer = NULL;
  2565. qglIndexd = NULL;
  2566. qglIndexdv = NULL;
  2567. qglIndexf = NULL;
  2568. qglIndexfv = NULL;
  2569. qglIndexi = NULL;
  2570. qglIndexiv = NULL;
  2571. qglIndexs = NULL;
  2572. qglIndexsv = NULL;
  2573. qglIndexub = NULL;
  2574. qglIndexubv = NULL;
  2575. qglInitNames = NULL;
  2576. qglInterleavedArrays = NULL;
  2577. qglIsEnabled = NULL;
  2578. qglIsList = NULL;
  2579. qglIsTexture = NULL;
  2580. qglLightModelf = NULL;
  2581. qglLightModelfv = NULL;
  2582. qglLightModeli = NULL;
  2583. qglLightModeliv = NULL;
  2584. qglLightf = NULL;
  2585. qglLightfv = NULL;
  2586. qglLighti = NULL;
  2587. qglLightiv = NULL;
  2588. qglLineStipple = NULL;
  2589. qglLineWidth = NULL;
  2590. qglListBase = NULL;
  2591. qglLoadIdentity = NULL;
  2592. qglLoadMatrixd = NULL;
  2593. qglLoadMatrixf = NULL;
  2594. qglLoadName = NULL;
  2595. qglLogicOp = NULL;
  2596. qglMap1d = NULL;
  2597. qglMap1f = NULL;
  2598. qglMap2d = NULL;
  2599. qglMap2f = NULL;
  2600. qglMapGrid1d = NULL;
  2601. qglMapGrid1f = NULL;
  2602. qglMapGrid2d = NULL;
  2603. qglMapGrid2f = NULL;
  2604. qglMaterialf = NULL;
  2605. qglMaterialfv = NULL;
  2606. qglMateriali = NULL;
  2607. qglMaterialiv = NULL;
  2608. qglMatrixMode = NULL;
  2609. qglMultMatrixd = NULL;
  2610. qglMultMatrixf = NULL;
  2611. qglNewList = NULL;
  2612. qglNormal3b = NULL;
  2613. qglNormal3bv = NULL;
  2614. qglNormal3d = NULL;
  2615. qglNormal3dv = NULL;
  2616. qglNormal3f = NULL;
  2617. qglNormal3fv = NULL;
  2618. qglNormal3i = NULL;
  2619. qglNormal3iv = NULL;
  2620. qglNormal3s = NULL;
  2621. qglNormal3sv = NULL;
  2622. qglNormalPointer = NULL;
  2623. qglOrtho = NULL;
  2624. qglPassThrough = NULL;
  2625. qglPixelMapfv = NULL;
  2626. qglPixelMapuiv = NULL;
  2627. qglPixelMapusv = NULL;
  2628. qglPixelStoref = NULL;
  2629. qglPixelStorei = NULL;
  2630. qglPixelTransferf = NULL;
  2631. qglPixelTransferi = NULL;
  2632. qglPixelZoom = NULL;
  2633. qglPointSize = NULL;
  2634. qglPolygonMode = NULL;
  2635. qglPolygonOffset = NULL;
  2636. qglPolygonStipple = NULL;
  2637. qglPopAttrib = NULL;
  2638. qglPopClientAttrib = NULL;
  2639. qglPopMatrix = NULL;
  2640. qglPopName = NULL;
  2641. qglPrioritizeTextures = NULL;
  2642. qglPushAttrib = NULL;
  2643. qglPushClientAttrib = NULL;
  2644. qglPushMatrix = NULL;
  2645. qglPushName = NULL;
  2646. qglRasterPos2d = NULL;
  2647. qglRasterPos2dv = NULL;
  2648. qglRasterPos2f = NULL;
  2649. qglRasterPos2fv = NULL;
  2650. qglRasterPos2i = NULL;
  2651. qglRasterPos2iv = NULL;
  2652. qglRasterPos2s = NULL;
  2653. qglRasterPos2sv = NULL;
  2654. qglRasterPos3d = NULL;
  2655. qglRasterPos3dv = NULL;
  2656. qglRasterPos3f = NULL;
  2657. qglRasterPos3fv = NULL;
  2658. qglRasterPos3i = NULL;
  2659. qglRasterPos3iv = NULL;
  2660. qglRasterPos3s = NULL;
  2661. qglRasterPos3sv = NULL;
  2662. qglRasterPos4d = NULL;
  2663. qglRasterPos4dv = NULL;
  2664. qglRasterPos4f = NULL;
  2665. qglRasterPos4fv = NULL;
  2666. qglRasterPos4i = NULL;
  2667. qglRasterPos4iv = NULL;
  2668. qglRasterPos4s = NULL;
  2669. qglRasterPos4sv = NULL;
  2670. qglReadBuffer = NULL;
  2671. qglReadPixels = NULL;
  2672. qglRectd = NULL;
  2673. qglRectdv = NULL;
  2674. qglRectf = NULL;
  2675. qglRectfv = NULL;
  2676. qglRecti = NULL;
  2677. qglRectiv = NULL;
  2678. qglRects = NULL;
  2679. qglRectsv = NULL;
  2680. qglRenderMode = NULL;
  2681. qglRotated = NULL;
  2682. qglRotatef = NULL;
  2683. qglScaled = NULL;
  2684. qglScalef = NULL;
  2685. qglScissor = NULL;
  2686. qglSelectBuffer = NULL;
  2687. qglShadeModel = NULL;
  2688. qglStencilFunc = NULL;
  2689. qglStencilMask = NULL;
  2690. qglStencilOp = NULL;
  2691. qglTexCoord1d = NULL;
  2692. qglTexCoord1dv = NULL;
  2693. qglTexCoord1f = NULL;
  2694. qglTexCoord1fv = NULL;
  2695. qglTexCoord1i = NULL;
  2696. qglTexCoord1iv = NULL;
  2697. qglTexCoord1s = NULL;
  2698. qglTexCoord1sv = NULL;
  2699. qglTexCoord2d = NULL;
  2700. qglTexCoord2dv = NULL;
  2701. qglTexCoord2f = NULL;
  2702. qglTexCoord2fv = NULL;
  2703. qglTexCoord2i = NULL;
  2704. qglTexCoord2iv = NULL;
  2705. qglTexCoord2s = NULL;
  2706. qglTexCoord2sv = NULL;
  2707. qglTexCoord3d = NULL;
  2708. qglTexCoord3dv = NULL;
  2709. qglTexCoord3f = NULL;
  2710. qglTexCoord3fv = NULL;
  2711. qglTexCoord3i = NULL;
  2712. qglTexCoord3iv = NULL;
  2713. qglTexCoord3s = NULL;
  2714. qglTexCoord3sv = NULL;
  2715. qglTexCoord4d = NULL;
  2716. qglTexCoord4dv = NULL;
  2717. qglTexCoord4f = NULL;
  2718. qglTexCoord4fv = NULL;
  2719. qglTexCoord4i = NULL;
  2720. qglTexCoord4iv = NULL;
  2721. qglTexCoord4s = NULL;
  2722. qglTexCoord4sv = NULL;
  2723. qglTexCoordPointer = NULL;
  2724. qglTexEnvf = NULL;
  2725. qglTexEnvfv = NULL;
  2726. qglTexEnvi = NULL;
  2727. qglTexEnviv = NULL;
  2728. qglTexGend = NULL;
  2729. qglTexGendv = NULL;
  2730. qglTexGenf = NULL;
  2731. qglTexGenfv = NULL;
  2732. qglTexGeni = NULL;
  2733. qglTexGeniv = NULL;
  2734. qglTexImage1D = NULL;
  2735. qglTexImage2D = NULL;
  2736. qglTexParameterf = NULL;
  2737. qglTexParameterfv = NULL;
  2738. qglTexParameteri = NULL;
  2739. qglTexParameteriv = NULL;
  2740. qglTexSubImage1D = NULL;
  2741. qglTexSubImage2D = NULL;
  2742. qglTranslated = NULL;
  2743. qglTranslatef = NULL;
  2744. qglVertex2d = NULL;
  2745. qglVertex2dv = NULL;
  2746. qglVertex2f = NULL;
  2747. qglVertex2fv = NULL;
  2748. qglVertex2i = NULL;
  2749. qglVertex2iv = NULL;
  2750. qglVertex2s = NULL;
  2751. qglVertex2sv = NULL;
  2752. qglVertex3d = NULL;
  2753. qglVertex3dv = NULL;
  2754. qglVertex3f = NULL;
  2755. qglVertex3fv = NULL;
  2756. qglVertex3i = NULL;
  2757. qglVertex3iv = NULL;
  2758. qglVertex3s = NULL;
  2759. qglVertex3sv = NULL;
  2760. qglVertex4d = NULL;
  2761. qglVertex4dv = NULL;
  2762. qglVertex4f = NULL;
  2763. qglVertex4fv = NULL;
  2764. qglVertex4i = NULL;
  2765. qglVertex4iv = NULL;
  2766. qglVertex4s = NULL;
  2767. qglVertex4sv = NULL;
  2768. qglVertexPointer = NULL;
  2769. qglViewport = NULL;
  2770. // bk001129 - from cvs1.17 (mkv)
  2771. #if defined(__FX__)
  2772. qfxMesaCreateContext = NULL;
  2773. qfxMesaCreateBestContext = NULL;
  2774. qfxMesaDestroyContext = NULL;
  2775. qfxMesaMakeCurrent = NULL;
  2776. qfxMesaGetCurrentContext = NULL;
  2777. qfxMesaSwapBuffers = NULL;
  2778. #endif
  2779. qglXChooseVisual = NULL;
  2780. qglXCreateContext = NULL;
  2781. qglXDestroyContext = NULL;
  2782. qglXMakeCurrent = NULL;
  2783. qglXCopyContext = NULL;
  2784. qglXSwapBuffers = NULL;
  2785. }
  2786. #define GPA( a ) dlsym( glw_state.OpenGLLib, a )
  2787. void *qwglGetProcAddress(char *symbol)
  2788. {
  2789. if (glw_state.OpenGLLib)
  2790. return GPA ( symbol );
  2791. return NULL;
  2792. }
  2793. /*
  2794. ** QGL_Init
  2795. **
  2796. ** This is responsible for binding our qgl function pointers to
  2797. ** the appropriate GL stuff. In Windows this means doing a
  2798. ** LoadLibrary and a bunch of calls to GetProcAddress. On other
  2799. ** operating systems we need to do the right thing, whatever that
  2800. ** might be.
  2801. **
  2802. */
  2803. qboolean QGL_Init( const char *dllname )
  2804. {
  2805. if ( ( glw_state.OpenGLLib = dlopen( dllname, RTLD_LAZY|RTLD_GLOBAL ) ) == 0 )
  2806. {
  2807. char fn[1024];
  2808. // FILE *fp; // bk001204 - unused
  2809. extern uid_t saved_euid; // unix_main.c
  2810. // if we are not setuid, try current directory
  2811. if (getuid() == saved_euid) {
  2812. getcwd(fn, sizeof(fn));
  2813. Q_strcat(fn, sizeof(fn), "/");
  2814. Q_strcat(fn, sizeof(fn), dllname);
  2815. if ( ( glw_state.OpenGLLib = dlopen( fn, RTLD_LAZY ) ) == 0 ) {
  2816. ri.Printf(PRINT_ALL, "QGL_Init: Can't load %s from /etc/ld.so.conf or current dir: %s\n", dllname, dlerror());
  2817. return qfalse;
  2818. }
  2819. } else {
  2820. ri.Printf(PRINT_ALL, "QGL_Init: Can't load %s from /etc/ld.so.conf: %s\n", dllname, dlerror());
  2821. return qfalse;
  2822. }
  2823. }
  2824. qglAccum = dllAccum = GPA( "glAccum" );
  2825. qglAlphaFunc = dllAlphaFunc = GPA( "glAlphaFunc" );
  2826. qglAreTexturesResident = dllAreTexturesResident = GPA( "glAreTexturesResident" );
  2827. qglArrayElement = dllArrayElement = GPA( "glArrayElement" );
  2828. qglBegin = dllBegin = GPA( "glBegin" );
  2829. qglBindTexture = dllBindTexture = GPA( "glBindTexture" );
  2830. qglBitmap = dllBitmap = GPA( "glBitmap" );
  2831. qglBlendFunc = dllBlendFunc = GPA( "glBlendFunc" );
  2832. qglCallList = dllCallList = GPA( "glCallList" );
  2833. qglCallLists = dllCallLists = GPA( "glCallLists" );
  2834. qglClear = dllClear = GPA( "glClear" );
  2835. qglClearAccum = dllClearAccum = GPA( "glClearAccum" );
  2836. qglClearColor = dllClearColor = GPA( "glClearColor" );
  2837. qglClearDepth = dllClearDepth = GPA( "glClearDepth" );
  2838. qglClearIndex = dllClearIndex = GPA( "glClearIndex" );
  2839. qglClearStencil = dllClearStencil = GPA( "glClearStencil" );
  2840. qglClipPlane = dllClipPlane = GPA( "glClipPlane" );
  2841. qglColor3b = dllColor3b = GPA( "glColor3b" );
  2842. qglColor3bv = dllColor3bv = GPA( "glColor3bv" );
  2843. qglColor3d = dllColor3d = GPA( "glColor3d" );
  2844. qglColor3dv = dllColor3dv = GPA( "glColor3dv" );
  2845. qglColor3f = dllColor3f = GPA( "glColor3f" );
  2846. qglColor3fv = dllColor3fv = GPA( "glColor3fv" );
  2847. qglColor3i = dllColor3i = GPA( "glColor3i" );
  2848. qglColor3iv = dllColor3iv = GPA( "glColor3iv" );
  2849. qglColor3s = dllColor3s = GPA( "glColor3s" );
  2850. qglColor3sv = dllColor3sv = GPA( "glColor3sv" );
  2851. qglColor3ub = dllColor3ub = GPA( "glColor3ub" );
  2852. qglColor3ubv = dllColor3ubv = GPA( "glColor3ubv" );
  2853. qglColor3ui = dllColor3ui = GPA( "glColor3ui" );
  2854. qglColor3uiv = dllColor3uiv = GPA( "glColor3uiv" );
  2855. qglColor3us = dllColor3us = GPA( "glColor3us" );
  2856. qglColor3usv = dllColor3usv = GPA( "glColor3usv" );
  2857. qglColor4b = dllColor4b = GPA( "glColor4b" );
  2858. qglColor4bv = dllColor4bv = GPA( "glColor4bv" );
  2859. qglColor4d = dllColor4d = GPA( "glColor4d" );
  2860. qglColor4dv = dllColor4dv = GPA( "glColor4dv" );
  2861. qglColor4f = dllColor4f = GPA( "glColor4f" );
  2862. qglColor4fv = dllColor4fv = GPA( "glColor4fv" );
  2863. qglColor4i = dllColor4i = GPA( "glColor4i" );
  2864. qglColor4iv = dllColor4iv = GPA( "glColor4iv" );
  2865. qglColor4s = dllColor4s = GPA( "glColor4s" );
  2866. qglColor4sv = dllColor4sv = GPA( "glColor4sv" );
  2867. qglColor4ub = dllColor4ub = GPA( "glColor4ub" );
  2868. qglColor4ubv = dllColor4ubv = GPA( "glColor4ubv" );
  2869. qglColor4ui = dllColor4ui = GPA( "glColor4ui" );
  2870. qglColor4uiv = dllColor4uiv = GPA( "glColor4uiv" );
  2871. qglColor4us = dllColor4us = GPA( "glColor4us" );
  2872. qglColor4usv = dllColor4usv = GPA( "glColor4usv" );
  2873. qglColorMask = dllColorMask = GPA( "glColorMask" );
  2874. qglColorMaterial = dllColorMaterial = GPA( "glColorMaterial" );
  2875. qglColorPointer = dllColorPointer = GPA( "glColorPointer" );
  2876. qglCopyPixels = dllCopyPixels = GPA( "glCopyPixels" );
  2877. qglCopyTexImage1D = dllCopyTexImage1D = GPA( "glCopyTexImage1D" );
  2878. qglCopyTexImage2D = dllCopyTexImage2D = GPA( "glCopyTexImage2D" );
  2879. qglCopyTexSubImage1D = dllCopyTexSubImage1D = GPA( "glCopyTexSubImage1D" );
  2880. qglCopyTexSubImage2D = dllCopyTexSubImage2D = GPA( "glCopyTexSubImage2D" );
  2881. qglCullFace = dllCullFace = GPA( "glCullFace" );
  2882. qglDeleteLists = dllDeleteLists = GPA( "glDeleteLists" );
  2883. qglDeleteTextures = dllDeleteTextures = GPA( "glDeleteTextures" );
  2884. qglDepthFunc = dllDepthFunc = GPA( "glDepthFunc" );
  2885. qglDepthMask = dllDepthMask = GPA( "glDepthMask" );
  2886. qglDepthRange = dllDepthRange = GPA( "glDepthRange" );
  2887. qglDisable = dllDisable = GPA( "glDisable" );
  2888. qglDisableClientState = dllDisableClientState = GPA( "glDisableClientState" );
  2889. qglDrawArrays = dllDrawArrays = GPA( "glDrawArrays" );
  2890. qglDrawBuffer = dllDrawBuffer = GPA( "glDrawBuffer" );
  2891. qglDrawElements = dllDrawElements = GPA( "glDrawElements" );
  2892. qglDrawPixels = dllDrawPixels = GPA( "glDrawPixels" );
  2893. qglEdgeFlag = dllEdgeFlag = GPA( "glEdgeFlag" );
  2894. qglEdgeFlagPointer = dllEdgeFlagPointer = GPA( "glEdgeFlagPointer" );
  2895. qglEdgeFlagv = dllEdgeFlagv = GPA( "glEdgeFlagv" );
  2896. qglEnable = dllEnable = GPA( "glEnable" );
  2897. qglEnableClientState = dllEnableClientState = GPA( "glEnableClientState" );
  2898. qglEnd = dllEnd = GPA( "glEnd" );
  2899. qglEndList = dllEndList = GPA( "glEndList" );
  2900. qglEvalCoord1d = dllEvalCoord1d = GPA( "glEvalCoord1d" );
  2901. qglEvalCoord1dv = dllEvalCoord1dv = GPA( "glEvalCoord1dv" );
  2902. qglEvalCoord1f = dllEvalCoord1f = GPA( "glEvalCoord1f" );
  2903. qglEvalCoord1fv = dllEvalCoord1fv = GPA( "glEvalCoord1fv" );
  2904. qglEvalCoord2d = dllEvalCoord2d = GPA( "glEvalCoord2d" );
  2905. qglEvalCoord2dv = dllEvalCoord2dv = GPA( "glEvalCoord2dv" );
  2906. qglEvalCoord2f = dllEvalCoord2f = GPA( "glEvalCoord2f" );
  2907. qglEvalCoord2fv = dllEvalCoord2fv = GPA( "glEvalCoord2fv" );
  2908. qglEvalMesh1 = dllEvalMesh1 = GPA( "glEvalMesh1" );
  2909. qglEvalMesh2 = dllEvalMesh2 = GPA( "glEvalMesh2" );
  2910. qglEvalPoint1 = dllEvalPoint1 = GPA( "glEvalPoint1" );
  2911. qglEvalPoint2 = dllEvalPoint2 = GPA( "glEvalPoint2" );
  2912. qglFeedbackBuffer = dllFeedbackBuffer = GPA( "glFeedbackBuffer" );
  2913. qglFinish = dllFinish = GPA( "glFinish" );
  2914. qglFlush = dllFlush = GPA( "glFlush" );
  2915. qglFogf = dllFogf = GPA( "glFogf" );
  2916. qglFogfv = dllFogfv = GPA( "glFogfv" );
  2917. qglFogi = dllFogi = GPA( "glFogi" );
  2918. qglFogiv = dllFogiv = GPA( "glFogiv" );
  2919. qglFrontFace = dllFrontFace = GPA( "glFrontFace" );
  2920. qglFrustum = dllFrustum = GPA( "glFrustum" );
  2921. qglGenLists = dllGenLists = GPA( "glGenLists" );
  2922. qglGenTextures = dllGenTextures = GPA( "glGenTextures" );
  2923. qglGetBooleanv = dllGetBooleanv = GPA( "glGetBooleanv" );
  2924. qglGetClipPlane = dllGetClipPlane = GPA( "glGetClipPlane" );
  2925. qglGetDoublev = dllGetDoublev = GPA( "glGetDoublev" );
  2926. qglGetError = dllGetError = GPA( "glGetError" );
  2927. qglGetFloatv = dllGetFloatv = GPA( "glGetFloatv" );
  2928. qglGetIntegerv = dllGetIntegerv = GPA( "glGetIntegerv" );
  2929. qglGetLightfv = dllGetLightfv = GPA( "glGetLightfv" );
  2930. qglGetLightiv = dllGetLightiv = GPA( "glGetLightiv" );
  2931. qglGetMapdv = dllGetMapdv = GPA( "glGetMapdv" );
  2932. qglGetMapfv = dllGetMapfv = GPA( "glGetMapfv" );
  2933. qglGetMapiv = dllGetMapiv = GPA( "glGetMapiv" );
  2934. qglGetMaterialfv = dllGetMaterialfv = GPA( "glGetMaterialfv" );
  2935. qglGetMaterialiv = dllGetMaterialiv = GPA( "glGetMaterialiv" );
  2936. qglGetPixelMapfv = dllGetPixelMapfv = GPA( "glGetPixelMapfv" );
  2937. qglGetPixelMapuiv = dllGetPixelMapuiv = GPA( "glGetPixelMapuiv" );
  2938. qglGetPixelMapusv = dllGetPixelMapusv = GPA( "glGetPixelMapusv" );
  2939. qglGetPointerv = dllGetPointerv = GPA( "glGetPointerv" );
  2940. qglGetPolygonStipple = dllGetPolygonStipple = GPA( "glGetPolygonStipple" );
  2941. qglGetString = dllGetString = GPA( "glGetString" );
  2942. qglGetTexEnvfv = dllGetTexEnvfv = GPA( "glGetTexEnvfv" );
  2943. qglGetTexEnviv = dllGetTexEnviv = GPA( "glGetTexEnviv" );
  2944. qglGetTexGendv = dllGetTexGendv = GPA( "glGetTexGendv" );
  2945. qglGetTexGenfv = dllGetTexGenfv = GPA( "glGetTexGenfv" );
  2946. qglGetTexGeniv = dllGetTexGeniv = GPA( "glGetTexGeniv" );
  2947. qglGetTexImage = dllGetTexImage = GPA( "glGetTexImage" );
  2948. qglGetTexParameterfv = dllGetTexParameterfv = GPA( "glGetTexParameterfv" );
  2949. qglGetTexParameteriv = dllGetTexParameteriv = GPA( "glGetTexParameteriv" );
  2950. qglHint = dllHint = GPA( "glHint" );
  2951. qglIndexMask = dllIndexMask = GPA( "glIndexMask" );
  2952. qglIndexPointer = dllIndexPointer = GPA( "glIndexPointer" );
  2953. qglIndexd = dllIndexd = GPA( "glIndexd" );
  2954. qglIndexdv = dllIndexdv = GPA( "glIndexdv" );
  2955. qglIndexf = dllIndexf = GPA( "glIndexf" );
  2956. qglIndexfv = dllIndexfv = GPA( "glIndexfv" );
  2957. qglIndexi = dllIndexi = GPA( "glIndexi" );
  2958. qglIndexiv = dllIndexiv = GPA( "glIndexiv" );
  2959. qglIndexs = dllIndexs = GPA( "glIndexs" );
  2960. qglIndexsv = dllIndexsv = GPA( "glIndexsv" );
  2961. qglIndexub = dllIndexub = GPA( "glIndexub" );
  2962. qglIndexubv = dllIndexubv = GPA( "glIndexubv" );
  2963. qglInitNames = dllInitNames = GPA( "glInitNames" );
  2964. qglInterleavedArrays = dllInterleavedArrays = GPA( "glInterleavedArrays" );
  2965. qglIsEnabled = dllIsEnabled = GPA( "glIsEnabled" );
  2966. qglIsList = dllIsList = GPA( "glIsList" );
  2967. qglIsTexture = dllIsTexture = GPA( "glIsTexture" );
  2968. qglLightModelf = dllLightModelf = GPA( "glLightModelf" );
  2969. qglLightModelfv = dllLightModelfv = GPA( "glLightModelfv" );
  2970. qglLightModeli = dllLightModeli = GPA( "glLightModeli" );
  2971. qglLightModeliv = dllLightModeliv = GPA( "glLightModeliv" );
  2972. qglLightf = dllLightf = GPA( "glLightf" );
  2973. qglLightfv = dllLightfv = GPA( "glLightfv" );
  2974. qglLighti = dllLighti = GPA( "glLighti" );
  2975. qglLightiv = dllLightiv = GPA( "glLightiv" );
  2976. qglLineStipple = dllLineStipple = GPA( "glLineStipple" );
  2977. qglLineWidth = dllLineWidth = GPA( "glLineWidth" );
  2978. qglListBase = dllListBase = GPA( "glListBase" );
  2979. qglLoadIdentity = dllLoadIdentity = GPA( "glLoadIdentity" );
  2980. qglLoadMatrixd = dllLoadMatrixd = GPA( "glLoadMatrixd" );
  2981. qglLoadMatrixf = dllLoadMatrixf = GPA( "glLoadMatrixf" );
  2982. qglLoadName = dllLoadName = GPA( "glLoadName" );
  2983. qglLogicOp = dllLogicOp = GPA( "glLogicOp" );
  2984. qglMap1d = dllMap1d = GPA( "glMap1d" );
  2985. qglMap1f = dllMap1f = GPA( "glMap1f" );
  2986. qglMap2d = dllMap2d = GPA( "glMap2d" );
  2987. qglMap2f = dllMap2f = GPA( "glMap2f" );
  2988. qglMapGrid1d = dllMapGrid1d = GPA( "glMapGrid1d" );
  2989. qglMapGrid1f = dllMapGrid1f = GPA( "glMapGrid1f" );
  2990. qglMapGrid2d = dllMapGrid2d = GPA( "glMapGrid2d" );
  2991. qglMapGrid2f = dllMapGrid2f = GPA( "glMapGrid2f" );
  2992. qglMaterialf = dllMaterialf = GPA( "glMaterialf" );
  2993. qglMaterialfv = dllMaterialfv = GPA( "glMaterialfv" );
  2994. qglMateriali = dllMateriali = GPA( "glMateriali" );
  2995. qglMaterialiv = dllMaterialiv = GPA( "glMaterialiv" );
  2996. qglMatrixMode = dllMatrixMode = GPA( "glMatrixMode" );
  2997. qglMultMatrixd = dllMultMatrixd = GPA( "glMultMatrixd" );
  2998. qglMultMatrixf = dllMultMatrixf = GPA( "glMultMatrixf" );
  2999. qglNewList = dllNewList = GPA( "glNewList" );
  3000. qglNormal3b = dllNormal3b = GPA( "glNormal3b" );
  3001. qglNormal3bv = dllNormal3bv = GPA( "glNormal3bv" );
  3002. qglNormal3d = dllNormal3d = GPA( "glNormal3d" );
  3003. qglNormal3dv = dllNormal3dv = GPA( "glNormal3dv" );
  3004. qglNormal3f = dllNormal3f = GPA( "glNormal3f" );
  3005. qglNormal3fv = dllNormal3fv = GPA( "glNormal3fv" );
  3006. qglNormal3i = dllNormal3i = GPA( "glNormal3i" );
  3007. qglNormal3iv = dllNormal3iv = GPA( "glNormal3iv" );
  3008. qglNormal3s = dllNormal3s = GPA( "glNormal3s" );
  3009. qglNormal3sv = dllNormal3sv = GPA( "glNormal3sv" );
  3010. qglNormalPointer = dllNormalPointer = GPA( "glNormalPointer" );
  3011. qglOrtho = dllOrtho = GPA( "glOrtho" );
  3012. qglPassThrough = dllPassThrough = GPA( "glPassThrough" );
  3013. qglPixelMapfv = dllPixelMapfv = GPA( "glPixelMapfv" );
  3014. qglPixelMapuiv = dllPixelMapuiv = GPA( "glPixelMapuiv" );
  3015. qglPixelMapusv = dllPixelMapusv = GPA( "glPixelMapusv" );
  3016. qglPixelStoref = dllPixelStoref = GPA( "glPixelStoref" );
  3017. qglPixelStorei = dllPixelStorei = GPA( "glPixelStorei" );
  3018. qglPixelTransferf = dllPixelTransferf = GPA( "glPixelTransferf" );
  3019. qglPixelTransferi = dllPixelTransferi = GPA( "glPixelTransferi" );
  3020. qglPixelZoom = dllPixelZoom = GPA( "glPixelZoom" );
  3021. qglPointSize = dllPointSize = GPA( "glPointSize" );
  3022. qglPolygonMode = dllPolygonMode = GPA( "glPolygonMode" );
  3023. qglPolygonOffset = dllPolygonOffset = GPA( "glPolygonOffset" );
  3024. qglPolygonStipple = dllPolygonStipple = GPA( "glPolygonStipple" );
  3025. qglPopAttrib = dllPopAttrib = GPA( "glPopAttrib" );
  3026. qglPopClientAttrib = dllPopClientAttrib = GPA( "glPopClientAttrib" );
  3027. qglPopMatrix = dllPopMatrix = GPA( "glPopMatrix" );
  3028. qglPopName = dllPopName = GPA( "glPopName" );
  3029. qglPrioritizeTextures = dllPrioritizeTextures = GPA( "glPrioritizeTextures" );
  3030. qglPushAttrib = dllPushAttrib = GPA( "glPushAttrib" );
  3031. qglPushClientAttrib = dllPushClientAttrib = GPA( "glPushClientAttrib" );
  3032. qglPushMatrix = dllPushMatrix = GPA( "glPushMatrix" );
  3033. qglPushName = dllPushName = GPA( "glPushName" );
  3034. qglRasterPos2d = dllRasterPos2d = GPA( "glRasterPos2d" );
  3035. qglRasterPos2dv = dllRasterPos2dv = GPA( "glRasterPos2dv" );
  3036. qglRasterPos2f = dllRasterPos2f = GPA( "glRasterPos2f" );
  3037. qglRasterPos2fv = dllRasterPos2fv = GPA( "glRasterPos2fv" );
  3038. qglRasterPos2i = dllRasterPos2i = GPA( "glRasterPos2i" );
  3039. qglRasterPos2iv = dllRasterPos2iv = GPA( "glRasterPos2iv" );
  3040. qglRasterPos2s = dllRasterPos2s = GPA( "glRasterPos2s" );
  3041. qglRasterPos2sv = dllRasterPos2sv = GPA( "glRasterPos2sv" );
  3042. qglRasterPos3d = dllRasterPos3d = GPA( "glRasterPos3d" );
  3043. qglRasterPos3dv = dllRasterPos3dv = GPA( "glRasterPos3dv" );
  3044. qglRasterPos3f = dllRasterPos3f = GPA( "glRasterPos3f" );
  3045. qglRasterPos3fv = dllRasterPos3fv = GPA( "glRasterPos3fv" );
  3046. qglRasterPos3i = dllRasterPos3i = GPA( "glRasterPos3i" );
  3047. qglRasterPos3iv = dllRasterPos3iv = GPA( "glRasterPos3iv" );
  3048. qglRasterPos3s = dllRasterPos3s = GPA( "glRasterPos3s" );
  3049. qglRasterPos3sv = dllRasterPos3sv = GPA( "glRasterPos3sv" );
  3050. qglRasterPos4d = dllRasterPos4d = GPA( "glRasterPos4d" );
  3051. qglRasterPos4dv = dllRasterPos4dv = GPA( "glRasterPos4dv" );
  3052. qglRasterPos4f = dllRasterPos4f = GPA( "glRasterPos4f" );
  3053. qglRasterPos4fv = dllRasterPos4fv = GPA( "glRasterPos4fv" );
  3054. qglRasterPos4i = dllRasterPos4i = GPA( "glRasterPos4i" );
  3055. qglRasterPos4iv = dllRasterPos4iv = GPA( "glRasterPos4iv" );
  3056. qglRasterPos4s = dllRasterPos4s = GPA( "glRasterPos4s" );
  3057. qglRasterPos4sv = dllRasterPos4sv = GPA( "glRasterPos4sv" );
  3058. qglReadBuffer = dllReadBuffer = GPA( "glReadBuffer" );
  3059. qglReadPixels = dllReadPixels = GPA( "glReadPixels" );
  3060. qglRectd = dllRectd = GPA( "glRectd" );
  3061. qglRectdv = dllRectdv = GPA( "glRectdv" );
  3062. qglRectf = dllRectf = GPA( "glRectf" );
  3063. qglRectfv = dllRectfv = GPA( "glRectfv" );
  3064. qglRecti = dllRecti = GPA( "glRecti" );
  3065. qglRectiv = dllRectiv = GPA( "glRectiv" );
  3066. qglRects = dllRects = GPA( "glRects" );
  3067. qglRectsv = dllRectsv = GPA( "glRectsv" );
  3068. qglRenderMode = dllRenderMode = GPA( "glRenderMode" );
  3069. qglRotated = dllRotated = GPA( "glRotated" );
  3070. qglRotatef = dllRotatef = GPA( "glRotatef" );
  3071. qglScaled = dllScaled = GPA( "glScaled" );
  3072. qglScalef = dllScalef = GPA( "glScalef" );
  3073. qglScissor = dllScissor = GPA( "glScissor" );
  3074. qglSelectBuffer = dllSelectBuffer = GPA( "glSelectBuffer" );
  3075. qglShadeModel = dllShadeModel = GPA( "glShadeModel" );
  3076. qglStencilFunc = dllStencilFunc = GPA( "glStencilFunc" );
  3077. qglStencilMask = dllStencilMask = GPA( "glStencilMask" );
  3078. qglStencilOp = dllStencilOp = GPA( "glStencilOp" );
  3079. qglTexCoord1d = dllTexCoord1d = GPA( "glTexCoord1d" );
  3080. qglTexCoord1dv = dllTexCoord1dv = GPA( "glTexCoord1dv" );
  3081. qglTexCoord1f = dllTexCoord1f = GPA( "glTexCoord1f" );
  3082. qglTexCoord1fv = dllTexCoord1fv = GPA( "glTexCoord1fv" );
  3083. qglTexCoord1i = dllTexCoord1i = GPA( "glTexCoord1i" );
  3084. qglTexCoord1iv = dllTexCoord1iv = GPA( "glTexCoord1iv" );
  3085. qglTexCoord1s = dllTexCoord1s = GPA( "glTexCoord1s" );
  3086. qglTexCoord1sv = dllTexCoord1sv = GPA( "glTexCoord1sv" );
  3087. qglTexCoord2d = dllTexCoord2d = GPA( "glTexCoord2d" );
  3088. qglTexCoord2dv = dllTexCoord2dv = GPA( "glTexCoord2dv" );
  3089. qglTexCoord2f = dllTexCoord2f = GPA( "glTexCoord2f" );
  3090. qglTexCoord2fv = dllTexCoord2fv = GPA( "glTexCoord2fv" );
  3091. qglTexCoord2i = dllTexCoord2i = GPA( "glTexCoord2i" );
  3092. qglTexCoord2iv = dllTexCoord2iv = GPA( "glTexCoord2iv" );
  3093. qglTexCoord2s = dllTexCoord2s = GPA( "glTexCoord2s" );
  3094. qglTexCoord2sv = dllTexCoord2sv = GPA( "glTexCoord2sv" );
  3095. qglTexCoord3d = dllTexCoord3d = GPA( "glTexCoord3d" );
  3096. qglTexCoord3dv = dllTexCoord3dv = GPA( "glTexCoord3dv" );
  3097. qglTexCoord3f = dllTexCoord3f = GPA( "glTexCoord3f" );
  3098. qglTexCoord3fv = dllTexCoord3fv = GPA( "glTexCoord3fv" );
  3099. qglTexCoord3i = dllTexCoord3i = GPA( "glTexCoord3i" );
  3100. qglTexCoord3iv = dllTexCoord3iv = GPA( "glTexCoord3iv" );
  3101. qglTexCoord3s = dllTexCoord3s = GPA( "glTexCoord3s" );
  3102. qglTexCoord3sv = dllTexCoord3sv = GPA( "glTexCoord3sv" );
  3103. qglTexCoord4d = dllTexCoord4d = GPA( "glTexCoord4d" );
  3104. qglTexCoord4dv = dllTexCoord4dv = GPA( "glTexCoord4dv" );
  3105. qglTexCoord4f = dllTexCoord4f = GPA( "glTexCoord4f" );
  3106. qglTexCoord4fv = dllTexCoord4fv = GPA( "glTexCoord4fv" );
  3107. qglTexCoord4i = dllTexCoord4i = GPA( "glTexCoord4i" );
  3108. qglTexCoord4iv = dllTexCoord4iv = GPA( "glTexCoord4iv" );
  3109. qglTexCoord4s = dllTexCoord4s = GPA( "glTexCoord4s" );
  3110. qglTexCoord4sv = dllTexCoord4sv = GPA( "glTexCoord4sv" );
  3111. qglTexCoordPointer = dllTexCoordPointer = GPA( "glTexCoordPointer" );
  3112. qglTexEnvf = dllTexEnvf = GPA( "glTexEnvf" );
  3113. qglTexEnvfv = dllTexEnvfv = GPA( "glTexEnvfv" );
  3114. qglTexEnvi = dllTexEnvi = GPA( "glTexEnvi" );
  3115. qglTexEnviv = dllTexEnviv = GPA( "glTexEnviv" );
  3116. qglTexGend = dllTexGend = GPA( "glTexGend" );
  3117. qglTexGendv = dllTexGendv = GPA( "glTexGendv" );
  3118. qglTexGenf = dllTexGenf = GPA( "glTexGenf" );
  3119. qglTexGenfv = dllTexGenfv = GPA( "glTexGenfv" );
  3120. qglTexGeni = dllTexGeni = GPA( "glTexGeni" );
  3121. qglTexGeniv = dllTexGeniv = GPA( "glTexGeniv" );
  3122. qglTexImage1D = dllTexImage1D = GPA( "glTexImage1D" );
  3123. qglTexImage2D = dllTexImage2D = GPA( "glTexImage2D" );
  3124. qglTexParameterf = dllTexParameterf = GPA( "glTexParameterf" );
  3125. qglTexParameterfv = dllTexParameterfv = GPA( "glTexParameterfv" );
  3126. qglTexParameteri = dllTexParameteri = GPA( "glTexParameteri" );
  3127. qglTexParameteriv = dllTexParameteriv = GPA( "glTexParameteriv" );
  3128. qglTexSubImage1D = dllTexSubImage1D = GPA( "glTexSubImage1D" );
  3129. qglTexSubImage2D = dllTexSubImage2D = GPA( "glTexSubImage2D" );
  3130. qglTranslated = dllTranslated = GPA( "glTranslated" );
  3131. qglTranslatef = dllTranslatef = GPA( "glTranslatef" );
  3132. qglVertex2d = dllVertex2d = GPA( "glVertex2d" );
  3133. qglVertex2dv = dllVertex2dv = GPA( "glVertex2dv" );
  3134. qglVertex2f = dllVertex2f = GPA( "glVertex2f" );
  3135. qglVertex2fv = dllVertex2fv = GPA( "glVertex2fv" );
  3136. qglVertex2i = dllVertex2i = GPA( "glVertex2i" );
  3137. qglVertex2iv = dllVertex2iv = GPA( "glVertex2iv" );
  3138. qglVertex2s = dllVertex2s = GPA( "glVertex2s" );
  3139. qglVertex2sv = dllVertex2sv = GPA( "glVertex2sv" );
  3140. qglVertex3d = dllVertex3d = GPA( "glVertex3d" );
  3141. qglVertex3dv = dllVertex3dv = GPA( "glVertex3dv" );
  3142. qglVertex3f = dllVertex3f = GPA( "glVertex3f" );
  3143. qglVertex3fv = dllVertex3fv = GPA( "glVertex3fv" );
  3144. qglVertex3i = dllVertex3i = GPA( "glVertex3i" );
  3145. qglVertex3iv = dllVertex3iv = GPA( "glVertex3iv" );
  3146. qglVertex3s = dllVertex3s = GPA( "glVertex3s" );
  3147. qglVertex3sv = dllVertex3sv = GPA( "glVertex3sv" );
  3148. qglVertex4d = dllVertex4d = GPA( "glVertex4d" );
  3149. qglVertex4dv = dllVertex4dv = GPA( "glVertex4dv" );
  3150. qglVertex4f = dllVertex4f = GPA( "glVertex4f" );
  3151. qglVertex4fv = dllVertex4fv = GPA( "glVertex4fv" );
  3152. qglVertex4i = dllVertex4i = GPA( "glVertex4i" );
  3153. qglVertex4iv = dllVertex4iv = GPA( "glVertex4iv" );
  3154. qglVertex4s = dllVertex4s = GPA( "glVertex4s" );
  3155. qglVertex4sv = dllVertex4sv = GPA( "glVertex4sv" );
  3156. qglVertexPointer = dllVertexPointer = GPA( "glVertexPointer" );
  3157. qglViewport = dllViewport = GPA( "glViewport" );
  3158. // bk001129 - from cvs1.17 (mkv)
  3159. #if defined(__FX__)
  3160. qfxMesaCreateContext = GPA("fxMesaCreateContext");
  3161. qfxMesaCreateBestContext = GPA("fxMesaCreateBestContext");
  3162. qfxMesaDestroyContext = GPA("fxMesaDestroyContext");
  3163. qfxMesaMakeCurrent = GPA("fxMesaMakeCurrent");
  3164. qfxMesaGetCurrentContext = GPA("fxMesaGetCurrentContext");
  3165. qfxMesaSwapBuffers = GPA("fxMesaSwapBuffers");
  3166. #endif
  3167. qglXChooseVisual = GPA("glXChooseVisual");
  3168. qglXCreateContext = GPA("glXCreateContext");
  3169. qglXDestroyContext = GPA("glXDestroyContext");
  3170. qglXMakeCurrent = GPA("glXMakeCurrent");
  3171. qglXCopyContext = GPA("glXCopyContext");
  3172. qglXSwapBuffers = GPA("glXSwapBuffers");
  3173. qglLockArraysEXT = 0;
  3174. qglUnlockArraysEXT = 0;
  3175. qglPointParameterfEXT = 0;
  3176. qglPointParameterfvEXT = 0;
  3177. qglColorTableEXT = 0;
  3178. qgl3DfxSetPaletteEXT = 0;
  3179. qglSelectTextureSGIS = 0;
  3180. qglMTexCoord2fSGIS = 0;
  3181. qglActiveTextureARB = 0;
  3182. qglClientActiveTextureARB = 0;
  3183. qglMultiTexCoord2fARB = 0;
  3184. return qtrue;
  3185. }
  3186. void QGL_EnableLogging( qboolean enable ) {
  3187. // bk001205 - fixed for new countdown
  3188. static qboolean isEnabled = qfalse; // init
  3189. // return if we're already active
  3190. if ( isEnabled && enable ) {
  3191. // decrement log counter and stop if it has reached 0
  3192. ri.Cvar_Set( "r_logFile", va("%d", r_logFile->integer - 1 ) );
  3193. if ( r_logFile->integer ) {
  3194. return;
  3195. }
  3196. enable = qfalse;
  3197. }
  3198. // return if we're already disabled
  3199. if ( !enable && !isEnabled )
  3200. return;
  3201. isEnabled = enable;
  3202. // bk001205 - old code starts here
  3203. if ( enable ) {
  3204. if ( !glw_state.log_fp ) {
  3205. struct tm *newtime;
  3206. time_t aclock;
  3207. char buffer[1024];
  3208. cvar_t *basedir;
  3209. time( &aclock );
  3210. newtime = localtime( &aclock );
  3211. asctime( newtime );
  3212. basedir = ri.Cvar_Get( "fs_basepath", "", 0 ); // FIXME: userdir?
  3213. assert(basedir);
  3214. Com_sprintf( buffer, sizeof(buffer), "%s/gl.log", basedir->string );
  3215. glw_state.log_fp = fopen( buffer, "wt" );
  3216. assert(glw_state.log_fp);
  3217. ri.Printf(PRINT_ALL, "QGL_EnableLogging(%d): writing %s\n", r_logFile->integer, buffer );
  3218. fprintf( glw_state.log_fp, "%s\n", asctime( newtime ) );
  3219. }
  3220. qglAccum = logAccum;
  3221. qglAlphaFunc = logAlphaFunc;
  3222. qglAreTexturesResident = logAreTexturesResident;
  3223. qglArrayElement = logArrayElement;
  3224. qglBegin = logBegin;
  3225. qglBindTexture = logBindTexture;
  3226. qglBitmap = logBitmap;
  3227. qglBlendFunc = logBlendFunc;
  3228. qglCallList = logCallList;
  3229. qglCallLists = logCallLists;
  3230. qglClear = logClear;
  3231. qglClearAccum = logClearAccum;
  3232. qglClearColor = logClearColor;
  3233. qglClearDepth = logClearDepth;
  3234. qglClearIndex = logClearIndex;
  3235. qglClearStencil = logClearStencil;
  3236. qglClipPlane = logClipPlane;
  3237. qglColor3b = logColor3b;
  3238. qglColor3bv = logColor3bv;
  3239. qglColor3d = logColor3d;
  3240. qglColor3dv = logColor3dv;
  3241. qglColor3f = logColor3f;
  3242. qglColor3fv = logColor3fv;
  3243. qglColor3i = logColor3i;
  3244. qglColor3iv = logColor3iv;
  3245. qglColor3s = logColor3s;
  3246. qglColor3sv = logColor3sv;
  3247. qglColor3ub = logColor3ub;
  3248. qglColor3ubv = logColor3ubv;
  3249. qglColor3ui = logColor3ui;
  3250. qglColor3uiv = logColor3uiv;
  3251. qglColor3us = logColor3us;
  3252. qglColor3usv = logColor3usv;
  3253. qglColor4b = logColor4b;
  3254. qglColor4bv = logColor4bv;
  3255. qglColor4d = logColor4d;
  3256. qglColor4dv = logColor4dv;
  3257. qglColor4f = logColor4f;
  3258. qglColor4fv = logColor4fv;
  3259. qglColor4i = logColor4i;
  3260. qglColor4iv = logColor4iv;
  3261. qglColor4s = logColor4s;
  3262. qglColor4sv = logColor4sv;
  3263. qglColor4ub = logColor4ub;
  3264. qglColor4ubv = logColor4ubv;
  3265. qglColor4ui = logColor4ui;
  3266. qglColor4uiv = logColor4uiv;
  3267. qglColor4us = logColor4us;
  3268. qglColor4usv = logColor4usv;
  3269. qglColorMask = logColorMask;
  3270. qglColorMaterial = logColorMaterial;
  3271. qglColorPointer = logColorPointer;
  3272. qglCopyPixels = logCopyPixels;
  3273. qglCopyTexImage1D = logCopyTexImage1D;
  3274. qglCopyTexImage2D = logCopyTexImage2D;
  3275. qglCopyTexSubImage1D = logCopyTexSubImage1D;
  3276. qglCopyTexSubImage2D = logCopyTexSubImage2D;
  3277. qglCullFace = logCullFace;
  3278. qglDeleteLists = logDeleteLists ;
  3279. qglDeleteTextures = logDeleteTextures ;
  3280. qglDepthFunc = logDepthFunc ;
  3281. qglDepthMask = logDepthMask ;
  3282. qglDepthRange = logDepthRange ;
  3283. qglDisable = logDisable ;
  3284. qglDisableClientState = logDisableClientState ;
  3285. qglDrawArrays = logDrawArrays ;
  3286. qglDrawBuffer = logDrawBuffer ;
  3287. qglDrawElements = logDrawElements ;
  3288. qglDrawPixels = logDrawPixels ;
  3289. qglEdgeFlag = logEdgeFlag ;
  3290. qglEdgeFlagPointer = logEdgeFlagPointer ;
  3291. qglEdgeFlagv = logEdgeFlagv ;
  3292. qglEnable = logEnable ;
  3293. qglEnableClientState = logEnableClientState ;
  3294. qglEnd = logEnd ;
  3295. qglEndList = logEndList ;
  3296. qglEvalCoord1d = logEvalCoord1d ;
  3297. qglEvalCoord1dv = logEvalCoord1dv ;
  3298. qglEvalCoord1f = logEvalCoord1f ;
  3299. qglEvalCoord1fv = logEvalCoord1fv ;
  3300. qglEvalCoord2d = logEvalCoord2d ;
  3301. qglEvalCoord2dv = logEvalCoord2dv ;
  3302. qglEvalCoord2f = logEvalCoord2f ;
  3303. qglEvalCoord2fv = logEvalCoord2fv ;
  3304. qglEvalMesh1 = logEvalMesh1 ;
  3305. qglEvalMesh2 = logEvalMesh2 ;
  3306. qglEvalPoint1 = logEvalPoint1 ;
  3307. qglEvalPoint2 = logEvalPoint2 ;
  3308. qglFeedbackBuffer = logFeedbackBuffer ;
  3309. qglFinish = logFinish ;
  3310. qglFlush = logFlush ;
  3311. qglFogf = logFogf ;
  3312. qglFogfv = logFogfv ;
  3313. qglFogi = logFogi ;
  3314. qglFogiv = logFogiv ;
  3315. qglFrontFace = logFrontFace ;
  3316. qglFrustum = logFrustum ;
  3317. qglGenLists = logGenLists ;
  3318. qglGenTextures = logGenTextures ;
  3319. qglGetBooleanv = logGetBooleanv ;
  3320. qglGetClipPlane = logGetClipPlane ;
  3321. qglGetDoublev = logGetDoublev ;
  3322. qglGetError = logGetError ;
  3323. qglGetFloatv = logGetFloatv ;
  3324. qglGetIntegerv = logGetIntegerv ;
  3325. qglGetLightfv = logGetLightfv ;
  3326. qglGetLightiv = logGetLightiv ;
  3327. qglGetMapdv = logGetMapdv ;
  3328. qglGetMapfv = logGetMapfv ;
  3329. qglGetMapiv = logGetMapiv ;
  3330. qglGetMaterialfv = logGetMaterialfv ;
  3331. qglGetMaterialiv = logGetMaterialiv ;
  3332. qglGetPixelMapfv = logGetPixelMapfv ;
  3333. qglGetPixelMapuiv = logGetPixelMapuiv ;
  3334. qglGetPixelMapusv = logGetPixelMapusv ;
  3335. qglGetPointerv = logGetPointerv ;
  3336. qglGetPolygonStipple = logGetPolygonStipple ;
  3337. qglGetString = logGetString ;
  3338. qglGetTexEnvfv = logGetTexEnvfv ;
  3339. qglGetTexEnviv = logGetTexEnviv ;
  3340. qglGetTexGendv = logGetTexGendv ;
  3341. qglGetTexGenfv = logGetTexGenfv ;
  3342. qglGetTexGeniv = logGetTexGeniv ;
  3343. qglGetTexImage = logGetTexImage ;
  3344. qglGetTexLevelParameterfv = logGetTexLevelParameterfv ;
  3345. qglGetTexLevelParameteriv = logGetTexLevelParameteriv ;
  3346. qglGetTexParameterfv = logGetTexParameterfv ;
  3347. qglGetTexParameteriv = logGetTexParameteriv ;
  3348. qglHint = logHint ;
  3349. qglIndexMask = logIndexMask ;
  3350. qglIndexPointer = logIndexPointer ;
  3351. qglIndexd = logIndexd ;
  3352. qglIndexdv = logIndexdv ;
  3353. qglIndexf = logIndexf ;
  3354. qglIndexfv = logIndexfv ;
  3355. qglIndexi = logIndexi ;
  3356. qglIndexiv = logIndexiv ;
  3357. qglIndexs = logIndexs ;
  3358. qglIndexsv = logIndexsv ;
  3359. qglIndexub = logIndexub ;
  3360. qglIndexubv = logIndexubv ;
  3361. qglInitNames = logInitNames ;
  3362. qglInterleavedArrays = logInterleavedArrays ;
  3363. qglIsEnabled = logIsEnabled ;
  3364. qglIsList = logIsList ;
  3365. qglIsTexture = logIsTexture ;
  3366. qglLightModelf = logLightModelf ;
  3367. qglLightModelfv = logLightModelfv ;
  3368. qglLightModeli = logLightModeli ;
  3369. qglLightModeliv = logLightModeliv ;
  3370. qglLightf = logLightf ;
  3371. qglLightfv = logLightfv ;
  3372. qglLighti = logLighti ;
  3373. qglLightiv = logLightiv ;
  3374. qglLineStipple = logLineStipple ;
  3375. qglLineWidth = logLineWidth ;
  3376. qglListBase = logListBase ;
  3377. qglLoadIdentity = logLoadIdentity ;
  3378. qglLoadMatrixd = logLoadMatrixd ;
  3379. qglLoadMatrixf = logLoadMatrixf ;
  3380. qglLoadName = logLoadName ;
  3381. qglLogicOp = logLogicOp ;
  3382. qglMap1d = logMap1d ;
  3383. qglMap1f = logMap1f ;
  3384. qglMap2d = logMap2d ;
  3385. qglMap2f = logMap2f ;
  3386. qglMapGrid1d = logMapGrid1d ;
  3387. qglMapGrid1f = logMapGrid1f ;
  3388. qglMapGrid2d = logMapGrid2d ;
  3389. qglMapGrid2f = logMapGrid2f ;
  3390. qglMaterialf = logMaterialf ;
  3391. qglMaterialfv = logMaterialfv ;
  3392. qglMateriali = logMateriali ;
  3393. qglMaterialiv = logMaterialiv ;
  3394. qglMatrixMode = logMatrixMode ;
  3395. qglMultMatrixd = logMultMatrixd ;
  3396. qglMultMatrixf = logMultMatrixf ;
  3397. qglNewList = logNewList ;
  3398. qglNormal3b = logNormal3b ;
  3399. qglNormal3bv = logNormal3bv ;
  3400. qglNormal3d = logNormal3d ;
  3401. qglNormal3dv = logNormal3dv ;
  3402. qglNormal3f = logNormal3f ;
  3403. qglNormal3fv = logNormal3fv ;
  3404. qglNormal3i = logNormal3i ;
  3405. qglNormal3iv = logNormal3iv ;
  3406. qglNormal3s = logNormal3s ;
  3407. qglNormal3sv = logNormal3sv ;
  3408. qglNormalPointer = logNormalPointer ;
  3409. qglOrtho = logOrtho ;
  3410. qglPassThrough = logPassThrough ;
  3411. qglPixelMapfv = logPixelMapfv ;
  3412. qglPixelMapuiv = logPixelMapuiv ;
  3413. qglPixelMapusv = logPixelMapusv ;
  3414. qglPixelStoref = logPixelStoref ;
  3415. qglPixelStorei = logPixelStorei ;
  3416. qglPixelTransferf = logPixelTransferf ;
  3417. qglPixelTransferi = logPixelTransferi ;
  3418. qglPixelZoom = logPixelZoom ;
  3419. qglPointSize = logPointSize ;
  3420. qglPolygonMode = logPolygonMode ;
  3421. qglPolygonOffset = logPolygonOffset ;
  3422. qglPolygonStipple = logPolygonStipple ;
  3423. qglPopAttrib = logPopAttrib ;
  3424. qglPopClientAttrib = logPopClientAttrib ;
  3425. qglPopMatrix = logPopMatrix ;
  3426. qglPopName = logPopName ;
  3427. qglPrioritizeTextures = logPrioritizeTextures ;
  3428. qglPushAttrib = logPushAttrib ;
  3429. qglPushClientAttrib = logPushClientAttrib ;
  3430. qglPushMatrix = logPushMatrix ;
  3431. qglPushName = logPushName ;
  3432. qglRasterPos2d = logRasterPos2d ;
  3433. qglRasterPos2dv = logRasterPos2dv ;
  3434. qglRasterPos2f = logRasterPos2f ;
  3435. qglRasterPos2fv = logRasterPos2fv ;
  3436. qglRasterPos2i = logRasterPos2i ;
  3437. qglRasterPos2iv = logRasterPos2iv ;
  3438. qglRasterPos2s = logRasterPos2s ;
  3439. qglRasterPos2sv = logRasterPos2sv ;
  3440. qglRasterPos3d = logRasterPos3d ;
  3441. qglRasterPos3dv = logRasterPos3dv ;
  3442. qglRasterPos3f = logRasterPos3f ;
  3443. qglRasterPos3fv = logRasterPos3fv ;
  3444. qglRasterPos3i = logRasterPos3i ;
  3445. qglRasterPos3iv = logRasterPos3iv ;
  3446. qglRasterPos3s = logRasterPos3s ;
  3447. qglRasterPos3sv = logRasterPos3sv ;
  3448. qglRasterPos4d = logRasterPos4d ;
  3449. qglRasterPos4dv = logRasterPos4dv ;
  3450. qglRasterPos4f = logRasterPos4f ;
  3451. qglRasterPos4fv = logRasterPos4fv ;
  3452. qglRasterPos4i = logRasterPos4i ;
  3453. qglRasterPos4iv = logRasterPos4iv ;
  3454. qglRasterPos4s = logRasterPos4s ;
  3455. qglRasterPos4sv = logRasterPos4sv ;
  3456. qglReadBuffer = logReadBuffer ;
  3457. qglReadPixels = logReadPixels ;
  3458. qglRectd = logRectd ;
  3459. qglRectdv = logRectdv ;
  3460. qglRectf = logRectf ;
  3461. qglRectfv = logRectfv ;
  3462. qglRecti = logRecti ;
  3463. qglRectiv = logRectiv ;
  3464. qglRects = logRects ;
  3465. qglRectsv = logRectsv ;
  3466. qglRenderMode = logRenderMode ;
  3467. qglRotated = logRotated ;
  3468. qglRotatef = logRotatef ;
  3469. qglScaled = logScaled ;
  3470. qglScalef = logScalef ;
  3471. qglScissor = logScissor ;
  3472. qglSelectBuffer = logSelectBuffer ;
  3473. qglShadeModel = logShadeModel ;
  3474. qglStencilFunc = logStencilFunc ;
  3475. qglStencilMask = logStencilMask ;
  3476. qglStencilOp = logStencilOp ;
  3477. qglTexCoord1d = logTexCoord1d ;
  3478. qglTexCoord1dv = logTexCoord1dv ;
  3479. qglTexCoord1f = logTexCoord1f ;
  3480. qglTexCoord1fv = logTexCoord1fv ;
  3481. qglTexCoord1i = logTexCoord1i ;
  3482. qglTexCoord1iv = logTexCoord1iv ;
  3483. qglTexCoord1s = logTexCoord1s ;
  3484. qglTexCoord1sv = logTexCoord1sv ;
  3485. qglTexCoord2d = logTexCoord2d ;
  3486. qglTexCoord2dv = logTexCoord2dv ;
  3487. qglTexCoord2f = logTexCoord2f ;
  3488. qglTexCoord2fv = logTexCoord2fv ;
  3489. qglTexCoord2i = logTexCoord2i ;
  3490. qglTexCoord2iv = logTexCoord2iv ;
  3491. qglTexCoord2s = logTexCoord2s ;
  3492. qglTexCoord2sv = logTexCoord2sv ;
  3493. qglTexCoord3d = logTexCoord3d ;
  3494. qglTexCoord3dv = logTexCoord3dv ;
  3495. qglTexCoord3f = logTexCoord3f ;
  3496. qglTexCoord3fv = logTexCoord3fv ;
  3497. qglTexCoord3i = logTexCoord3i ;
  3498. qglTexCoord3iv = logTexCoord3iv ;
  3499. qglTexCoord3s = logTexCoord3s ;
  3500. qglTexCoord3sv = logTexCoord3sv ;
  3501. qglTexCoord4d = logTexCoord4d ;
  3502. qglTexCoord4dv = logTexCoord4dv ;
  3503. qglTexCoord4f = logTexCoord4f ;
  3504. qglTexCoord4fv = logTexCoord4fv ;
  3505. qglTexCoord4i = logTexCoord4i ;
  3506. qglTexCoord4iv = logTexCoord4iv ;
  3507. qglTexCoord4s = logTexCoord4s ;
  3508. qglTexCoord4sv = logTexCoord4sv ;
  3509. qglTexCoordPointer = logTexCoordPointer ;
  3510. qglTexEnvf = logTexEnvf ;
  3511. qglTexEnvfv = logTexEnvfv ;
  3512. qglTexEnvi = logTexEnvi ;
  3513. qglTexEnviv = logTexEnviv ;
  3514. qglTexGend = logTexGend ;
  3515. qglTexGendv = logTexGendv ;
  3516. qglTexGenf = logTexGenf ;
  3517. qglTexGenfv = logTexGenfv ;
  3518. qglTexGeni = logTexGeni ;
  3519. qglTexGeniv = logTexGeniv ;
  3520. qglTexImage1D = logTexImage1D ;
  3521. qglTexImage2D = logTexImage2D ;
  3522. qglTexParameterf = logTexParameterf ;
  3523. qglTexParameterfv = logTexParameterfv ;
  3524. qglTexParameteri = logTexParameteri ;
  3525. qglTexParameteriv = logTexParameteriv ;
  3526. qglTexSubImage1D = logTexSubImage1D ;
  3527. qglTexSubImage2D = logTexSubImage2D ;
  3528. qglTranslated = logTranslated ;
  3529. qglTranslatef = logTranslatef ;
  3530. qglVertex2d = logVertex2d ;
  3531. qglVertex2dv = logVertex2dv ;
  3532. qglVertex2f = logVertex2f ;
  3533. qglVertex2fv = logVertex2fv ;
  3534. qglVertex2i = logVertex2i ;
  3535. qglVertex2iv = logVertex2iv ;
  3536. qglVertex2s = logVertex2s ;
  3537. qglVertex2sv = logVertex2sv ;
  3538. qglVertex3d = logVertex3d ;
  3539. qglVertex3dv = logVertex3dv ;
  3540. qglVertex3f = logVertex3f ;
  3541. qglVertex3fv = logVertex3fv ;
  3542. qglVertex3i = logVertex3i ;
  3543. qglVertex3iv = logVertex3iv ;
  3544. qglVertex3s = logVertex3s ;
  3545. qglVertex3sv = logVertex3sv ;
  3546. qglVertex4d = logVertex4d ;
  3547. qglVertex4dv = logVertex4dv ;
  3548. qglVertex4f = logVertex4f ;
  3549. qglVertex4fv = logVertex4fv ;
  3550. qglVertex4i = logVertex4i ;
  3551. qglVertex4iv = logVertex4iv ;
  3552. qglVertex4s = logVertex4s ;
  3553. qglVertex4sv = logVertex4sv ;
  3554. qglVertexPointer = logVertexPointer ;
  3555. qglViewport = logViewport ;
  3556. }
  3557. else
  3558. {
  3559. qglAccum = dllAccum;
  3560. qglAlphaFunc = dllAlphaFunc;
  3561. qglAreTexturesResident = dllAreTexturesResident;
  3562. qglArrayElement = dllArrayElement;
  3563. qglBegin = dllBegin;
  3564. qglBindTexture = dllBindTexture;
  3565. qglBitmap = dllBitmap;
  3566. qglBlendFunc = dllBlendFunc;
  3567. qglCallList = dllCallList;
  3568. qglCallLists = dllCallLists;
  3569. qglClear = dllClear;
  3570. qglClearAccum = dllClearAccum;
  3571. qglClearColor = dllClearColor;
  3572. qglClearDepth = dllClearDepth;
  3573. qglClearIndex = dllClearIndex;
  3574. qglClearStencil = dllClearStencil;
  3575. qglClipPlane = dllClipPlane;
  3576. qglColor3b = dllColor3b;
  3577. qglColor3bv = dllColor3bv;
  3578. qglColor3d = dllColor3d;
  3579. qglColor3dv = dllColor3dv;
  3580. qglColor3f = dllColor3f;
  3581. qglColor3fv = dllColor3fv;
  3582. qglColor3i = dllColor3i;
  3583. qglColor3iv = dllColor3iv;
  3584. qglColor3s = dllColor3s;
  3585. qglColor3sv = dllColor3sv;
  3586. qglColor3ub = dllColor3ub;
  3587. qglColor3ubv = dllColor3ubv;
  3588. qglColor3ui = dllColor3ui;
  3589. qglColor3uiv = dllColor3uiv;
  3590. qglColor3us = dllColor3us;
  3591. qglColor3usv = dllColor3usv;
  3592. qglColor4b = dllColor4b;
  3593. qglColor4bv = dllColor4bv;
  3594. qglColor4d = dllColor4d;
  3595. qglColor4dv = dllColor4dv;
  3596. qglColor4f = dllColor4f;
  3597. qglColor4fv = dllColor4fv;
  3598. qglColor4i = dllColor4i;
  3599. qglColor4iv = dllColor4iv;
  3600. qglColor4s = dllColor4s;
  3601. qglColor4sv = dllColor4sv;
  3602. qglColor4ub = dllColor4ub;
  3603. qglColor4ubv = dllColor4ubv;
  3604. qglColor4ui = dllColor4ui;
  3605. qglColor4uiv = dllColor4uiv;
  3606. qglColor4us = dllColor4us;
  3607. qglColor4usv = dllColor4usv;
  3608. qglColorMask = dllColorMask;
  3609. qglColorMaterial = dllColorMaterial;
  3610. qglColorPointer = dllColorPointer;
  3611. qglCopyPixels = dllCopyPixels;
  3612. qglCopyTexImage1D = dllCopyTexImage1D;
  3613. qglCopyTexImage2D = dllCopyTexImage2D;
  3614. qglCopyTexSubImage1D = dllCopyTexSubImage1D;
  3615. qglCopyTexSubImage2D = dllCopyTexSubImage2D;
  3616. qglCullFace = dllCullFace;
  3617. qglDeleteLists = dllDeleteLists ;
  3618. qglDeleteTextures = dllDeleteTextures ;
  3619. qglDepthFunc = dllDepthFunc ;
  3620. qglDepthMask = dllDepthMask ;
  3621. qglDepthRange = dllDepthRange ;
  3622. qglDisable = dllDisable ;
  3623. qglDisableClientState = dllDisableClientState ;
  3624. qglDrawArrays = dllDrawArrays ;
  3625. qglDrawBuffer = dllDrawBuffer ;
  3626. qglDrawElements = dllDrawElements ;
  3627. qglDrawPixels = dllDrawPixels ;
  3628. qglEdgeFlag = dllEdgeFlag ;
  3629. qglEdgeFlagPointer = dllEdgeFlagPointer ;
  3630. qglEdgeFlagv = dllEdgeFlagv ;
  3631. qglEnable = dllEnable ;
  3632. qglEnableClientState = dllEnableClientState ;
  3633. qglEnd = dllEnd ;
  3634. qglEndList = dllEndList ;
  3635. qglEvalCoord1d = dllEvalCoord1d ;
  3636. qglEvalCoord1dv = dllEvalCoord1dv ;
  3637. qglEvalCoord1f = dllEvalCoord1f ;
  3638. qglEvalCoord1fv = dllEvalCoord1fv ;
  3639. qglEvalCoord2d = dllEvalCoord2d ;
  3640. qglEvalCoord2dv = dllEvalCoord2dv ;
  3641. qglEvalCoord2f = dllEvalCoord2f ;
  3642. qglEvalCoord2fv = dllEvalCoord2fv ;
  3643. qglEvalMesh1 = dllEvalMesh1 ;
  3644. qglEvalMesh2 = dllEvalMesh2 ;
  3645. qglEvalPoint1 = dllEvalPoint1 ;
  3646. qglEvalPoint2 = dllEvalPoint2 ;
  3647. qglFeedbackBuffer = dllFeedbackBuffer ;
  3648. qglFinish = dllFinish ;
  3649. qglFlush = dllFlush ;
  3650. qglFogf = dllFogf ;
  3651. qglFogfv = dllFogfv ;
  3652. qglFogi = dllFogi ;
  3653. qglFogiv = dllFogiv ;
  3654. qglFrontFace = dllFrontFace ;
  3655. qglFrustum = dllFrustum ;
  3656. qglGenLists = dllGenLists ;
  3657. qglGenTextures = dllGenTextures ;
  3658. qglGetBooleanv = dllGetBooleanv ;
  3659. qglGetClipPlane = dllGetClipPlane ;
  3660. qglGetDoublev = dllGetDoublev ;
  3661. qglGetError = dllGetError ;
  3662. qglGetFloatv = dllGetFloatv ;
  3663. qglGetIntegerv = dllGetIntegerv ;
  3664. qglGetLightfv = dllGetLightfv ;
  3665. qglGetLightiv = dllGetLightiv ;
  3666. qglGetMapdv = dllGetMapdv ;
  3667. qglGetMapfv = dllGetMapfv ;
  3668. qglGetMapiv = dllGetMapiv ;
  3669. qglGetMaterialfv = dllGetMaterialfv ;
  3670. qglGetMaterialiv = dllGetMaterialiv ;
  3671. qglGetPixelMapfv = dllGetPixelMapfv ;
  3672. qglGetPixelMapuiv = dllGetPixelMapuiv ;
  3673. qglGetPixelMapusv = dllGetPixelMapusv ;
  3674. qglGetPointerv = dllGetPointerv ;
  3675. qglGetPolygonStipple = dllGetPolygonStipple ;
  3676. qglGetString = dllGetString ;
  3677. qglGetTexEnvfv = dllGetTexEnvfv ;
  3678. qglGetTexEnviv = dllGetTexEnviv ;
  3679. qglGetTexGendv = dllGetTexGendv ;
  3680. qglGetTexGenfv = dllGetTexGenfv ;
  3681. qglGetTexGeniv = dllGetTexGeniv ;
  3682. qglGetTexImage = dllGetTexImage ;
  3683. qglGetTexLevelParameterfv = dllGetTexLevelParameterfv ;
  3684. qglGetTexLevelParameteriv = dllGetTexLevelParameteriv ;
  3685. qglGetTexParameterfv = dllGetTexParameterfv ;
  3686. qglGetTexParameteriv = dllGetTexParameteriv ;
  3687. qglHint = dllHint ;
  3688. qglIndexMask = dllIndexMask ;
  3689. qglIndexPointer = dllIndexPointer ;
  3690. qglIndexd = dllIndexd ;
  3691. qglIndexdv = dllIndexdv ;
  3692. qglIndexf = dllIndexf ;
  3693. qglIndexfv = dllIndexfv ;
  3694. qglIndexi = dllIndexi ;
  3695. qglIndexiv = dllIndexiv ;
  3696. qglIndexs = dllIndexs ;
  3697. qglIndexsv = dllIndexsv ;
  3698. qglIndexub = dllIndexub ;
  3699. qglIndexubv = dllIndexubv ;
  3700. qglInitNames = dllInitNames ;
  3701. qglInterleavedArrays = dllInterleavedArrays ;
  3702. qglIsEnabled = dllIsEnabled ;
  3703. qglIsList = dllIsList ;
  3704. qglIsTexture = dllIsTexture ;
  3705. qglLightModelf = dllLightModelf ;
  3706. qglLightModelfv = dllLightModelfv ;
  3707. qglLightModeli = dllLightModeli ;
  3708. qglLightModeliv = dllLightModeliv ;
  3709. qglLightf = dllLightf ;
  3710. qglLightfv = dllLightfv ;
  3711. qglLighti = dllLighti ;
  3712. qglLightiv = dllLightiv ;
  3713. qglLineStipple = dllLineStipple ;
  3714. qglLineWidth = dllLineWidth ;
  3715. qglListBase = dllListBase ;
  3716. qglLoadIdentity = dllLoadIdentity ;
  3717. qglLoadMatrixd = dllLoadMatrixd ;
  3718. qglLoadMatrixf = dllLoadMatrixf ;
  3719. qglLoadName = dllLoadName ;
  3720. qglLogicOp = dllLogicOp ;
  3721. qglMap1d = dllMap1d ;
  3722. qglMap1f = dllMap1f ;
  3723. qglMap2d = dllMap2d ;
  3724. qglMap2f = dllMap2f ;
  3725. qglMapGrid1d = dllMapGrid1d ;
  3726. qglMapGrid1f = dllMapGrid1f ;
  3727. qglMapGrid2d = dllMapGrid2d ;
  3728. qglMapGrid2f = dllMapGrid2f ;
  3729. qglMaterialf = dllMaterialf ;
  3730. qglMaterialfv = dllMaterialfv ;
  3731. qglMateriali = dllMateriali ;
  3732. qglMaterialiv = dllMaterialiv ;
  3733. qglMatrixMode = dllMatrixMode ;
  3734. qglMultMatrixd = dllMultMatrixd ;
  3735. qglMultMatrixf = dllMultMatrixf ;
  3736. qglNewList = dllNewList ;
  3737. qglNormal3b = dllNormal3b ;
  3738. qglNormal3bv = dllNormal3bv ;
  3739. qglNormal3d = dllNormal3d ;
  3740. qglNormal3dv = dllNormal3dv ;
  3741. qglNormal3f = dllNormal3f ;
  3742. qglNormal3fv = dllNormal3fv ;
  3743. qglNormal3i = dllNormal3i ;
  3744. qglNormal3iv = dllNormal3iv ;
  3745. qglNormal3s = dllNormal3s ;
  3746. qglNormal3sv = dllNormal3sv ;
  3747. qglNormalPointer = dllNormalPointer ;
  3748. qglOrtho = dllOrtho ;
  3749. qglPassThrough = dllPassThrough ;
  3750. qglPixelMapfv = dllPixelMapfv ;
  3751. qglPixelMapuiv = dllPixelMapuiv ;
  3752. qglPixelMapusv = dllPixelMapusv ;
  3753. qglPixelStoref = dllPixelStoref ;
  3754. qglPixelStorei = dllPixelStorei ;
  3755. qglPixelTransferf = dllPixelTransferf ;
  3756. qglPixelTransferi = dllPixelTransferi ;
  3757. qglPixelZoom = dllPixelZoom ;
  3758. qglPointSize = dllPointSize ;
  3759. qglPolygonMode = dllPolygonMode ;
  3760. qglPolygonOffset = dllPolygonOffset ;
  3761. qglPolygonStipple = dllPolygonStipple ;
  3762. qglPopAttrib = dllPopAttrib ;
  3763. qglPopClientAttrib = dllPopClientAttrib ;
  3764. qglPopMatrix = dllPopMatrix ;
  3765. qglPopName = dllPopName ;
  3766. qglPrioritizeTextures = dllPrioritizeTextures ;
  3767. qglPushAttrib = dllPushAttrib ;
  3768. qglPushClientAttrib = dllPushClientAttrib ;
  3769. qglPushMatrix = dllPushMatrix ;
  3770. qglPushName = dllPushName ;
  3771. qglRasterPos2d = dllRasterPos2d ;
  3772. qglRasterPos2dv = dllRasterPos2dv ;
  3773. qglRasterPos2f = dllRasterPos2f ;
  3774. qglRasterPos2fv = dllRasterPos2fv ;
  3775. qglRasterPos2i = dllRasterPos2i ;
  3776. qglRasterPos2iv = dllRasterPos2iv ;
  3777. qglRasterPos2s = dllRasterPos2s ;
  3778. qglRasterPos2sv = dllRasterPos2sv ;
  3779. qglRasterPos3d = dllRasterPos3d ;
  3780. qglRasterPos3dv = dllRasterPos3dv ;
  3781. qglRasterPos3f = dllRasterPos3f ;
  3782. qglRasterPos3fv = dllRasterPos3fv ;
  3783. qglRasterPos3i = dllRasterPos3i ;
  3784. qglRasterPos3iv = dllRasterPos3iv ;
  3785. qglRasterPos3s = dllRasterPos3s ;
  3786. qglRasterPos3sv = dllRasterPos3sv ;
  3787. qglRasterPos4d = dllRasterPos4d ;
  3788. qglRasterPos4dv = dllRasterPos4dv ;
  3789. qglRasterPos4f = dllRasterPos4f ;
  3790. qglRasterPos4fv = dllRasterPos4fv ;
  3791. qglRasterPos4i = dllRasterPos4i ;
  3792. qglRasterPos4iv = dllRasterPos4iv ;
  3793. qglRasterPos4s = dllRasterPos4s ;
  3794. qglRasterPos4sv = dllRasterPos4sv ;
  3795. qglReadBuffer = dllReadBuffer ;
  3796. qglReadPixels = dllReadPixels ;
  3797. qglRectd = dllRectd ;
  3798. qglRectdv = dllRectdv ;
  3799. qglRectf = dllRectf ;
  3800. qglRectfv = dllRectfv ;
  3801. qglRecti = dllRecti ;
  3802. qglRectiv = dllRectiv ;
  3803. qglRects = dllRects ;
  3804. qglRectsv = dllRectsv ;
  3805. qglRenderMode = dllRenderMode ;
  3806. qglRotated = dllRotated ;
  3807. qglRotatef = dllRotatef ;
  3808. qglScaled = dllScaled ;
  3809. qglScalef = dllScalef ;
  3810. qglScissor = dllScissor ;
  3811. qglSelectBuffer = dllSelectBuffer ;
  3812. qglShadeModel = dllShadeModel ;
  3813. qglStencilFunc = dllStencilFunc ;
  3814. qglStencilMask = dllStencilMask ;
  3815. qglStencilOp = dllStencilOp ;
  3816. qglTexCoord1d = dllTexCoord1d ;
  3817. qglTexCoord1dv = dllTexCoord1dv ;
  3818. qglTexCoord1f = dllTexCoord1f ;
  3819. qglTexCoord1fv = dllTexCoord1fv ;
  3820. qglTexCoord1i = dllTexCoord1i ;
  3821. qglTexCoord1iv = dllTexCoord1iv ;
  3822. qglTexCoord1s = dllTexCoord1s ;
  3823. qglTexCoord1sv = dllTexCoord1sv ;
  3824. qglTexCoord2d = dllTexCoord2d ;
  3825. qglTexCoord2dv = dllTexCoord2dv ;
  3826. qglTexCoord2f = dllTexCoord2f ;
  3827. qglTexCoord2fv = dllTexCoord2fv ;
  3828. qglTexCoord2i = dllTexCoord2i ;
  3829. qglTexCoord2iv = dllTexCoord2iv ;
  3830. qglTexCoord2s = dllTexCoord2s ;
  3831. qglTexCoord2sv = dllTexCoord2sv ;
  3832. qglTexCoord3d = dllTexCoord3d ;
  3833. qglTexCoord3dv = dllTexCoord3dv ;
  3834. qglTexCoord3f = dllTexCoord3f ;
  3835. qglTexCoord3fv = dllTexCoord3fv ;
  3836. qglTexCoord3i = dllTexCoord3i ;
  3837. qglTexCoord3iv = dllTexCoord3iv ;
  3838. qglTexCoord3s = dllTexCoord3s ;
  3839. qglTexCoord3sv = dllTexCoord3sv ;
  3840. qglTexCoord4d = dllTexCoord4d ;
  3841. qglTexCoord4dv = dllTexCoord4dv ;
  3842. qglTexCoord4f = dllTexCoord4f ;
  3843. qglTexCoord4fv = dllTexCoord4fv ;
  3844. qglTexCoord4i = dllTexCoord4i ;
  3845. qglTexCoord4iv = dllTexCoord4iv ;
  3846. qglTexCoord4s = dllTexCoord4s ;
  3847. qglTexCoord4sv = dllTexCoord4sv ;
  3848. qglTexCoordPointer = dllTexCoordPointer ;
  3849. qglTexEnvf = dllTexEnvf ;
  3850. qglTexEnvfv = dllTexEnvfv ;
  3851. qglTexEnvi = dllTexEnvi ;
  3852. qglTexEnviv = dllTexEnviv ;
  3853. qglTexGend = dllTexGend ;
  3854. qglTexGendv = dllTexGendv ;
  3855. qglTexGenf = dllTexGenf ;
  3856. qglTexGenfv = dllTexGenfv ;
  3857. qglTexGeni = dllTexGeni ;
  3858. qglTexGeniv = dllTexGeniv ;
  3859. qglTexImage1D = dllTexImage1D ;
  3860. qglTexImage2D = dllTexImage2D ;
  3861. qglTexParameterf = dllTexParameterf ;
  3862. qglTexParameterfv = dllTexParameterfv ;
  3863. qglTexParameteri = dllTexParameteri ;
  3864. qglTexParameteriv = dllTexParameteriv ;
  3865. qglTexSubImage1D = dllTexSubImage1D ;
  3866. qglTexSubImage2D = dllTexSubImage2D ;
  3867. qglTranslated = dllTranslated ;
  3868. qglTranslatef = dllTranslatef ;
  3869. qglVertex2d = dllVertex2d ;
  3870. qglVertex2dv = dllVertex2dv ;
  3871. qglVertex2f = dllVertex2f ;
  3872. qglVertex2fv = dllVertex2fv ;
  3873. qglVertex2i = dllVertex2i ;
  3874. qglVertex2iv = dllVertex2iv ;
  3875. qglVertex2s = dllVertex2s ;
  3876. qglVertex2sv = dllVertex2sv ;
  3877. qglVertex3d = dllVertex3d ;
  3878. qglVertex3dv = dllVertex3dv ;
  3879. qglVertex3f = dllVertex3f ;
  3880. qglVertex3fv = dllVertex3fv ;
  3881. qglVertex3i = dllVertex3i ;
  3882. qglVertex3iv = dllVertex3iv ;
  3883. qglVertex3s = dllVertex3s ;
  3884. qglVertex3sv = dllVertex3sv ;
  3885. qglVertex4d = dllVertex4d ;
  3886. qglVertex4dv = dllVertex4dv ;
  3887. qglVertex4f = dllVertex4f ;
  3888. qglVertex4fv = dllVertex4fv ;
  3889. qglVertex4i = dllVertex4i ;
  3890. qglVertex4iv = dllVertex4iv ;
  3891. qglVertex4s = dllVertex4s ;
  3892. qglVertex4sv = dllVertex4sv ;
  3893. qglVertexPointer = dllVertexPointer ;
  3894. qglViewport = dllViewport ;
  3895. }
  3896. }
  3897. void GLimp_LogNewFrame( void )
  3898. {
  3899. fprintf( glw_state.log_fp, "*** R_BeginFrame ***\n" );
  3900. }