glext.pp 474 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405
  1. {
  2. Adaption of the delphi3d.net OpenGL units to FreePascal
  3. Sebastian Guenther ([email protected]) in 2002
  4. These units are free to use
  5. }
  6. {$MACRO ON}
  7. {$MODE Delphi}
  8. {$IFDEF Windows}
  9. {$DEFINE extdecl:=stdcall }
  10. {$ELSE}
  11. {$DEFINE extdecl:=cdecl }
  12. {$ENDIF}
  13. {$IFNDEF FPC_DOTTEDUNITS}
  14. unit GLext;
  15. {$ENDIF FPC_DOTTEDUNITS}
  16. (**************************************************
  17. * OpenGL extension loading library *
  18. * Generated by MetaGLext, written by Tom Nuydens *
  19. * ([email protected] -- http://www.delphi3d.net *
  20. **************************************************)
  21. //*** Generated on 10/11/2002
  22. interface
  23. {$IFDEF FPC_DOTTEDUNITS}
  24. uses
  25. System.SysUtils,
  26. {$IFDEF Windows}
  27. WinApi.Windows,
  28. {$ELSE}
  29. System.DynLibs,
  30. {$ENDIF}
  31. Api.OpenGL.Gl;
  32. {$ELSE FPC_DOTTEDUNITS}
  33. uses
  34. SysUtils,
  35. {$IFDEF Windows}
  36. Windows,
  37. {$ELSE}
  38. dynlibs,
  39. {$ENDIF}
  40. GL;
  41. {$ENDIF FPC_DOTTEDUNITS}
  42. {$IFDEF Windows}
  43. { Declared in Windows unit as well in FPC; but declared here as well, to be
  44. fully compatible to upstream version - sg }
  45. function wglGetProcAddress(proc: PAnsiChar): Pointer; extdecl; external 'OpenGL32.dll';
  46. {$ELSE}
  47. function wglGetProcAddress(proc: PAnsiChar): Pointer;
  48. {$ENDIF}
  49. // Test if the given extension name is present in the given extension AnsiString.
  50. function glext_ExtensionSupported(const extension: AnsiString; const searchIn: AnsiString): Boolean;
  51. // Load the extension with the given name.
  52. function glext_LoadExtension(ext: AnsiString): Boolean;
  53. type
  54. GLcharARB = AnsiChar;
  55. TGLcharARB = GLcharARB;
  56. PGLcharARB = ^GLcharARB;
  57. PPGLchar = ^PGLchar;
  58. {$ifdef DARWIN}
  59. GLHandleARB = Pointer; // defined as void * in OpenGL.framework/glext.h
  60. {$else}
  61. GLhandleARB = Cardinal;
  62. {$endif}
  63. TGLhandleARB = GLhandleARB;
  64. PGLhandleARB = ^GLhandleARB;
  65. GLintptr = PtrInt;
  66. TGLintptr = GLintptr;
  67. PGLintptr = ^GLintptr;
  68. GLsizeiptr = PtrInt;
  69. TGLsizeiptr = GLsizeiptr;
  70. PGLsizeiptr = ^GLsizeiptr;
  71. GLchar = AnsiChar;
  72. TGLchar = GLchar;
  73. PGLchar = PAnsiChar;
  74. GLint64 = Int64;
  75. TGLint64 = GLint64;
  76. PGLint64 = ^GLint64;
  77. GLuint64 = QWord;
  78. TGLuint64 = GLuint64;
  79. PGLuint64 = ^GLuint64;
  80. //***** GL_version_1_2 *****//
  81. const
  82. GL_UNSIGNED_BYTE_3_3_2 = $8032;
  83. GL_UNSIGNED_SHORT_4_4_4_4 = $8033;
  84. GL_UNSIGNED_SHORT_5_5_5_1 = $8034;
  85. GL_UNSIGNED_INT_8_8_8_8 = $8035;
  86. GL_UNSIGNED_INT_10_10_10_2 = $8036;
  87. GL_RESCALE_NORMAL = $803A;
  88. GL_UNSIGNED_BYTE_2_3_3_REV = $8362;
  89. GL_UNSIGNED_SHORT_5_6_5 = $8363;
  90. GL_UNSIGNED_SHORT_5_6_5_REV = $8364;
  91. GL_UNSIGNED_SHORT_4_4_4_4_REV = $8365;
  92. GL_UNSIGNED_SHORT_1_5_5_5_REV = $8366;
  93. GL_UNSIGNED_INT_8_8_8_8_REV = $8367;
  94. GL_UNSIGNED_INT_2_10_10_10_REV = $8368;
  95. GL_BGR = $80E0;
  96. GL_BGRA = $80E1;
  97. GL_MAX_ELEMENTS_VERTICES = $80E8;
  98. GL_MAX_ELEMENTS_INDICES = $80E9;
  99. GL_CLAMP_TO_EDGE = $812F;
  100. GL_TEXTURE_MIN_LOD = $813A;
  101. GL_TEXTURE_MAX_LOD = $813B;
  102. GL_TEXTURE_BASE_LEVEL = $813C;
  103. GL_TEXTURE_MAX_LEVEL = $813D;
  104. GL_LIGHT_MODEL_COLOR_CONTROL = $81F8;
  105. GL_SINGLE_COLOR = $81F9;
  106. GL_SEPARATE_SPECULAR_COLOR = $81FA;
  107. GL_SMOOTH_POINT_SIZE_RANGE = $0B12;
  108. GL_SMOOTH_POINT_SIZE_GRANULARITY = $0B13;
  109. GL_SMOOTH_LINE_WIDTH_RANGE = $0B22;
  110. GL_SMOOTH_LINE_WIDTH_GRANULARITY = $0B23;
  111. GL_ALIASED_POINT_SIZE_RANGE = $846D;
  112. GL_ALIASED_LINE_WIDTH_RANGE = $846E;
  113. GL_PACK_SKIP_IMAGES = $806B;
  114. GL_PACK_IMAGE_HEIGHT = $806C;
  115. GL_UNPACK_SKIP_IMAGES = $806D;
  116. GL_UNPACK_IMAGE_HEIGHT = $806E;
  117. GL_TEXTURE_3D = $806F;
  118. GL_PROXY_TEXTURE_3D = $8070;
  119. GL_TEXTURE_DEPTH = $8071;
  120. GL_TEXTURE_WRAP_R = $8072;
  121. GL_MAX_3D_TEXTURE_SIZE = $8073;
  122. var
  123. glBlendColor: procedure(red: GLclampf; green: GLclampf; blue: GLclampf; alpha: GLclampf); extdecl;
  124. glBlendEquation: procedure(mode: GLenum); extdecl;
  125. glDrawRangeElements: procedure(mode: GLenum; start: GLuint; _end: GLuint; count: GLsizei; _type: GLenum; const indices: PGLvoid); extdecl;
  126. glColorTable: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const table: PGLvoid); extdecl;
  127. glColorTableParameterfv: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); extdecl;
  128. glColorTableParameteriv: procedure(target: GLenum; pname: GLenum; const params: PGLint); extdecl;
  129. glCopyColorTable: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei); extdecl;
  130. glGetColorTable: procedure(target: GLenum; format: GLenum; _type: GLenum; table: PGLvoid); extdecl;
  131. glGetColorTableParameterfv: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  132. glGetColorTableParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  133. glColorSubTable: procedure(target: GLenum; start: GLsizei; count: GLsizei; format: GLenum; _type: GLenum; const data: PGLvoid); extdecl;
  134. glCopyColorSubTable: procedure(target: GLenum; start: GLsizei; x: GLint; y: GLint; width: GLsizei); extdecl;
  135. glConvolutionFilter1D: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const image: PGLvoid); extdecl;
  136. glConvolutionFilter2D: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const image: PGLvoid); extdecl;
  137. glConvolutionParameterf: procedure(target: GLenum; pname: GLenum; params: GLfloat); extdecl;
  138. glConvolutionParameterfv: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); extdecl;
  139. glConvolutionParameteri: procedure(target: GLenum; pname: GLenum; params: GLint); extdecl;
  140. glConvolutionParameteriv: procedure(target: GLenum; pname: GLenum; const params: PGLint); extdecl;
  141. glCopyConvolutionFilter1D: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei); extdecl;
  142. glCopyConvolutionFilter2D: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl;
  143. glGetConvolutionFilter: procedure(target: GLenum; format: GLenum; _type: GLenum; image: PGLvoid); extdecl;
  144. glGetConvolutionParameterfv: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  145. glGetConvolutionParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  146. glGetSeparableFilter: procedure(target: GLenum; format: GLenum; _type: GLenum; row: PGLvoid; column: PGLvoid; span: PGLvoid); extdecl;
  147. glSeparableFilter2D: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const row: PGLvoid; const column: PGLvoid); extdecl;
  148. glGetHistogram: procedure(target: GLenum; reset: GLboolean; format: GLenum; _type: GLenum; values: PGLvoid); extdecl;
  149. glGetHistogramParameterfv: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  150. glGetHistogramParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  151. glGetMinmax: procedure(target: GLenum; reset: GLboolean; format: GLenum; _type: GLenum; values: PGLvoid); extdecl;
  152. glGetMinmaxParameterfv: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  153. glGetMinmaxParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  154. glHistogram: procedure(target: GLenum; width: GLsizei; internalformat: GLenum; sink: GLboolean); extdecl;
  155. glMinmax: procedure(target: GLenum; internalformat: GLenum; sink: GLboolean); extdecl;
  156. glResetHistogram: procedure(target: GLenum); extdecl;
  157. glResetMinmax: procedure(target: GLenum); extdecl;
  158. glTexImage3D: procedure(target: GLenum; level: GLint; internalformat: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; format: GLenum; _type: GLenum; const pixels: PGLvoid); extdecl;
  159. glTexSubImage3D: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); extdecl;
  160. glCopyTexSubImage3D: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl;
  161. function Load_GL_version_1_2: Boolean;
  162. //***** GL_ARB_imaging *****//
  163. const
  164. GL_CONSTANT_COLOR = $8001;
  165. GL_ONE_MINUS_CONSTANT_COLOR = $8002;
  166. GL_CONSTANT_ALPHA = $8003;
  167. GL_ONE_MINUS_CONSTANT_ALPHA = $8004;
  168. GL_BLEND_COLOR = $8005;
  169. GL_FUNC_ADD = $8006;
  170. GL_MIN = $8007;
  171. GL_MAX = $8008;
  172. GL_BLEND_EQUATION = $8009;
  173. GL_FUNC_SUBTRACT = $800A;
  174. GL_FUNC_REVERSE_SUBTRACT = $800B;
  175. GL_CONVOLUTION_1D = $8010;
  176. GL_CONVOLUTION_2D = $8011;
  177. GL_SEPARABLE_2D = $8012;
  178. GL_CONVOLUTION_BORDER_MODE = $8013;
  179. GL_CONVOLUTION_FILTER_SCALE = $8014;
  180. GL_CONVOLUTION_FILTER_BIAS = $8015;
  181. GL_REDUCE = $8016;
  182. GL_CONVOLUTION_FORMAT = $8017;
  183. GL_CONVOLUTION_WIDTH = $8018;
  184. GL_CONVOLUTION_HEIGHT = $8019;
  185. GL_MAX_CONVOLUTION_WIDTH = $801A;
  186. GL_MAX_CONVOLUTION_HEIGHT = $801B;
  187. GL_POST_CONVOLUTION_RED_SCALE = $801C;
  188. GL_POST_CONVOLUTION_GREEN_SCALE = $801D;
  189. GL_POST_CONVOLUTION_BLUE_SCALE = $801E;
  190. GL_POST_CONVOLUTION_ALPHA_SCALE = $801F;
  191. GL_POST_CONVOLUTION_RED_BIAS = $8020;
  192. GL_POST_CONVOLUTION_GREEN_BIAS = $8021;
  193. GL_POST_CONVOLUTION_BLUE_BIAS = $8022;
  194. GL_POST_CONVOLUTION_ALPHA_BIAS = $8023;
  195. GL_HISTOGRAM = $8024;
  196. GL_PROXY_HISTOGRAM = $8025;
  197. GL_HISTOGRAM_WIDTH = $8026;
  198. GL_HISTOGRAM_FORMAT = $8027;
  199. GL_HISTOGRAM_RED_SIZE = $8028;
  200. GL_HISTOGRAM_GREEN_SIZE = $8029;
  201. GL_HISTOGRAM_BLUE_SIZE = $802A;
  202. GL_HISTOGRAM_ALPHA_SIZE = $802B;
  203. GL_HISTOGRAM_LUMINANCE_SIZE = $802C;
  204. GL_HISTOGRAM_SINK = $802D;
  205. GL_MINMAX = $802E;
  206. GL_MINMAX_FORMAT = $802F;
  207. GL_MINMAX_SINK = $8030;
  208. GL_TABLE_TOO_LARGE = $8031;
  209. GL_COLOR_MATRIX = $80B1;
  210. GL_COLOR_MATRIX_STACK_DEPTH = $80B2;
  211. GL_MAX_COLOR_MATRIX_STACK_DEPTH = $80B3;
  212. GL_POST_COLOR_MATRIX_RED_SCALE = $80B4;
  213. GL_POST_COLOR_MATRIX_GREEN_SCALE = $80B5;
  214. GL_POST_COLOR_MATRIX_BLUE_SCALE = $80B6;
  215. GL_POST_COLOR_MATRIX_ALPHA_SCALE = $80B7;
  216. GL_POST_COLOR_MATRIX_RED_BIAS = $80B8;
  217. GL_POST_COLOR_MATRIX_GREEN_BIAS = $80B9;
  218. GL_POST_COLOR_MATRIX_BLUE_BIAS = $80BA;
  219. GL_POST_COLOR_MATIX_ALPHA_BIAS = $80BB;
  220. GL_COLOR_TABLE = $80D0;
  221. GL_POST_CONVOLUTION_COLOR_TABLE = $80D1;
  222. GL_POST_COLOR_MATRIX_COLOR_TABLE = $80D2;
  223. GL_PROXY_COLOR_TABLE = $80D3;
  224. GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = $80D4;
  225. GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = $80D5;
  226. GL_COLOR_TABLE_SCALE = $80D6;
  227. GL_COLOR_TABLE_BIAS = $80D7;
  228. GL_COLOR_TABLE_FORMAT = $80D8;
  229. GL_COLOR_TABLE_WIDTH = $80D9;
  230. GL_COLOR_TABLE_RED_SIZE = $80DA;
  231. GL_COLOR_TABLE_GREEN_SIZE = $80DB;
  232. GL_COLOR_TABLE_BLUE_SIZE = $80DC;
  233. GL_COLOR_TABLE_ALPHA_SIZE = $80DD;
  234. GL_COLOR_TABLE_LUMINANCE_SIZE = $80DE;
  235. GL_COLOR_TABLE_INTENSITY_SIZE = $80DF;
  236. GL_IGNORE_BORDER = $8150;
  237. GL_CONSTANT_BORDER = $8151;
  238. GL_WRAP_BORDER = $8152;
  239. GL_REPLICATE_BORDER = $8153;
  240. GL_CONVOLUTION_BORDER_COLOR = $8154;
  241. function Load_GL_ARB_imaging: Boolean;
  242. //***** GL_version_1_3 *****//
  243. const
  244. GL_TEXTURE0 = $84C0;
  245. GL_TEXTURE1 = $84C1;
  246. GL_TEXTURE2 = $84C2;
  247. GL_TEXTURE3 = $84C3;
  248. GL_TEXTURE4 = $84C4;
  249. GL_TEXTURE5 = $84C5;
  250. GL_TEXTURE6 = $84C6;
  251. GL_TEXTURE7 = $84C7;
  252. GL_TEXTURE8 = $84C8;
  253. GL_TEXTURE9 = $84C9;
  254. GL_TEXTURE10 = $84CA;
  255. GL_TEXTURE11 = $84CB;
  256. GL_TEXTURE12 = $84CC;
  257. GL_TEXTURE13 = $84CD;
  258. GL_TEXTURE14 = $84CE;
  259. GL_TEXTURE15 = $84CF;
  260. GL_TEXTURE16 = $84D0;
  261. GL_TEXTURE17 = $84D1;
  262. GL_TEXTURE18 = $84D2;
  263. GL_TEXTURE19 = $84D3;
  264. GL_TEXTURE20 = $84D4;
  265. GL_TEXTURE21 = $84D5;
  266. GL_TEXTURE22 = $84D6;
  267. GL_TEXTURE23 = $84D7;
  268. GL_TEXTURE24 = $84D8;
  269. GL_TEXTURE25 = $84D9;
  270. GL_TEXTURE26 = $84DA;
  271. GL_TEXTURE27 = $84DB;
  272. GL_TEXTURE28 = $84DC;
  273. GL_TEXTURE29 = $84DD;
  274. GL_TEXTURE30 = $84DE;
  275. GL_TEXTURE31 = $84DF;
  276. GL_ACTIVE_TEXTURE = $84E0;
  277. GL_CLIENT_ACTIVE_TEXTURE = $84E1;
  278. GL_MAX_TEXTURE_UNITS = $84E2;
  279. GL_TRANSPOSE_MODELVIEW_MATRIX = $84E3;
  280. GL_TRANSPOSE_PROJECTION_MATRIX = $84E4;
  281. GL_TRANSPOSE_TEXTURE_MATRIX = $84E5;
  282. GL_TRANSPOSE_COLOR_MATRIX = $84E6;
  283. GL_MULTISAMPLE = $809D;
  284. GL_SAMPLE_ALPHA_TO_COVERAGE = $809E;
  285. GL_SAMPLE_ALPHA_TO_ONE = $809F;
  286. GL_SAMPLE_COVERAGE = $80A0;
  287. GL_SAMPLE_BUFFERS = $80A8;
  288. GL_SAMPLES = $80A9;
  289. GL_SAMPLE_COVERAGE_VALUE = $80AA;
  290. GL_SAMPLE_COVERAGE_INVERT = $80AB;
  291. GL_MULTISAMPLE_BIT = $20000000;
  292. GL_NORMAL_MAP = $8511;
  293. GL_REFLECTION_MAP = $8512;
  294. GL_TEXTURE_CUBE_MAP = $8513;
  295. GL_TEXTURE_BINDING_CUBE_MAP = $8514;
  296. GL_TEXTURE_CUBE_MAP_POSITIVE_X = $8515;
  297. GL_TEXTURE_CUBE_MAP_NEGATIVE_X = $8516;
  298. GL_TEXTURE_CUBE_MAP_POSITIVE_Y = $8517;
  299. GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = $8518;
  300. GL_TEXTURE_CUBE_MAP_POSITIVE_Z = $8519;
  301. GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = $851A;
  302. GL_PROXY_TEXTURE_CUBE_MAP = $851B;
  303. GL_MAX_CUBE_MAP_TEXTURE_SIZE = $851C;
  304. GL_COMPRESSED_ALPHA = $84E9;
  305. GL_COMPRESSED_LUMINANCE = $84EA;
  306. GL_COMPRESSED_LUMINANCE_ALPHA = $84EB;
  307. GL_COMPRESSED_INTENSITY = $84EC;
  308. GL_COMPRESSED_RGB = $84ED;
  309. GL_COMPRESSED_RGBA = $84EE;
  310. GL_TEXTURE_COMPRESSION_HINT = $84EF;
  311. GL_TEXTURE_COMPRESSED_IMAGE_SIZE = $86A0;
  312. GL_TEXTURE_COMPRESSED = $86A1;
  313. GL_NUM_COMPRESSED_TEXTURE_FORMATS = $86A2;
  314. GL_COMPRESSED_TEXTURE_FORMATS = $86A3;
  315. GL_CLAMP_TO_BORDER = $812D;
  316. GL_CLAMP_TO_BORDER_SGIS = $812D;
  317. GL_COMBINE = $8570;
  318. GL_COMBINE_RGB = $8571;
  319. GL_COMBINE_ALPHA = $8572;
  320. GL_SOURCE0_RGB = $8580;
  321. GL_SOURCE1_RGB = $8581;
  322. GL_SOURCE2_RGB = $8582;
  323. GL_SOURCE0_ALPHA = $8588;
  324. GL_SOURCE1_ALPHA = $8589;
  325. GL_SOURCE2_ALPHA = $858A;
  326. GL_OPERAND0_RGB = $8590;
  327. GL_OPERAND1_RGB = $8591;
  328. GL_OPERAND2_RGB = $8592;
  329. GL_OPERAND0_ALPHA = $8598;
  330. GL_OPERAND1_ALPHA = $8599;
  331. GL_OPERAND2_ALPHA = $859A;
  332. GL_RGB_SCALE = $8573;
  333. GL_ADD_SIGNED = $8574;
  334. GL_INTERPOLATE = $8575;
  335. GL_SUBTRACT = $84E7;
  336. GL_CONSTANT = $8576;
  337. GL_PRIMARY_COLOR = $8577;
  338. GL_PREVIOUS = $8578;
  339. GL_DOT3_RGB = $86AE;
  340. GL_DOT3_RGBA = $86AF;
  341. var
  342. glActiveTexture: procedure(texture: GLenum); extdecl;
  343. glClientActiveTexture: procedure(texture: GLenum); extdecl;
  344. glMultiTexCoord1d: procedure(target: GLenum; s: GLdouble); extdecl;
  345. glMultiTexCoord1dv: procedure(target: GLenum; const v: PGLdouble); extdecl;
  346. glMultiTexCoord1f: procedure(target: GLenum; s: GLfloat); extdecl;
  347. glMultiTexCoord1fv: procedure(target: GLenum; const v: PGLfloat); extdecl;
  348. glMultiTexCoord1i: procedure(target: GLenum; s: GLint); extdecl;
  349. glMultiTexCoord1iv: procedure(target: GLenum; const v: PGLint); extdecl;
  350. glMultiTexCoord1s: procedure(target: GLenum; s: GLshort); extdecl;
  351. glMultiTexCoord1sv: procedure(target: GLenum; const v: PGLshort); extdecl;
  352. glMultiTexCoord2d: procedure(target: GLenum; s: GLdouble; t: GLdouble); extdecl;
  353. glMultiTexCoord2dv: procedure(target: GLenum; const v: PGLdouble); extdecl;
  354. glMultiTexCoord2f: procedure(target: GLenum; s: GLfloat; t: GLfloat); extdecl;
  355. glMultiTexCoord2fv: procedure(target: GLenum; const v: PGLfloat); extdecl;
  356. glMultiTexCoord2i: procedure(target: GLenum; s: GLint; t: GLint); extdecl;
  357. glMultiTexCoord2iv: procedure(target: GLenum; const v: PGLint); extdecl;
  358. glMultiTexCoord2s: procedure(target: GLenum; s: GLshort; t: GLshort); extdecl;
  359. glMultiTexCoord2sv: procedure(target: GLenum; const v: PGLshort); extdecl;
  360. glMultiTexCoord3d: procedure(target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble); extdecl;
  361. glMultiTexCoord3dv: procedure(target: GLenum; const v: PGLdouble); extdecl;
  362. glMultiTexCoord3f: procedure(target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat); extdecl;
  363. glMultiTexCoord3fv: procedure(target: GLenum; const v: PGLfloat); extdecl;
  364. glMultiTexCoord3i: procedure(target: GLenum; s: GLint; t: GLint; r: GLint); extdecl;
  365. glMultiTexCoord3iv: procedure(target: GLenum; const v: PGLint); extdecl;
  366. glMultiTexCoord3s: procedure(target: GLenum; s: GLshort; t: GLshort; r: GLshort); extdecl;
  367. glMultiTexCoord3sv: procedure(target: GLenum; const v: PGLshort); extdecl;
  368. glMultiTexCoord4d: procedure(target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble; q: GLdouble); extdecl;
  369. glMultiTexCoord4dv: procedure(target: GLenum; const v: PGLdouble); extdecl;
  370. glMultiTexCoord4f: procedure(target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat; q: GLfloat); extdecl;
  371. glMultiTexCoord4fv: procedure(target: GLenum; const v: PGLfloat); extdecl;
  372. glMultiTexCoord4i: procedure(target: GLenum; s: GLint; t: GLint; r: GLint; q: GLint); extdecl;
  373. glMultiTexCoord4iv: procedure(target: GLenum; const v: PGLint); extdecl;
  374. glMultiTexCoord4s: procedure(target: GLenum; s: GLshort; t: GLshort; r: GLshort; q: GLshort); extdecl;
  375. glMultiTexCoord4sv: procedure(target: GLenum; const v: PGLshort); extdecl;
  376. glLoadTransposeMatrixf: procedure(const m: PGLfloat); extdecl;
  377. glLoadTransposeMatrixd: procedure(const m: PGLdouble); extdecl;
  378. glMultTransposeMatrixf: procedure(const m: PGLfloat); extdecl;
  379. glMultTransposeMatrixd: procedure(const m: PGLdouble); extdecl;
  380. glSampleCoverage: procedure(value: GLclampf; invert: GLboolean); extdecl;
  381. glCompressedTexImage3D: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); extdecl;
  382. glCompressedTexImage2D: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); extdecl;
  383. glCompressedTexImage1D: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); extdecl;
  384. glCompressedTexSubImage3D: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); extdecl;
  385. glCompressedTexSubImage2D: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); extdecl;
  386. glCompressedTexSubImage1D: procedure(target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); extdecl;
  387. glGetCompressedTexImage: procedure(target: GLenum; level: GLint; img: PGLvoid); extdecl;
  388. function Load_GL_version_1_3: Boolean;
  389. //***** GL_ARB_multitexture *****//
  390. const
  391. GL_TEXTURE0_ARB = $84C0;
  392. GL_TEXTURE1_ARB = $84C1;
  393. GL_TEXTURE2_ARB = $84C2;
  394. GL_TEXTURE3_ARB = $84C3;
  395. GL_TEXTURE4_ARB = $84C4;
  396. GL_TEXTURE5_ARB = $84C5;
  397. GL_TEXTURE6_ARB = $84C6;
  398. GL_TEXTURE7_ARB = $84C7;
  399. GL_TEXTURE8_ARB = $84C8;
  400. GL_TEXTURE9_ARB = $84C9;
  401. GL_TEXTURE10_ARB = $84CA;
  402. GL_TEXTURE11_ARB = $84CB;
  403. GL_TEXTURE12_ARB = $84CC;
  404. GL_TEXTURE13_ARB = $84CD;
  405. GL_TEXTURE14_ARB = $84CE;
  406. GL_TEXTURE15_ARB = $84CF;
  407. GL_TEXTURE16_ARB = $84D0;
  408. GL_TEXTURE17_ARB = $84D1;
  409. GL_TEXTURE18_ARB = $84D2;
  410. GL_TEXTURE19_ARB = $84D3;
  411. GL_TEXTURE20_ARB = $84D4;
  412. GL_TEXTURE21_ARB = $84D5;
  413. GL_TEXTURE22_ARB = $84D6;
  414. GL_TEXTURE23_ARB = $84D7;
  415. GL_TEXTURE24_ARB = $84D8;
  416. GL_TEXTURE25_ARB = $84D9;
  417. GL_TEXTURE26_ARB = $84DA;
  418. GL_TEXTURE27_ARB = $84DB;
  419. GL_TEXTURE28_ARB = $84DC;
  420. GL_TEXTURE29_ARB = $84DD;
  421. GL_TEXTURE30_ARB = $84DE;
  422. GL_TEXTURE31_ARB = $84DF;
  423. GL_ACTIVE_TEXTURE_ARB = $84E0;
  424. GL_CLIENT_ACTIVE_TEXTURE_ARB = $84E1;
  425. GL_MAX_TEXTURE_UNITS_ARB = $84E2;
  426. var
  427. glActiveTextureARB: procedure(texture: GLenum); extdecl;
  428. glClientActiveTextureARB: procedure(texture: GLenum); extdecl;
  429. glMultiTexCoord1dARB: procedure(target: GLenum; s: GLdouble); extdecl;
  430. glMultiTexCoord1dvARB: procedure(target: GLenum; const v: PGLdouble); extdecl;
  431. glMultiTexCoord1fARB: procedure(target: GLenum; s: GLfloat); extdecl;
  432. glMultiTexCoord1fvARB: procedure(target: GLenum; const v: PGLfloat); extdecl;
  433. glMultiTexCoord1iARB: procedure(target: GLenum; s: GLint); extdecl;
  434. glMultiTexCoord1ivARB: procedure(target: GLenum; const v: PGLint); extdecl;
  435. glMultiTexCoord1sARB: procedure(target: GLenum; s: GLshort); extdecl;
  436. glMultiTexCoord1svARB: procedure(target: GLenum; const v: PGLshort); extdecl;
  437. glMultiTexCoord2dARB: procedure(target: GLenum; s: GLdouble; t: GLdouble); extdecl;
  438. glMultiTexCoord2dvARB: procedure(target: GLenum; const v: PGLdouble); extdecl;
  439. glMultiTexCoord2fARB: procedure(target: GLenum; s: GLfloat; t: GLfloat); extdecl;
  440. glMultiTexCoord2fvARB: procedure(target: GLenum; const v: PGLfloat); extdecl;
  441. glMultiTexCoord2iARB: procedure(target: GLenum; s: GLint; t: GLint); extdecl;
  442. glMultiTexCoord2ivARB: procedure(target: GLenum; const v: PGLint); extdecl;
  443. glMultiTexCoord2sARB: procedure(target: GLenum; s: GLshort; t: GLshort); extdecl;
  444. glMultiTexCoord2svARB: procedure(target: GLenum; const v: PGLshort); extdecl;
  445. glMultiTexCoord3dARB: procedure(target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble); extdecl;
  446. glMultiTexCoord3dvARB: procedure(target: GLenum; const v: PGLdouble); extdecl;
  447. glMultiTexCoord3fARB: procedure(target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat); extdecl;
  448. glMultiTexCoord3fvARB: procedure(target: GLenum; const v: PGLfloat); extdecl;
  449. glMultiTexCoord3iARB: procedure(target: GLenum; s: GLint; t: GLint; r: GLint); extdecl;
  450. glMultiTexCoord3ivARB: procedure(target: GLenum; const v: PGLint); extdecl;
  451. glMultiTexCoord3sARB: procedure(target: GLenum; s: GLshort; t: GLshort; r: GLshort); extdecl;
  452. glMultiTexCoord3svARB: procedure(target: GLenum; const v: PGLshort); extdecl;
  453. glMultiTexCoord4dARB: procedure(target: GLenum; s: GLdouble; t: GLdouble; r: GLdouble; q: GLdouble); extdecl;
  454. glMultiTexCoord4dvARB: procedure(target: GLenum; const v: PGLdouble); extdecl;
  455. glMultiTexCoord4fARB: procedure(target: GLenum; s: GLfloat; t: GLfloat; r: GLfloat; q: GLfloat); extdecl;
  456. glMultiTexCoord4fvARB: procedure(target: GLenum; const v: PGLfloat); extdecl;
  457. glMultiTexCoord4iARB: procedure(target: GLenum; s: GLint; t: GLint; r: GLint; q: GLint); extdecl;
  458. glMultiTexCoord4ivARB: procedure(target: GLenum; const v: PGLint); extdecl;
  459. glMultiTexCoord4sARB: procedure(target: GLenum; s: GLshort; t: GLshort; r: GLshort; q: GLshort); extdecl;
  460. glMultiTexCoord4svARB: procedure(target: GLenum; const v: PGLshort); extdecl;
  461. function Load_GL_ARB_multitexture: Boolean;
  462. //***** GL_ARB_transpose_matrix *****//
  463. const
  464. GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = $84E3;
  465. GL_TRANSPOSE_PROJECTION_MATRIX_ARB = $84E4;
  466. GL_TRANSPOSE_TEXTURE_MATRIX_ARB = $84E5;
  467. GL_TRANSPOSE_COLOR_MATRIX_ARB = $84E6;
  468. var
  469. glLoadTransposeMatrixfARB: procedure(m: PGLfloat); extdecl;
  470. glLoadTransposeMatrixdARB: procedure(m: PGLdouble); extdecl;
  471. glMultTransposeMatrixfARB: procedure(m: PGLfloat); extdecl;
  472. glMultTransposeMatrixdARB: procedure(m: PGLdouble); extdecl;
  473. function Load_GL_ARB_transpose_matrix: Boolean;
  474. //***** GL_ARB_multisample *****//
  475. const
  476. WGL_SAMPLE_BUFFERS_ARB = $2041;
  477. WGL_SAMPLES_ARB = $2042;
  478. GL_MULTISAMPLE_ARB = $809D;
  479. GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = $809E;
  480. GL_SAMPLE_ALPHA_TO_ONE_ARB = $809F;
  481. GL_SAMPLE_COVERAGE_ARB = $80A0;
  482. GL_MULTISAMPLE_BIT_ARB = $20000000;
  483. GL_SAMPLE_BUFFERS_ARB = $80A8;
  484. GL_SAMPLES_ARB = $80A9;
  485. GL_SAMPLE_COVERAGE_VALUE_ARB = $80AA;
  486. GL_SAMPLE_COVERAGE_INVERT_ARB = $80AB;
  487. var
  488. glSampleCoverageARB: procedure(value: GLclampf; invert: GLboolean); extdecl;
  489. function Load_GL_ARB_multisample: Boolean;
  490. //***** GL_ARB_texture_env_add *****//
  491. function Load_GL_ARB_texture_env_add: Boolean;
  492. {$IFDEF Windows}
  493. //***** WGL_ARB_extensions_string *****//
  494. var
  495. wglGetExtensionsStringARB: function(hdc: HDC): PAnsiChar; extdecl;
  496. function Load_WGL_ARB_extensions_string: Boolean;
  497. //***** WGL_ARB_buffer_region *****//
  498. const
  499. WGL_FRONT_COLOR_BUFFER_BIT_ARB = $0001;
  500. WGL_BACK_COLOR_BUFFER_BIT_ARB = $0002;
  501. WGL_DEPTH_BUFFER_BIT_ARB = $0004;
  502. WGL_STENCIL_BUFFER_BIT_ARB = $0008;
  503. var
  504. wglCreateBufferRegionARB: function(hDC: HDC; iLayerPlane: GLint; uType: GLuint): THandle; extdecl;
  505. wglDeleteBufferRegionARB: procedure(hRegion: THandle); extdecl;
  506. wglSaveBufferRegionARB: function(hRegion: THandle; x: GLint; y: GLint; width: GLint; height: GLint): BOOL; extdecl;
  507. wglRestoreBufferRegionARB: function(hRegion: THandle; x: GLint; y: GLint; width: GLint; height: GLint; xSrc: GLint; ySrc: GLint): BOOL; extdecl;
  508. function Load_WGL_ARB_buffer_region: Boolean;
  509. {$ENDIF}
  510. //***** GL_ARB_texture_cube_map *****//
  511. const
  512. GL_NORMAL_MAP_ARB = $8511;
  513. GL_REFLECTION_MAP_ARB = $8512;
  514. GL_TEXTURE_CUBE_MAP_ARB = $8513;
  515. GL_TEXTURE_BINDING_CUBE_MAP_ARB = $8514;
  516. GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $8515;
  517. GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $8516;
  518. GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $8517;
  519. GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $8518;
  520. GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $8519;
  521. GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $851A;
  522. GL_PROXY_TEXTURE_CUBE_MAP_ARB = $851B;
  523. GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = $851C;
  524. function Load_GL_ARB_texture_cube_map: Boolean;
  525. //***** GL_ARB_depth_texture *****//
  526. const
  527. GL_DEPTH_COMPONENT16_ARB = $81A5;
  528. GL_DEPTH_COMPONENT24_ARB = $81A6;
  529. GL_DEPTH_COMPONENT32_ARB = $81A7;
  530. GL_TEXTURE_DEPTH_SIZE_ARB = $884A;
  531. GL_DEPTH_TEXTURE_MODE_ARB = $884B;
  532. function Load_GL_ARB_depth_texture: Boolean;
  533. //***** GL_ARB_point_parameters *****//
  534. const
  535. GL_POINT_SIZE_MIN_ARB = $8126;
  536. GL_POINT_SIZE_MAX_ARB = $8127;
  537. GL_POINT_FADE_THRESHOLD_SIZE_ARB = $8128;
  538. GL_POINT_DISTANCE_ATTENUATION_ARB = $8129;
  539. var
  540. glPointParameterfARB: procedure(pname: GLenum; param: GLfloat); extdecl;
  541. glPointParameterfvARB: procedure(pname: GLenum; params: PGLfloat); extdecl;
  542. function Load_GL_ARB_point_parameters: Boolean;
  543. //***** GL_ARB_shadow *****//
  544. const
  545. GL_TEXTURE_COMPARE_MODE_ARB = $884C;
  546. GL_TEXTURE_COMPARE_FUNC_ARB = $884D;
  547. GL_COMPARE_R_TO_TEXTURE_ARB = $884E;
  548. function Load_GL_ARB_shadow: Boolean;
  549. //***** GL_ARB_shadow_ambient *****//
  550. const
  551. GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = $80BF;
  552. function Load_GL_ARB_shadow_ambient: Boolean;
  553. //***** GL_ARB_texture_border_clamp *****//
  554. const
  555. GL_CLAMP_TO_BORDER_ARB = $812D;
  556. function Load_GL_ARB_texture_border_clamp: Boolean;
  557. //***** GL_ARB_texture_compression *****//
  558. const
  559. GL_COMPRESSED_ALPHA_ARB = $84E9;
  560. GL_COMPRESSED_LUMINANCE_ARB = $84EA;
  561. GL_COMPRESSED_LUMINANCE_ALPHA_ARB = $84EB;
  562. GL_COMPRESSED_INTENSITY_ARB = $84EC;
  563. GL_COMPRESSED_RGB_ARB = $84ED;
  564. GL_COMPRESSED_RGBA_ARB = $84EE;
  565. GL_TEXTURE_COMPRESSION_HINT_ARB = $84EF;
  566. GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = $86A0;
  567. GL_TEXTURE_COMPRESSED_ARB = $86A1;
  568. GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = $86A2;
  569. GL_COMPRESSED_TEXTURE_FORMATS_ARB = $86A3;
  570. var
  571. glCompressedTexImage3DARB: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); extdecl;
  572. glCompressedTexImage2DARB: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); extdecl;
  573. glCompressedTexImage1DARB: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; border: GLint; imageSize: GLsizei; const data: PGLvoid); extdecl;
  574. glCompressedTexSubImage3DARB: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); extdecl;
  575. glCompressedTexSubImage2DARB: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); extdecl;
  576. glCompressedTexSubImage1DARB: procedure(target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; imageSize: GLsizei; const data: PGLvoid); extdecl;
  577. glGetCompressedTexImageARB: procedure(target: GLenum; lod: GLint; img: PGLvoid); extdecl;
  578. function Load_GL_ARB_texture_compression: Boolean;
  579. //***** GL_ARB_texture_env_combine *****//
  580. const
  581. GL_COMBINE_ARB = $8570;
  582. GL_COMBINE_RGB_ARB = $8571;
  583. GL_COMBINE_ALPHA_ARB = $8572;
  584. GL_SOURCE0_RGB_ARB = $8580;
  585. GL_SOURCE1_RGB_ARB = $8581;
  586. GL_SOURCE2_RGB_ARB = $8582;
  587. GL_SOURCE0_ALPHA_ARB = $8588;
  588. GL_SOURCE1_ALPHA_ARB = $8589;
  589. GL_SOURCE2_ALPHA_ARB = $858A;
  590. GL_OPERAND0_RGB_ARB = $8590;
  591. GL_OPERAND1_RGB_ARB = $8591;
  592. GL_OPERAND2_RGB_ARB = $8592;
  593. GL_OPERAND0_ALPHA_ARB = $8598;
  594. GL_OPERAND1_ALPHA_ARB = $8599;
  595. GL_OPERAND2_ALPHA_ARB = $859A;
  596. GL_RGB_SCALE_ARB = $8573;
  597. GL_ADD_SIGNED_ARB = $8574;
  598. GL_INTERPOLATE_ARB = $8575;
  599. GL_SUBTRACT_ARB = $84E7;
  600. GL_CONSTANT_ARB = $8576;
  601. GL_PRIMARY_COLOR_ARB = $8577;
  602. GL_PREVIOUS_ARB = $8578;
  603. function Load_GL_ARB_texture_env_combine: Boolean;
  604. //***** GL_ARB_texture_env_crossbar *****//
  605. function Load_GL_ARB_texture_env_crossbar: Boolean;
  606. //***** GL_ARB_texture_env_dot3 *****//
  607. const
  608. GL_DOT3_RGB_ARB = $86AE;
  609. GL_DOT3_RGBA_ARB = $86AF;
  610. function Load_GL_ARB_texture_env_dot3: Boolean;
  611. //***** GL_ARB_texture_mirrored_repeat *****//
  612. const
  613. GL_MIRRORED_REPEAT_ARB = $8370;
  614. function Load_GL_ARB_texture_mirrored_repeat: Boolean;
  615. //***** GL_ARB_vertex_blend *****//
  616. const
  617. GL_MAX_VERTEX_UNITS_ARB = $86A4;
  618. GL_ACTIVE_VERTEX_UNITS_ARB = $86A5;
  619. GL_WEIGHT_SUM_UNITY_ARB = $86A6;
  620. GL_VERTEX_BLEND_ARB = $86A7;
  621. GL_MODELVIEW0_ARB = $1700;
  622. GL_MODELVIEW1_ARB = $850A;
  623. GL_MODELVIEW2_ARB = $8722;
  624. GL_MODELVIEW3_ARB = $8723;
  625. GL_MODELVIEW4_ARB = $8724;
  626. GL_MODELVIEW5_ARB = $8725;
  627. GL_MODELVIEW6_ARB = $8726;
  628. GL_MODELVIEW7_ARB = $8727;
  629. GL_MODELVIEW8_ARB = $8728;
  630. GL_MODELVIEW9_ARB = $8729;
  631. GL_MODELVIEW10_ARB = $872A;
  632. GL_MODELVIEW11_ARB = $872B;
  633. GL_MODELVIEW12_ARB = $872C;
  634. GL_MODELVIEW13_ARB = $872D;
  635. GL_MODELVIEW14_ARB = $872E;
  636. GL_MODELVIEW15_ARB = $872F;
  637. GL_MODELVIEW16_ARB = $8730;
  638. GL_MODELVIEW17_ARB = $8731;
  639. GL_MODELVIEW18_ARB = $8732;
  640. GL_MODELVIEW19_ARB = $8733;
  641. GL_MODELVIEW20_ARB = $8734;
  642. GL_MODELVIEW21_ARB = $8735;
  643. GL_MODELVIEW22_ARB = $8736;
  644. GL_MODELVIEW23_ARB = $8737;
  645. GL_MODELVIEW24_ARB = $8738;
  646. GL_MODELVIEW25_ARB = $8739;
  647. GL_MODELVIEW26_ARB = $873A;
  648. GL_MODELVIEW27_ARB = $873B;
  649. GL_MODELVIEW28_ARB = $873C;
  650. GL_MODELVIEW29_ARB = $873D;
  651. GL_MODELVIEW30_ARB = $873E;
  652. GL_MODELVIEW31_ARB = $873F;
  653. GL_CURRENT_WEIGHT_ARB = $86A8;
  654. GL_WEIGHT_ARRAY_TYPE_ARB = $86A9;
  655. GL_WEIGHT_ARRAY_STRIDE_ARB = $86AA;
  656. GL_WEIGHT_ARRAY_SIZE_ARB = $86AB;
  657. GL_WEIGHT_ARRAY_POINTER_ARB = $86AC;
  658. GL_WEIGHT_ARRAY_ARB = $86AD;
  659. var
  660. glWeightbvARB: procedure(size: GLint; weights: PGLbyte); extdecl;
  661. glWeightsvARB: procedure(size: GLint; weights: PGLshort); extdecl;
  662. glWeightivARB: procedure(size: GLint; weights: PGLint); extdecl;
  663. glWeightfvARB: procedure(size: GLint; weights: PGLfloat); extdecl;
  664. glWeightdvARB: procedure(size: GLint; weights: PGLdouble); extdecl;
  665. glWeightvARB: procedure(size: GLint; weights: PGLdouble); extdecl;
  666. glWeightubvARB: procedure(size: GLint; weights: PGLubyte); extdecl;
  667. glWeightusvARB: procedure(size: GLint; weights: PGLushort); extdecl;
  668. glWeightuivARB: procedure(size: GLint; weights: PGLuint); extdecl;
  669. glWeightPointerARB: procedure(size: GLint; _type: GLenum; stride: GLsizei; pointer: PGLvoid); extdecl;
  670. glVertexBlendARB: procedure(count: GLint); extdecl;
  671. function Load_GL_ARB_vertex_blend: Boolean;
  672. //***** GL_ARB_vertex_program *****//
  673. const
  674. GL_VERTEX_PROGRAM_ARB = $8620;
  675. GL_VERTEX_PROGRAM_POINT_SIZE_ARB = $8642;
  676. GL_VERTEX_PROGRAM_TWO_SIDE_ARB = $8643;
  677. GL_COLOR_SUM_ARB = $8458;
  678. GL_PROGRAM_FORMAT_ASCII_ARB = $8875;
  679. GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = $8622;
  680. GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = $8623;
  681. GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = $8624;
  682. GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = $8625;
  683. GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = $886A;
  684. GL_CURRENT_VERTEX_ATTRIB_ARB = $8626;
  685. GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = $8645;
  686. GL_PROGRAM_LENGTH_ARB = $8627;
  687. GL_PROGRAM_FORMAT_ARB = $8876;
  688. GL_PROGRAM_BINDING_ARB = $8677;
  689. GL_PROGRAM_INSTRUCTIONS_ARB = $88A0;
  690. GL_MAX_PROGRAM_INSTRUCTIONS_ARB = $88A1;
  691. GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = $88A2;
  692. GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = $88A3;
  693. GL_PROGRAM_TEMPORARIES_ARB = $88A4;
  694. GL_MAX_PROGRAM_TEMPORARIES_ARB = $88A5;
  695. GL_PROGRAM_NATIVE_TEMPORARIES_ARB = $88A6;
  696. GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = $88A7;
  697. GL_PROGRAM_PARAMETERS_ARB = $88A8;
  698. GL_MAX_PROGRAM_PARAMETERS_ARB = $88A9;
  699. GL_PROGRAM_NATIVE_PARAMETERS_ARB = $88AA;
  700. GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = $88AB;
  701. GL_PROGRAM_ATTRIBS_ARB = $88AC;
  702. GL_MAX_PROGRAM_ATTRIBS_ARB = $88AD;
  703. GL_PROGRAM_NATIVE_ATTRIBS_ARB = $88AE;
  704. GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = $88AF;
  705. GL_PROGRAM_ADDRESS_REGISTERS_ARB = $88B0;
  706. GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = $88B1;
  707. GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = $88B2;
  708. GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = $88B3;
  709. GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = $88B4;
  710. GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = $88B5;
  711. GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = $88B6;
  712. GL_PROGRAM_STRING_ARB = $8628;
  713. GL_PROGRAM_ERROR_POSITION_ARB = $864B;
  714. GL_CURRENT_MATRIX_ARB = $8641;
  715. GL_TRANSPOSE_CURRENT_MATRIX_ARB = $88B7;
  716. GL_CURRENT_MATRIX_STACK_DEPTH_ARB = $8640;
  717. GL_MAX_VERTEX_ATTRIBS_ARB = $8869;
  718. GL_MAX_PROGRAM_MATRICES_ARB = $862F;
  719. GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = $862E;
  720. GL_PROGRAM_ERROR_STRING_ARB = $8874;
  721. GL_MATRIX0_ARB = $88C0;
  722. GL_MATRIX1_ARB = $88C1;
  723. GL_MATRIX2_ARB = $88C2;
  724. GL_MATRIX3_ARB = $88C3;
  725. GL_MATRIX4_ARB = $88C4;
  726. GL_MATRIX5_ARB = $88C5;
  727. GL_MATRIX6_ARB = $88C6;
  728. GL_MATRIX7_ARB = $88C7;
  729. GL_MATRIX8_ARB = $88C8;
  730. GL_MATRIX9_ARB = $88C9;
  731. GL_MATRIX10_ARB = $88CA;
  732. GL_MATRIX11_ARB = $88CB;
  733. GL_MATRIX12_ARB = $88CC;
  734. GL_MATRIX13_ARB = $88CD;
  735. GL_MATRIX14_ARB = $88CE;
  736. GL_MATRIX15_ARB = $88CF;
  737. GL_MATRIX16_ARB = $88D0;
  738. GL_MATRIX17_ARB = $88D1;
  739. GL_MATRIX18_ARB = $88D2;
  740. GL_MATRIX19_ARB = $88D3;
  741. GL_MATRIX20_ARB = $88D4;
  742. GL_MATRIX21_ARB = $88D5;
  743. GL_MATRIX22_ARB = $88D6;
  744. GL_MATRIX23_ARB = $88D7;
  745. GL_MATRIX24_ARB = $88D8;
  746. GL_MATRIX25_ARB = $88D9;
  747. GL_MATRIX26_ARB = $88DA;
  748. GL_MATRIX27_ARB = $88DB;
  749. GL_MATRIX28_ARB = $88DC;
  750. GL_MATRIX29_ARB = $88DD;
  751. GL_MATRIX30_ARB = $88DE;
  752. GL_MATRIX31_ARB = $88DF;
  753. var
  754. glVertexAttrib1sARB: procedure(index: GLuint; x: GLshort); extdecl;
  755. glVertexAttrib1fARB: procedure(index: GLuint; x: GLfloat); extdecl;
  756. glVertexAttrib1dARB: procedure(index: GLuint; x: GLdouble); extdecl;
  757. glVertexAttrib2sARB: procedure(index: GLuint; x: GLshort; y: GLshort); extdecl;
  758. glVertexAttrib2fARB: procedure(index: GLuint; x: GLfloat; y: GLfloat); extdecl;
  759. glVertexAttrib2dARB: procedure(index: GLuint; x: GLdouble; y: GLdouble); extdecl;
  760. glVertexAttrib3sARB: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort); extdecl;
  761. glVertexAttrib3fARB: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  762. glVertexAttrib3dARB: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble); extdecl;
  763. glVertexAttrib4sARB: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort; w: GLshort); extdecl;
  764. glVertexAttrib4fARB: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  765. glVertexAttrib4dARB: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl;
  766. glVertexAttrib4NubARB: procedure(index: GLuint; x: GLubyte; y: GLubyte; z: GLubyte; w: GLubyte); extdecl;
  767. glVertexAttrib1svARB: procedure(index: GLuint; const v: PGLshort); extdecl;
  768. glVertexAttrib1fvARB: procedure(index: GLuint; const v: PGLfloat); extdecl;
  769. glVertexAttrib1dvARB: procedure(index: GLuint; const v: PGLdouble); extdecl;
  770. glVertexAttrib2svARB: procedure(index: GLuint; const v: PGLshort); extdecl;
  771. glVertexAttrib2fvARB: procedure(index: GLuint; const v: PGLfloat); extdecl;
  772. glVertexAttrib2dvARB: procedure(index: GLuint; const v: PGLdouble); extdecl;
  773. glVertexAttrib3svARB: procedure(index: GLuint; const v: PGLshort); extdecl;
  774. glVertexAttrib3fvARB: procedure(index: GLuint; const v: PGLfloat); extdecl;
  775. glVertexAttrib3dvARB: procedure(index: GLuint; const v: PGLdouble); extdecl;
  776. glVertexAttrib4bvARB: procedure(index: GLuint; const v: PGLbyte); extdecl;
  777. glVertexAttrib4svARB: procedure(index: GLuint; const v: PGLshort); extdecl;
  778. glVertexAttrib4ivARB: procedure(index: GLuint; const v: PGLint); extdecl;
  779. glVertexAttrib4ubvARB: procedure(index: GLuint; const v: PGLubyte); extdecl;
  780. glVertexAttrib4usvARB: procedure(index: GLuint; const v: PGLushort); extdecl;
  781. glVertexAttrib4uivARB: procedure(index: GLuint; const v: PGLuint); extdecl;
  782. glVertexAttrib4fvARB: procedure(index: GLuint; const v: PGLfloat); extdecl;
  783. glVertexAttrib4dvARB: procedure(index: GLuint; const v: PGLdouble); extdecl;
  784. glVertexAttrib4NbvARB: procedure(index: GLuint; const v: PGLbyte); extdecl;
  785. glVertexAttrib4NsvARB: procedure(index: GLuint; const v: PGLshort); extdecl;
  786. glVertexAttrib4NivARB: procedure(index: GLuint; const v: PGLint); extdecl;
  787. glVertexAttrib4NubvARB: procedure(index: GLuint; const v: PGLubyte); extdecl;
  788. glVertexAttrib4NusvARB: procedure(index: GLuint; const v: PGLushort); extdecl;
  789. glVertexAttrib4NuivARB: procedure(index: GLuint; const v: PGLuint); extdecl;
  790. glVertexAttribPointerARB: procedure(index: GLuint; size: GLint; _type: GLenum; normalized: GLboolean; stride: GLsizei; const pointer: PGLvoid); extdecl;
  791. glEnableVertexAttribArrayARB: procedure(index: GLuint); extdecl;
  792. glDisableVertexAttribArrayARB: procedure(index: GLuint); extdecl;
  793. glProgramStringARB: procedure(target: GLenum; format: GLenum; len: GLsizei; const _string: PGLvoid); extdecl;
  794. glBindProgramARB: procedure(target: GLenum; _program: GLuint); extdecl;
  795. glDeleteProgramsARB: procedure(n: GLsizei; const programs: PGLuint); extdecl;
  796. glGenProgramsARB: procedure(n: GLsizei; programs: PGLuint); extdecl;
  797. glProgramEnvParameter4dARB: procedure(target: GLenum; index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl;
  798. glProgramEnvParameter4dvARB: procedure(target: GLenum; index: GLuint; const params: PGLdouble); extdecl;
  799. glProgramEnvParameter4fARB: procedure(target: GLenum; index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  800. glProgramEnvParameter4fvARB: procedure(target: GLenum; index: GLuint; const params: PGLfloat); extdecl;
  801. glProgramLocalParameter4dARB: procedure(target: GLenum; index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl;
  802. glProgramLocalParameter4dvARB: procedure(target: GLenum; index: GLuint; const params: PGLdouble); extdecl;
  803. glProgramLocalParameter4fARB: procedure(target: GLenum; index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  804. glProgramLocalParameter4fvARB: procedure(target: GLenum; index: GLuint; const params: PGLfloat); extdecl;
  805. glGetProgramEnvParameterdvARB: procedure(target: GLenum; index: GLuint; params: PGLdouble); extdecl;
  806. glGetProgramEnvParameterfvARB: procedure(target: GLenum; index: GLuint; params: PGLfloat); extdecl;
  807. glGetProgramLocalParameterdvARB: procedure(target: GLenum; index: GLuint; params: PGLdouble); extdecl;
  808. glGetProgramLocalParameterfvARB: procedure(target: GLenum; index: GLuint; params: PGLfloat); extdecl;
  809. glGetProgramivARB: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  810. glGetProgramStringARB: procedure(target: GLenum; pname: GLenum; _string: PGLvoid); extdecl;
  811. glGetVertexAttribdvARB: procedure(index: GLuint; pname: GLenum; params: PGLdouble); extdecl;
  812. glGetVertexAttribfvARB: procedure(index: GLuint; pname: GLenum; params: PGLfloat); extdecl;
  813. glGetVertexAttribivARB: procedure(index: GLuint; pname: GLenum; params: PGLint); extdecl;
  814. glGetVertexAttribPointervARB: procedure(index: GLuint; pname: GLenum; pointer: PGLvoid); extdecl;
  815. glIsProgramARB: function(_program: GLuint): GLboolean; extdecl;
  816. function Load_GL_ARB_vertex_program: Boolean;
  817. //***** GL_ARB_window_pos *****//
  818. var
  819. glWindowPos2dARB: procedure(x: GLdouble; y: GLdouble); extdecl;
  820. glWindowPos2fARB: procedure(x: GLfloat; y: GLfloat); extdecl;
  821. glWindowPos2iARB: procedure(x: GLint; y: GLint); extdecl;
  822. glWindowPos2sARB: procedure(x: GLshort; y: GLshort); extdecl;
  823. glWindowPos2dvARB: procedure(const p: PGLdouble); extdecl;
  824. glWindowPos2fvARB: procedure(const p: PGLfloat); extdecl;
  825. glWindowPos2ivARB: procedure(const p: PGLint); extdecl;
  826. glWindowPos2svARB: procedure(const p: PGLshort); extdecl;
  827. glWindowPos3dARB: procedure(x: GLdouble; y: GLdouble; z: GLdouble); extdecl;
  828. glWindowPos3fARB: procedure(x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  829. glWindowPos3iARB: procedure(x: GLint; y: GLint; z: GLint); extdecl;
  830. glWindowPos3sARB: procedure(x: GLshort; y: GLshort; z: GLshort); extdecl;
  831. glWindowPos3dvARB: procedure(const p: PGLdouble); extdecl;
  832. glWindowPos3fvARB: procedure(const p: PGLfloat); extdecl;
  833. glWindowPos3ivARB: procedure(const p: PGLint); extdecl;
  834. glWindowPos3svARB: procedure(const p: PGLshort); extdecl;
  835. function Load_GL_ARB_window_pos: Boolean;
  836. //***** GL_EXT_422_pixels *****//
  837. const
  838. GL_422_EXT = $80CC;
  839. GL_422_REV_EXT = $80CD;
  840. GL_422_AVERAGE_EXT = $80CE;
  841. GL_422_REV_AVERAGE_EXT = $80CF;
  842. function Load_GL_EXT_422_pixels: Boolean;
  843. //***** GL_EXT_abgr *****//
  844. const
  845. GL_ABGR_EXT = $8000;
  846. function Load_GL_EXT_abgr: Boolean;
  847. //***** GL_EXT_bgra *****//
  848. const
  849. GL_BGR_EXT = $80E0;
  850. GL_BGRA_EXT = $80E1;
  851. function Load_GL_EXT_bgra: Boolean;
  852. //***** GL_EXT_blend_color *****//
  853. const
  854. GL_CONSTANT_COLOR_EXT = $8001;
  855. GL_ONE_MINUS_CONSTANT_COLOR_EXT = $8002;
  856. GL_CONSTANT_ALPHA_EXT = $8003;
  857. GL_ONE_MINUS_CONSTANT_ALPHA_EXT = $8004;
  858. GL_BLEND_COLOR_EXT = $8005;
  859. var
  860. glBlendColorEXT: procedure(red: GLclampf; green: GLclampf; blue: GLclampf; alpha: GLclampf); extdecl;
  861. function Load_GL_EXT_blend_color: Boolean;
  862. //***** GL_EXT_blend_func_separate *****//
  863. const
  864. GL_BLEND_DST_RGB_EXT = $80C8;
  865. GL_BLEND_SRC_RGB_EXT = $80C9;
  866. GL_BLEND_DST_ALPHA_EXT = $80CA;
  867. GL_BLEND_SRC_ALPHA_EXT = $80CB;
  868. var
  869. glBlendFuncSeparateEXT: procedure(sfactorRGB: GLenum; dfactorRGB: GLenum; sfactorAlpha: GLenum; dfactorAlpha: GLenum); extdecl;
  870. function Load_GL_EXT_blend_func_separate: Boolean;
  871. //***** GL_EXT_blend_logic_op *****//
  872. function Load_GL_EXT_blend_logic_op: Boolean;
  873. //***** GL_EXT_blend_minmax *****//
  874. const
  875. GL_FUNC_ADD_EXT = $8006;
  876. GL_MIN_EXT = $8007;
  877. GL_MAX_EXT = $8008;
  878. GL_BLEND_EQUATION_EXT = $8009;
  879. var
  880. glBlendEquationEXT: procedure(mode: GLenum); extdecl;
  881. function Load_GL_EXT_blend_minmax: Boolean;
  882. //***** GL_EXT_blend_subtract *****//
  883. const
  884. GL_FUNC_SUBTRACT_EXT = $800A;
  885. GL_FUNC_REVERSE_SUBTRACT_EXT = $800B;
  886. function Load_GL_EXT_blend_subtract: Boolean;
  887. //***** GL_EXT_clip_volume_hint *****//
  888. const
  889. GL_CLIP_VOLUME_CLIPPING_HINT_EXT = $80F0;
  890. function Load_GL_EXT_clip_volume_hint: Boolean;
  891. //***** GL_EXT_color_subtable *****//
  892. var
  893. glColorSubTableEXT: procedure(target: GLenum; start: GLsizei; count: GLsizei; format: GLenum; _type: GLenum; const data: PGLvoid); extdecl;
  894. glCopyColorSubTableEXT: procedure(target: GLenum; start: GLsizei; x: GLint; y: GLint; width: GLsizei); extdecl;
  895. function Load_GL_EXT_color_subtable: Boolean;
  896. //***** GL_EXT_compiled_vertex_array *****//
  897. const
  898. GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = $81A8;
  899. GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = $81A9;
  900. var
  901. glLockArraysEXT: procedure(first: GLint; count: GLsizei); extdecl;
  902. glUnlockArraysEXT: procedure(); extdecl;
  903. function Load_GL_EXT_compiled_vertex_array: Boolean;
  904. //***** GL_EXT_convolution *****//
  905. const
  906. GL_CONVOLUTION_1D_EXT = $8010;
  907. GL_CONVOLUTION_2D_EXT = $8011;
  908. GL_SEPARABLE_2D_EXT = $8012;
  909. GL_CONVOLUTION_BORDER_MODE_EXT = $8013;
  910. GL_CONVOLUTION_FILTER_SCALE_EXT = $8014;
  911. GL_CONVOLUTION_FILTER_BIAS_EXT = $8015;
  912. GL_REDUCE_EXT = $8016;
  913. GL_CONVOLUTION_FORMAT_EXT = $8017;
  914. GL_CONVOLUTION_WIDTH_EXT = $8018;
  915. GL_CONVOLUTION_HEIGHT_EXT = $8019;
  916. GL_MAX_CONVOLUTION_WIDTH_EXT = $801A;
  917. GL_MAX_CONVOLUTION_HEIGHT_EXT = $801B;
  918. GL_POST_CONVOLUTION_RED_SCALE_EXT = $801C;
  919. GL_POST_CONVOLUTION_GREEN_SCALE_EXT = $801D;
  920. GL_POST_CONVOLUTION_BLUE_SCALE_EXT = $801E;
  921. GL_POST_CONVOLUTION_ALPHA_SCALE_EXT = $801F;
  922. GL_POST_CONVOLUTION_RED_BIAS_EXT = $8020;
  923. GL_POST_CONVOLUTION_GREEN_BIAS_EXT = $8021;
  924. GL_POST_CONVOLUTION_BLUE_BIAS_EXT = $8022;
  925. GL_POST_CONVOLUTION_ALPHA_BIAS_EXT = $8023;
  926. var
  927. glConvolutionFilter1DEXT: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const image: PGLvoid); extdecl;
  928. glConvolutionFilter2DEXT: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const image: PGLvoid); extdecl;
  929. glCopyConvolutionFilter1DEXT: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei); extdecl;
  930. glCopyConvolutionFilter2DEXT: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei; height: GLsizei); extdecl;
  931. glGetConvolutionFilterEXT: procedure(target: GLenum; format: GLenum; _type: GLenum; image: PGLvoid); extdecl;
  932. glSeparableFilter2DEXT: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const row: PGLvoid; const column: PGLvoid); extdecl;
  933. glGetSeparableFilterEXT: procedure(target: GLenum; format: GLenum; _type: GLenum; row: PGLvoid; column: PGLvoid; span: PGLvoid); extdecl;
  934. glConvolutionParameteriEXT: procedure(target: GLenum; pname: GLenum; param: GLint); extdecl;
  935. glConvolutionParameterivEXT: procedure(target: GLenum; pname: GLenum; const params: PGLint); extdecl;
  936. glConvolutionParameterfEXT: procedure(target: GLenum; pname: GLenum; param: GLfloat); extdecl;
  937. glConvolutionParameterfvEXT: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); extdecl;
  938. glGetConvolutionParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  939. glGetConvolutionParameterfvEXT: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  940. function Load_GL_EXT_convolution: Boolean;
  941. //***** GL_EXT_fog_coord *****//
  942. const
  943. GL_FOG_COORDINATE_SOURCE_EXT = $8450;
  944. GL_FOG_COORDINATE_EXT = $8451;
  945. GL_FRAGMENT_DEPTH_EXT = $8452;
  946. GL_CURRENT_FOG_COORDINATE_EXT = $8453;
  947. GL_FOG_COORDINATE_ARRAY_TYPE_EXT = $8454;
  948. GL_FOG_COORDINATE_ARRAY_STRIDE_EXT = $8455;
  949. GL_FOG_COORDINATE_ARRAY_POINTER_EXT = $8456;
  950. GL_FOG_COORDINATE_ARRAY_EXT = $8457;
  951. var
  952. glFogCoordfEXT: procedure(coord: GLfloat); extdecl;
  953. glFogCoorddEXT: procedure(coord: GLdouble); extdecl;
  954. glFogCoordfvEXT: procedure(coord: PGLfloat); extdecl;
  955. glFogCoorddvEXT: procedure(coord: PGLdouble); extdecl;
  956. glFogCoordPointerEXT: procedure(_type: GLenum; stride: GLsizei; pointer: PGLvoid); extdecl;
  957. function Load_GL_EXT_fog_coord: Boolean;
  958. //***** GL_EXT_histogram *****//
  959. const
  960. GL_HISTOGRAM_EXT = $8024;
  961. GL_PROXY_HISTOGRAM_EXT = $8025;
  962. GL_HISTOGRAM_WIDTH_EXT = $8026;
  963. GL_HISTOGRAM_FORMAT_EXT = $8027;
  964. GL_HISTOGRAM_RED_SIZE_EXT = $8028;
  965. GL_HISTOGRAM_GREEN_SIZE_EXT = $8029;
  966. GL_HISTOGRAM_BLUE_SIZE_EXT = $802A;
  967. GL_HISTOGRAM_ALPHA_SIZE_EXT = $802B;
  968. GL_HISTOGRAM_LUMINANCE_SIZE_EXT = $802C;
  969. GL_HISTOGRAM_SINK_EXT = $802D;
  970. GL_MINMAX_EXT = $802E;
  971. GL_MINMAX_FORMAT_EXT = $802F;
  972. GL_MINMAX_SINK_EXT = $8030;
  973. var
  974. glHistogramEXT: procedure(target: GLenum; width: GLsizei; internalformat: GLenum; sink: GLboolean); extdecl;
  975. glResetHistogramEXT: procedure(target: GLenum); extdecl;
  976. glGetHistogramEXT: procedure(target: GLenum; reset: GLboolean; format: GLenum; _type: GLenum; values: PGLvoid); extdecl;
  977. glGetHistogramParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  978. glGetHistogramParameterfvEXT: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  979. glMinmaxEXT: procedure(target: GLenum; internalformat: GLenum; sink: GLboolean); extdecl;
  980. glResetMinmaxEXT: procedure(target: GLenum); extdecl;
  981. glGetMinmaxEXT: procedure(target: GLenum; reset: GLboolean; format: GLenum; _type: GLenum; values: PGLvoid); extdecl;
  982. glGetMinmaxParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  983. glGetMinmaxParameterfvEXT: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  984. function Load_GL_EXT_histogram: Boolean;
  985. //***** GL_EXT_multi_draw_arrays *****//
  986. var
  987. glMultiDrawArraysEXT: procedure(mode: GLenum; first: PGLint; count: PGLsizei; primcount: GLsizei); extdecl;
  988. glMultiDrawElementsEXT: procedure(mode: GLenum; count: PGLsizei; _type: GLenum; const indices: PGLvoid; primcount: GLsizei); extdecl;
  989. function Load_GL_EXT_multi_draw_arrays: Boolean;
  990. //***** GL_EXT_packed_depth_stencil *****//
  991. const
  992. GL_DEPTH_STENCIL_EXT = $84F9;
  993. GL_UNSIGNED_INT_24_8_EXT = $84FA;
  994. GL_DEPTH24_STENCIL8_EXT = $88F0;
  995. GL_TEXTURE_STENCIL_SIZE_EXT = $88F1;
  996. function Load_GL_EXT_packed_depth_stencil: Boolean;
  997. //***** GL_EXT_packed_pixels *****//
  998. const
  999. GL_UNSIGNED_BYTE_3_3_2_EXT = $8032;
  1000. GL_UNSIGNED_SHORT_4_4_4_4_EXT = $8033;
  1001. GL_UNSIGNED_SHORT_5_5_5_1_EXT = $8034;
  1002. GL_UNSIGNED_INT_8_8_8_8_EXT = $8035;
  1003. GL_UNSIGNED_INT_10_10_10_2_EXT = $8036;
  1004. function Load_GL_EXT_packed_pixels: Boolean;
  1005. //***** GL_EXT_paletted_texture *****//
  1006. const
  1007. GL_COLOR_INDEX1_EXT = $80E2;
  1008. GL_COLOR_INDEX2_EXT = $80E3;
  1009. GL_COLOR_INDEX4_EXT = $80E4;
  1010. GL_COLOR_INDEX8_EXT = $80E5;
  1011. GL_COLOR_INDEX12_EXT = $80E6;
  1012. GL_COLOR_INDEX16_EXT = $80E7;
  1013. GL_COLOR_TABLE_FORMAT_EXT = $80D8;
  1014. GL_COLOR_TABLE_WIDTH_EXT = $80D9;
  1015. GL_COLOR_TABLE_RED_SIZE_EXT = $80DA;
  1016. GL_COLOR_TABLE_GREEN_SIZE_EXT = $80DB;
  1017. GL_COLOR_TABLE_BLUE_SIZE_EXT = $80DC;
  1018. GL_COLOR_TABLE_ALPHA_SIZE_EXT = $80DD;
  1019. GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = $80DE;
  1020. GL_COLOR_TABLE_INTENSITY_SIZE_EXT = $80DF;
  1021. GL_TEXTURE_INDEX_SIZE_EXT = $80ED;
  1022. GL_TEXTURE_1D = $0DE0;
  1023. GL_TEXTURE_2D = $0DE1;
  1024. GL_TEXTURE_3D_EXT = $806F;
  1025. // GL_TEXTURE_CUBE_MAP_ARB { already defined }
  1026. GL_PROXY_TEXTURE_1D = $8063;
  1027. GL_PROXY_TEXTURE_2D = $8064;
  1028. GL_PROXY_TEXTURE_3D_EXT = $8070;
  1029. // GL_PROXY_TEXTURE_CUBE_MAP_ARB { already defined }
  1030. // GL_TEXTURE_1D { already defined }
  1031. // GL_TEXTURE_2D { already defined }
  1032. // GL_TEXTURE_3D_EXT { already defined }
  1033. // GL_TEXTURE_CUBE_MAP_ARB { already defined }
  1034. var
  1035. glColorTableEXT: procedure(target: GLenum; internalFormat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const data: PGLvoid); extdecl;
  1036. // glColorSubTableEXT { already defined }
  1037. glGetColorTableEXT: procedure(target: GLenum; format: GLenum; _type: GLenum; data: PGLvoid); extdecl;
  1038. glGetColorTableParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  1039. glGetColorTableParameterfvEXT: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  1040. function Load_GL_EXT_paletted_texture: Boolean;
  1041. //***** GL_EXT_point_parameters *****//
  1042. const
  1043. GL_POINT_SIZE_MIN_EXT = $8126;
  1044. GL_POINT_SIZE_MAX_EXT = $8127;
  1045. GL_POINT_FADE_THRESHOLD_SIZE_EXT = $8128;
  1046. GL_DISTANCE_ATTENUATION_EXT = $8129;
  1047. var
  1048. glPointParameterfEXT: procedure(pname: GLenum; param: GLfloat); extdecl;
  1049. glPointParameterfvEXT: procedure(pname: GLenum; params: PGLfloat); extdecl;
  1050. function Load_GL_EXT_point_parameters: Boolean;
  1051. //***** GL_EXT_polygon_offset *****//
  1052. const
  1053. GL_POLYGON_OFFSET_EXT = $8037;
  1054. GL_POLYGON_OFFSET_FACTOR_EXT = $8038;
  1055. GL_POLYGON_OFFSET_BIAS_EXT = $8039;
  1056. var
  1057. glPolygonOffsetEXT: procedure(factor: GLfloat; bias: GLfloat); extdecl;
  1058. function Load_GL_EXT_polygon_offset: Boolean;
  1059. //***** GL_EXT_secondary_color *****//
  1060. const
  1061. GL_COLOR_SUM_EXT = $8458;
  1062. GL_CURRENT_SECONDARY_COLOR_EXT = $8459;
  1063. GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = $845A;
  1064. GL_SECONDARY_COLOR_ARRAY_TYPE_EXT = $845B;
  1065. GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = $845C;
  1066. GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = $845D;
  1067. GL_SECONDARY_COLOR_ARRAY_EXT = $845E;
  1068. var
  1069. glSecondaryColor3bEXT: procedure(components: GLbyte); extdecl;
  1070. glSecondaryColor3sEXT: procedure(components: GLshort); extdecl;
  1071. glSecondaryColor3iEXT: procedure(components: GLint); extdecl;
  1072. glSecondaryColor3fEXT: procedure(components: GLfloat); extdecl;
  1073. glSecondaryColor3dEXT: procedure(components: GLdouble); extdecl;
  1074. glSecondaryColor3ubEXT: procedure(components: GLubyte); extdecl;
  1075. glSecondaryColor3usEXT: procedure(components: GLushort); extdecl;
  1076. glSecondaryColor3uiEXT: procedure(components: GLuint); extdecl;
  1077. glSecondaryColor3bvEXT: procedure(components: GLbyte); extdecl;
  1078. glSecondaryColor3svEXT: procedure(components: GLshort); extdecl;
  1079. glSecondaryColor3ivEXT: procedure(components: GLint); extdecl;
  1080. glSecondaryColor3fvEXT: procedure(components: GLfloat); extdecl;
  1081. glSecondaryColor3dvEXT: procedure(components: GLdouble); extdecl;
  1082. glSecondaryColor3ubvEXT: procedure(components: GLubyte); extdecl;
  1083. glSecondaryColor3usvEXT: procedure(components: GLushort); extdecl;
  1084. glSecondaryColor3uivEXT: procedure(components: GLuint); extdecl;
  1085. glSecondaryColorPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; pointer: PGLvoid); extdecl;
  1086. function Load_GL_EXT_secondary_color: Boolean;
  1087. //***** GL_EXT_separate_specular_color *****//
  1088. const
  1089. GL_LIGHT_MODEL_COLOR_CONTROL_EXT = $81F8;
  1090. GL_SINGLE_COLOR_EXT = $81F9;
  1091. GL_SEPARATE_SPECULAR_COLOR_EXT = $81FA;
  1092. function Load_GL_EXT_separate_specular_color: Boolean;
  1093. //***** GL_EXT_shadow_funcs *****//
  1094. function Load_GL_EXT_shadow_funcs: Boolean;
  1095. //***** GL_EXT_shared_texture_palette *****//
  1096. const
  1097. GL_SHARED_TEXTURE_PALETTE_EXT = $81FB;
  1098. function Load_GL_EXT_shared_texture_palette: Boolean;
  1099. //***** GL_EXT_stencil_two_side *****//
  1100. const
  1101. GL_STENCIL_TEST_TWO_SIDE_EXT = $8910;
  1102. GL_ACTIVE_STENCIL_FACE_EXT = $8911;
  1103. var
  1104. glActiveStencilFaceEXT: procedure(face: GLenum); extdecl;
  1105. function Load_GL_EXT_stencil_two_side: Boolean;
  1106. //***** GL_EXT_stencil_wrap *****//
  1107. const
  1108. GL_INCR_WRAP_EXT = $8507;
  1109. GL_DECR_WRAP_EXT = $8508;
  1110. function Load_GL_EXT_stencil_wrap: Boolean;
  1111. //***** GL_EXT_subtexture *****//
  1112. var
  1113. glTexSubImage1DEXT: procedure(target: GLenum; level: GLint; xoffset: GLint; width: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); extdecl;
  1114. glTexSubImage2DEXT: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; width: GLsizei; height: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); extdecl;
  1115. glTexSubImage3DEXT: procedure(target: GLenum; level: GLint; xoffset: GLint; yoffset: GLint; zoffset: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; format: GLenum; _type: GLenum; const pixels: PGLvoid); extdecl;
  1116. function Load_GL_EXT_subtexture: Boolean;
  1117. //***** GL_EXT_texture3D *****//
  1118. const
  1119. GL_PACK_SKIP_IMAGES_EXT = $806B;
  1120. GL_PACK_IMAGE_HEIGHT_EXT = $806C;
  1121. GL_UNPACK_SKIP_IMAGES_EXT = $806D;
  1122. GL_UNPACK_IMAGE_HEIGHT_EXT = $806E;
  1123. // GL_TEXTURE_3D_EXT { already defined }
  1124. // GL_PROXY_TEXTURE_3D_EXT { already defined }
  1125. GL_TEXTURE_DEPTH_EXT = $8071;
  1126. GL_TEXTURE_WRAP_R_EXT = $8072;
  1127. GL_MAX_3D_TEXTURE_SIZE_EXT = $8073;
  1128. var
  1129. glTexImage3DEXT: procedure(target: GLenum; level: GLint; internalformat: GLenum; width: GLsizei; height: GLsizei; depth: GLsizei; border: GLint; format: GLenum; _type: GLenum; const pixels: PGLvoid); extdecl;
  1130. function Load_GL_EXT_texture3D: Boolean;
  1131. //***** GL_EXT_texture_compression_s3tc *****//
  1132. const
  1133. GL_COMPRESSED_RGB_S3TC_DXT1_EXT = $83F0;
  1134. GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = $83F1;
  1135. GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = $83F2;
  1136. GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = $83F3;
  1137. function Load_GL_EXT_texture_compression_s3tc: Boolean;
  1138. //***** GL_EXT_texture_env_add *****//
  1139. function Load_GL_EXT_texture_env_add: Boolean;
  1140. //***** GL_EXT_texture_env_combine *****//
  1141. const
  1142. GL_COMBINE_EXT = $8570;
  1143. GL_COMBINE_RGB_EXT = $8571;
  1144. GL_COMBINE_ALPHA_EXT = $8572;
  1145. GL_SOURCE0_RGB_EXT = $8580;
  1146. GL_SOURCE1_RGB_EXT = $8581;
  1147. GL_SOURCE2_RGB_EXT = $8582;
  1148. GL_SOURCE0_ALPHA_EXT = $8588;
  1149. GL_SOURCE1_ALPHA_EXT = $8589;
  1150. GL_SOURCE2_ALPHA_EXT = $858A;
  1151. GL_OPERAND0_RGB_EXT = $8590;
  1152. GL_OPERAND1_RGB_EXT = $8591;
  1153. GL_OPERAND2_RGB_EXT = $8592;
  1154. GL_OPERAND0_ALPHA_EXT = $8598;
  1155. GL_OPERAND1_ALPHA_EXT = $8599;
  1156. GL_OPERAND2_ALPHA_EXT = $859A;
  1157. GL_RGB_SCALE_EXT = $8573;
  1158. GL_ADD_SIGNED_EXT = $8574;
  1159. GL_INTERPOLATE_EXT = $8575;
  1160. GL_CONSTANT_EXT = $8576;
  1161. GL_PRIMARY_COLOR_EXT = $8577;
  1162. GL_PREVIOUS_EXT = $8578;
  1163. function Load_GL_EXT_texture_env_combine: Boolean;
  1164. //***** GL_EXT_texture_env_dot3 *****//
  1165. const
  1166. GL_DOT3_RGB_EXT = $8740;
  1167. GL_DOT3_RGBA_EXT = $8741;
  1168. function Load_GL_EXT_texture_env_dot3: Boolean;
  1169. //***** GL_EXT_texture_filter_anisotropic *****//
  1170. const
  1171. GL_TEXTURE_MAX_ANISOTROPY_EXT = $84FE;
  1172. GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = $84FF;
  1173. function Load_GL_EXT_texture_filter_anisotropic: Boolean;
  1174. //***** GL_EXT_texture_lod_bias *****//
  1175. const
  1176. GL_TEXTURE_FILTER_CONTROL_EXT = $8500;
  1177. GL_TEXTURE_LOD_BIAS_EXT = $8501;
  1178. GL_MAX_TEXTURE_LOD_BIAS_EXT = $84FD;
  1179. function Load_GL_EXT_texture_lod_bias: Boolean;
  1180. //***** GL_EXT_texture_object *****//
  1181. const
  1182. GL_TEXTURE_PRIORITY_EXT = $8066;
  1183. GL_TEXTURE_RESIDENT_EXT = $8067;
  1184. GL_TEXTURE_1D_BINDING_EXT = $8068;
  1185. GL_TEXTURE_2D_BINDING_EXT = $8069;
  1186. GL_TEXTURE_3D_BINDING_EXT = $806A;
  1187. var
  1188. glGenTexturesEXT: procedure(n: GLsizei; textures: PGLuint); extdecl;
  1189. glDeleteTexturesEXT: procedure(n: GLsizei; const textures: PGLuint); extdecl;
  1190. glBindTextureEXT: procedure(target: GLenum; texture: GLuint); extdecl;
  1191. glPrioritizeTexturesEXT: procedure(n: GLsizei; const textures: PGLuint; const priorities: PGLclampf); extdecl;
  1192. glAreTexturesResidentEXT: function(n: GLsizei; const textures: PGLuint; residences: PGLboolean): GLboolean; extdecl;
  1193. glIsTextureEXT: function(texture: GLuint): GLboolean; extdecl;
  1194. function Load_GL_EXT_texture_object: Boolean;
  1195. //***** GL_EXT_vertex_array *****//
  1196. const
  1197. GL_VERTEX_ARRAY_EXT = $8074;
  1198. GL_NORMAL_ARRAY_EXT = $8075;
  1199. GL_COLOR_ARRAY_EXT = $8076;
  1200. GL_INDEX_ARRAY_EXT = $8077;
  1201. GL_TEXTURE_COORD_ARRAY_EXT = $8078;
  1202. GL_EDGE_FLAG_ARRAY_EXT = $8079;
  1203. GL_DOUBLE_EXT = $140A;
  1204. GL_VERTEX_ARRAY_SIZE_EXT = $807A;
  1205. GL_VERTEX_ARRAY_TYPE_EXT = $807B;
  1206. GL_VERTEX_ARRAY_STRIDE_EXT = $807C;
  1207. GL_VERTEX_ARRAY_COUNT_EXT = $807D;
  1208. GL_NORMAL_ARRAY_TYPE_EXT = $807E;
  1209. GL_NORMAL_ARRAY_STRIDE_EXT = $807F;
  1210. GL_NORMAL_ARRAY_COUNT_EXT = $8080;
  1211. GL_COLOR_ARRAY_SIZE_EXT = $8081;
  1212. GL_COLOR_ARRAY_TYPE_EXT = $8082;
  1213. GL_COLOR_ARRAY_STRIDE_EXT = $8083;
  1214. GL_COLOR_ARRAY_COUNT_EXT = $8084;
  1215. GL_INDEX_ARRAY_TYPE_EXT = $8085;
  1216. GL_INDEX_ARRAY_STRIDE_EXT = $8086;
  1217. GL_INDEX_ARRAY_COUNT_EXT = $8087;
  1218. GL_TEXTURE_COORD_ARRAY_SIZE_EXT = $8088;
  1219. GL_TEXTURE_COORD_ARRAY_TYPE_EXT = $8089;
  1220. GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = $808A;
  1221. GL_TEXTURE_COORD_ARRAY_COUNT_EXT = $808B;
  1222. GL_EDGE_FLAG_ARRAY_STRIDE_EXT = $808C;
  1223. GL_EDGE_FLAG_ARRAY_COUNT_EXT = $808D;
  1224. GL_VERTEX_ARRAY_POINTER_EXT = $808E;
  1225. GL_NORMAL_ARRAY_POINTER_EXT = $808F;
  1226. GL_COLOR_ARRAY_POINTER_EXT = $8090;
  1227. GL_INDEX_ARRAY_POINTER_EXT = $8091;
  1228. GL_TEXTURE_COORD_ARRAY_POINTER_EXT = $8092;
  1229. GL_EDGE_FLAG_ARRAY_POINTER_EXT = $8093;
  1230. var
  1231. glArrayElementEXT: procedure(i: GLint); extdecl;
  1232. glDrawArraysEXT: procedure(mode: GLenum; first: GLint; count: GLsizei); extdecl;
  1233. glVertexPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); extdecl;
  1234. glNormalPointerEXT: procedure(_type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); extdecl;
  1235. glColorPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); extdecl;
  1236. glIndexPointerEXT: procedure(_type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); extdecl;
  1237. glTexCoordPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; count: GLsizei; const pointer: PGLvoid); extdecl;
  1238. glEdgeFlagPointerEXT: procedure(stride: GLsizei; count: GLsizei; const pointer: PGLboolean); extdecl;
  1239. glGetPointervEXT: procedure(pname: GLenum; params: PGLvoid); extdecl;
  1240. function Load_GL_EXT_vertex_array: Boolean;
  1241. //***** GL_EXT_vertex_shader *****//
  1242. const
  1243. GL_VERTEX_SHADER_EXT = $8780;
  1244. GL_VARIANT_VALUE_EXT = $87E4;
  1245. GL_VARIANT_DATATYPE_EXT = $87E5;
  1246. GL_VARIANT_ARRAY_STRIDE_EXT = $87E6;
  1247. GL_VARIANT_ARRAY_TYPE_EXT = $87E7;
  1248. GL_VARIANT_ARRAY_EXT = $87E8;
  1249. GL_VARIANT_ARRAY_POINTER_EXT = $87E9;
  1250. GL_INVARIANT_VALUE_EXT = $87EA;
  1251. GL_INVARIANT_DATATYPE_EXT = $87EB;
  1252. GL_LOCAL_CONSTANT_VALUE_EXT = $87EC;
  1253. GL_LOCAL_CONSTANT_DATATYPE_EXT = $87ED;
  1254. GL_OP_INDEX_EXT = $8782;
  1255. GL_OP_NEGATE_EXT = $8783;
  1256. GL_OP_DOT3_EXT = $8784;
  1257. GL_OP_DOT4_EXT = $8785;
  1258. GL_OP_MUL_EXT = $8786;
  1259. GL_OP_ADD_EXT = $8787;
  1260. GL_OP_MADD_EXT = $8788;
  1261. GL_OP_FRAC_EXT = $8789;
  1262. GL_OP_MAX_EXT = $878A;
  1263. GL_OP_MIN_EXT = $878B;
  1264. GL_OP_SET_GE_EXT = $878C;
  1265. GL_OP_SET_LT_EXT = $878D;
  1266. GL_OP_CLAMP_EXT = $878E;
  1267. GL_OP_FLOOR_EXT = $878F;
  1268. GL_OP_ROUND_EXT = $8790;
  1269. GL_OP_EXP_BASE_2_EXT = $8791;
  1270. GL_OP_LOG_BASE_2_EXT = $8792;
  1271. GL_OP_POWER_EXT = $8793;
  1272. GL_OP_RECIP_EXT = $8794;
  1273. GL_OP_RECIP_SQRT_EXT = $8795;
  1274. GL_OP_SUB_EXT = $8796;
  1275. GL_OP_CROSS_PRODUCT_EXT = $8797;
  1276. GL_OP_MULTIPLY_MATRIX_EXT = $8798;
  1277. GL_OP_MOV_EXT = $8799;
  1278. GL_OUTPUT_VERTEX_EXT = $879A;
  1279. GL_OUTPUT_COLOR0_EXT = $879B;
  1280. GL_OUTPUT_COLOR1_EXT = $879C;
  1281. GL_OUTPUT_TEXTURE_COORD0_EXT = $879D;
  1282. GL_OUTPUT_TEXTURE_COORD1_EXT = $879E;
  1283. GL_OUTPUT_TEXTURE_COORD2_EXT = $879F;
  1284. GL_OUTPUT_TEXTURE_COORD3_EXT = $87A0;
  1285. GL_OUTPUT_TEXTURE_COORD4_EXT = $87A1;
  1286. GL_OUTPUT_TEXTURE_COORD5_EXT = $87A2;
  1287. GL_OUTPUT_TEXTURE_COORD6_EXT = $87A3;
  1288. GL_OUTPUT_TEXTURE_COORD7_EXT = $87A4;
  1289. GL_OUTPUT_TEXTURE_COORD8_EXT = $87A5;
  1290. GL_OUTPUT_TEXTURE_COORD9_EXT = $87A6;
  1291. GL_OUTPUT_TEXTURE_COORD10_EXT = $87A7;
  1292. GL_OUTPUT_TEXTURE_COORD11_EXT = $87A8;
  1293. GL_OUTPUT_TEXTURE_COORD12_EXT = $87A9;
  1294. GL_OUTPUT_TEXTURE_COORD13_EXT = $87AA;
  1295. GL_OUTPUT_TEXTURE_COORD14_EXT = $87AB;
  1296. GL_OUTPUT_TEXTURE_COORD15_EXT = $87AC;
  1297. GL_OUTPUT_TEXTURE_COORD16_EXT = $87AD;
  1298. GL_OUTPUT_TEXTURE_COORD17_EXT = $87AE;
  1299. GL_OUTPUT_TEXTURE_COORD18_EXT = $87AF;
  1300. GL_OUTPUT_TEXTURE_COORD19_EXT = $87B0;
  1301. GL_OUTPUT_TEXTURE_COORD20_EXT = $87B1;
  1302. GL_OUTPUT_TEXTURE_COORD21_EXT = $87B2;
  1303. GL_OUTPUT_TEXTURE_COORD22_EXT = $87B3;
  1304. GL_OUTPUT_TEXTURE_COORD23_EXT = $87B4;
  1305. GL_OUTPUT_TEXTURE_COORD24_EXT = $87B5;
  1306. GL_OUTPUT_TEXTURE_COORD25_EXT = $87B6;
  1307. GL_OUTPUT_TEXTURE_COORD26_EXT = $87B7;
  1308. GL_OUTPUT_TEXTURE_COORD27_EXT = $87B8;
  1309. GL_OUTPUT_TEXTURE_COORD28_EXT = $87B9;
  1310. GL_OUTPUT_TEXTURE_COORD29_EXT = $87BA;
  1311. GL_OUTPUT_TEXTURE_COORD30_EXT = $87BB;
  1312. GL_OUTPUT_TEXTURE_COORD31_EXT = $87BC;
  1313. GL_OUTPUT_FOG_EXT = $87BD;
  1314. GL_SCALAR_EXT = $87BE;
  1315. GL_VECTOR_EXT = $87BF;
  1316. GL_MATRIX_EXT = $87C0;
  1317. GL_VARIANT_EXT = $87C1;
  1318. GL_INVARIANT_EXT = $87C2;
  1319. GL_LOCAL_CONSTANT_EXT = $87C3;
  1320. GL_LOCAL_EXT = $87C4;
  1321. GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = $87C5;
  1322. GL_MAX_VERTEX_SHADER_VARIANTS_EXT = $87C6;
  1323. GL_MAX_VERTEX_SHADER_INVARIANTS_EXT = $87C7;
  1324. GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = $87C8;
  1325. GL_MAX_VERTEX_SHADER_LOCALS_EXT = $87C9;
  1326. GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = $87CA;
  1327. GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = $87CB;
  1328. GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = $87CC;
  1329. GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = $87CD;
  1330. GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = $87CE;
  1331. GL_VERTEX_SHADER_INSTRUCTIONS_EXT = $87CF;
  1332. GL_VERTEX_SHADER_VARIANTS_EXT = $87D0;
  1333. GL_VERTEX_SHADER_INVARIANTS_EXT = $87D1;
  1334. GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = $87D2;
  1335. GL_VERTEX_SHADER_LOCALS_EXT = $87D3;
  1336. GL_VERTEX_SHADER_BINDING_EXT = $8781;
  1337. GL_VERTEX_SHADER_OPTIMIZED_EXT = $87D4;
  1338. GL_X_EXT = $87D5;
  1339. GL_Y_EXT = $87D6;
  1340. GL_Z_EXT = $87D7;
  1341. GL_W_EXT = $87D8;
  1342. GL_NEGATIVE_X_EXT = $87D9;
  1343. GL_NEGATIVE_Y_EXT = $87DA;
  1344. GL_NEGATIVE_Z_EXT = $87DB;
  1345. GL_NEGATIVE_W_EXT = $87DC;
  1346. GL_ZERO_EXT = $87DD;
  1347. GL_ONE_EXT = $87DE;
  1348. GL_NEGATIVE_ONE_EXT = $87DF;
  1349. GL_NORMALIZED_RANGE_EXT = $87E0;
  1350. GL_FULL_RANGE_EXT = $87E1;
  1351. GL_CURRENT_VERTEX_EXT = $87E2;
  1352. GL_MVP_MATRIX_EXT = $87E3;
  1353. var
  1354. glBeginVertexShaderEXT: procedure(); extdecl;
  1355. glEndVertexShaderEXT: procedure(); extdecl;
  1356. glBindVertexShaderEXT: procedure(id: GLuint); extdecl;
  1357. glGenVertexShadersEXT: function(range: GLuint): GLuint; extdecl;
  1358. glDeleteVertexShaderEXT: procedure(id: GLuint); extdecl;
  1359. glShaderOp1EXT: procedure(op: GLenum; res: GLuint; arg1: GLuint); extdecl;
  1360. glShaderOp2EXT: procedure(op: GLenum; res: GLuint; arg1: GLuint; arg2: GLuint); extdecl;
  1361. glShaderOp3EXT: procedure(op: GLenum; res: GLuint; arg1: GLuint; arg2: GLuint; arg3: GLuint); extdecl;
  1362. glSwizzleEXT: procedure(res: GLuint; _in: GLuint; outX: GLenum; outY: GLenum; outZ: GLenum; outW: GLenum); extdecl;
  1363. glWriteMaskEXT: procedure(res: GLuint; _in: GLuint; outX: GLenum; outY: GLenum; outZ: GLenum; outW: GLenum); extdecl;
  1364. glInsertComponentEXT: procedure(res: GLuint; src: GLuint; num: GLuint); extdecl;
  1365. glExtractComponentEXT: procedure(res: GLuint; src: GLuint; num: GLuint); extdecl;
  1366. glGenSymbolsEXT: function(datatype: GLenum; storagetype: GLenum; range: GLenum; components: GLuint): GLuint; extdecl;
  1367. glSetInvariantEXT: procedure(id: GLuint; _type: GLenum; addr: PGLvoid); extdecl;
  1368. glSetLocalConstantEXT: procedure(id: GLuint; _type: GLenum; addr: PGLvoid); extdecl;
  1369. glVariantbvEXT: procedure(id: GLuint; addr: PGLbyte); extdecl;
  1370. glVariantsvEXT: procedure(id: GLuint; addr: PGLshort); extdecl;
  1371. glVariantivEXT: procedure(id: GLuint; addr: PGLint); extdecl;
  1372. glVariantfvEXT: procedure(id: GLuint; addr: PGLfloat); extdecl;
  1373. glVariantdvEXT: procedure(id: GLuint; addr: PGLdouble); extdecl;
  1374. glVariantubvEXT: procedure(id: GLuint; addr: PGLubyte); extdecl;
  1375. glVariantusvEXT: procedure(id: GLuint; addr: PGLushort); extdecl;
  1376. glVariantuivEXT: procedure(id: GLuint; addr: PGLuint); extdecl;
  1377. glVariantPointerEXT: procedure(id: GLuint; _type: GLenum; stride: GLuint; addr: PGLvoid); extdecl;
  1378. glEnableVariantClientStateEXT: procedure(id: GLuint); extdecl;
  1379. glDisableVariantClientStateEXT: procedure(id: GLuint); extdecl;
  1380. glBindLightParameterEXT: function(light: GLenum; value: GLenum): GLuint; extdecl;
  1381. glBindMaterialParameterEXT: function(face: GLenum; value: GLenum): GLuint; extdecl;
  1382. glBindTexGenParameterEXT: function(_unit: GLenum; coord: GLenum; value: GLenum): GLuint; extdecl;
  1383. glBindTextureUnitParameterEXT: function(_unit: GLenum; value: GLenum): GLuint; extdecl;
  1384. glBindParameterEXT: function(value: GLenum): GLuint; extdecl;
  1385. glIsVariantEnabledEXT: function(id: GLuint; cap: GLenum): GLboolean; extdecl;
  1386. glGetVariantBooleanvEXT: procedure(id: GLuint; value: GLenum; data: PGLboolean); extdecl;
  1387. glGetVariantIntegervEXT: procedure(id: GLuint; value: GLenum; data: PGLint); extdecl;
  1388. glGetVariantFloatvEXT: procedure(id: GLuint; value: GLenum; data: PGLfloat); extdecl;
  1389. glGetVariantPointervEXT: procedure(id: GLuint; value: GLenum; data: PGLvoid); extdecl;
  1390. glGetInvariantBooleanvEXT: procedure(id: GLuint; value: GLenum; data: PGLboolean); extdecl;
  1391. glGetInvariantIntegervEXT: procedure(id: GLuint; value: GLenum; data: PGLint); extdecl;
  1392. glGetInvariantFloatvEXT: procedure(id: GLuint; value: GLenum; data: PGLfloat); extdecl;
  1393. glGetLocalConstantBooleanvEXT: procedure(id: GLuint; value: GLenum; data: PGLboolean); extdecl;
  1394. glGetLocalConstantIntegervEXT: procedure(id: GLuint; value: GLenum; data: PGLint); extdecl;
  1395. glGetLocalConstantFloatvEXT: procedure(id: GLuint; value: GLenum; data: PGLfloat); extdecl;
  1396. function Load_GL_EXT_vertex_shader: Boolean;
  1397. //***** GL_EXT_vertex_weighting *****//
  1398. const
  1399. GL_VERTEX_WEIGHTING_EXT = $8509;
  1400. GL_MODELVIEW0_EXT = $1700;
  1401. GL_MODELVIEW1_EXT = $850A;
  1402. GL_MODELVIEW0_MATRIX_EXT = $0BA6;
  1403. GL_MODELVIEW1_MATRIX_EXT = $8506;
  1404. GL_CURRENT_VERTEX_WEIGHT_EXT = $850B;
  1405. GL_VERTEX_WEIGHT_ARRAY_EXT = $850C;
  1406. GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT = $850D;
  1407. GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT = $850E;
  1408. GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = $850F;
  1409. GL_MODELVIEW0_STACK_DEPTH_EXT = $0BA3;
  1410. GL_MODELVIEW1_STACK_DEPTH_EXT = $8502;
  1411. GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = $8510;
  1412. var
  1413. glVertexWeightfEXT: procedure(weight: GLfloat); extdecl;
  1414. glVertexWeightfvEXT: procedure(weight: PGLfloat); extdecl;
  1415. glVertexWeightPointerEXT: procedure(size: GLint; _type: GLenum; stride: GLsizei; pointer: PGLvoid); extdecl;
  1416. function Load_GL_EXT_vertex_weighting: Boolean;
  1417. //***** GL_HP_occlusion_test *****//
  1418. const
  1419. GL_OCCLUSION_TEST_HP = $8165;
  1420. GL_OCCLUSION_TEST_RESULT_HP = $8166;
  1421. function Load_GL_HP_occlusion_test: Boolean;
  1422. //***** GL_NV_blend_square *****//
  1423. function Load_GL_NV_blend_square: Boolean;
  1424. //***** GL_NV_copy_depth_to_color *****//
  1425. const
  1426. GL_DEPTH_STENCIL_TO_RGBA_NV = $886E;
  1427. GL_DEPTH_STENCIL_TO_BGRA_NV = $886F;
  1428. function Load_GL_NV_copy_depth_to_color: Boolean;
  1429. //***** GL_NV_depth_clamp *****//
  1430. const
  1431. GL_DEPTH_CLAMP_NV = $864F;
  1432. function Load_GL_NV_depth_clamp: Boolean;
  1433. //***** GL_NV_evaluators *****//
  1434. const
  1435. GL_EVAL_2D_NV = $86C0;
  1436. GL_EVAL_TRIANGULAR_2D_NV = $86C1;
  1437. GL_MAP_TESSELLATION_NV = $86C2;
  1438. GL_MAP_ATTRIB_U_ORDER_NV = $86C3;
  1439. GL_MAP_ATTRIB_V_ORDER_NV = $86C4;
  1440. GL_EVAL_FRACTIONAL_TESSELLATION_NV = $86C5;
  1441. GL_EVAL_VERTEX_ATTRIB0_NV = $86C6;
  1442. GL_EVAL_VERTEX_ATTRIB1_NV = $86C7;
  1443. GL_EVAL_VERTEX_ATTRIB2_NV = $86C8;
  1444. GL_EVAL_VERTEX_ATTRIB3_NV = $86C9;
  1445. GL_EVAL_VERTEX_ATTRIB4_NV = $86CA;
  1446. GL_EVAL_VERTEX_ATTRIB5_NV = $86CB;
  1447. GL_EVAL_VERTEX_ATTRIB6_NV = $86CC;
  1448. GL_EVAL_VERTEX_ATTRIB7_NV = $86CD;
  1449. GL_EVAL_VERTEX_ATTRIB8_NV = $86CE;
  1450. GL_EVAL_VERTEX_ATTRIB9_NV = $86CF;
  1451. GL_EVAL_VERTEX_ATTRIB10_NV = $86D0;
  1452. GL_EVAL_VERTEX_ATTRIB11_NV = $86D1;
  1453. GL_EVAL_VERTEX_ATTRIB12_NV = $86D2;
  1454. GL_EVAL_VERTEX_ATTRIB13_NV = $86D3;
  1455. GL_EVAL_VERTEX_ATTRIB14_NV = $86D4;
  1456. GL_EVAL_VERTEX_ATTRIB15_NV = $86D5;
  1457. GL_MAX_MAP_TESSELLATION_NV = $86D6;
  1458. GL_MAX_RATIONAL_EVAL_ORDER_NV = $86D7;
  1459. var
  1460. glMapControlPointsNV: procedure(target: GLenum; index: GLuint; _type: GLenum; ustride: GLsizei; vstride: GLsizei; uorder: GLint; vorder: GLint; _packed: GLboolean; const points: PGLvoid); extdecl;
  1461. glMapParameterivNV: procedure(target: GLenum; pname: GLenum; const params: PGLint); extdecl;
  1462. glMapParameterfvNV: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); extdecl;
  1463. glGetMapControlPointsNV: procedure(target: GLenum; index: GLuint; _type: GLenum; ustride: GLsizei; vstride: GLsizei; _packed: GLboolean; points: PGLvoid); extdecl;
  1464. glGetMapParameterivNV: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  1465. glGetMapParameterfvNV: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  1466. glGetMapAttribParameterivNV: procedure(target: GLenum; index: GLuint; pname: GLenum; params: PGLint); extdecl;
  1467. glGetMapAttribParameterfvNV: procedure(target: GLenum; index: GLuint; pname: GLenum; params: PGLfloat); extdecl;
  1468. glEvalMapsNV: procedure(target: GLenum; mode: GLenum); extdecl;
  1469. function Load_GL_NV_evaluators: Boolean;
  1470. //***** GL_NV_fence *****//
  1471. const
  1472. GL_ALL_COMPLETED_NV = $84F2;
  1473. GL_FENCE_STATUS_NV = $84F3;
  1474. GL_FENCE_CONDITION_NV = $84F4;
  1475. var
  1476. glGenFencesNV: procedure(n: GLsizei; fences: PGLuint); extdecl;
  1477. glDeleteFencesNV: procedure(n: GLsizei; const fences: PGLuint); extdecl;
  1478. glSetFenceNV: procedure(fence: GLuint; condition: GLenum); extdecl;
  1479. glTestFenceNV: function(fence: GLuint): GLboolean; extdecl;
  1480. glFinishFenceNV: procedure(fence: GLuint); extdecl;
  1481. glIsFenceNV: function(fence: GLuint): GLboolean; extdecl;
  1482. glGetFenceivNV: procedure(fence: GLuint; pname: GLenum; params: PGLint); extdecl;
  1483. function Load_GL_NV_fence: Boolean;
  1484. //***** GL_NV_fog_distance *****//
  1485. const
  1486. GL_FOG_DISTANCE_MODE_NV = $855A;
  1487. GL_EYE_RADIAL_NV = $855B;
  1488. GL_EYE_PLANE_ABSOLUTE_NV = $855C;
  1489. function Load_GL_NV_fog_distance: Boolean;
  1490. //***** GL_NV_light_max_exponent *****//
  1491. const
  1492. GL_MAX_SHININESS_NV = $8504;
  1493. GL_MAX_SPOT_EXPONENT_NV = $8505;
  1494. function Load_GL_NV_light_max_exponent: Boolean;
  1495. //***** GL_NV_multisample_filter_hint *****//
  1496. const
  1497. GL_MULTISAMPLE_FILTER_HINT_NV = $8534;
  1498. function Load_GL_NV_multisample_filter_hint: Boolean;
  1499. //***** GL_NV_occlusion_query *****//
  1500. // GL_OCCLUSION_TEST_HP { already defined }
  1501. // GL_OCCLUSION_TEST_RESULT_HP { already defined }
  1502. const
  1503. GL_PIXEL_COUNTER_BITS_NV = $8864;
  1504. GL_CURRENT_OCCLUSION_QUERY_ID_NV = $8865;
  1505. GL_PIXEL_COUNT_NV = $8866;
  1506. GL_PIXEL_COUNT_AVAILABLE_NV = $8867;
  1507. var
  1508. glGenOcclusionQueriesNV: procedure(n: GLsizei; ids: PGLuint); extdecl;
  1509. glDeleteOcclusionQueriesNV: procedure(n: GLsizei; const ids: PGLuint); extdecl;
  1510. glIsOcclusionQueryNV: function(id: GLuint): GLboolean; extdecl;
  1511. glBeginOcclusionQueryNV: procedure(id: GLuint); extdecl;
  1512. glEndOcclusionQueryNV: procedure(); extdecl;
  1513. glGetOcclusionQueryivNV: procedure(id: GLuint; pname: GLenum; params: PGLint); extdecl;
  1514. glGetOcclusionQueryuivNV: procedure(id: GLuint; pname: GLenum; params: PGLuint); extdecl;
  1515. function Load_GL_NV_occlusion_query: Boolean;
  1516. //***** GL_NV_packed_depth_stencil *****//
  1517. const
  1518. GL_DEPTH_STENCIL_NV = $84F9;
  1519. GL_UNSIGNED_INT_24_8_NV = $84FA;
  1520. function Load_GL_NV_packed_depth_stencil: Boolean;
  1521. //***** GL_NV_point_sprite *****//
  1522. const
  1523. GL_POINT_SPRITE_NV = $8861;
  1524. GL_COORD_REPLACE_NV = $8862;
  1525. GL_POINT_SPRITE_R_MODE_NV = $8863;
  1526. var
  1527. glPointParameteriNV: procedure(pname: GLenum; param: GLint); extdecl;
  1528. glPointParameterivNV: procedure(pname: GLenum; const params: PGLint); extdecl;
  1529. function Load_GL_NV_point_sprite: Boolean;
  1530. //***** GL_NV_register_combiners *****//
  1531. const
  1532. GL_REGISTER_COMBINERS_NV = $8522;
  1533. GL_COMBINER0_NV = $8550;
  1534. GL_COMBINER1_NV = $8551;
  1535. GL_COMBINER2_NV = $8552;
  1536. GL_COMBINER3_NV = $8553;
  1537. GL_COMBINER4_NV = $8554;
  1538. GL_COMBINER5_NV = $8555;
  1539. GL_COMBINER6_NV = $8556;
  1540. GL_COMBINER7_NV = $8557;
  1541. GL_VARIABLE_A_NV = $8523;
  1542. GL_VARIABLE_B_NV = $8524;
  1543. GL_VARIABLE_C_NV = $8525;
  1544. GL_VARIABLE_D_NV = $8526;
  1545. GL_VARIABLE_E_NV = $8527;
  1546. GL_VARIABLE_F_NV = $8528;
  1547. GL_VARIABLE_G_NV = $8529;
  1548. GL_CONSTANT_COLOR0_NV = $852A;
  1549. GL_CONSTANT_COLOR1_NV = $852B;
  1550. GL_PRIMARY_COLOR_NV = $852C;
  1551. GL_SECONDARY_COLOR_NV = $852D;
  1552. GL_SPARE0_NV = $852E;
  1553. GL_SPARE1_NV = $852F;
  1554. GL_UNSIGNED_IDENTITY_NV = $8536;
  1555. GL_UNSIGNED_INVERT_NV = $8537;
  1556. GL_EXPAND_NORMAL_NV = $8538;
  1557. GL_EXPAND_NEGATE_NV = $8539;
  1558. GL_HALF_BIAS_NORMAL_NV = $853A;
  1559. GL_HALF_BIAS_NEGATE_NV = $853B;
  1560. GL_SIGNED_IDENTITY_NV = $853C;
  1561. GL_SIGNED_NEGATE_NV = $853D;
  1562. GL_E_TIMES_F_NV = $8531;
  1563. GL_SPARE0_PLUS_SECONDARY_COLOR_NV = $8532;
  1564. GL_SCALE_BY_TWO_NV = $853E;
  1565. GL_SCALE_BY_FOUR_NV = $853F;
  1566. GL_SCALE_BY_ONE_HALF_NV = $8540;
  1567. GL_BIAS_BY_NEGATIVE_ONE_HALF_NV = $8541;
  1568. GL_DISCARD_NV = $8530;
  1569. GL_COMBINER_INPUT_NV = $8542;
  1570. GL_COMBINER_MAPPING_NV = $8543;
  1571. GL_COMBINER_COMPONENT_USAGE_NV = $8544;
  1572. GL_COMBINER_AB_DOT_PRODUCT_NV = $8545;
  1573. GL_COMBINER_CD_DOT_PRODUCT_NV = $8546;
  1574. GL_COMBINER_MUX_SUM_NV = $8547;
  1575. GL_COMBINER_SCALE_NV = $8548;
  1576. GL_COMBINER_BIAS_NV = $8549;
  1577. GL_COMBINER_AB_OUTPUT_NV = $854A;
  1578. GL_COMBINER_CD_OUTPUT_NV = $854B;
  1579. GL_COMBINER_SUM_OUTPUT_NV = $854C;
  1580. GL_NUM_GENERAL_COMBINERS_NV = $854E;
  1581. GL_COLOR_SUM_CLAMP_NV = $854F;
  1582. GL_MAX_GENERAL_COMBINERS_NV = $854D;
  1583. var
  1584. glCombinerParameterfvNV: procedure(pname: GLenum; const params: PGLfloat); extdecl;
  1585. glCombinerParameterivNV: procedure(pname: GLenum; const params: PGLint); extdecl;
  1586. glCombinerParameterfNV: procedure(pname: GLenum; param: GLfloat); extdecl;
  1587. glCombinerParameteriNV: procedure(pname: GLenum; param: GLint); extdecl;
  1588. glCombinerInputNV: procedure(stage: GLenum; portion: GLenum; variable: GLenum; input: GLenum; mapping: GLenum; componentUsage: GLenum); extdecl;
  1589. glCombinerOutputNV: procedure(stage: GLenum; portion: GLenum; abOutput: GLenum; cdOutput: GLenum; sumOutput: GLenum; scale: GLenum; bias: GLenum; abDotProduct: GLboolean; cdDotProduct: GLboolean; muxSum: GLboolean); extdecl;
  1590. glFinalCombinerInputNV: procedure(variable: GLenum; input: GLenum; mapping: GLenum; componentUsage: GLenum); extdecl;
  1591. glGetCombinerInputParameterfvNV: procedure(stage: GLenum; portion: GLenum; variable: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  1592. glGetCombinerInputParameterivNV: procedure(stage: GLenum; portion: GLenum; variable: GLenum; pname: GLenum; params: PGLint); extdecl;
  1593. glGetCombinerOutputParameterfvNV: procedure(stage: GLenum; portion: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  1594. glGetCombinerOutputParameterivNV: procedure(stage: GLenum; portion: GLenum; pname: GLenum; params: PGLint); extdecl;
  1595. glGetFinalCombinerInputParameterfvNV: procedure(variable: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  1596. glGetFinalCombinerInputParameterivNV: procedure(variable: GLenum; pname: GLenum; params: PGLint); extdecl;
  1597. function Load_GL_NV_register_combiners: Boolean;
  1598. //***** GL_NV_register_combiners2 *****//
  1599. const
  1600. GL_PER_STAGE_CONSTANTS_NV = $8535;
  1601. var
  1602. glCombinerStageParameterfvNV: procedure(stage: GLenum; pname: GLenum; const params: PGLfloat); extdecl;
  1603. glGetCombinerStageParameterfvNV: procedure(stage: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  1604. function Load_GL_NV_register_combiners2: Boolean;
  1605. //***** GL_NV_texgen_emboss *****//
  1606. const
  1607. GL_EMBOSS_MAP_NV = $855F;
  1608. GL_EMBOSS_LIGHT_NV = $855D;
  1609. GL_EMBOSS_CONSTANT_NV = $855E;
  1610. function Load_GL_NV_texgen_emboss: Boolean;
  1611. //***** GL_NV_texgen_reflection *****//
  1612. const
  1613. GL_NORMAL_MAP_NV = $8511;
  1614. GL_REFLECTION_MAP_NV = $8512;
  1615. function Load_GL_NV_texgen_reflection: Boolean;
  1616. //***** GL_NV_texture_compression_vtc *****//
  1617. // GL_COMPRESSED_RGB_S3TC_DXT1_EXT { already defined }
  1618. // GL_COMPRESSED_RGBA_S3TC_DXT1_EXT { already defined }
  1619. // GL_COMPRESSED_RGBA_S3TC_DXT3_EXT { already defined }
  1620. // GL_COMPRESSED_RGBA_S3TC_DXT5_EXT { already defined }
  1621. function Load_GL_NV_texture_compression_vtc: Boolean;
  1622. //***** GL_NV_texture_env_combine4 *****//
  1623. const
  1624. GL_COMBINE4_NV = $8503;
  1625. GL_SOURCE3_RGB_NV = $8583;
  1626. GL_SOURCE3_ALPHA_NV = $858B;
  1627. GL_OPERAND3_RGB_NV = $8593;
  1628. GL_OPERAND3_ALPHA_NV = $859B;
  1629. function Load_GL_NV_texture_env_combine4: Boolean;
  1630. //***** GL_NV_texture_rectangle *****//
  1631. const
  1632. GL_TEXTURE_RECTANGLE_NV = $84F5;
  1633. GL_TEXTURE_BINDING_RECTANGLE_NV = $84F6;
  1634. GL_PROXY_TEXTURE_RECTANGLE_NV = $84F7;
  1635. GL_MAX_RECTANGLE_TEXTURE_SIZE_NV = $84F8;
  1636. function Load_GL_NV_texture_rectangle: Boolean;
  1637. //***** GL_NV_texture_shader *****//
  1638. const
  1639. GL_TEXTURE_SHADER_NV = $86DE;
  1640. GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = $86D9;
  1641. GL_SHADER_OPERATION_NV = $86DF;
  1642. GL_CULL_MODES_NV = $86E0;
  1643. GL_OFFSET_TEXTURE_MATRIX_NV = $86E1;
  1644. GL_OFFSET_TEXTURE_SCALE_NV = $86E2;
  1645. GL_OFFSET_TEXTURE_BIAS_NV = $86E3;
  1646. GL_PREVIOUS_TEXTURE_INPUT_NV = $86E4;
  1647. GL_CONST_EYE_NV = $86E5;
  1648. GL_SHADER_CONSISTENT_NV = $86DD;
  1649. GL_PASS_THROUGH_NV = $86E6;
  1650. GL_CULL_FRAGMENT_NV = $86E7;
  1651. GL_OFFSET_TEXTURE_2D_NV = $86E8;
  1652. GL_OFFSET_TEXTURE_RECTANGLE_NV = $864C;
  1653. GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV = $864D;
  1654. GL_DEPENDENT_AR_TEXTURE_2D_NV = $86E9;
  1655. GL_DEPENDENT_GB_TEXTURE_2D_NV = $86EA;
  1656. GL_DOT_PRODUCT_NV = $86EC;
  1657. GL_DOT_PRODUCT_DEPTH_REPLACE_NV = $86ED;
  1658. GL_DOT_PRODUCT_TEXTURE_2D_NV = $86EE;
  1659. GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = $864E;
  1660. GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = $86F0;
  1661. GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = $86F1;
  1662. GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV = $86F2;
  1663. GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = $86F3;
  1664. GL_HILO_NV = $86F4;
  1665. GL_DSDT_NV = $86F5;
  1666. GL_DSDT_MAG_NV = $86F6;
  1667. GL_DSDT_MAG_VIB_NV = $86F7;
  1668. GL_UNSIGNED_INT_S8_S8_8_8_NV = $86DA;
  1669. GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = $86DB;
  1670. GL_SIGNED_RGBA_NV = $86FB;
  1671. GL_SIGNED_RGBA8_NV = $86FC;
  1672. GL_SIGNED_RGB_NV = $86FE;
  1673. GL_SIGNED_RGB8_NV = $86FF;
  1674. GL_SIGNED_LUMINANCE_NV = $8701;
  1675. GL_SIGNED_LUMINANCE8_NV = $8702;
  1676. GL_SIGNED_LUMINANCE_ALPHA_NV = $8703;
  1677. GL_SIGNED_LUMINANCE8_ALPHA8_NV = $8704;
  1678. GL_SIGNED_ALPHA_NV = $8705;
  1679. GL_SIGNED_ALPHA8_NV = $8706;
  1680. GL_SIGNED_INTENSITY_NV = $8707;
  1681. GL_SIGNED_INTENSITY8_NV = $8708;
  1682. GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = $870C;
  1683. GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = $870D;
  1684. GL_HILO16_NV = $86F8;
  1685. GL_SIGNED_HILO_NV = $86F9;
  1686. GL_SIGNED_HILO16_NV = $86FA;
  1687. GL_DSDT8_NV = $8709;
  1688. GL_DSDT8_MAG8_NV = $870A;
  1689. GL_DSDT_MAG_INTENSITY_NV = $86DC;
  1690. GL_DSDT8_MAG8_INTENSITY8_NV = $870B;
  1691. GL_HI_SCALE_NV = $870E;
  1692. GL_LO_SCALE_NV = $870F;
  1693. GL_DS_SCALE_NV = $8710;
  1694. GL_DT_SCALE_NV = $8711;
  1695. GL_MAGNITUDE_SCALE_NV = $8712;
  1696. GL_VIBRANCE_SCALE_NV = $8713;
  1697. GL_HI_BIAS_NV = $8714;
  1698. GL_LO_BIAS_NV = $8715;
  1699. GL_DS_BIAS_NV = $8716;
  1700. GL_DT_BIAS_NV = $8717;
  1701. GL_MAGNITUDE_BIAS_NV = $8718;
  1702. GL_VIBRANCE_BIAS_NV = $8719;
  1703. GL_TEXTURE_BORDER_VALUES_NV = $871A;
  1704. GL_TEXTURE_HI_SIZE_NV = $871B;
  1705. GL_TEXTURE_LO_SIZE_NV = $871C;
  1706. GL_TEXTURE_DS_SIZE_NV = $871D;
  1707. GL_TEXTURE_DT_SIZE_NV = $871E;
  1708. GL_TEXTURE_MAG_SIZE_NV = $871F;
  1709. function Load_GL_NV_texture_shader: Boolean;
  1710. //***** GL_NV_texture_shader2 *****//
  1711. const
  1712. GL_DOT_PRODUCT_TEXTURE_3D_NV = $86EF;
  1713. // GL_HILO_NV { already defined }
  1714. // GL_DSDT_NV { already defined }
  1715. // GL_DSDT_MAG_NV { already defined }
  1716. // GL_DSDT_MAG_VIB_NV { already defined }
  1717. // GL_UNSIGNED_INT_S8_S8_8_8_NV { already defined }
  1718. // GL_UNSIGNED_INT_8_8_S8_S8_REV_NV { already defined }
  1719. // GL_SIGNED_RGBA_NV { already defined }
  1720. // GL_SIGNED_RGBA8_NV { already defined }
  1721. // GL_SIGNED_RGB_NV { already defined }
  1722. // GL_SIGNED_RGB8_NV { already defined }
  1723. // GL_SIGNED_LUMINANCE_NV { already defined }
  1724. // GL_SIGNED_LUMINANCE8_NV { already defined }
  1725. // GL_SIGNED_LUMINANCE_ALPHA_NV { already defined }
  1726. // GL_SIGNED_LUMINANCE8_ALPHA8_NV { already defined }
  1727. // GL_SIGNED_ALPHA_NV { already defined }
  1728. // GL_SIGNED_ALPHA8_NV { already defined }
  1729. // GL_SIGNED_INTENSITY_NV { already defined }
  1730. // GL_SIGNED_INTENSITY8_NV { already defined }
  1731. // GL_SIGNED_RGB_UNSIGNED_ALPHA_NV { already defined }
  1732. // GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV { already defined }
  1733. // GL_HILO16_NV { already defined }
  1734. // GL_SIGNED_HILO_NV { already defined }
  1735. // GL_SIGNED_HILO16_NV { already defined }
  1736. // GL_DSDT8_NV { already defined }
  1737. // GL_DSDT8_MAG8_NV { already defined }
  1738. // GL_DSDT_MAG_INTENSITY_NV { already defined }
  1739. // GL_DSDT8_MAG8_INTENSITY8_NV { already defined }
  1740. function Load_GL_NV_texture_shader2: Boolean;
  1741. //***** GL_NV_texture_shader3 *****//
  1742. const
  1743. GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = $8850;
  1744. GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = $8851;
  1745. GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = $8852;
  1746. GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = $8853;
  1747. GL_OFFSET_HILO_TEXTURE_2D_NV = $8854;
  1748. GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV = $8855;
  1749. GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = $8856;
  1750. GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = $8857;
  1751. GL_DEPENDENT_HILO_TEXTURE_2D_NV = $8858;
  1752. GL_DEPENDENT_RGB_TEXTURE_3D_NV = $8859;
  1753. GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = $885A;
  1754. GL_DOT_PRODUCT_PASS_THROUGH_NV = $885B;
  1755. GL_DOT_PRODUCT_TEXTURE_1D_NV = $885C;
  1756. GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = $885D;
  1757. GL_HILO8_NV = $885E;
  1758. GL_SIGNED_HILO8_NV = $885F;
  1759. GL_FORCE_BLUE_TO_ONE_NV = $8860;
  1760. function Load_GL_NV_texture_shader3: Boolean;
  1761. //***** GL_NV_vertex_array_range *****//
  1762. const
  1763. GL_VERTEX_ARRAY_RANGE_NV = $851D;
  1764. GL_VERTEX_ARRAY_RANGE_LENGTH_NV = $851E;
  1765. GL_VERTEX_ARRAY_RANGE_VALID_NV = $851F;
  1766. GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = $8520;
  1767. GL_VERTEX_ARRAY_RANGE_POINTER_NV = $8521;
  1768. var
  1769. glVertexArrayRangeNV: procedure(length: GLsizei; pointer: PGLvoid); extdecl;
  1770. glFlushVertexArrayRangeNV: procedure(); extdecl;
  1771. {$IFDEF Windows}
  1772. wglAllocateMemoryNV: function(size: GLsizei; readFrequency: GLfloat; writeFrequency: GLfloat; priority: GLfloat): PGLvoid; extdecl;
  1773. wglFreeMemoryNV: procedure(pointer: PGLvoid); extdecl;
  1774. {$ENDIF}
  1775. function Load_GL_NV_vertex_array_range: Boolean;
  1776. //***** GL_NV_vertex_array_range2 *****//
  1777. const
  1778. GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = $8533;
  1779. function Load_GL_NV_vertex_array_range2: Boolean;
  1780. //***** GL_NV_vertex_program *****//
  1781. const
  1782. GL_VERTEX_PROGRAM_NV = $8620;
  1783. GL_VERTEX_PROGRAM_POINT_SIZE_NV = $8642;
  1784. GL_VERTEX_PROGRAM_TWO_SIDE_NV = $8643;
  1785. GL_VERTEX_STATE_PROGRAM_NV = $8621;
  1786. GL_ATTRIB_ARRAY_SIZE_NV = $8623;
  1787. GL_ATTRIB_ARRAY_STRIDE_NV = $8624;
  1788. GL_ATTRIB_ARRAY_TYPE_NV = $8625;
  1789. GL_CURRENT_ATTRIB_NV = $8626;
  1790. GL_PROGRAM_PARAMETER_NV = $8644;
  1791. GL_ATTRIB_ARRAY_POINTER_NV = $8645;
  1792. GL_PROGRAM_TARGET_NV = $8646;
  1793. GL_PROGRAM_LENGTH_NV = $8627;
  1794. GL_PROGRAM_RESIDENT_NV = $8647;
  1795. GL_PROGRAM_STRING_NV = $8628;
  1796. GL_TRACK_MATRIX_NV = $8648;
  1797. GL_TRACK_MATRIX_TRANSFORM_NV = $8649;
  1798. GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV = $862E;
  1799. GL_MAX_TRACK_MATRICES_NV = $862F;
  1800. GL_CURRENT_MATRIX_STACK_DEPTH_NV = $8640;
  1801. GL_CURRENT_MATRIX_NV = $8641;
  1802. GL_VERTEX_PROGRAM_BINDING_NV = $864A;
  1803. GL_PROGRAM_ERROR_POSITION_NV = $864B;
  1804. GL_MODELVIEW_PROJECTION_NV = $8629;
  1805. GL_MATRIX0_NV = $8630;
  1806. GL_MATRIX1_NV = $8631;
  1807. GL_MATRIX2_NV = $8632;
  1808. GL_MATRIX3_NV = $8633;
  1809. GL_MATRIX4_NV = $8634;
  1810. GL_MATRIX5_NV = $8635;
  1811. GL_MATRIX6_NV = $8636;
  1812. GL_MATRIX7_NV = $8637;
  1813. GL_IDENTITY_NV = $862A;
  1814. GL_INVERSE_NV = $862B;
  1815. GL_TRANSPOSE_NV = $862C;
  1816. GL_INVERSE_TRANSPOSE_NV = $862D;
  1817. GL_VERTEX_ATTRIB_ARRAY0_NV = $8650;
  1818. GL_VERTEX_ATTRIB_ARRAY1_NV = $8651;
  1819. GL_VERTEX_ATTRIB_ARRAY2_NV = $8652;
  1820. GL_VERTEX_ATTRIB_ARRAY3_NV = $8653;
  1821. GL_VERTEX_ATTRIB_ARRAY4_NV = $8654;
  1822. GL_VERTEX_ATTRIB_ARRAY5_NV = $8655;
  1823. GL_VERTEX_ATTRIB_ARRAY6_NV = $8656;
  1824. GL_VERTEX_ATTRIB_ARRAY7_NV = $8657;
  1825. GL_VERTEX_ATTRIB_ARRAY8_NV = $8658;
  1826. GL_VERTEX_ATTRIB_ARRAY9_NV = $8659;
  1827. GL_VERTEX_ATTRIB_ARRAY10_NV = $865A;
  1828. GL_VERTEX_ATTRIB_ARRAY11_NV = $865B;
  1829. GL_VERTEX_ATTRIB_ARRAY12_NV = $865C;
  1830. GL_VERTEX_ATTRIB_ARRAY13_NV = $865D;
  1831. GL_VERTEX_ATTRIB_ARRAY14_NV = $865E;
  1832. GL_VERTEX_ATTRIB_ARRAY15_NV = $865F;
  1833. GL_MAP1_VERTEX_ATTRIB0_4_NV = $8660;
  1834. GL_MAP1_VERTEX_ATTRIB1_4_NV = $8661;
  1835. GL_MAP1_VERTEX_ATTRIB2_4_NV = $8662;
  1836. GL_MAP1_VERTEX_ATTRIB3_4_NV = $8663;
  1837. GL_MAP1_VERTEX_ATTRIB4_4_NV = $8664;
  1838. GL_MAP1_VERTEX_ATTRIB5_4_NV = $8665;
  1839. GL_MAP1_VERTEX_ATTRIB6_4_NV = $8666;
  1840. GL_MAP1_VERTEX_ATTRIB7_4_NV = $8667;
  1841. GL_MAP1_VERTEX_ATTRIB8_4_NV = $8668;
  1842. GL_MAP1_VERTEX_ATTRIB9_4_NV = $8669;
  1843. GL_MAP1_VERTEX_ATTRIB10_4_NV = $866A;
  1844. GL_MAP1_VERTEX_ATTRIB11_4_NV = $866B;
  1845. GL_MAP1_VERTEX_ATTRIB12_4_NV = $866C;
  1846. GL_MAP1_VERTEX_ATTRIB13_4_NV = $866D;
  1847. GL_MAP1_VERTEX_ATTRIB14_4_NV = $866E;
  1848. GL_MAP1_VERTEX_ATTRIB15_4_NV = $866F;
  1849. GL_MAP2_VERTEX_ATTRIB0_4_NV = $8670;
  1850. GL_MAP2_VERTEX_ATTRIB1_4_NV = $8671;
  1851. GL_MAP2_VERTEX_ATTRIB2_4_NV = $8672;
  1852. GL_MAP2_VERTEX_ATTRIB3_4_NV = $8673;
  1853. GL_MAP2_VERTEX_ATTRIB4_4_NV = $8674;
  1854. GL_MAP2_VERTEX_ATTRIB5_4_NV = $8675;
  1855. GL_MAP2_VERTEX_ATTRIB6_4_NV = $8676;
  1856. GL_MAP2_VERTEX_ATTRIB7_4_NV = $8677;
  1857. GL_MAP2_VERTEX_ATTRIB8_4_NV = $8678;
  1858. GL_MAP2_VERTEX_ATTRIB9_4_NV = $8679;
  1859. GL_MAP2_VERTEX_ATTRIB10_4_NV = $867A;
  1860. GL_MAP2_VERTEX_ATTRIB11_4_NV = $867B;
  1861. GL_MAP2_VERTEX_ATTRIB12_4_NV = $867C;
  1862. GL_MAP2_VERTEX_ATTRIB13_4_NV = $867D;
  1863. GL_MAP2_VERTEX_ATTRIB14_4_NV = $867E;
  1864. GL_MAP2_VERTEX_ATTRIB15_4_NV = $867F;
  1865. var
  1866. glBindProgramNV: procedure(target: GLenum; id: GLuint); extdecl;
  1867. glDeleteProgramsNV: procedure(n: GLsizei; const ids: PGLuint); extdecl;
  1868. glExecuteProgramNV: procedure(target: GLenum; id: GLuint; const params: PGLfloat); extdecl;
  1869. glGenProgramsNV: procedure(n: GLsizei; ids: PGLuint); extdecl;
  1870. glAreProgramsResidentNV: function(n: GLsizei; const ids: PGLuint; residences: PGLboolean): GLboolean; extdecl;
  1871. glRequestResidentProgramsNV: procedure(n: GLsizei; ids: PGLuint); extdecl;
  1872. glGetProgramParameterfvNV: procedure(target: GLenum; index: GLuint; pname: GLenum; params: PGLfloat); extdecl;
  1873. glGetProgramParameterdvNV: procedure(target: GLenum; index: GLuint; pname: GLenum; params: PGLdouble); extdecl;
  1874. glGetProgramivNV: procedure(id: GLuint; pname: GLenum; params: PGLint); extdecl;
  1875. glGetProgramStringNV: procedure(id: GLuint; pname: GLenum; _program: PGLubyte); extdecl;
  1876. glGetTrackMatrixivNV: procedure(target: GLenum; address: GLuint; pname: GLenum; params: PGLint); extdecl;
  1877. glGetVertexAttribdvNV: procedure(index: GLuint; pname: GLenum; params: PGLdouble); extdecl;
  1878. glGetVertexAttribfvNV: procedure(index: GLuint; pname: GLenum; params: PGLfloat); extdecl;
  1879. glGetVertexAttribivNV: procedure(index: GLuint; pname: GLenum; params: PGLint); extdecl;
  1880. glGetVertexAttribPointervNV: procedure(index: GLuint; pname: GLenum; pointer: PGLvoid); extdecl;
  1881. glIsProgramNV: function(id: GLuint): GLboolean; extdecl;
  1882. glLoadProgramNV: procedure(target: GLenum; id: GLuint; len: GLsizei; const _program: PGLubyte); extdecl;
  1883. glProgramParameter4fNV: procedure(target: GLenum; index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  1884. glProgramParameter4fvNV: procedure(target: GLenum; index: GLuint; const params: PGLfloat); extdecl;
  1885. glProgramParameters4dvNV: procedure(target: GLenum; index: GLuint; num: GLuint; const params: PGLdouble); extdecl;
  1886. glProgramParameters4fvNV: procedure(target: GLenum; index: GLuint; num: GLuint; const params: PGLfloat); extdecl;
  1887. glTrackMatrixNV: procedure(target: GLenum; address: GLuint; matrix: GLenum; transform: GLenum); extdecl;
  1888. glVertexAttribPointerNV: procedure(index: GLuint; size: GLint; _type: GLenum; stride: GLsizei; const pointer: PGLvoid); extdecl;
  1889. glVertexAttrib1sNV: procedure(index: GLuint; x: GLshort); extdecl;
  1890. glVertexAttrib1fNV: procedure(index: GLuint; x: GLfloat); extdecl;
  1891. glVertexAttrib1dNV: procedure(index: GLuint; x: GLdouble); extdecl;
  1892. glVertexAttrib2sNV: procedure(index: GLuint; x: GLshort; y: GLshort); extdecl;
  1893. glVertexAttrib2fNV: procedure(index: GLuint; x: GLfloat; y: GLfloat); extdecl;
  1894. glVertexAttrib2dNV: procedure(index: GLuint; x: GLdouble; y: GLdouble); extdecl;
  1895. glVertexAttrib3sNV: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort); extdecl;
  1896. glVertexAttrib3fNV: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  1897. glVertexAttrib3dNV: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble); extdecl;
  1898. glVertexAttrib4sNV: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort; w: GLshort); extdecl;
  1899. glVertexAttrib4fNV: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  1900. glVertexAttrib4dNV: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl;
  1901. glVertexAttrib4ubNV: procedure(index: GLuint; x: GLubyte; y: GLubyte; z: GLubyte; w: GLubyte); extdecl;
  1902. glVertexAttrib1svNV: procedure(index: GLuint; const v: PGLshort); extdecl;
  1903. glVertexAttrib1fvNV: procedure(index: GLuint; const v: PGLfloat); extdecl;
  1904. glVertexAttrib1dvNV: procedure(index: GLuint; const v: PGLdouble); extdecl;
  1905. glVertexAttrib2svNV: procedure(index: GLuint; const v: PGLshort); extdecl;
  1906. glVertexAttrib2fvNV: procedure(index: GLuint; const v: PGLfloat); extdecl;
  1907. glVertexAttrib2dvNV: procedure(index: GLuint; const v: PGLdouble); extdecl;
  1908. glVertexAttrib3svNV: procedure(index: GLuint; const v: PGLshort); extdecl;
  1909. glVertexAttrib3fvNV: procedure(index: GLuint; const v: PGLfloat); extdecl;
  1910. glVertexAttrib3dvNV: procedure(index: GLuint; const v: PGLdouble); extdecl;
  1911. glVertexAttrib4svNV: procedure(index: GLuint; const v: PGLshort); extdecl;
  1912. glVertexAttrib4fvNV: procedure(index: GLuint; const v: PGLfloat); extdecl;
  1913. glVertexAttrib4dvNV: procedure(index: GLuint; const v: PGLdouble); extdecl;
  1914. glVertexAttrib4ubvNV: procedure(index: GLuint; const v: PGLubyte); extdecl;
  1915. glVertexAttribs1svNV: procedure(index: GLuint; n: GLsizei; const v: PGLshort); extdecl;
  1916. glVertexAttribs1fvNV: procedure(index: GLuint; n: GLsizei; const v: PGLfloat); extdecl;
  1917. glVertexAttribs1dvNV: procedure(index: GLuint; n: GLsizei; const v: PGLdouble); extdecl;
  1918. glVertexAttribs2svNV: procedure(index: GLuint; n: GLsizei; const v: PGLshort); extdecl;
  1919. glVertexAttribs2fvNV: procedure(index: GLuint; n: GLsizei; const v: PGLfloat); extdecl;
  1920. glVertexAttribs2dvNV: procedure(index: GLuint; n: GLsizei; const v: PGLdouble); extdecl;
  1921. glVertexAttribs3svNV: procedure(index: GLuint; n: GLsizei; const v: PGLshort); extdecl;
  1922. glVertexAttribs3fvNV: procedure(index: GLuint; n: GLsizei; const v: PGLfloat); extdecl;
  1923. glVertexAttribs3dvNV: procedure(index: GLuint; n: GLsizei; const v: PGLdouble); extdecl;
  1924. glVertexAttribs4svNV: procedure(index: GLuint; n: GLsizei; const v: PGLshort); extdecl;
  1925. glVertexAttribs4fvNV: procedure(index: GLuint; n: GLsizei; const v: PGLfloat); extdecl;
  1926. glVertexAttribs4dvNV: procedure(index: GLuint; n: GLsizei; const v: PGLdouble); extdecl;
  1927. glVertexAttribs4ubvNV: procedure(index: GLuint; n: GLsizei; const v: PGLubyte); extdecl;
  1928. function Load_GL_NV_vertex_program: Boolean;
  1929. //***** GL_NV_vertex_program1_1 *****//
  1930. function Load_GL_NV_vertex_program1_1: Boolean;
  1931. //***** GL_ATI_element_array *****//
  1932. const
  1933. GL_ELEMENT_ARRAY_ATI = $8768;
  1934. GL_ELEMENT_ARRAY_TYPE_ATI = $8769;
  1935. GL_ELEMENT_ARRAY_POINTER_ATI = $876A;
  1936. var
  1937. glElementPointerATI: procedure(_type: GLenum; const pointer: PGLvoid); extdecl;
  1938. glDrawElementArrayATI: procedure(mode: GLenum; count: GLsizei); extdecl;
  1939. glDrawRangeElementArrayATI: procedure(mode: GLenum; start: GLuint; _end: GLuint; count: GLsizei); extdecl;
  1940. function Load_GL_ATI_element_array: Boolean;
  1941. //***** GL_ATI_envmap_bumpmap *****//
  1942. const
  1943. GL_BUMP_ROT_MATRIX_ATI = $8775;
  1944. GL_BUMP_ROT_MATRIX_SIZE_ATI = $8776;
  1945. GL_BUMP_NUM_TEX_UNITS_ATI = $8777;
  1946. GL_BUMP_TEX_UNITS_ATI = $8778;
  1947. GL_DUDV_ATI = $8779;
  1948. GL_DU8DV8_ATI = $877A;
  1949. GL_BUMP_ENVMAP_ATI = $877B;
  1950. GL_BUMP_TARGET_ATI = $877C;
  1951. var
  1952. glTexBumpParameterivATI: procedure(pname: GLenum; param: PGLint); extdecl;
  1953. glTexBumpParameterfvATI: procedure(pname: GLenum; param: PGLfloat); extdecl;
  1954. glGetTexBumpParameterivATI: procedure(pname: GLenum; param: PGLint); extdecl;
  1955. glGetTexBumpParameterfvATI: procedure(pname: GLenum; param: PGLfloat); extdecl;
  1956. function Load_GL_ATI_envmap_bumpmap: Boolean;
  1957. //***** GL_ATI_fragment_shader *****//
  1958. const
  1959. GL_FRAGMENT_SHADER_ATI = $8920;
  1960. GL_REG_0_ATI = $8921;
  1961. GL_REG_1_ATI = $8922;
  1962. GL_REG_2_ATI = $8923;
  1963. GL_REG_3_ATI = $8924;
  1964. GL_REG_4_ATI = $8925;
  1965. GL_REG_5_ATI = $8926;
  1966. GL_CON_0_ATI = $8941;
  1967. GL_CON_1_ATI = $8942;
  1968. GL_CON_2_ATI = $8943;
  1969. GL_CON_3_ATI = $8944;
  1970. GL_CON_4_ATI = $8945;
  1971. GL_CON_5_ATI = $8946;
  1972. GL_CON_6_ATI = $8947;
  1973. GL_CON_7_ATI = $8948;
  1974. GL_MOV_ATI = $8961;
  1975. GL_ADD_ATI = $8963;
  1976. GL_MUL_ATI = $8964;
  1977. GL_SUB_ATI = $8965;
  1978. GL_DOT3_ATI = $8966;
  1979. GL_DOT4_ATI = $8967;
  1980. GL_MAD_ATI = $8968;
  1981. GL_LERP_ATI = $8969;
  1982. GL_CND_ATI = $896A;
  1983. GL_CND0_ATI = $896B;
  1984. GL_DOT2_ADD_ATI = $896C;
  1985. GL_SECONDARY_INTERPOLATOR_ATI = $896D;
  1986. GL_SWIZZLE_STR_ATI = $8976;
  1987. GL_SWIZZLE_STQ_ATI = $8977;
  1988. GL_SWIZZLE_STR_DR_ATI = $8978;
  1989. GL_SWIZZLE_STQ_DQ_ATI = $8979;
  1990. GL_RED_BIT_ATI = $0001;
  1991. GL_GREEN_BIT_ATI = $0002;
  1992. GL_BLUE_BIT_ATI = $0004;
  1993. GL_2X_BIT_ATI = $0001;
  1994. GL_4X_BIT_ATI = $0002;
  1995. GL_8X_BIT_ATI = $0004;
  1996. GL_HALF_BIT_ATI = $0008;
  1997. GL_QUARTER_BIT_ATI = $0010;
  1998. GL_EIGHTH_BIT_ATI = $0020;
  1999. GL_SATURATE_BIT_ATI = $0040;
  2000. // GL_2X_BIT_ATI { already defined }
  2001. GL_COMP_BIT_ATI = $0002;
  2002. GL_NEGATE_BIT_ATI = $0004;
  2003. GL_BIAS_BIT_ATI = $0008;
  2004. var
  2005. glGenFragmentShadersATI: function(range: GLuint): GLuint; extdecl;
  2006. glBindFragmentShaderATI: procedure(id: GLuint); extdecl;
  2007. glDeleteFragmentShaderATI: procedure(id: GLuint); extdecl;
  2008. glBeginFragmentShaderATI: procedure(); extdecl;
  2009. glEndFragmentShaderATI: procedure(); extdecl;
  2010. glPassTexCoordATI: procedure(dst: GLuint; coord: GLuint; swizzle: GLenum); extdecl;
  2011. glSampleMapATI: procedure(dst: GLuint; interp: GLuint; swizzle: GLenum); extdecl;
  2012. glColorFragmentOp1ATI: procedure(op: GLenum; dst: GLuint; dstMask: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint); extdecl;
  2013. glColorFragmentOp2ATI: procedure(op: GLenum; dst: GLuint; dstMask: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint; arg2: GLuint; arg2Rep: GLuint; arg2Mod: GLuint); extdecl;
  2014. glColorFragmentOp3ATI: procedure(op: GLenum; dst: GLuint; dstMask: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint; arg2: GLuint; arg2Rep: GLuint; arg2Mod: GLuint; arg3: GLuint; arg3Rep: GLuint; arg3Mod: GLuint); extdecl;
  2015. glAlphaFragmentOp1ATI: procedure(op: GLenum; dst: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint); extdecl;
  2016. glAlphaFragmentOp2ATI: procedure(op: GLenum; dst: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint; arg2: GLuint; arg2Rep: GLuint; arg2Mod: GLuint); extdecl;
  2017. glAlphaFragmentOp3ATI: procedure(op: GLenum; dst: GLuint; dstMod: GLuint; arg1: GLuint; arg1Rep: GLuint; arg1Mod: GLuint; arg2: GLuint; arg2Rep: GLuint; arg2Mod: GLuint; arg3: GLuint; arg3Rep: GLuint; arg3Mod: GLuint); extdecl;
  2018. glSetFragmentShaderConstantATI: procedure(dst: GLuint; const value: PGLfloat); extdecl;
  2019. function Load_GL_ATI_fragment_shader: Boolean;
  2020. //***** GL_ATI_pn_triangles *****//
  2021. const
  2022. GL_PN_TRIANGLES_ATI = $87F0;
  2023. GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = $87F1;
  2024. GL_PN_TRIANGLES_POINT_MODE_ATI = $87F2;
  2025. GL_PN_TRIANGLES_NORMAL_MODE_ATI = $87F3;
  2026. GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI = $87F4;
  2027. GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI = $87F5;
  2028. GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI = $87F6;
  2029. GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = $87F7;
  2030. GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = $87F8;
  2031. var
  2032. glPNTrianglesiATI: procedure(pname: GLenum; param: GLint); extdecl;
  2033. glPNTrianglesfATI: procedure(pname: GLenum; param: GLfloat); extdecl;
  2034. function Load_GL_ATI_pn_triangles: Boolean;
  2035. //***** GL_ATI_texture_mirror_once *****//
  2036. const
  2037. GL_MIRROR_CLAMP_ATI = $8742;
  2038. GL_MIRROR_CLAMP_TO_EDGE_ATI = $8743;
  2039. function Load_GL_ATI_texture_mirror_once: Boolean;
  2040. //***** GL_ATI_vertex_array_object *****//
  2041. const
  2042. GL_STATIC_ATI = $8760;
  2043. GL_DYNAMIC_ATI = $8761;
  2044. GL_PRESERVE_ATI = $8762;
  2045. GL_DISCARD_ATI = $8763;
  2046. GL_OBJECT_BUFFER_SIZE_ATI = $8764;
  2047. GL_OBJECT_BUFFER_USAGE_ATI = $8765;
  2048. GL_ARRAY_OBJECT_BUFFER_ATI = $8766;
  2049. GL_ARRAY_OBJECT_OFFSET_ATI = $8767;
  2050. var
  2051. glNewObjectBufferATI: function(size: GLsizei; const pointer: PGLvoid; usage: GLenum): GLuint; extdecl;
  2052. glIsObjectBufferATI: function(buffer: GLuint): GLboolean; extdecl;
  2053. glUpdateObjectBufferATI: procedure(buffer: GLuint; offset: GLuint; size: GLsizei; const pointer: PGLvoid; preserve: GLenum); extdecl;
  2054. glGetObjectBufferfvATI: procedure(buffer: GLuint; pname: GLenum; params: PGLfloat); extdecl;
  2055. glGetObjectBufferivATI: procedure(buffer: GLuint; pname: GLenum; params: PGLint); extdecl;
  2056. glDeleteObjectBufferATI: procedure(buffer: GLuint); extdecl;
  2057. glArrayObjectATI: procedure(_array: GLenum; size: GLint; _type: GLenum; stride: GLsizei; buffer: GLuint; offset: GLuint); extdecl;
  2058. glGetArrayObjectfvATI: procedure(_array: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  2059. glGetArrayObjectivATI: procedure(_array: GLenum; pname: GLenum; params: PGLint); extdecl;
  2060. glVariantArrayObjectATI: procedure(id: GLuint; _type: GLenum; stride: GLsizei; buffer: GLuint; offset: GLuint); extdecl;
  2061. glGetVariantArrayObjectfvATI: procedure(id: GLuint; pname: GLenum; params: PGLfloat); extdecl;
  2062. glGetVariantArrayObjectivATI: procedure(id: GLuint; pname: GLenum; params: PGLint); extdecl;
  2063. function Load_GL_ATI_vertex_array_object: Boolean;
  2064. //***** GL_ATI_vertex_streams *****//
  2065. const
  2066. GL_MAX_VERTEX_STREAMS_ATI = $876B;
  2067. GL_VERTEX_STREAM0_ATI = $876C;
  2068. GL_VERTEX_STREAM1_ATI = $876D;
  2069. GL_VERTEX_STREAM2_ATI = $876E;
  2070. GL_VERTEX_STREAM3_ATI = $876F;
  2071. GL_VERTEX_STREAM4_ATI = $8770;
  2072. GL_VERTEX_STREAM5_ATI = $8771;
  2073. GL_VERTEX_STREAM6_ATI = $8772;
  2074. GL_VERTEX_STREAM7_ATI = $8773;
  2075. GL_VERTEX_SOURCE_ATI = $8774;
  2076. var
  2077. glVertexStream1s: procedure(stream: GLenum; coords: GLshort); extdecl;
  2078. glVertexStream1i: procedure(stream: GLenum; coords: GLint); extdecl;
  2079. glVertexStream1f: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2080. glVertexStream1d: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2081. glVertexStream1sv: procedure(stream: GLenum; coords: GLshort); extdecl;
  2082. glVertexStream1iv: procedure(stream: GLenum; coords: GLint); extdecl;
  2083. glVertexStream1fv: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2084. glVertexStream1dv: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2085. glVertexStream2s: procedure(stream: GLenum; coords: GLshort); extdecl;
  2086. glVertexStream2i: procedure(stream: GLenum; coords: GLint); extdecl;
  2087. glVertexStream2f: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2088. glVertexStream2d: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2089. glVertexStream2sv: procedure(stream: GLenum; coords: GLshort); extdecl;
  2090. glVertexStream2iv: procedure(stream: GLenum; coords: GLint); extdecl;
  2091. glVertexStream2fv: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2092. glVertexStream2dv: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2093. glVertexStream3s: procedure(stream: GLenum; coords: GLshort); extdecl;
  2094. glVertexStream3i: procedure(stream: GLenum; coords: GLint); extdecl;
  2095. glVertexStream3f: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2096. glVertexStream3d: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2097. glVertexStream3sv: procedure(stream: GLenum; coords: GLshort); extdecl;
  2098. glVertexStream3iv: procedure(stream: GLenum; coords: GLint); extdecl;
  2099. glVertexStream3fv: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2100. glVertexStream3dv: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2101. glVertexStream4s: procedure(stream: GLenum; coords: GLshort); extdecl;
  2102. glVertexStream4i: procedure(stream: GLenum; coords: GLint); extdecl;
  2103. glVertexStream4f: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2104. glVertexStream4d: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2105. glVertexStream4sv: procedure(stream: GLenum; coords: GLshort); extdecl;
  2106. glVertexStream4iv: procedure(stream: GLenum; coords: GLint); extdecl;
  2107. glVertexStream4fv: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2108. glVertexStream4dv: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2109. glNormalStream3b: procedure(stream: GLenum; coords: GLbyte); extdecl;
  2110. glNormalStream3s: procedure(stream: GLenum; coords: GLshort); extdecl;
  2111. glNormalStream3i: procedure(stream: GLenum; coords: GLint); extdecl;
  2112. glNormalStream3f: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2113. glNormalStream3d: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2114. glNormalStream3bv: procedure(stream: GLenum; coords: GLbyte); extdecl;
  2115. glNormalStream3sv: procedure(stream: GLenum; coords: GLshort); extdecl;
  2116. glNormalStream3iv: procedure(stream: GLenum; coords: GLint); extdecl;
  2117. glNormalStream3fv: procedure(stream: GLenum; coords: GLfloat); extdecl;
  2118. glNormalStream3dv: procedure(stream: GLenum; coords: GLdouble); extdecl;
  2119. glClientActiveVertexStream: procedure(stream: GLenum); extdecl;
  2120. glVertexBlendEnvi: procedure(pname: GLenum; param: GLint); extdecl;
  2121. glVertexBlendEnvf: procedure(pname: GLenum; param: GLfloat); extdecl;
  2122. function Load_GL_ATI_vertex_streams: Boolean;
  2123. {$IFDEF Windows}
  2124. //***** WGL_I3D_image_buffer *****//
  2125. const
  2126. WGL_IMAGE_BUFFER_MIN_ACCESS_I3D = $0001;
  2127. WGL_IMAGE_BUFFER_LOCK_I3D = $0002;
  2128. var
  2129. wglCreateImageBufferI3D: function(hDC: HDC; dwSize: DWORD; uFlags: UINT): PGLvoid; extdecl;
  2130. wglDestroyImageBufferI3D: function(hDC: HDC; pAddress: PGLvoid): BOOL; extdecl;
  2131. wglAssociateImageBufferEventsI3D: function(hdc: HDC; pEvent: PHandle; pAddress: PGLvoid; pSize: PDWORD; count: UINT): BOOL; extdecl;
  2132. wglReleaseImageBufferEventsI3D: function(hdc: HDC; pAddress: PGLvoid; count: UINT): BOOL; extdecl;
  2133. function Load_WGL_I3D_image_buffer: Boolean;
  2134. //***** WGL_I3D_swap_frame_lock *****//
  2135. var
  2136. wglEnableFrameLockI3D: function(): BOOL; extdecl;
  2137. wglDisableFrameLockI3D: function(): BOOL; extdecl;
  2138. wglIsEnabledFrameLockI3D: function(pFlag: PBOOL): BOOL; extdecl;
  2139. wglQueryFrameLockMasterI3D: function(pFlag: PBOOL): BOOL; extdecl;
  2140. function Load_WGL_I3D_swap_frame_lock: Boolean;
  2141. //***** WGL_I3D_swap_frame_usage *****//
  2142. var
  2143. wglGetFrameUsageI3D: function(pUsage: PGLfloat): BOOL; extdecl;
  2144. wglBeginFrameTrackingI3D: function(): BOOL; extdecl;
  2145. wglEndFrameTrackingI3D: function(): BOOL; extdecl;
  2146. wglQueryFrameTrackingI3D: function(pFrameCount: PDWORD; pMissedFrames: PDWORD; pLastMissedUsage: PGLfloat): BOOL; extdecl;
  2147. function Load_WGL_I3D_swap_frame_usage: Boolean;
  2148. {$ENDIF}
  2149. //***** GL_3DFX_texture_compression_FXT1 *****//
  2150. const
  2151. GL_COMPRESSED_RGB_FXT1_3DFX = $86B0;
  2152. GL_COMPRESSED_RGBA_FXT1_3DFX = $86B1;
  2153. function Load_GL_3DFX_texture_compression_FXT1: Boolean;
  2154. //***** GL_IBM_cull_vertex *****//
  2155. const
  2156. GL_CULL_VERTEX_IBM = $1928A;
  2157. function Load_GL_IBM_cull_vertex: Boolean;
  2158. //***** GL_IBM_multimode_draw_arrays *****//
  2159. var
  2160. glMultiModeDrawArraysIBM: procedure(mode: PGLenum; first: PGLint; count: PGLsizei; primcount: GLsizei; modestride: GLint); extdecl;
  2161. glMultiModeDrawElementsIBM: procedure(mode: PGLenum; count: PGLsizei; _type: GLenum; const indices: PGLvoid; primcount: GLsizei; modestride: GLint); extdecl;
  2162. function Load_GL_IBM_multimode_draw_arrays: Boolean;
  2163. //***** GL_IBM_raster_pos_clip *****//
  2164. const
  2165. GL_RASTER_POSITION_UNCLIPPED_IBM = $19262;
  2166. function Load_GL_IBM_raster_pos_clip: Boolean;
  2167. //***** GL_IBM_texture_mirrored_repeat *****//
  2168. const
  2169. GL_MIRRORED_REPEAT_IBM = $8370;
  2170. function Load_GL_IBM_texture_mirrored_repeat: Boolean;
  2171. //***** GL_IBM_vertex_array_lists *****//
  2172. const
  2173. GL_VERTEX_ARRAY_LIST_IBM = $1929E;
  2174. GL_NORMAL_ARRAY_LIST_IBM = $1929F;
  2175. GL_COLOR_ARRAY_LIST_IBM = $192A0;
  2176. GL_INDEX_ARRAY_LIST_IBM = $192A1;
  2177. GL_TEXTURE_COORD_ARRAY_LIST_IBM = $192A2;
  2178. GL_EDGE_FLAG_ARRAY_LIST_IBM = $192A3;
  2179. GL_FOG_COORDINATE_ARRAY_LIST_IBM = $192A4;
  2180. GL_SECONDARY_COLOR_ARRAY_LIST_IBM = $192A5;
  2181. GL_VERTEX_ARRAY_LIST_STRIDE_IBM = $192A8;
  2182. GL_NORMAL_ARRAY_LIST_STRIDE_IBM = $192A9;
  2183. GL_COLOR_ARRAY_LIST_STRIDE_IBM = $192AA;
  2184. GL_INDEX_ARRAY_LIST_STRIDE_IBM = $192AB;
  2185. GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM = $192AC;
  2186. GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM = $192AD;
  2187. GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM = $192AE;
  2188. GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM = $192AF;
  2189. var
  2190. glColorPointerListIBM: procedure(size: GLint; _type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); extdecl;
  2191. glSecondaryColorPointerListIBM: procedure(size: GLint; _type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); extdecl;
  2192. glEdgeFlagPointerListIBM: procedure(stride: GLint; const pointer: PGLboolean; ptrstride: GLint); extdecl;
  2193. glFogCoordPointerListIBM: procedure(_type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); extdecl;
  2194. glNormalPointerListIBM: procedure(_type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); extdecl;
  2195. glTexCoordPointerListIBM: procedure(size: GLint; _type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); extdecl;
  2196. glVertexPointerListIBM: procedure(size: GLint; _type: GLenum; stride: GLint; const pointer: PGLvoid; ptrstride: GLint); extdecl;
  2197. function Load_GL_IBM_vertex_array_lists: Boolean;
  2198. //***** GL_MESA_resize_buffers *****//
  2199. var
  2200. glResizeBuffersMESA: procedure(); extdecl;
  2201. function Load_GL_MESA_resize_buffers: Boolean;
  2202. //***** GL_MESA_window_pos *****//
  2203. var
  2204. glWindowPos2dMESA: procedure(x: GLdouble; y: GLdouble); extdecl;
  2205. glWindowPos2fMESA: procedure(x: GLfloat; y: GLfloat); extdecl;
  2206. glWindowPos2iMESA: procedure(x: GLint; y: GLint); extdecl;
  2207. glWindowPos2sMESA: procedure(x: GLshort; y: GLshort); extdecl;
  2208. glWindowPos2ivMESA: procedure(const p: PGLint); extdecl;
  2209. glWindowPos2svMESA: procedure(const p: PGLshort); extdecl;
  2210. glWindowPos2fvMESA: procedure(const p: PGLfloat); extdecl;
  2211. glWindowPos2dvMESA: procedure(const p: PGLdouble); extdecl;
  2212. glWindowPos3iMESA: procedure(x: GLint; y: GLint; z: GLint); extdecl;
  2213. glWindowPos3sMESA: procedure(x: GLshort; y: GLshort; z: GLshort); extdecl;
  2214. glWindowPos3fMESA: procedure(x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2215. glWindowPos3dMESA: procedure(x: GLdouble; y: GLdouble; z: GLdouble); extdecl;
  2216. glWindowPos3ivMESA: procedure(const p: PGLint); extdecl;
  2217. glWindowPos3svMESA: procedure(const p: PGLshort); extdecl;
  2218. glWindowPos3fvMESA: procedure(const p: PGLfloat); extdecl;
  2219. glWindowPos3dvMESA: procedure(const p: PGLdouble); extdecl;
  2220. glWindowPos4iMESA: procedure(x: GLint; y: GLint; z: GLint; w: GLint); extdecl;
  2221. glWindowPos4sMESA: procedure(x: GLshort; y: GLshort; z: GLshort; w: GLshort); extdecl;
  2222. glWindowPos4fMESA: procedure(x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  2223. glWindowPos4dMESA: procedure(x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl;
  2224. glWindowPos4ivMESA: procedure(const p: PGLint); extdecl;
  2225. glWindowPos4svMESA: procedure(const p: PGLshort); extdecl;
  2226. glWindowPos4fvMESA: procedure(const p: PGLfloat); extdecl;
  2227. glWindowPos4dvMESA: procedure(const p: PGLdouble); extdecl;
  2228. function Load_GL_MESA_window_pos: Boolean;
  2229. //***** GL_OML_interlace *****//
  2230. const
  2231. GL_INTERLACE_OML = $8980;
  2232. GL_INTERLACE_READ_OML = $8981;
  2233. function Load_GL_OML_interlace: Boolean;
  2234. //***** GL_OML_resample *****//
  2235. const
  2236. GL_PACK_RESAMPLE_OML = $8984;
  2237. GL_UNPACK_RESAMPLE_OML = $8985;
  2238. GL_RESAMPLE_REPLICATE_OML = $8986;
  2239. GL_RESAMPLE_ZERO_FILL_OML = $8987;
  2240. GL_RESAMPLE_AVERAGE_OML = $8988;
  2241. GL_RESAMPLE_DECIMATE_OML = $8989;
  2242. // GL_RESAMPLE_AVERAGE_OML { already defined }
  2243. function Load_GL_OML_resample: Boolean;
  2244. //***** GL_OML_subsample *****//
  2245. const
  2246. GL_FORMAT_SUBSAMPLE_24_24_OML = $8982;
  2247. GL_FORMAT_SUBSAMPLE_244_244_OML = $8983;
  2248. function Load_GL_OML_subsample: Boolean;
  2249. //***** GL_SGIS_generate_mipmap *****//
  2250. const
  2251. GL_GENERATE_MIPMAP_SGIS = $8191;
  2252. GL_GENERATE_MIPMAP_HINT_SGIS = $8192;
  2253. function Load_GL_SGIS_generate_mipmap: Boolean;
  2254. //***** GL_SGIS_multisample *****//
  2255. const
  2256. GLX_SAMPLE_BUFFERS_SGIS = $186A0;
  2257. GLX_SAMPLES_SGIS = $186A1;
  2258. GL_MULTISAMPLE_SGIS = $809D;
  2259. GL_SAMPLE_ALPHA_TO_MASK_SGIS = $809E;
  2260. GL_SAMPLE_ALPHA_TO_ONE_SGIS = $809F;
  2261. GL_SAMPLE_MASK_SGIS = $80A0;
  2262. GL_MULTISAMPLE_BIT_EXT = $20000000;
  2263. GL_1PASS_SGIS = $80A1;
  2264. GL_2PASS_0_SGIS = $80A2;
  2265. GL_2PASS_1_SGIS = $80A3;
  2266. GL_4PASS_0_SGIS = $80A4;
  2267. GL_4PASS_1_SGIS = $80A5;
  2268. GL_4PASS_2_SGIS = $80A6;
  2269. GL_4PASS_3_SGIS = $80A7;
  2270. GL_SAMPLE_BUFFERS_SGIS = $80A8;
  2271. GL_SAMPLES_SGIS = $80A9;
  2272. GL_SAMPLE_MASK_VALUE_SGIS = $80AA;
  2273. GL_SAMPLE_MASK_INVERT_SGIS = $80AB;
  2274. GL_SAMPLE_PATTERN_SGIS = $80AC;
  2275. var
  2276. glSampleMaskSGIS: procedure(value: GLclampf; invert: GLboolean); extdecl;
  2277. glSamplePatternSGIS: procedure(pattern: GLenum); extdecl;
  2278. function Load_GL_SGIS_multisample: Boolean;
  2279. //***** GL_SGIS_pixel_texture *****//
  2280. const
  2281. GL_PIXEL_TEXTURE_SGIS = $8353;
  2282. GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS = $8354;
  2283. GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS = $8355;
  2284. GL_PIXEL_GROUP_COLOR_SGIS = $8356;
  2285. var
  2286. glPixelTexGenParameteriSGIS: procedure(pname: GLenum; param: GLint); extdecl;
  2287. glPixelTexGenParameterfSGIS: procedure(pname: GLenum; param: GLfloat); extdecl;
  2288. glGetPixelTexGenParameterivSGIS: procedure(pname: GLenum; params: GLint); extdecl;
  2289. glGetPixelTexGenParameterfvSGIS: procedure(pname: GLenum; params: GLfloat); extdecl;
  2290. function Load_GL_SGIS_pixel_texture: Boolean;
  2291. //***** GL_SGIS_texture_border_clamp *****//
  2292. // GL_CLAMP_TO_BORDER_SGIS { already defined }
  2293. function Load_GL_SGIS_texture_border_clamp: Boolean;
  2294. //***** GL_SGIS_texture_color_mask *****//
  2295. const
  2296. GL_TEXTURE_COLOR_WRITEMASK_SGIS = $81EF;
  2297. var
  2298. glTextureColorMaskSGIS: procedure(r: GLboolean; g: GLboolean; b: GLboolean; a: GLboolean); extdecl;
  2299. function Load_GL_SGIS_texture_color_mask: Boolean;
  2300. //***** GL_SGIS_texture_edge_clamp *****//
  2301. const
  2302. GL_CLAMP_TO_EDGE_SGIS = $812F;
  2303. function Load_GL_SGIS_texture_edge_clamp: Boolean;
  2304. //***** GL_SGIS_texture_lod *****//
  2305. const
  2306. GL_TEXTURE_MIN_LOD_SGIS = $813A;
  2307. GL_TEXTURE_MAX_LOD_SGIS = $813B;
  2308. GL_TEXTURE_BASE_LEVEL_SGIS = $813C;
  2309. GL_TEXTURE_MAX_LEVEL_SGIS = $813D;
  2310. function Load_GL_SGIS_texture_lod: Boolean;
  2311. //***** GL_SGIS_depth_texture *****//
  2312. const
  2313. GL_DEPTH_COMPONENT16_SGIX = $81A5;
  2314. GL_DEPTH_COMPONENT24_SGIX = $81A6;
  2315. GL_DEPTH_COMPONENT32_SGIX = $81A7;
  2316. function Load_GL_SGIS_depth_texture: Boolean;
  2317. //***** GL_SGIX_fog_offset *****//
  2318. const
  2319. GL_FOG_OFFSET_SGIX = $8198;
  2320. GL_FOG_OFFSET_VALUE_SGIX = $8199;
  2321. function Load_GL_SGIX_fog_offset: Boolean;
  2322. //***** GL_SGIX_interlace *****//
  2323. const
  2324. GL_INTERLACE_SGIX = $8094;
  2325. function Load_GL_SGIX_interlace: Boolean;
  2326. //***** GL_SGIX_shadow_ambient *****//
  2327. const
  2328. GL_SHADOW_AMBIENT_SGIX = $80BF;
  2329. function Load_GL_SGIX_shadow_ambient: Boolean;
  2330. //***** GL_SGI_color_matrix *****//
  2331. const
  2332. GL_COLOR_MATRIX_SGI = $80B1;
  2333. GL_COLOR_MATRIX_STACK_DEPTH_SGI = $80B2;
  2334. GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI = $80B3;
  2335. GL_POST_COLOR_MATRIX_RED_SCALE_SGI = $80B4;
  2336. GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI = $80B5;
  2337. GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI = $80B6;
  2338. GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI = $80B7;
  2339. GL_POST_COLOR_MATRIX_RED_BIAS_SGI = $80B8;
  2340. GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI = $80B9;
  2341. GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI = $80BA;
  2342. GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI = $80BB;
  2343. function Load_GL_SGI_color_matrix: Boolean;
  2344. //***** GL_SGI_color_table *****//
  2345. const
  2346. GL_COLOR_TABLE_SGI = $80D0;
  2347. GL_POST_CONVOLUTION_COLOR_TABLE_SGI = $80D1;
  2348. GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI = $80D2;
  2349. GL_PROXY_COLOR_TABLE_SGI = $80D3;
  2350. GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI = $80D4;
  2351. GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI = $80D5;
  2352. GL_COLOR_TABLE_SCALE_SGI = $80D6;
  2353. GL_COLOR_TABLE_BIAS_SGI = $80D7;
  2354. GL_COLOR_TABLE_FORMAT_SGI = $80D8;
  2355. GL_COLOR_TABLE_WIDTH_SGI = $80D9;
  2356. GL_COLOR_TABLE_RED_SIZE_SGI = $80DA;
  2357. GL_COLOR_TABLE_GREEN_SIZE_SGI = $80DB;
  2358. GL_COLOR_TABLE_BLUE_SIZE_SGI = $80DC;
  2359. GL_COLOR_TABLE_ALPHA_SIZE_SGI = $80DD;
  2360. GL_COLOR_TABLE_LUMINANCE_SIZE_SGI = $80DE;
  2361. GL_COLOR_TABLE_INTENSITY_SIZE_SGI = $80DF;
  2362. var
  2363. glColorTableSGI: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; format: GLenum; _type: GLenum; const table: PGLvoid); extdecl;
  2364. glCopyColorTableSGI: procedure(target: GLenum; internalformat: GLenum; x: GLint; y: GLint; width: GLsizei); extdecl;
  2365. glColorTableParameterivSGI: procedure(target: GLenum; pname: GLenum; const params: PGLint); extdecl;
  2366. glColorTableParameterfvSGI: procedure(target: GLenum; pname: GLenum; const params: PGLfloat); extdecl;
  2367. glGetColorTableSGI: procedure(target: GLenum; format: GLenum; _type: GLenum; table: PGLvoid); extdecl;
  2368. glGetColorTableParameterivSGI: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  2369. glGetColorTableParameterfvSGI: procedure(target: GLenum; pname: GLenum; params: PGLfloat); extdecl;
  2370. function Load_GL_SGI_color_table: Boolean;
  2371. //***** GL_SGI_texture_color_table *****//
  2372. const
  2373. GL_TEXTURE_COLOR_TABLE_SGI = $80BC;
  2374. GL_PROXY_TEXTURE_COLOR_TABLE_SGI = $80BD;
  2375. function Load_GL_SGI_texture_color_table: Boolean;
  2376. //***** GL_SUN_vertex *****//
  2377. var
  2378. glColor4ubVertex2fSUN: procedure(r: GLubyte; g: GLubyte; b: GLubyte; a: GLubyte; x: GLfloat; y: GLfloat); extdecl;
  2379. glColor4ubVertex2fvSUN: procedure(const c: PGLubyte; const v: PGLfloat); extdecl;
  2380. glColor4ubVertex3fSUN: procedure(r: GLubyte; g: GLubyte; b: GLubyte; a: GLubyte; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2381. glColor4ubVertex3fvSUN: procedure(const c: PGLubyte; const v: PGLfloat); extdecl;
  2382. glColor3fVertex3fSUN: procedure(r: GLfloat; g: GLfloat; b: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2383. glColor3fVertex3fvSUN: procedure(const c: PGLfloat; const v: PGLfloat); extdecl;
  2384. glNormal3fVertex3fSUN: procedure(nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2385. glNormal3fVertex3fvSUN: procedure(const n: PGLfloat; const v: PGLfloat); extdecl;
  2386. glColor4fNormal3fVertex3fSUN: procedure(r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2387. glColor4fNormal3fVertex3fvSUN: procedure(const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); extdecl;
  2388. glTexCoord2fVertex3fSUN: procedure(s: GLfloat; t: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2389. glTexCoord2fVertex3fvSUN: procedure(const tc: PGLfloat; const v: PGLfloat); extdecl;
  2390. glTexCoord4fVertex4fSUN: procedure(s: GLfloat; t: GLfloat; p: GLfloat; q: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  2391. glTexCoord4fVertex4fvSUN: procedure(const tc: PGLfloat; const v: PGLfloat); extdecl;
  2392. glTexCoord2fColor4ubVertex3fSUN: procedure(s: GLfloat; t: GLfloat; r: GLubyte; g: GLubyte; b: GLubyte; a: GLubyte; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2393. glTexCoord2fColor4ubVertex3fvSUN: procedure(const tc: PGLfloat; const c: PGLubyte; const v: PGLfloat); extdecl;
  2394. glTexCoord2fColor3fVertex3fSUN: procedure(s: GLfloat; t: GLfloat; r: GLfloat; g: GLfloat; b: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2395. glTexCoord2fColor3fVertex3fvSUN: procedure(const tc: PGLfloat; const c: PGLfloat; const v: PGLfloat); extdecl;
  2396. glTexCoord2fNormal3fVertex3fSUN: procedure(s: GLfloat; t: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2397. glTexCoord2fNormal3fVertex3fvSUN: procedure(const tc: PGLfloat; const n: PGLfloat; const v: PGLfloat); extdecl;
  2398. glTexCoord2fColor4fNormal3fVertex3fSUN: procedure(s: GLfloat; t: GLfloat; r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2399. glTexCoord2fColor4fNormal3fVertex3fvSUN: procedure(const tc: PGLfloat; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); extdecl;
  2400. glTexCoord4fColor4fNormal3fVertex4fSUN: procedure(s: GLfloat; t: GLfloat; p: GLfloat; q: GLfloat; r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  2401. glTexCoord4fColor4fNormal3fVertex4fvSUN: procedure(const tc: PGLfloat; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); extdecl;
  2402. glReplacementCodeuiVertex3fSUN: procedure(rc: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2403. glReplacementCodeuiVertex3fvSUN: procedure(const rc: PGLuint; const v: PGLfloat); extdecl;
  2404. glReplacementCodeuiColor4ubVertex3fSUN: procedure(rc: GLuint; r: GLubyte; g: GLubyte; b: GLubyte; a: GLubyte; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2405. glReplacementCodeuiColor4ubVertex3fvSUN: procedure(const rc: PGLuint; const c: PGLubyte; const v: PGLfloat); extdecl;
  2406. glReplacementCodeuiColor3fVertex3fSUN: procedure(rc: GLuint; r: GLfloat; g: GLfloat; b: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2407. glReplacementCodeuiColor3fVertex3fvSUN: procedure(const rc: PGLuint; const c: PGLfloat; const v: PGLfloat); extdecl;
  2408. glReplacementCodeuiNormal3fVertex3fSUN: procedure(rc: GLuint; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2409. glReplacementCodeuiNormal3fVertex3fvSUN: procedure(const rc: PGLuint; const n: PGLfloat; const v: PGLfloat); extdecl;
  2410. glReplacementCodeuiColor4fNormal3fVertex3fSUN: procedure(rc: GLuint; r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2411. glReplacementCodeuiColor4fNormal3fVertex3fvSUN: procedure(const rc: PGLuint; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); extdecl;
  2412. glReplacementCodeuiTexCoord2fVertex3fSUN: procedure(rc: GLuint; s: GLfloat; t: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2413. glReplacementCodeuiTexCoord2fVertex3fvSUN: procedure(const rc: PGLuint; const tc: PGLfloat; const v: PGLfloat); extdecl;
  2414. glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN: procedure(rc: GLuint; s: GLfloat; t: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2415. glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN: procedure(const rc: PGLuint; const tc: PGLfloat; const n: PGLfloat; const v: PGLfloat); extdecl;
  2416. glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN: procedure(rc: GLuint; s: GLfloat; t: GLfloat; r: GLfloat; g: GLfloat; b: GLfloat; a: GLfloat; nx: GLfloat; ny: GLfloat; nz: GLfloat; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  2417. glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN: procedure(const rc: PGLuint; const tc: PGLfloat; const c: PGLfloat; const n: PGLfloat; const v: PGLfloat); extdecl;
  2418. function Load_GL_SUN_vertex: Boolean;
  2419. //***** GL_ARB_fragment_program *****//
  2420. const
  2421. GL_FRAGMENT_PROGRAM_ARB = $8804;
  2422. // GL_PROGRAM_FORMAT_ASCII_ARB { already defined }
  2423. // GL_PROGRAM_LENGTH_ARB { already defined }
  2424. // GL_PROGRAM_FORMAT_ARB { already defined }
  2425. // GL_PROGRAM_BINDING_ARB { already defined }
  2426. // GL_PROGRAM_INSTRUCTIONS_ARB { already defined }
  2427. // GL_MAX_PROGRAM_INSTRUCTIONS_ARB { already defined }
  2428. // GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB { already defined }
  2429. // GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB { already defined }
  2430. // GL_PROGRAM_TEMPORARIES_ARB { already defined }
  2431. // GL_MAX_PROGRAM_TEMPORARIES_ARB { already defined }
  2432. // GL_PROGRAM_NATIVE_TEMPORARIES_ARB { already defined }
  2433. // GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB { already defined }
  2434. // GL_PROGRAM_PARAMETERS_ARB { already defined }
  2435. // GL_MAX_PROGRAM_PARAMETERS_ARB { already defined }
  2436. // GL_PROGRAM_NATIVE_PARAMETERS_ARB { already defined }
  2437. // GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB { already defined }
  2438. // GL_PROGRAM_ATTRIBS_ARB { already defined }
  2439. // GL_MAX_PROGRAM_ATTRIBS_ARB { already defined }
  2440. // GL_PROGRAM_NATIVE_ATTRIBS_ARB { already defined }
  2441. // GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB { already defined }
  2442. // GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB { already defined }
  2443. // GL_MAX_PROGRAM_ENV_PARAMETERS_ARB { already defined }
  2444. // GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB { already defined }
  2445. GL_PROGRAM_ALU_INSTRUCTIONS_ARB = $8805;
  2446. GL_PROGRAM_TEX_INSTRUCTIONS_ARB = $8806;
  2447. GL_PROGRAM_TEX_INDIRECTIONS_ARB = $8807;
  2448. GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = $8808;
  2449. GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = $8809;
  2450. GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = $880A;
  2451. GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = $880B;
  2452. GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = $880C;
  2453. GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = $880D;
  2454. GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = $880E;
  2455. GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = $880F;
  2456. GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = $8810;
  2457. // GL_PROGRAM_STRING_ARB { already defined }
  2458. // GL_PROGRAM_ERROR_POSITION_ARB { already defined }
  2459. // GL_CURRENT_MATRIX_ARB { already defined }
  2460. // GL_TRANSPOSE_CURRENT_MATRIX_ARB { already defined }
  2461. // GL_CURRENT_MATRIX_STACK_DEPTH_ARB { already defined }
  2462. // GL_MAX_PROGRAM_MATRICES_ARB { already defined }
  2463. // GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB { already defined }
  2464. GL_MAX_TEXTURE_COORDS_ARB = $8871;
  2465. GL_MAX_TEXTURE_IMAGE_UNITS_ARB = $8872;
  2466. // GL_PROGRAM_ERROR_STRING_ARB { already defined }
  2467. // GL_MATRIX0_ARB { already defined }
  2468. // GL_MATRIX1_ARB { already defined }
  2469. // GL_MATRIX2_ARB { already defined }
  2470. // GL_MATRIX3_ARB { already defined }
  2471. // GL_MATRIX4_ARB { already defined }
  2472. // GL_MATRIX5_ARB { already defined }
  2473. // GL_MATRIX6_ARB { already defined }
  2474. // GL_MATRIX7_ARB { already defined }
  2475. // GL_MATRIX8_ARB { already defined }
  2476. // GL_MATRIX9_ARB { already defined }
  2477. // GL_MATRIX10_ARB { already defined }
  2478. // GL_MATRIX11_ARB { already defined }
  2479. // GL_MATRIX12_ARB { already defined }
  2480. // GL_MATRIX13_ARB { already defined }
  2481. // GL_MATRIX14_ARB { already defined }
  2482. // GL_MATRIX15_ARB { already defined }
  2483. // GL_MATRIX16_ARB { already defined }
  2484. // GL_MATRIX17_ARB { already defined }
  2485. // GL_MATRIX18_ARB { already defined }
  2486. // GL_MATRIX19_ARB { already defined }
  2487. // GL_MATRIX20_ARB { already defined }
  2488. // GL_MATRIX21_ARB { already defined }
  2489. // GL_MATRIX22_ARB { already defined }
  2490. // GL_MATRIX23_ARB { already defined }
  2491. // GL_MATRIX24_ARB { already defined }
  2492. // GL_MATRIX25_ARB { already defined }
  2493. // GL_MATRIX26_ARB { already defined }
  2494. // GL_MATRIX27_ARB { already defined }
  2495. // GL_MATRIX28_ARB { already defined }
  2496. // GL_MATRIX29_ARB { already defined }
  2497. // GL_MATRIX30_ARB { already defined }
  2498. // GL_MATRIX31_ARB { already defined }
  2499. // glProgramStringARB { already defined }
  2500. // glBindProgramARB { already defined }
  2501. // glDeleteProgramsARB { already defined }
  2502. // glGenProgramsARB { already defined }
  2503. // glProgramEnvParameter4dARB { already defined }
  2504. // glProgramEnvParameter4dvARB { already defined }
  2505. // glProgramEnvParameter4fARB { already defined }
  2506. // glProgramEnvParameter4fvARB { already defined }
  2507. // glProgramLocalParameter4dARB { already defined }
  2508. // glProgramLocalParameter4dvARB { already defined }
  2509. // glProgramLocalParameter4fARB { already defined }
  2510. // glProgramLocalParameter4fvARB { already defined }
  2511. // glGetProgramEnvParameterdvARB { already defined }
  2512. // glGetProgramEnvParameterfvARB { already defined }
  2513. // glGetProgramLocalParameterdvARB { already defined }
  2514. // glGetProgramLocalParameterfvARB { already defined }
  2515. // glGetProgramivARB { already defined }
  2516. // glGetProgramStringARB { already defined }
  2517. // glIsProgramARB { already defined }
  2518. function Load_GL_ARB_fragment_program: Boolean;
  2519. {***** GL_ATI_text_fragment_shader *****}
  2520. const
  2521. GL_TEXT_FRAGMENT_SHADER_ATI = $8200;
  2522. function Load_GL_ATI_text_fragment_shader: Boolean;
  2523. {***** GL_ARB_vertex_buffer_object *****}
  2524. const
  2525. GL_BUFFER_SIZE_ARB = $8764;
  2526. GL_BUFFER_USAGE_ARB = $8765;
  2527. GL_ARRAY_BUFFER_ARB = $8892;
  2528. GL_ELEMENT_ARRAY_BUFFER_ARB = $8893;
  2529. GL_ARRAY_BUFFER_BINDING_ARB = $8894;
  2530. GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = $8895;
  2531. GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = $8896;
  2532. GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = $8897;
  2533. GL_COLOR_ARRAY_BUFFER_BINDING_ARB = $8898;
  2534. GL_INDEX_ARRAY_BUFFER_BINDING_ARB = $8899;
  2535. GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = $889A;
  2536. GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = $889B;
  2537. GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = $889C;
  2538. GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = $889D;
  2539. GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = $889E;
  2540. GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = $889F;
  2541. GL_READ_ONLY_ARB = $88B8;
  2542. GL_WRITE_ONLY_ARB = $88B9;
  2543. GL_READ_WRITE_ARB = $88BA;
  2544. GL_BUFFER_ACCESS_ARB = $88BB;
  2545. GL_BUFFER_MAPPED_ARB = $88BC;
  2546. GL_BUFFER_MAP_POINTER_ARB = $88BD;
  2547. GL_STREAM_DRAW_ARB = $88E0;
  2548. GL_STREAM_READ_ARB = $88E1;
  2549. GL_STREAM_COPY_ARB = $88E2;
  2550. GL_STATIC_DRAW_ARB = $88E4;
  2551. GL_STATIC_READ_ARB = $88E5;
  2552. GL_STATIC_COPY_ARB = $88E6;
  2553. GL_DYNAMIC_DRAW_ARB = $88E8;
  2554. GL_DYNAMIC_READ_ARB = $88E9;
  2555. GL_DYNAMIC_COPY_ARB = $88EA;
  2556. var
  2557. glBindBufferARB : procedure(target : GLenum; buffer: GLuint); extdecl;
  2558. glDeleteBuffersARB : procedure(n : GLsizei; buffers : PGLuint); extdecl;
  2559. glGenBuffersARB : procedure(n : GLsizei; buffers : PGLuint); extdecl;
  2560. glIsBufferARB : function (buffer : GLuint) :GLboolean; extdecl;
  2561. glBufferDataARB : procedure(target : GLenum; size:GLsizei; data:PGLvoid;usage: GLenum); extdecl;
  2562. glBufferSubDataARB : procedure(target : GLenum; offset :GLint; size : GLsizei; data: PGLvoid); extdecl;
  2563. glGetBufferSubDataARB : procedure(target : GLenum; offset :GLint; size : GLsizei; data: PGLvoid); extdecl;
  2564. glMapBufferARB : function (target :GLenum; access: GLenum) : PGLvoid; extdecl;
  2565. glUnmapBufferARB : function (target :GLenum) :GLboolean; extdecl;
  2566. glGetBufferParameterivARB:procedure(target:GLenum; pname:GLenum; params:PGLint); extdecl;
  2567. glGetBufferPointervARB : procedure(target: GLenum; pname:GLenum; params: PPGLvoid); extdecl;
  2568. function Load_GL_ARB_vertex_buffer_object : boolean;
  2569. //***** GL_APPLE_client_storage *****//
  2570. const
  2571. GL_UNPACK_CLIENT_STORAGE_APPLE = $85B2;
  2572. function Load_GL_APPLE_client_storage: Boolean;
  2573. //***** GL_APPLE_element_array *****//
  2574. const
  2575. GL_ELEMENT_ARRAY_APPLE = $8768;
  2576. GL_ELEMENT_ARRAY_TYPE_APPLE = $8769;
  2577. GL_ELEMENT_ARRAY_POINTER_APPLE = $876A;
  2578. var
  2579. glElementPointerAPPLE: procedure(_type: GLenum; const pointer: PGLvoid); extdecl;
  2580. glDrawElementArrayAPPLE: procedure(mode: GLenum; first: GLint; count: GLsizei); extdecl;
  2581. glDrawRangeElementArrayAPPLE: procedure(mode: GLenum; start: GLuint; _end: GLuint; first: GLint; count: GLsizei); extdecl;
  2582. glMultiDrawElementArrayAPPLE: procedure(mode: GLenum; const first: PGLint; const count: PGLsizei; primcount: GLsizei); extdecl;
  2583. glMultiDrawRangeElementArrayAPPLE: procedure(mode: GLenum; start: GLuint; _end: GLuint; const first: PGLint; const count: PGLsizei; primcount: GLsizei); extdecl;
  2584. function Load_GL_APPLE_element_array: Boolean;
  2585. //***** GL_APPLE_fence *****//
  2586. const
  2587. GL_DRAW_PIXELS_APPLE = $8A0A;
  2588. GL_FENCE_APPLE = $8A0B;
  2589. var
  2590. glGenFencesAPPLE: procedure(n: GLsizei; fences: PGLuint); extdecl;
  2591. glDeleteFencesAPPLE: procedure(n: GLsizei; const fences: PGLuint); extdecl;
  2592. glSetFenceAPPLE: procedure(fence: GLuint); extdecl;
  2593. glIsFenceAPPLE: function(fence: GLuint): GLboolean; extdecl;
  2594. glTestFenceAPPLE: function(fence: GLuint): GLboolean; extdecl;
  2595. glFinishFenceAPPLE: procedure(fence: GLuint); extdecl;
  2596. glTestObjectAPPLE: function(_object: GLenum; name: GLuint): GLboolean; extdecl;
  2597. glFinishObjectAPPLE: procedure(_object: GLenum; name: GLint); extdecl;
  2598. function Load_GL_APPLE_fence: Boolean;
  2599. //***** GL_APPLE_vertex_array_object *****//
  2600. const
  2601. GL_VERTEX_ARRAY_BINDING_APPLE = $85B5;
  2602. var
  2603. glBindVertexArrayAPPLE: procedure(_array: GLuint); extdecl;
  2604. glDeleteVertexArraysAPPLE: procedure(n: GLsizei; const arrays: PGLuint); extdecl;
  2605. glGenVertexArraysAPPLE: procedure(n: GLsizei; const arrays: PGLuint); extdecl;
  2606. glIsVertexArrayAPPLE: function(_array: GLuint): GLboolean; extdecl;
  2607. function Load_GL_APPLE_vertex_array_object: Boolean;
  2608. //***** GL_APPLE_vertex_array_range *****//
  2609. const
  2610. GL_VERTEX_ARRAY_RANGE_APPLE = $851D;
  2611. GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE = $851E;
  2612. GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE = $8520;
  2613. GL_VERTEX_ARRAY_RANGE_POINTER_APPLE = $8521;
  2614. GL_VERTEX_ARRAY_STORAGE_HINT_APPLE = $851F;
  2615. GL_STORAGE_CACHED_APPLE = $85BE;
  2616. GL_STORAGE_SHARED_APPLE = $85BF;
  2617. var
  2618. glVertexArrayRangeAPPLE: procedure(length: GLsizei; pointer: PGLvoid); extdecl;
  2619. glFlushVertexArrayRangeAPPLE: procedure(length: GLsizei; pointer: PGLvoid); extdecl;
  2620. glVertexArrayParameteriAPPLE: procedure(pname: GLenum; param: GLint); extdecl;
  2621. function Load_GL_APPLE_vertex_array_range: Boolean;
  2622. {$IFDEF Windows}
  2623. //***** WGL_ARB_pixel_format *****//
  2624. const
  2625. WGL_NUMBER_PIXEL_FORMATS_ARB = $2000;
  2626. WGL_DRAW_TO_WINDOW_ARB = $2001;
  2627. WGL_DRAW_TO_BITMAP_ARB = $2002;
  2628. WGL_ACCELERATION_ARB = $2003;
  2629. WGL_NEED_PALETTE_ARB = $2004;
  2630. WGL_NEED_SYSTEM_PALETTE_ARB = $2005;
  2631. WGL_SWAP_LAYER_BUFFERS_ARB = $2006;
  2632. WGL_SWAP_METHOD_ARB = $2007;
  2633. WGL_NUMBER_OVERLAYS_ARB = $2008;
  2634. WGL_NUMBER_UNDERLAYS_ARB = $2009;
  2635. WGL_TRANSPARENT_ARB = $200A;
  2636. WGL_TRANSPARENT_RED_VALUE_ARB = $2037;
  2637. WGL_TRANSPARENT_GREEN_VALUE_ARB = $2038;
  2638. WGL_TRANSPARENT_BLUE_VALUE_ARB = $2039;
  2639. WGL_TRANSPARENT_ALPHA_VALUE_ARB = $203A;
  2640. WGL_TRANSPARENT_INDEX_VALUE_ARB = $203B;
  2641. WGL_SHARE_DEPTH_ARB = $200C;
  2642. WGL_SHARE_STENCIL_ARB = $200D;
  2643. WGL_SHARE_ACCUM_ARB = $200E;
  2644. WGL_SUPPORT_GDI_ARB = $200F;
  2645. WGL_SUPPORT_OPENGL_ARB = $2010;
  2646. WGL_DOUBLE_BUFFER_ARB = $2011;
  2647. WGL_STEREO_ARB = $2012;
  2648. WGL_PIXEL_TYPE_ARB = $2013;
  2649. WGL_COLOR_BITS_ARB = $2014;
  2650. WGL_RED_BITS_ARB = $2015;
  2651. WGL_RED_SHIFT_ARB = $2016;
  2652. WGL_GREEN_BITS_ARB = $2017;
  2653. WGL_GREEN_SHIFT_ARB = $2018;
  2654. WGL_BLUE_BITS_ARB = $2019;
  2655. WGL_BLUE_SHIFT_ARB = $201A;
  2656. WGL_ALPHA_BITS_ARB = $201B;
  2657. WGL_ALPHA_SHIFT_ARB = $201C;
  2658. WGL_ACCUM_BITS_ARB = $201D;
  2659. WGL_ACCUM_RED_BITS_ARB = $201E;
  2660. WGL_ACCUM_GREEN_BITS_ARB = $201F;
  2661. WGL_ACCUM_BLUE_BITS_ARB = $2020;
  2662. WGL_ACCUM_ALPHA_BITS_ARB = $2021;
  2663. WGL_DEPTH_BITS_ARB = $2022;
  2664. WGL_STENCIL_BITS_ARB = $2023;
  2665. WGL_AUX_BUFFERS_ARB = $2024;
  2666. WGL_NO_ACCELERATION_ARB = $2025;
  2667. WGL_GENERIC_ACCELERATION_ARB = $2026;
  2668. WGL_FULL_ACCELERATION_ARB = $2027;
  2669. WGL_SWAP_EXCHANGE_ARB = $2028;
  2670. WGL_SWAP_COPY_ARB = $2029;
  2671. WGL_SWAP_UNDEFINED_ARB = $202A;
  2672. WGL_TYPE_RGBA_ARB = $202B;
  2673. WGL_TYPE_COLORINDEX_ARB = $202C;
  2674. var
  2675. wglGetPixelFormatAttribivARB: function(hdc: HDC; iPixelFormat: GLint; iLayerPlane: GLint; nAttributes: GLuint; const piAttributes: PGLint; piValues: PGLint): BOOL; extdecl;
  2676. wglGetPixelFormatAttribfvARB: function(hdc: HDC; iPixelFormat: GLint; iLayerPlane: GLint; nAttributes: GLuint; const piAttributes: PGLint; pfValues: PGLfloat): BOOL; extdecl;
  2677. wglChoosePixelFormatARB: function(hdc: HDC; const piAttribIList: PGLint; const pfAttribFList: PGLfloat; nMaxFormats: GLuint; piFormats: PGLint; nNumFormats: PGLuint): BOOL; extdecl;
  2678. function Load_WGL_ARB_pixel_format: Boolean;
  2679. //***** WGL_ARB_make_current_read *****//
  2680. const
  2681. WGL_ERROR_INVALID_PIXEL_TYPE_ARB = $2043;
  2682. WGL_ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB = $2054;
  2683. var
  2684. wglMakeContextCurrentARB: function(hDrawDC: HDC; hReadDC: HDC; hglrc: HGLRC): BOOL; extdecl;
  2685. wglGetCurrentReadDCARB: function(): HDC; extdecl;
  2686. function Load_WGL_ARB_make_current_read: Boolean;
  2687. //***** WGL_ARB_pbuffer *****//
  2688. const
  2689. WGL_DRAW_TO_PBUFFER_ARB = $202D;
  2690. // WGL_DRAW_TO_PBUFFER_ARB { already defined }
  2691. WGL_MAX_PBUFFER_PIXELS_ARB = $202E;
  2692. WGL_MAX_PBUFFER_WIDTH_ARB = $202F;
  2693. WGL_MAX_PBUFFER_HEIGHT_ARB = $2030;
  2694. WGL_PBUFFER_LARGEST_ARB = $2033;
  2695. WGL_PBUFFER_WIDTH_ARB = $2034;
  2696. WGL_PBUFFER_HEIGHT_ARB = $2035;
  2697. WGL_PBUFFER_LOST_ARB = $2036;
  2698. var
  2699. wglCreatePbufferARB: function(hDC: HDC; iPixelFormat: GLint; iWidth: GLint; iHeight: GLint; const piAttribList: PGLint): THandle; extdecl;
  2700. wglGetPbufferDCARB: function(hPbuffer: THandle): HDC; extdecl;
  2701. wglReleasePbufferDCARB: function(hPbuffer: THandle; hDC: HDC): GLint; extdecl;
  2702. wglDestroyPbufferARB: function(hPbuffer: THandle): BOOL; extdecl;
  2703. wglQueryPbufferARB: function(hPbuffer: THandle; iAttribute: GLint; piValue: PGLint): BOOL; extdecl;
  2704. function Load_WGL_ARB_pbuffer: Boolean;
  2705. //***** WGL_EXT_swap_control *****//
  2706. var
  2707. wglSwapIntervalEXT: function(interval: GLint): BOOL; extdecl;
  2708. wglGetSwapIntervalEXT: function(): GLint; extdecl;
  2709. function Load_WGL_EXT_swap_control: Boolean;
  2710. //***** WGL_ARB_render_texture *****//
  2711. const
  2712. WGL_BIND_TO_TEXTURE_RGB_ARB = $2070;
  2713. WGL_BIND_TO_TEXTURE_RGBA_ARB = $2071;
  2714. WGL_TEXTURE_FORMAT_ARB = $2072;
  2715. WGL_TEXTURE_TARGET_ARB = $2073;
  2716. WGL_MIPMAP_TEXTURE_ARB = $2074;
  2717. WGL_TEXTURE_RGB_ARB = $2075;
  2718. WGL_TEXTURE_RGBA_ARB = $2076;
  2719. WGL_NO_TEXTURE_ARB = $2077;
  2720. WGL_TEXTURE_CUBE_MAP_ARB = $2078;
  2721. WGL_TEXTURE_1D_ARB = $2079;
  2722. WGL_TEXTURE_2D_ARB = $207A;
  2723. // WGL_NO_TEXTURE_ARB { already defined }
  2724. WGL_MIPMAP_LEVEL_ARB = $207B;
  2725. WGL_CUBE_MAP_FACE_ARB = $207C;
  2726. WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = $207D;
  2727. WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = $207E;
  2728. WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = $207F;
  2729. WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = $2080;
  2730. WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = $2081;
  2731. WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = $2082;
  2732. WGL_FRONT_LEFT_ARB = $2083;
  2733. WGL_FRONT_RIGHT_ARB = $2084;
  2734. WGL_BACK_LEFT_ARB = $2085;
  2735. WGL_BACK_RIGHT_ARB = $2086;
  2736. WGL_AUX0_ARB = $2087;
  2737. WGL_AUX1_ARB = $2088;
  2738. WGL_AUX2_ARB = $2089;
  2739. WGL_AUX3_ARB = $208A;
  2740. WGL_AUX4_ARB = $208B;
  2741. WGL_AUX5_ARB = $208C;
  2742. WGL_AUX6_ARB = $208D;
  2743. WGL_AUX7_ARB = $208E;
  2744. WGL_AUX8_ARB = $208F;
  2745. WGL_AUX9_ARB = $2090;
  2746. var
  2747. wglBindTexImageARB: function(hPbuffer: THandle; iBuffer: GLint): BOOL; extdecl;
  2748. wglReleaseTexImageARB: function(hPbuffer: THandle; iBuffer: GLint): BOOL; extdecl;
  2749. wglSetPbufferAttribARB: function(hPbuffer: THandle; const piAttribList: PGLint): BOOL; extdecl;
  2750. function Load_WGL_ARB_render_texture: Boolean;
  2751. //***** WGL_EXT_extensions_string *****//
  2752. var
  2753. wglGetExtensionsStringEXT: function(): PAnsiChar; extdecl;
  2754. function Load_WGL_EXT_extensions_string: Boolean;
  2755. //***** WGL_EXT_make_current_read *****//
  2756. var
  2757. wglMakeContextCurrentEXT: function(hDrawDC: HDC; hReadDC: HDC; hglrc: HGLRC): BOOL; extdecl;
  2758. wglGetCurrentReadDCEXT: function(): HDC; extdecl;
  2759. function Load_WGL_EXT_make_current_read: Boolean;
  2760. //***** WGL_EXT_pbuffer *****//
  2761. const
  2762. WGL_DRAW_TO_PBUFFER_EXT = $202D;
  2763. WGL_MAX_PBUFFER_PIXELS_EXT = $202E;
  2764. WGL_MAX_PBUFFER_WIDTH_EXT = $202F;
  2765. WGL_MAX_PBUFFER_HEIGHT_EXT = $2030;
  2766. WGL_OPTIMAL_PBUFFER_WIDTH_EXT = $2031;
  2767. WGL_OPTIMAL_PBUFFER_HEIGHT_EXT = $2032;
  2768. WGL_PBUFFER_LARGEST_EXT = $2033;
  2769. WGL_PBUFFER_WIDTH_EXT = $2034;
  2770. WGL_PBUFFER_HEIGHT_EXT = $2035;
  2771. var
  2772. wglCreatePbufferEXT: function(hDC: HDC; iPixelFormat: GLint; iWidth: GLint; iHeight: GLint; const piAttribList: PGLint): THandle; extdecl;
  2773. wglGetPbufferDCEXT: function(hPbuffer: THandle): HDC; extdecl;
  2774. wglReleasePbufferDCEXT: function(hPbuffer: THandle; hDC: HDC): GLint; extdecl;
  2775. wglDestroyPbufferEXT: function(hPbuffer: THandle): BOOL; extdecl;
  2776. wglQueryPbufferEXT: function(hPbuffer: THandle; iAttribute: GLint; piValue: PGLint): BOOL; extdecl;
  2777. function Load_WGL_EXT_pbuffer: Boolean;
  2778. //***** WGL_EXT_pixel_format *****//
  2779. const
  2780. WGL_NUMBER_PIXEL_FORMATS_EXT = $2000;
  2781. WGL_DRAW_TO_WINDOW_EXT = $2001;
  2782. WGL_DRAW_TO_BITMAP_EXT = $2002;
  2783. WGL_ACCELERATION_EXT = $2003;
  2784. WGL_NEED_PALETTE_EXT = $2004;
  2785. WGL_NEED_SYSTEM_PALETTE_EXT = $2005;
  2786. WGL_SWAP_LAYER_BUFFERS_EXT = $2006;
  2787. WGL_SWAP_METHOD_EXT = $2007;
  2788. WGL_NUMBER_OVERLAYS_EXT = $2008;
  2789. WGL_NUMBER_UNDERLAYS_EXT = $2009;
  2790. WGL_TRANSPARENT_EXT = $200A;
  2791. WGL_TRANSPARENT_VALUE_EXT = $200B;
  2792. WGL_SHARE_DEPTH_EXT = $200C;
  2793. WGL_SHARE_STENCIL_EXT = $200D;
  2794. WGL_SHARE_ACCUM_EXT = $200E;
  2795. WGL_SUPPORT_GDI_EXT = $200F;
  2796. WGL_SUPPORT_OPENGL_EXT = $2010;
  2797. WGL_DOUBLE_BUFFER_EXT = $2011;
  2798. WGL_STEREO_EXT = $2012;
  2799. WGL_PIXEL_TYPE_EXT = $2013;
  2800. WGL_COLOR_BITS_EXT = $2014;
  2801. WGL_RED_BITS_EXT = $2015;
  2802. WGL_RED_SHIFT_EXT = $2016;
  2803. WGL_GREEN_BITS_EXT = $2017;
  2804. WGL_GREEN_SHIFT_EXT = $2018;
  2805. WGL_BLUE_BITS_EXT = $2019;
  2806. WGL_BLUE_SHIFT_EXT = $201A;
  2807. WGL_ALPHA_BITS_EXT = $201B;
  2808. WGL_ALPHA_SHIFT_EXT = $201C;
  2809. WGL_ACCUM_BITS_EXT = $201D;
  2810. WGL_ACCUM_RED_BITS_EXT = $201E;
  2811. WGL_ACCUM_GREEN_BITS_EXT = $201F;
  2812. WGL_ACCUM_BLUE_BITS_EXT = $2020;
  2813. WGL_ACCUM_ALPHA_BITS_EXT = $2021;
  2814. WGL_DEPTH_BITS_EXT = $2022;
  2815. WGL_STENCIL_BITS_EXT = $2023;
  2816. WGL_AUX_BUFFERS_EXT = $2024;
  2817. WGL_NO_ACCELERATION_EXT = $2025;
  2818. WGL_GENERIC_ACCELERATION_EXT = $2026;
  2819. WGL_FULL_ACCELERATION_EXT = $2027;
  2820. WGL_SWAP_EXCHANGE_EXT = $2028;
  2821. WGL_SWAP_COPY_EXT = $2029;
  2822. WGL_SWAP_UNDEFINED_EXT = $202A;
  2823. WGL_TYPE_RGBA_EXT = $202B;
  2824. WGL_TYPE_COLORINDEX_EXT = $202C;
  2825. var
  2826. wglGetPixelFormatAttribivEXT: function(hdc: HDC; iPixelFormat: GLint; iLayerPlane: GLint; nAttributes: GLuint; piAttributes: PGLint; piValues: PGLint): BOOL; extdecl;
  2827. wglGetPixelFormatAttribfvEXT: function(hdc: HDC; iPixelFormat: GLint; iLayerPlane: GLint; nAttributes: GLuint; piAttributes: PGLint; pfValues: PGLfloat): BOOL; extdecl;
  2828. wglChoosePixelFormatEXT: function(hdc: HDC; const piAttribIList: PGLint; const pfAttribFList: PGLfloat; nMaxFormats: GLuint; piFormats: PGLint; nNumFormats: PGLuint): BOOL; extdecl;
  2829. function Load_WGL_EXT_pixel_format: Boolean;
  2830. //***** WGL_I3D_digital_video_control *****//
  2831. const
  2832. WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D = $2050;
  2833. WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D = $2051;
  2834. WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D = $2052;
  2835. WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D = $2053;
  2836. var
  2837. wglGetDigitalVideoParametersI3D: function(hDC: HDC; iAttribute: GLint; piValue: PGLint): BOOL; extdecl;
  2838. wglSetDigitalVideoParametersI3D: function(hDC: HDC; iAttribute: GLint; const piValue: PGLint): BOOL; extdecl;
  2839. function Load_WGL_I3D_digital_video_control: Boolean;
  2840. //***** WGL_I3D_gamma *****//
  2841. const
  2842. WGL_GAMMA_TABLE_SIZE_I3D = $204E;
  2843. WGL_GAMMA_EXCLUDE_DESKTOP_I3D = $204F;
  2844. // WGL_GAMMA_EXCLUDE_DESKTOP_I3D { already defined }
  2845. var
  2846. wglGetGammaTableParametersI3D: function(hDC: HDC; iAttribute: GLint; piValue: PGLint): BOOL; extdecl;
  2847. wglSetGammaTableParametersI3D: function(hDC: HDC; iAttribute: GLint; const piValue: PGLint): BOOL; extdecl;
  2848. wglGetGammaTableI3D: function(hDC: HDC; iEntries: GLint; puRed: PGLUSHORT; puGreen: PGLUSHORT; puBlue: PGLUSHORT): BOOL; extdecl;
  2849. wglSetGammaTableI3D: function(hDC: HDC; iEntries: GLint; const puRed: PGLUSHORT; const puGreen: PGLUSHORT; const puBlue: PGLUSHORT): BOOL; extdecl;
  2850. function Load_WGL_I3D_gamma: Boolean;
  2851. //***** WGL_I3D_genlock *****//
  2852. const
  2853. WGL_GENLOCK_SOURCE_MULTIVIEW_I3D = $2044;
  2854. WGL_GENLOCK_SOURCE_EXTERNAL_SYNC_I3D = $2045;
  2855. WGL_GENLOCK_SOURCE_EXTERNAL_FIELD_I3D = $2046;
  2856. WGL_GENLOCK_SOURCE_EXTERNAL_TTL_I3D = $2047;
  2857. WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D = $2048;
  2858. WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D = $2049;
  2859. WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D = $204A;
  2860. WGL_GENLOCK_SOURCE_EDGE_RISING_I3D = $204B;
  2861. WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D = $204C;
  2862. var
  2863. wglEnableGenlockI3D: function(hDC: HDC): BOOL; extdecl;
  2864. wglDisableGenlockI3D: function(hDC: HDC): BOOL; extdecl;
  2865. wglIsEnabledGenlockI3D: function(hDC: HDC; pFlag: PBOOL): BOOL; extdecl;
  2866. wglGenlockSourceI3D: function(hDC: HDC; uSource: GLUINT): BOOL; extdecl;
  2867. wglGetGenlockSourceI3D: function(hDC: HDC; uSource: PGLUINT): BOOL; extdecl;
  2868. wglGenlockSourceEdgeI3D: function(hDC: HDC; uEdge: GLUINT): BOOL; extdecl;
  2869. wglGetGenlockSourceEdgeI3D: function(hDC: HDC; uEdge: PGLUINT): BOOL; extdecl;
  2870. wglGenlockSampleRateI3D: function(hDC: HDC; uRate: GLUINT): BOOL; extdecl;
  2871. wglGetGenlockSampleRateI3D: function(hDC: HDC; uRate: PGLUINT): BOOL; extdecl;
  2872. wglGenlockSourceDelayI3D: function(hDC: HDC; uDelay: GLUINT): BOOL; extdecl;
  2873. wglGetGenlockSourceDelayI3D: function(hDC: HDC; uDelay: PGLUINT): BOOL; extdecl;
  2874. wglQueryGenlockMaxSourceDelayI3D: function(hDC: HDC; uMaxLineDelay: PGLUINT; uMaxPixelDelay: PGLUINT): BOOL; extdecl;
  2875. function Load_WGL_I3D_genlock: Boolean;
  2876. {$ENDIF}
  2877. //***** GL_ARB_matrix_palette *****//
  2878. const
  2879. GL_MATRIX_PALETTE_ARB = $8840;
  2880. GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = $8841;
  2881. GL_MAX_PALETTE_MATRICES_ARB = $8842;
  2882. GL_CURRENT_PALETTE_MATRIX_ARB = $8843;
  2883. GL_MATRIX_INDEX_ARRAY_ARB = $8844;
  2884. GL_CURRENT_MATRIX_INDEX_ARB = $8845;
  2885. GL_MATRIX_INDEX_ARRAY_SIZE_ARB = $8846;
  2886. GL_MATRIX_INDEX_ARRAY_TYPE_ARB = $8847;
  2887. GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = $8848;
  2888. GL_MATRIX_INDEX_ARRAY_POINTER_ARB = $8849;
  2889. var
  2890. glCurrentPaletteMatrixARB: procedure(index: GLint); extdecl;
  2891. glMatrixIndexubvARB: procedure(size: GLint; indices: PGLubyte); extdecl;
  2892. glMatrixIndexusvARB: procedure(size: GLint; indices: PGLushort); extdecl;
  2893. glMatrixIndexuivARB: procedure(size: GLint; indices: PGLuint); extdecl;
  2894. glMatrixIndexPointerARB: procedure(size: GLint; _type: GLenum; stride: GLsizei; pointer: PGLvoid); extdecl;
  2895. function Load_GL_ARB_matrix_palette: Boolean;
  2896. //***** GL_NV_element_array *****//
  2897. const
  2898. GL_ELEMENT_ARRAY_TYPE_NV = $8769;
  2899. GL_ELEMENT_ARRAY_POINTER_NV = $876A;
  2900. var
  2901. glElementPointerNV: procedure(_type: GLenum; const pointer: PGLvoid); extdecl;
  2902. glDrawElementArrayNV: procedure(mode: GLenum; first: GLint; count: GLsizei); extdecl;
  2903. glDrawRangeElementArrayNV: procedure(mode: GLenum; start: GLuint; _end: GLuint; first: GLint; count: GLsizei); extdecl;
  2904. glMultiDrawElementArrayNV: procedure(mode: GLenum; const first: PGLint; const count: PGLsizei; primcount: GLsizei); extdecl;
  2905. glMultiDrawRangeElementArrayNV: procedure(mode: GLenum; start: GLuint; _end: GLuint; const first: PGLint; const count: PGLsizei; primcount: GLsizei); extdecl;
  2906. function Load_GL_NV_element_array: Boolean;
  2907. //***** GL_NV_float_buffer *****//
  2908. const
  2909. GL_FLOAT_R_NV = $8880;
  2910. GL_FLOAT_RG_NV = $8881;
  2911. GL_FLOAT_RGB_NV = $8882;
  2912. GL_FLOAT_RGBA_NV = $8883;
  2913. GL_FLOAT_R16_NV = $8884;
  2914. GL_FLOAT_R32_NV = $8885;
  2915. GL_FLOAT_RG16_NV = $8886;
  2916. GL_FLOAT_RG32_NV = $8887;
  2917. GL_FLOAT_RGB16_NV = $8888;
  2918. GL_FLOAT_RGB32_NV = $8889;
  2919. GL_FLOAT_RGBA16_NV = $888A;
  2920. GL_FLOAT_RGBA32_NV = $888B;
  2921. GL_TEXTURE_FLOAT_COMPONENTS_NV = $888C;
  2922. GL_FLOAT_CLEAR_COLOR_VALUE_NV = $888D;
  2923. GL_FLOAT_RGBA_MODE_NV = $888E;
  2924. {$IFDEF Windows}
  2925. WGL_FLOAT_COMPONENTS_NV = $20B0;
  2926. WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV = $20B1;
  2927. WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV = $20B2;
  2928. WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV = $20B3;
  2929. WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV = $20B4;
  2930. WGL_TEXTURE_FLOAT_R_NV = $20B5;
  2931. WGL_TEXTURE_FLOAT_RG_NV = $20B6;
  2932. WGL_TEXTURE_FLOAT_RGB_NV = $20B7;
  2933. WGL_TEXTURE_FLOAT_RGBA_NV = $20B8;
  2934. {$ENDIF}
  2935. function Load_GL_NV_float_buffer: Boolean;
  2936. //***** GL_NV_fragment_program *****//
  2937. const
  2938. GL_FRAGMENT_PROGRAM_NV = $8870;
  2939. GL_MAX_TEXTURE_COORDS_NV = $8871;
  2940. GL_MAX_TEXTURE_IMAGE_UNITS_NV = $8872;
  2941. GL_FRAGMENT_PROGRAM_BINDING_NV = $8873;
  2942. GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = $8868;
  2943. GL_PROGRAM_ERROR_STRING_NV = $8874;
  2944. var
  2945. glProgramNamedParameter4fNV: procedure(id: GLuint; len: GLsizei; const name: PGLubyte; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  2946. glProgramNamedParameter4dNV: procedure(id: GLuint; len: GLsizei; const name: PGLubyte; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl;
  2947. glGetProgramNamedParameterfvNV: procedure(id: GLuint; len: GLsizei; const name: PGLubyte; params: PGLfloat); extdecl;
  2948. glGetProgramNamedParameterdvNV: procedure(id: GLuint; len: GLsizei; const name: PGLubyte; params: PGLdouble); extdecl;
  2949. // glProgramLocalParameter4dARB { already defined }
  2950. // glProgramLocalParameter4dvARB { already defined }
  2951. // glProgramLocalParameter4fARB { already defined }
  2952. // glProgramLocalParameter4fvARB { already defined }
  2953. // glGetProgramLocalParameterdvARB { already defined }
  2954. // glGetProgramLocalParameterfvARB { already defined }
  2955. function Load_GL_NV_fragment_program: Boolean;
  2956. //***** GL_NV_primitive_restart *****//
  2957. const
  2958. GL_PRIMITIVE_RESTART_NV = $8558;
  2959. GL_PRIMITIVE_RESTART_INDEX_NV = $8559;
  2960. var
  2961. glPrimitiveRestartNV: procedure(); extdecl;
  2962. glPrimitiveRestartIndexNV: procedure(index: GLuint); extdecl;
  2963. function Load_GL_NV_primitive_restart: Boolean;
  2964. //***** GL_NV_vertex_program2 *****//
  2965. function Load_GL_NV_vertex_program2: Boolean;
  2966. {$IFDEF Windows}
  2967. //***** WGL_NV_render_texture_rectangle *****//
  2968. const
  2969. WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = $20A0;
  2970. WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = $20A1;
  2971. WGL_TEXTURE_RECTANGLE_NV = $20A2;
  2972. function Load_WGL_NV_render_texture_rectangle: Boolean;
  2973. {$ENDIF}
  2974. //***** GL_NV_pixel_data_range *****//
  2975. const
  2976. GL_WRITE_PIXEL_DATA_RANGE_NV = $8878;
  2977. GL_READ_PIXEL_DATA_RANGE_NV = $8879;
  2978. GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = $887A;
  2979. GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = $887B;
  2980. GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = $887C;
  2981. GL_READ_PIXEL_DATA_RANGE_POINTER_NV = $887D;
  2982. var
  2983. glPixelDataRangeNV: procedure(target: GLenum; length: GLsizei; pointer: PGLvoid); extdecl;
  2984. glFlushPixelDataRangeNV: procedure(target: GLenum); extdecl;
  2985. // wglAllocateMemoryNV { already defined }
  2986. // wglFreeMemoryNV { already defined }
  2987. function Load_GL_NV_pixel_data_range: Boolean;
  2988. //***** GL_EXT_texture_rectangle *****//
  2989. const
  2990. GL_TEXTURE_RECTANGLE_EXT = $84F5;
  2991. GL_TEXTURE_BINDING_RECTANGLE_EXT = $84F6;
  2992. GL_PROXY_TEXTURE_RECTANGLE_EXT = $84F7;
  2993. GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT = $84F8;
  2994. function Load_GL_EXT_texture_rectangle: Boolean;
  2995. //***** GL_S3_s3tc *****//
  2996. const
  2997. GL_RGB_S3TC = $83A0;
  2998. GL_RGB4_S3TC = $83A1;
  2999. GL_RGBA_S3TC = $83A2;
  3000. GL_RGBA4_S3TC = $83A3;
  3001. function Load_GL_S3_s3tc: Boolean;
  3002. //***** GL_ATI_draw_buffers *****//
  3003. const
  3004. GL_MAX_DRAW_BUFFERS_ATI = $8824;
  3005. GL_DRAW_BUFFER0_ATI = $8825;
  3006. GL_DRAW_BUFFER1_ATI = $8826;
  3007. GL_DRAW_BUFFER2_ATI = $8827;
  3008. GL_DRAW_BUFFER3_ATI = $8828;
  3009. GL_DRAW_BUFFER4_ATI = $8829;
  3010. GL_DRAW_BUFFER5_ATI = $882A;
  3011. GL_DRAW_BUFFER6_ATI = $882B;
  3012. GL_DRAW_BUFFER7_ATI = $882C;
  3013. GL_DRAW_BUFFER8_ATI = $882D;
  3014. GL_DRAW_BUFFER9_ATI = $882E;
  3015. GL_DRAW_BUFFER10_ATI = $882F;
  3016. GL_DRAW_BUFFER11_ATI = $8830;
  3017. GL_DRAW_BUFFER12_ATI = $8831;
  3018. GL_DRAW_BUFFER13_ATI = $8832;
  3019. GL_DRAW_BUFFER14_ATI = $8833;
  3020. GL_DRAW_BUFFER15_ATI = $8834;
  3021. var
  3022. glDrawBuffersATI: procedure(n: GLsizei; const bufs: PGLenum); extdecl;
  3023. function Load_GL_ATI_draw_buffers: Boolean;
  3024. {$IFDEF Windows}
  3025. //***** WGL_ATI_pixel_format_float *****//
  3026. const
  3027. WGL_RGBA_FLOAT_MODE_ATI = $8820;
  3028. WGL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI = $8835;
  3029. WGL_TYPE_RGBA_FLOAT_ATI = $21A0;
  3030. function Load_WGL_ATI_pixel_format_float: Boolean;
  3031. {$ENDIF}
  3032. //***** GL_ATI_texture_env_combine3 *****//
  3033. const
  3034. GL_MODULATE_ADD_ATI = $8744;
  3035. GL_MODULATE_SIGNED_ADD_ATI = $8745;
  3036. GL_MODULATE_SUBTRACT_ATI = $8746;
  3037. function Load_GL_ATI_texture_env_combine3: Boolean;
  3038. //***** GL_ATI_texture_float *****//
  3039. const
  3040. GL_RGBA_FLOAT32_ATI = $8814;
  3041. GL_RGB_FLOAT32_ATI = $8815;
  3042. GL_ALPHA_FLOAT32_ATI = $8816;
  3043. GL_INTENSITY_FLOAT32_ATI = $8817;
  3044. GL_LUMINANCE_FLOAT32_ATI = $8818;
  3045. GL_LUMINANCE_ALPHA_FLOAT32_ATI = $8819;
  3046. GL_RGBA_FLOAT16_ATI = $881A;
  3047. GL_RGB_FLOAT16_ATI = $881B;
  3048. GL_ALPHA_FLOAT16_ATI = $881C;
  3049. GL_INTENSITY_FLOAT16_ATI = $881D;
  3050. GL_LUMINANCE_FLOAT16_ATI = $881E;
  3051. GL_LUMINANCE_ALPHA_FLOAT16_ATI = $881F;
  3052. function Load_GL_ATI_texture_float: Boolean;
  3053. //***** GL_NV_texture_expand_normal *****//
  3054. const
  3055. GL_TEXTURE_UNSIGNED_REMAP_MODE_NV = $888F;
  3056. function Load_GL_NV_texture_expand_normal: Boolean;
  3057. //***** GL_NV_half_float *****//
  3058. const
  3059. GL_HALF_FLOAT_NV = $140B;
  3060. var
  3061. glVertex2hNV: procedure(x: GLushort; y: GLushort); extdecl;
  3062. glVertex2hvNV: procedure(const v: PGLushort); extdecl;
  3063. glVertex3hNV: procedure(x: GLushort; y: GLushort; z: GLushort); extdecl;
  3064. glVertex3hvNV: procedure(const v: PGLushort); extdecl;
  3065. glVertex4hNV: procedure(x: GLushort; y: GLushort; z: GLushort; w: GLushort); extdecl;
  3066. glVertex4hvNV: procedure(const v: PGLushort); extdecl;
  3067. glNormal3hNV: procedure(nx: GLushort; ny: GLushort; nz: GLushort); extdecl;
  3068. glNormal3hvNV: procedure(const v: PGLushort); extdecl;
  3069. glColor3hNV: procedure(red: GLushort; green: GLushort; blue: GLushort); extdecl;
  3070. glColor3hvNV: procedure(const v: PGLushort); extdecl;
  3071. glColor4hNV: procedure(red: GLushort; green: GLushort; blue: GLushort; alpha: GLushort); extdecl;
  3072. glColor4hvNV: procedure(const v: PGLushort); extdecl;
  3073. glTexCoord1hNV: procedure(s: GLushort); extdecl;
  3074. glTexCoord1hvNV: procedure(const v: PGLushort); extdecl;
  3075. glTexCoord2hNV: procedure(s: GLushort; t: GLushort); extdecl;
  3076. glTexCoord2hvNV: procedure(const v: PGLushort); extdecl;
  3077. glTexCoord3hNV: procedure(s: GLushort; t: GLushort; r: GLushort); extdecl;
  3078. glTexCoord3hvNV: procedure(const v: PGLushort); extdecl;
  3079. glTexCoord4hNV: procedure(s: GLushort; t: GLushort; r: GLushort; q: GLushort); extdecl;
  3080. glTexCoord4hvNV: procedure(const v: PGLushort); extdecl;
  3081. glMultiTexCoord1hNV: procedure(target: GLenum; s: GLushort); extdecl;
  3082. glMultiTexCoord1hvNV: procedure(target: GLenum; const v: PGLushort); extdecl;
  3083. glMultiTexCoord2hNV: procedure(target: GLenum; s: GLushort; t: GLushort); extdecl;
  3084. glMultiTexCoord2hvNV: procedure(target: GLenum; const v: PGLushort); extdecl;
  3085. glMultiTexCoord3hNV: procedure(target: GLenum; s: GLushort; t: GLushort; r: GLushort); extdecl;
  3086. glMultiTexCoord3hvNV: procedure(target: GLenum; const v: PGLushort); extdecl;
  3087. glMultiTexCoord4hNV: procedure(target: GLenum; s: GLushort; t: GLushort; r: GLushort; q: GLushort); extdecl;
  3088. glMultiTexCoord4hvNV: procedure(target: GLenum; const v: PGLushort); extdecl;
  3089. glFogCoordhNV: procedure(fog: GLushort); extdecl;
  3090. glFogCoordhvNV: procedure(const fog: PGLushort); extdecl;
  3091. glSecondaryColor3hNV: procedure(red: GLushort; green: GLushort; blue: GLushort); extdecl;
  3092. glSecondaryColor3hvNV: procedure(const v: PGLushort); extdecl;
  3093. glVertexWeighthNV: procedure(weight: GLushort); extdecl;
  3094. glVertexWeighthvNV: procedure(const weight: PGLushort); extdecl;
  3095. glVertexAttrib1hNV: procedure(index: GLuint; x: GLushort); extdecl;
  3096. glVertexAttrib1hvNV: procedure(index: GLuint; const v: PGLushort); extdecl;
  3097. glVertexAttrib2hNV: procedure(index: GLuint; x: GLushort; y: GLushort); extdecl;
  3098. glVertexAttrib2hvNV: procedure(index: GLuint; const v: PGLushort); extdecl;
  3099. glVertexAttrib3hNV: procedure(index: GLuint; x: GLushort; y: GLushort; z: GLushort); extdecl;
  3100. glVertexAttrib3hvNV: procedure(index: GLuint; const v: PGLushort); extdecl;
  3101. glVertexAttrib4hNV: procedure(index: GLuint; x: GLushort; y: GLushort; z: GLushort; w: GLushort); extdecl;
  3102. glVertexAttrib4hvNV: procedure(index: GLuint; const v: PGLushort); extdecl;
  3103. glVertexAttribs1hvNV: procedure(index: GLuint; n: GLsizei; const v: PGLushort); extdecl;
  3104. glVertexAttribs2hvNV: procedure(index: GLuint; n: GLsizei; const v: PGLushort); extdecl;
  3105. glVertexAttribs3hvNV: procedure(index: GLuint; n: GLsizei; const v: PGLushort); extdecl;
  3106. glVertexAttribs4hvNV: procedure(index: GLuint; n: GLsizei; const v: PGLushort); extdecl;
  3107. function Load_GL_NV_half_float: Boolean;
  3108. //***** GL_ATI_map_object_buffer *****//
  3109. var
  3110. glMapObjectBufferATI: function(buffer: GLuint): PGLvoid; extdecl;
  3111. glUnmapObjectBufferATI: procedure(buffer: GLuint); extdecl;
  3112. function Load_GL_ATI_map_object_buffer: Boolean;
  3113. //***** GL_ATI_separate_stencil *****//
  3114. const
  3115. GL_KEEP = $1E00;
  3116. GL_ZERO = $0000;
  3117. GL_REPLACE = $1E01;
  3118. GL_INCR = $1E02;
  3119. GL_DECR = $1E03;
  3120. GL_INVERT = $150A;
  3121. GL_NEVER = $0200;
  3122. GL_LESS = $0201;
  3123. GL_LEQUAL = $0203;
  3124. GL_GREATER = $0204;
  3125. GL_GEQUAL = $0206;
  3126. GL_EQUAL = $0202;
  3127. GL_NOTEQUAL = $0205;
  3128. GL_ALWAYS = $0207;
  3129. GL_FRONT = $0404;
  3130. GL_BACK = $0405;
  3131. GL_FRONT_AND_BACK = $0408;
  3132. GL_STENCIL_BACK_FUNC_ATI = $8800;
  3133. GL_STENCIL_BACK_FAIL_ATI = $8801;
  3134. GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = $8802;
  3135. GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = $8803;
  3136. var
  3137. glStencilOpSeparateATI: procedure(face: GLenum; sfail: GLenum; dpfail: GLenum; dppass: GLenum); extdecl;
  3138. glStencilFuncSeparateATI: procedure(frontfunc: GLenum; backfunc: GLenum; ref: GLint; mask: GLuint); extdecl;
  3139. function Load_GL_ATI_separate_stencil: Boolean;
  3140. //***** GL_ATI_vertex_attrib_array_object *****//
  3141. var
  3142. glVertexAttribArrayObjectATI: procedure(index: GLuint; size: GLint; _type: GLenum; normalized: GLboolean; stride: GLsizei; buffer: GLuint; offset: GLuint); extdecl;
  3143. glGetVertexAttribArrayObjectfvATI: procedure(index: GLuint; pname: GLenum; params: PGLfloat); extdecl;
  3144. glGetVertexAttribArrayObjectivATI: procedure(index: GLuint; pname: GLenum; params: PGLint); extdecl;
  3145. function Load_GL_ATI_vertex_attrib_array_object: Boolean;
  3146. //***** GL_ARB_occlusion_query *****//
  3147. const
  3148. GL_SAMPLES_PASSED_ARB = $8914;
  3149. GL_QUERY_COUNTER_BITS_ARB = $8864;
  3150. GL_CURRENT_QUERY_ARB = $8865;
  3151. GL_QUERY_RESULT_ARB = $8866;
  3152. GL_QUERY_RESULT_AVAILABLE_ARB = $8867;
  3153. var
  3154. glGenQueriesARB: procedure(n: GLsizei; ids: PGLuint); extdecl;
  3155. glDeleteQueriesARB: procedure(n: GLsizei; const ids: PGLuint); extdecl;
  3156. glIsQueryARB: function(id: GLuint): GLboolean; extdecl;
  3157. glBeginQueryARB: procedure(target: GLenum; id: GLuint); extdecl;
  3158. glEndQueryARB: procedure(target: GLenum); extdecl;
  3159. glGetQueryivARB: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  3160. glGetQueryObjectivARB: procedure(id: GLuint; pname: GLenum; params: PGLint); extdecl;
  3161. glGetQueryObjectuivARB: procedure(id: GLuint; pname: GLenum; params: PGLuint); extdecl;
  3162. function Load_GL_ARB_occlusion_query: Boolean;
  3163. //***** GL_ARB_shader_objects *****//
  3164. const
  3165. GL_PROGRAM_OBJECT_ARB = $8B40;
  3166. GL_OBJECT_TYPE_ARB = $8B4E;
  3167. GL_OBJECT_SUBTYPE_ARB = $8B4F;
  3168. GL_OBJECT_DELETE_STATUS_ARB = $8B80;
  3169. GL_OBJECT_COMPILE_STATUS_ARB = $8B81;
  3170. GL_OBJECT_LINK_STATUS_ARB = $8B82;
  3171. GL_OBJECT_VALIDATE_STATUS_ARB = $8B83;
  3172. GL_OBJECT_INFO_LOG_LENGTH_ARB = $8B84;
  3173. GL_OBJECT_ATTACHED_OBJECTS_ARB = $8B85;
  3174. GL_OBJECT_ACTIVE_UNIFORMS_ARB = $8B86;
  3175. GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = $8B87;
  3176. GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = $8B88;
  3177. GL_SHADER_OBJECT_ARB = $8B48;
  3178. GL_FLOAT = $1406;
  3179. GL_FLOAT_VEC2_ARB = $8B50;
  3180. GL_FLOAT_VEC3_ARB = $8B51;
  3181. GL_FLOAT_VEC4_ARB = $8B52;
  3182. GL_INT = $1404;
  3183. GL_INT_VEC2_ARB = $8B53;
  3184. GL_INT_VEC3_ARB = $8B54;
  3185. GL_INT_VEC4_ARB = $8B55;
  3186. GL_BOOL_ARB = $8B56;
  3187. GL_BOOL_VEC2_ARB = $8B57;
  3188. GL_BOOL_VEC3_ARB = $8B58;
  3189. GL_BOOL_VEC4_ARB = $8B59;
  3190. GL_FLOAT_MAT2_ARB = $8B5A;
  3191. GL_FLOAT_MAT3_ARB = $8B5B;
  3192. GL_FLOAT_MAT4_ARB = $8B5C;
  3193. var
  3194. glDeleteObjectARB: procedure(obj: GLhandleARB); extdecl;
  3195. glGetHandleARB: function(pname: GLenum): GLhandleARB; extdecl;
  3196. glDetachObjectARB: procedure(containerObj: GLhandleARB; attachedObj: GLhandleARB); extdecl;
  3197. glCreateShaderObjectARB: function(shaderType: GLenum): GLhandleARB; extdecl;
  3198. glShaderSourceARB: procedure(shaderObj: GLhandleARB; count: GLsizei; const _string: PGLvoid; const length: PGLint); extdecl;
  3199. glCompileShaderARB: procedure(shaderObj: GLhandleARB); extdecl;
  3200. glCreateProgramObjectARB: function(): GLhandleARB; extdecl;
  3201. glAttachObjectARB: procedure(containerObj: GLhandleARB; obj: GLhandleARB); extdecl;
  3202. glLinkProgramARB: procedure(programObj: GLhandleARB); extdecl;
  3203. glUseProgramObjectARB: procedure(programObj: GLhandleARB); extdecl;
  3204. glValidateProgramARB: procedure(programObj: GLhandleARB); extdecl;
  3205. glUniform1fARB: procedure(location: GLint; v0: GLfloat); extdecl;
  3206. glUniform2fARB: procedure(location: GLint; v0: GLfloat; v1: GLfloat); extdecl;
  3207. glUniform3fARB: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat); extdecl;
  3208. glUniform4fARB: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat; v3: GLfloat); extdecl;
  3209. glUniform1iARB: procedure(location: GLint; v0: GLint); extdecl;
  3210. glUniform2iARB: procedure(location: GLint; v0: GLint; v1: GLint); extdecl;
  3211. glUniform3iARB: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint); extdecl;
  3212. glUniform4iARB: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint; v3: GLint); extdecl;
  3213. glUniform1fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); extdecl;
  3214. glUniform2fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); extdecl;
  3215. glUniform3fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); extdecl;
  3216. glUniform4fvARB: procedure(location: GLint; count: GLsizei; value: PGLfloat); extdecl;
  3217. glUniform1ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); extdecl;
  3218. glUniform2ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); extdecl;
  3219. glUniform3ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); extdecl;
  3220. glUniform4ivARB: procedure(location: GLint; count: GLsizei; value: PGLint); extdecl;
  3221. glUniformMatrix2fvARB: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); extdecl;
  3222. glUniformMatrix3fvARB: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); extdecl;
  3223. glUniformMatrix4fvARB: procedure(location: GLint; count: GLsizei; transpose: GLboolean; value: PGLfloat); extdecl;
  3224. glGetObjectParameterfvARB: procedure(obj: GLhandleARB; pname: GLenum; params: PGLfloat); extdecl;
  3225. glGetObjectParameterivARB: procedure(obj: GLhandleARB; pname: GLenum; params: PGLint); extdecl;
  3226. glGetInfoLogARB: procedure(obj: GLhandleARB; maxLength: GLsizei; length: PGLsizei; infoLog: PGLcharARB); extdecl;
  3227. glGetAttachedObjectsARB: procedure(containerObj: GLhandleARB; maxCount: GLsizei; count: PGLsizei; obj: PGLhandleARB); extdecl;
  3228. glGetUniformLocationARB: function(programObj: GLhandleARB; const name: PGLcharARB): GLint; extdecl;
  3229. glGetActiveUniformARB: procedure(programObj: GLhandleARB; index: GLuint; maxLength: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLcharARB); extdecl;
  3230. glGetUniformfvARB: procedure(programObj: GLhandleARB; location: GLint; params: PGLfloat); extdecl;
  3231. glGetUniformivARB: procedure(programObj: GLhandleARB; location: GLint; params: PGLint); extdecl;
  3232. glGetShaderSourceARB: procedure(obj: GLhandleARB; maxLength: GLsizei; length: PGLsizei; source: PGLcharARB); extdecl;
  3233. function Load_GL_ARB_shader_objects: Boolean;
  3234. //***** GL_ARB_vertex_shader *****//
  3235. const
  3236. GL_VERTEX_SHADER_ARB = $8B31;
  3237. GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = $8B4A;
  3238. GL_MAX_VARYING_FLOATS_ARB = $8B4B;
  3239. // GL_MAX_VERTEX_ATTRIBS_ARB { already defined }
  3240. // GL_MAX_TEXTURE_IMAGE_UNITS_ARB { already defined }
  3241. GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = $8B4C;
  3242. GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = $8B4D;
  3243. // GL_MAX_TEXTURE_COORDS_ARB { already defined }
  3244. // GL_VERTEX_PROGRAM_POINT_SIZE_ARB { already defined }
  3245. // GL_VERTEX_PROGRAM_TWO_SIDE_ARB { already defined }
  3246. // GL_OBJECT_TYPE_ARB { already defined }
  3247. // GL_OBJECT_SUBTYPE_ARB { already defined }
  3248. GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = $8B89;
  3249. GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = $8B8A;
  3250. // GL_SHADER_OBJECT_ARB { already defined }
  3251. // GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB { already defined }
  3252. // GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB { already defined }
  3253. // GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB { already defined }
  3254. // GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB { already defined }
  3255. // GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB { already defined }
  3256. // GL_CURRENT_VERTEX_ATTRIB_ARB { already defined }
  3257. // GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB { already defined }
  3258. // GL_FLOAT { already defined }
  3259. // GL_FLOAT_VEC2_ARB { already defined }
  3260. // GL_FLOAT_VEC3_ARB { already defined }
  3261. // GL_FLOAT_VEC4_ARB { already defined }
  3262. // GL_FLOAT_MAT2_ARB { already defined }
  3263. // GL_FLOAT_MAT3_ARB { already defined }
  3264. // GL_FLOAT_MAT4_ARB { already defined }
  3265. // glVertexAttrib1fARB { already defined }
  3266. // glVertexAttrib1sARB { already defined }
  3267. // glVertexAttrib1dARB { already defined }
  3268. // glVertexAttrib2fARB { already defined }
  3269. // glVertexAttrib2sARB { already defined }
  3270. // glVertexAttrib2dARB { already defined }
  3271. // glVertexAttrib3fARB { already defined }
  3272. // glVertexAttrib3sARB { already defined }
  3273. // glVertexAttrib3dARB { already defined }
  3274. // glVertexAttrib4fARB { already defined }
  3275. // glVertexAttrib4sARB { already defined }
  3276. // glVertexAttrib4dARB { already defined }
  3277. // glVertexAttrib4NubARB { already defined }
  3278. // glVertexAttrib1fvARB { already defined }
  3279. // glVertexAttrib1svARB { already defined }
  3280. // glVertexAttrib1dvARB { already defined }
  3281. // glVertexAttrib2fvARB { already defined }
  3282. // glVertexAttrib2svARB { already defined }
  3283. // glVertexAttrib2dvARB { already defined }
  3284. // glVertexAttrib3fvARB { already defined }
  3285. // glVertexAttrib3svARB { already defined }
  3286. // glVertexAttrib3dvARB { already defined }
  3287. // glVertexAttrib4fvARB { already defined }
  3288. // glVertexAttrib4svARB { already defined }
  3289. // glVertexAttrib4dvARB { already defined }
  3290. // glVertexAttrib4ivARB { already defined }
  3291. // glVertexAttrib4bvARB { already defined }
  3292. // glVertexAttrib4ubvARB { already defined }
  3293. // glVertexAttrib4usvARB { already defined }
  3294. // glVertexAttrib4uivARB { already defined }
  3295. // glVertexAttrib4NbvARB { already defined }
  3296. // glVertexAttrib4NsvARB { already defined }
  3297. // glVertexAttrib4NivARB { already defined }
  3298. // glVertexAttrib4NubvARB { already defined }
  3299. // glVertexAttrib4NusvARB { already defined }
  3300. // glVertexAttrib4NuivARB { already defined }
  3301. // glVertexAttribPointerARB { already defined }
  3302. // glEnableVertexAttribArrayARB { already defined }
  3303. // glDisableVertexAttribArrayARB { already defined }
  3304. var
  3305. glBindAttribLocationARB: procedure(programObj: GLhandleARB; index: GLuint; const name: PGLcharARB); extdecl;
  3306. glGetActiveAttribARB: procedure(programObj: GLhandleARB; index: GLuint; maxLength: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLcharARB); extdecl;
  3307. glGetAttribLocationARB: function(programObj: GLhandleARB; const name: PGLcharARB): GLint; extdecl;
  3308. // glGetVertexAttribdvARB { already defined }
  3309. // glGetVertexAttribfvARB { already defined }
  3310. // glGetVertexAttribivARB { already defined }
  3311. // glGetVertexAttribPointervARB { already defined }
  3312. function Load_GL_ARB_vertex_shader: Boolean;
  3313. //***** GL_ARB_fragment_shader *****//
  3314. const
  3315. GL_FRAGMENT_SHADER_ARB = $8B30;
  3316. GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = $8B49;
  3317. // GL_MAX_TEXTURE_COORDS_ARB { already defined }
  3318. // GL_MAX_TEXTURE_IMAGE_UNITS_ARB { already defined }
  3319. // GL_OBJECT_TYPE_ARB { already defined }
  3320. // GL_OBJECT_SUBTYPE_ARB { already defined }
  3321. // GL_SHADER_OBJECT_ARB { already defined }
  3322. function Load_GL_ARB_fragment_shader: Boolean;
  3323. //***** GL_ARB_shading_language_100 *****//
  3324. function Load_GL_ARB_shading_language_100: Boolean;
  3325. //***** GL_ARB_texture_non_power_of_two *****//
  3326. function Load_GL_ARB_texture_non_power_of_two: Boolean;
  3327. //***** GL_ARB_point_sprite *****//
  3328. const
  3329. GL_POINT_SPRITE_ARB = $8861;
  3330. GL_COORD_REPLACE_ARB = $8862;
  3331. function Load_GL_ARB_point_sprite: Boolean;
  3332. //***** GL_EXT_depth_bounds_test *****//
  3333. const
  3334. GL_DEPTH_BOUNDS_TEST_EXT = $8890;
  3335. GL_DEPTH_BOUNDS_EXT = $8891;
  3336. var
  3337. glDepthBoundsEXT: procedure(zmin: GLclampd; zmax: GLclampd); extdecl;
  3338. function Load_GL_EXT_depth_bounds_test: Boolean;
  3339. //***** GL_EXT_texture_mirror_clamp *****//
  3340. const
  3341. GL_MIRROR_CLAMP_EXT = $8742;
  3342. GL_MIRROR_CLAMP_TO_EDGE_EXT = $8743;
  3343. GL_MIRROR_CLAMP_TO_BORDER_EXT = $8912;
  3344. function Load_GL_EXT_texture_mirror_clamp: Boolean;
  3345. //***** GL_EXT_blend_equation_separate *****//
  3346. const
  3347. GL_BLEND_EQUATION_RGB_EXT = $8009;
  3348. GL_BLEND_EQUATION_ALPHA_EXT = $883D;
  3349. var
  3350. glBlendEquationSeparateEXT: procedure(modeRGB: GLenum; modeAlpha: GLenum); extdecl;
  3351. function Load_GL_EXT_blend_equation_separate: Boolean;
  3352. //***** GL_MESA_pack_invert *****//
  3353. const
  3354. GL_PACK_INVERT_MESA = $8758;
  3355. function Load_GL_MESA_pack_invert: Boolean;
  3356. //***** GL_MESA_ycbcr_texture *****//
  3357. const
  3358. GL_YCBCR_MESA = $8757;
  3359. GL_UNSIGNED_SHORT_8_8_MESA = $85BA;
  3360. GL_UNSIGNED_SHORT_8_8_REV_MESA = $85BB;
  3361. function Load_GL_MESA_ycbcr_texture: Boolean;
  3362. //***** GL_ARB_fragment_program_shadow *****//
  3363. function Load_GL_ARB_fragment_program_shadow: Boolean;
  3364. //***** GL_NV_fragment_program_option *****//
  3365. function Load_GL_NV_fragment_program_option: Boolean;
  3366. //***** GL_EXT_pixel_buffer_object *****//
  3367. const
  3368. GL_PIXEL_PACK_BUFFER_EXT = $88EB;
  3369. GL_PIXEL_UNPACK_BUFFER_EXT = $88EC;
  3370. GL_PIXEL_PACK_BUFFER_BINDING_EXT = $88ED;
  3371. GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = $88EF;
  3372. function Load_GL_EXT_pixel_buffer_object: Boolean;
  3373. //***** GL_NV_fragment_program2 *****//
  3374. const
  3375. GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = $88F4;
  3376. GL_MAX_PROGRAM_CALL_DEPTH_NV = $88F5;
  3377. GL_MAX_PROGRAM_IF_DEPTH_NV = $88F6;
  3378. GL_MAX_PROGRAM_LOOP_DEPTH_NV = $88F7;
  3379. GL_MAX_PROGRAM_LOOP_COUNT_NV = $88F8;
  3380. function Load_GL_NV_fragment_program2: Boolean;
  3381. //***** GL_NV_vertex_program2_option *****//
  3382. // GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV { already defined }
  3383. // GL_MAX_PROGRAM_CALL_DEPTH_NV { already defined }
  3384. function Load_GL_NV_vertex_program2_option: Boolean;
  3385. //***** GL_NV_vertex_program3 *****//
  3386. // GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB { already defined }
  3387. function Load_GL_NV_vertex_program3: Boolean;
  3388. //***** GL_ARB_draw_buffers *****//
  3389. const
  3390. GL_MAX_DRAW_BUFFERS_ARB = $8824;
  3391. GL_DRAW_BUFFER0_ARB = $8825;
  3392. GL_DRAW_BUFFER1_ARB = $8826;
  3393. GL_DRAW_BUFFER2_ARB = $8827;
  3394. GL_DRAW_BUFFER3_ARB = $8828;
  3395. GL_DRAW_BUFFER4_ARB = $8829;
  3396. GL_DRAW_BUFFER5_ARB = $882A;
  3397. GL_DRAW_BUFFER6_ARB = $882B;
  3398. GL_DRAW_BUFFER7_ARB = $882C;
  3399. GL_DRAW_BUFFER8_ARB = $882D;
  3400. GL_DRAW_BUFFER9_ARB = $882E;
  3401. GL_DRAW_BUFFER10_ARB = $882F;
  3402. GL_DRAW_BUFFER11_ARB = $8830;
  3403. GL_DRAW_BUFFER12_ARB = $8831;
  3404. GL_DRAW_BUFFER13_ARB = $8832;
  3405. GL_DRAW_BUFFER14_ARB = $8833;
  3406. GL_DRAW_BUFFER15_ARB = $8834;
  3407. var
  3408. glDrawBuffersARB: procedure(n: GLsizei; const bufs: PGLenum); extdecl;
  3409. function Load_GL_ARB_draw_buffers: Boolean;
  3410. //***** GL_ARB_texture_rectangle *****//
  3411. const
  3412. GL_TEXTURE_RECTANGLE_ARB = $84F5;
  3413. GL_TEXTURE_BINDING_RECTANGLE_ARB = $84F6;
  3414. GL_PROXY_TEXTURE_RECTANGLE_ARB = $84F7;
  3415. GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = $84F8;
  3416. function Load_GL_ARB_texture_rectangle: Boolean;
  3417. //***** GL_ARB_color_buffer_float *****//
  3418. const
  3419. GL_RGBA_FLOAT_MODE_ARB = $8820;
  3420. GL_CLAMP_VERTEX_COLOR_ARB = $891A;
  3421. GL_CLAMP_FRAGMENT_COLOR_ARB = $891B;
  3422. GL_CLAMP_READ_COLOR_ARB = $891C;
  3423. GL_FIXED_ONLY_ARB = $891D;
  3424. WGL_TYPE_RGBA_FLOAT_ARB = $21A0;
  3425. var
  3426. glClampColorARB: procedure(target: GLenum; clamp: GLenum); extdecl;
  3427. function Load_GL_ARB_color_buffer_float: Boolean;
  3428. //***** GL_ARB_half_float_pixel *****//
  3429. const
  3430. GL_HALF_FLOAT_ARB = $140B;
  3431. function Load_GL_ARB_half_float_pixel: Boolean;
  3432. //***** GL_ARB_texture_float *****//
  3433. const
  3434. GL_TEXTURE_RED_TYPE_ARB = $8C10;
  3435. GL_TEXTURE_GREEN_TYPE_ARB = $8C11;
  3436. GL_TEXTURE_BLUE_TYPE_ARB = $8C12;
  3437. GL_TEXTURE_ALPHA_TYPE_ARB = $8C13;
  3438. GL_TEXTURE_LUMINANCE_TYPE_ARB = $8C14;
  3439. GL_TEXTURE_INTENSITY_TYPE_ARB = $8C15;
  3440. GL_TEXTURE_DEPTH_TYPE_ARB = $8C16;
  3441. GL_UNSIGNED_NORMALIZED_ARB = $8C17;
  3442. GL_RGBA32F_ARB = $8814;
  3443. GL_RGB32F_ARB = $8815;
  3444. GL_ALPHA32F_ARB = $8816;
  3445. GL_INTENSITY32F_ARB = $8817;
  3446. GL_LUMINANCE32F_ARB = $8818;
  3447. GL_LUMINANCE_ALPHA32F_ARB = $8819;
  3448. GL_RGBA16F_ARB = $881A;
  3449. GL_RGB16F_ARB = $881B;
  3450. GL_ALPHA16F_ARB = $881C;
  3451. GL_INTENSITY16F_ARB = $881D;
  3452. GL_LUMINANCE16F_ARB = $881E;
  3453. GL_LUMINANCE_ALPHA16F_ARB = $881F;
  3454. function Load_GL_ARB_texture_float: Boolean;
  3455. //***** GL_EXT_texture_compression_dxt1 *****//
  3456. // GL_COMPRESSED_RGB_S3TC_DXT1_EXT { already defined }
  3457. // GL_COMPRESSED_RGBA_S3TC_DXT1_EXT { already defined }
  3458. function Load_GL_EXT_texture_compression_dxt1: Boolean;
  3459. //***** GL_ARB_pixel_buffer_object *****//
  3460. const
  3461. GL_PIXEL_PACK_BUFFER_ARB = $88EB;
  3462. GL_PIXEL_UNPACK_BUFFER_ARB = $88EC;
  3463. GL_PIXEL_PACK_BUFFER_BINDING_ARB = $88ED;
  3464. GL_PIXEL_UNPACK_BUFFER_BINDING_ARB = $88EF;
  3465. function Load_GL_ARB_pixel_buffer_object: Boolean;
  3466. //***** GL_EXT_framebuffer_object *****//
  3467. const
  3468. GL_FRAMEBUFFER_EXT = $8D40;
  3469. GL_RENDERBUFFER_EXT = $8D41;
  3470. GL_STENCIL_INDEX_EXT = $8D45;
  3471. GL_STENCIL_INDEX1_EXT = $8D46;
  3472. GL_STENCIL_INDEX4_EXT = $8D47;
  3473. GL_STENCIL_INDEX8_EXT = $8D48;
  3474. GL_STENCIL_INDEX16_EXT = $8D49;
  3475. GL_RENDERBUFFER_WIDTH_EXT = $8D42;
  3476. GL_RENDERBUFFER_HEIGHT_EXT = $8D43;
  3477. GL_RENDERBUFFER_INTERNAL_FORMAT_EXT = $8D44;
  3478. GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = $8CD0;
  3479. GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = $8CD1;
  3480. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = $8CD2;
  3481. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = $8CD3;
  3482. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = $8CD4;
  3483. GL_COLOR_ATTACHMENT0_EXT = $8CE0;
  3484. GL_COLOR_ATTACHMENT1_EXT = $8CE1;
  3485. GL_COLOR_ATTACHMENT2_EXT = $8CE2;
  3486. GL_COLOR_ATTACHMENT3_EXT = $8CE3;
  3487. GL_COLOR_ATTACHMENT4_EXT = $8CE4;
  3488. GL_COLOR_ATTACHMENT5_EXT = $8CE5;
  3489. GL_COLOR_ATTACHMENT6_EXT = $8CE6;
  3490. GL_COLOR_ATTACHMENT7_EXT = $8CE7;
  3491. GL_COLOR_ATTACHMENT8_EXT = $8CE8;
  3492. GL_COLOR_ATTACHMENT9_EXT = $8CE9;
  3493. GL_COLOR_ATTACHMENT10_EXT = $8CEA;
  3494. GL_COLOR_ATTACHMENT11_EXT = $8CEB;
  3495. GL_COLOR_ATTACHMENT12_EXT = $8CEC;
  3496. GL_COLOR_ATTACHMENT13_EXT = $8CED;
  3497. GL_COLOR_ATTACHMENT14_EXT = $8CEE;
  3498. GL_COLOR_ATTACHMENT15_EXT = $8CEF;
  3499. GL_DEPTH_ATTACHMENT_EXT = $8D00;
  3500. GL_STENCIL_ATTACHMENT_EXT = $8D20;
  3501. GL_FRAMEBUFFER_COMPLETE_EXT = $8CD5;
  3502. GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = $8CD6;
  3503. GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = $8CD7;
  3504. GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT = $8CD8;
  3505. GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = $8CD9;
  3506. GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = $8CDA;
  3507. GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = $8CDB;
  3508. GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = $8CDC;
  3509. GL_FRAMEBUFFER_UNSUPPORTED_EXT = $8CDD;
  3510. GL_FRAMEBUFFER_STATUS_ERROR_EXT = $8CDE;
  3511. GL_FRAMEBUFFER_BINDING_EXT = $8CA6;
  3512. GL_RENDERBUFFER_BINDING_EXT = $8CA7;
  3513. GL_MAX_COLOR_ATTACHMENTS_EXT = $8CDF;
  3514. GL_MAX_RENDERBUFFER_SIZE_EXT = $84E8;
  3515. GL_INVALID_FRAMEBUFFER_OPERATION_EXT = $0506;
  3516. var
  3517. glIsRenderbufferEXT: function(renderbuffer: GLuint): GLboolean; extdecl;
  3518. glBindRenderbufferEXT: procedure(target: GLenum; renderbuffer: GLuint); extdecl;
  3519. glDeleteRenderbuffersEXT: procedure(n: GLsizei; const renderbuffers: PGLuint); extdecl;
  3520. glGenRenderbuffersEXT: procedure(n: GLsizei; renderbuffers: PGLuint); extdecl;
  3521. glRenderbufferStorageEXT: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei); extdecl;
  3522. glGetRenderbufferParameterivEXT: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  3523. glIsFramebufferEXT: function(framebuffer: GLuint): GLboolean; extdecl;
  3524. glBindFramebufferEXT: procedure(target: GLenum; framebuffer: GLuint); extdecl;
  3525. glDeleteFramebuffersEXT: procedure(n: GLsizei; const framebuffers: PGLuint); extdecl;
  3526. glGenFramebuffersEXT: procedure(n: GLsizei; framebuffers: PGLuint); extdecl;
  3527. glCheckFramebufferStatusEXT: function(target: GLenum): GLenum; extdecl;
  3528. glFramebufferTexture1DEXT: procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); extdecl;
  3529. glFramebufferTexture2DEXT: procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); extdecl;
  3530. glFramebufferTexture3DEXT: procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint; zoffset: GLint); extdecl;
  3531. glFramebufferRenderbufferEXT: procedure(target: GLenum; attachment: GLenum; renderbuffertarget: GLenum; renderbuffer: GLuint); extdecl;
  3532. glGetFramebufferAttachmentParameterivEXT: procedure(target: GLenum; attachment: GLenum; pname: GLenum; params: PGLint); extdecl;
  3533. glGenerateMipmapEXT: procedure(target: GLenum); extdecl;
  3534. function Load_GL_EXT_framebuffer_object: Boolean;
  3535. //**** GL_ARB_framebuffer_object *****//
  3536. const
  3537. GL_INVALID_FRAMEBUFFER_OPERATION = $0506;
  3538. GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = $8210;
  3539. GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = $8211;
  3540. GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = $8212;
  3541. GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = $8213;
  3542. GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = $8214;
  3543. GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = $8215;
  3544. GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = $8216;
  3545. GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = $8217;
  3546. GL_FRAMEBUFFER_DEFAULT = $8218;
  3547. GL_FRAMEBUFFER_UNDEFINED = $8219;
  3548. GL_DEPTH_STENCIL_ATTACHMENT = $821A;
  3549. GL_MAX_RENDERBUFFER_SIZE = $84E8;
  3550. GL_DEPTH_STENCIL = $84F9;
  3551. GL_UNSIGNED_INT_24_8 = $84FA;
  3552. GL_DEPTH24_STENCIL8 = $88F0;
  3553. GL_TEXTURE_STENCIL_SIZE = $88F1;
  3554. GL_TEXTURE_RED_TYPE = $8C10;
  3555. GL_TEXTURE_GREEN_TYPE = $8C11;
  3556. GL_TEXTURE_BLUE_TYPE = $8C12;
  3557. GL_TEXTURE_ALPHA_TYPE = $8C13;
  3558. GL_TEXTURE_DEPTH_TYPE = $8C16;
  3559. GL_UNSIGNED_NORMALIZED = $8C17;
  3560. GL_FRAMEBUFFER_BINDING = $8CA6;
  3561. GL_DRAW_FRAMEBUFFER_BINDING = GL_FRAMEBUFFER_BINDING;
  3562. GL_RENDERBUFFER_BINDING = $8CA7;
  3563. GL_READ_FRAMEBUFFER = $8CA8;
  3564. GL_DRAW_FRAMEBUFFER = $8CA9;
  3565. GL_READ_FRAMEBUFFER_BINDING = $8CAA;
  3566. GL_RENDERBUFFER_SAMPLES = $8CAB;
  3567. GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = $8CD0;
  3568. GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = $8CD1;
  3569. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = $8CD2;
  3570. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = $8CD3;
  3571. GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = $8CD4;
  3572. GL_FRAMEBUFFER_COMPLETE = $8CD5;
  3573. GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = $8CD6;
  3574. GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = $8CD7;
  3575. GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = $8CDB;
  3576. GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = $8CDC;
  3577. GL_FRAMEBUFFER_UNSUPPORTED = $8CDD;
  3578. GL_MAX_COLOR_ATTACHMENTS = $8CDF;
  3579. GL_COLOR_ATTACHMENT0 = $8CE0;
  3580. GL_COLOR_ATTACHMENT1 = $8CE1;
  3581. GL_COLOR_ATTACHMENT2 = $8CE2;
  3582. GL_COLOR_ATTACHMENT3 = $8CE3;
  3583. GL_COLOR_ATTACHMENT4 = $8CE4;
  3584. GL_COLOR_ATTACHMENT5 = $8CE5;
  3585. GL_COLOR_ATTACHMENT6 = $8CE6;
  3586. GL_COLOR_ATTACHMENT7 = $8CE7;
  3587. GL_COLOR_ATTACHMENT8 = $8CE8;
  3588. GL_COLOR_ATTACHMENT9 = $8CE9;
  3589. GL_COLOR_ATTACHMENT10 = $8CEA;
  3590. GL_COLOR_ATTACHMENT11 = $8CEB;
  3591. GL_COLOR_ATTACHMENT12 = $8CEC;
  3592. GL_COLOR_ATTACHMENT13 = $8CED;
  3593. GL_COLOR_ATTACHMENT14 = $8CEE;
  3594. GL_COLOR_ATTACHMENT15 = $8CEF;
  3595. GL_DEPTH_ATTACHMENT = $8D00;
  3596. GL_STENCIL_ATTACHMENT = $8D20;
  3597. GL_FRAMEBUFFER = $8D40;
  3598. GL_RENDERBUFFER = $8D41;
  3599. GL_RENDERBUFFER_WIDTH = $8D42;
  3600. GL_RENDERBUFFER_HEIGHT = $8D43;
  3601. GL_RENDERBUFFER_INTERNAL_FORMAT = $8D44;
  3602. GL_STENCIL_INDEX1 = $8D46;
  3603. GL_STENCIL_INDEX4 = $8D47;
  3604. GL_STENCIL_INDEX8 = $8D48;
  3605. GL_STENCIL_INDEX16 = $8D49;
  3606. GL_RENDERBUFFER_RED_SIZE = $8D50;
  3607. GL_RENDERBUFFER_GREEN_SIZE = $8D51;
  3608. GL_RENDERBUFFER_BLUE_SIZE = $8D52;
  3609. GL_RENDERBUFFER_ALPHA_SIZE = $8D53;
  3610. GL_RENDERBUFFER_DEPTH_SIZE = $8D54;
  3611. GL_RENDERBUFFER_STENCIL_SIZE = $8D55;
  3612. GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = $8D56;
  3613. GL_MAX_SAMPLES = $8D57;
  3614. var
  3615. glIsRenderbuffer: function(renderbuffer: GLuint): GLboolean; extdecl;
  3616. glBindRenderbuffer: procedure(target: GLenum; renderbuffer: GLuint); extdecl;
  3617. glDeleteRenderbuffers: procedure(n: GLsizei; const renderbuffers: PGLuint); extdecl;
  3618. glGenRenderbuffers: procedure(n: GLsizei; renderbuffers: PGLuint); extdecl;
  3619. glRenderbufferStorage: procedure(target: GLenum; internalformat: GLenum; width: GLsizei; height: GLsizei); extdecl;
  3620. glGetRenderbufferParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  3621. glIsFramebuffer: function(framebuffer: GLuint): GLboolean; extdecl;
  3622. glBindFramebuffer: procedure(target: GLenum; framebuffer: GLuint); extdecl;
  3623. glDeleteFramebuffers: procedure(n: GLsizei; const framebuffers: PGLuint); extdecl;
  3624. glGenFramebuffers: procedure(n: GLsizei; framebuffers: PGLuint); extdecl;
  3625. glCheckFramebufferStatus: function(target: GLenum): GLenum; extdecl;
  3626. glFramebufferTexture1D: procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); extdecl;
  3627. glFramebufferTexture2D: procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint); extdecl;
  3628. glFramebufferTexture3D: procedure(target: GLenum; attachment: GLenum; textarget: GLenum; texture: GLuint; level: GLint; zoffset: GLint); extdecl;
  3629. glFramebufferRenderbuffer: procedure(target: GLenum; attachment: GLenum; renderbuffertarget: GLenum; renderbuffer: GLuint); extdecl;
  3630. glGetFramebufferAttachmentParameteriv: procedure(target: GLenum; attachment: GLenum; pname: GLenum; params: PGLint); extdecl;
  3631. glGenerateMipmap: procedure(target: GLenum); extdecl;
  3632. glBlitFramebuffer: procedure(srcX0: GLint; srcY0: GLint; srcX1: GLint; srcY1: GLint; dstX0: GLint; dstY0: GLint; dstX1: GLint; dstY1: GLint; mask: GLbitfield; filter: GLenum); extdecl;
  3633. glRenderbufferStorageMultisample: procedure(target: GLenum; samples: GLsizei; internalformat: GLenum; width: GLsizei; height: GLsizei); extdecl;
  3634. glFramebufferTextureLayer: procedure(target: GLenum; attachment: GLenum; texture: GLuint; level: GLint; layer: GLint); extdecl;
  3635. { Using LoadAsCore = true means that we will *not* check
  3636. if the extension is advertised in glGetString(GL_EXTENSIONS) AnsiString.
  3637. This allows to successfully Load_GL_version_3_0 in an OpenGL 3.0
  3638. forward-compatible context, where the "core extensions" do not have
  3639. to be mentioned inside glGetString(GL_EXTENSIONS). }
  3640. function Load_GL_ARB_framebuffer_object(LoadAsCore: boolean = false): Boolean;
  3641. //**** GL_ARB_framebuffer_object DEPRECATED *****//
  3642. const
  3643. GL_INDEX = $8222;
  3644. GL_TEXTURE_LUMINANCE_TYPE = $8C14;
  3645. GL_TEXTURE_INTENSITY_TYPE = $8C15;
  3646. //**** GL_ARB_map_buffer_range *****//
  3647. const
  3648. GL_MAP_READ_BIT = $0001;
  3649. GL_MAP_WRITE_BIT = $0002;
  3650. GL_MAP_INVALIDATE_RANGE_BIT = $0004;
  3651. GL_MAP_INVALIDATE_BUFFER_BIT = $0008;
  3652. GL_MAP_FLUSH_EXPLICIT_BIT = $0010;
  3653. GL_MAP_UNSYNCHRONIZED_BIT = $0020;
  3654. var
  3655. glMapBufferRange: function(target: GLenum; offset: GLintptr; length: GLsizeiptr; access: GLbitfield): PGLvoid; extdecl;
  3656. glFlushMappedBufferRange: procedure(target: GLenum; offset: GLintptr; length: GLsizeiptr); extdecl;
  3657. function Load_GL_ARB_map_buffer_range(LoadAsCore: boolean = false): Boolean;
  3658. //**** GL_ARB_vertex_array_object *****//
  3659. const
  3660. GL_VERTEX_ARRAY_BINDING = $85B5;
  3661. var
  3662. glBindVertexArray: procedure(_array: GLuint); extdecl;
  3663. glDeleteVertexArrays: procedure(n: GLsizei; const arrays: PGLuint); extdecl;
  3664. glGenVertexArrays: procedure(n: GLsizei; arrays: PGLuint); extdecl;
  3665. glIsVertexArray: function(_array: GLuint): GLboolean; extdecl;
  3666. function Load_GL_ARB_vertex_array_object(LoadAsCore: boolean = false): Boolean;
  3667. //**** GL_ARB_copy_buffer *****//
  3668. const
  3669. GL_COPY_READ_BUFFER = $8F36;
  3670. GL_COPY_WRITE_BUFFER = $8F37;
  3671. var
  3672. glCopyBufferSubData: procedure(readTarget: GLenum; writeTarget: GLenum; readOffset: GLintptr; writeOffset: GLintptr; size: GLsizeiptr); extdecl;
  3673. function Load_GL_ARB_copy_buffer(LoadAsCore: boolean = false): Boolean;
  3674. //**** GL_ARB_uniform_buffer_object *****//
  3675. const
  3676. GL_UNIFORM_BUFFER = $8A11;
  3677. GL_UNIFORM_BUFFER_BINDING = $8A28;
  3678. GL_UNIFORM_BUFFER_START = $8A29;
  3679. GL_UNIFORM_BUFFER_SIZE = $8A2A;
  3680. GL_MAX_VERTEX_UNIFORM_BLOCKS = $8A2B;
  3681. GL_MAX_GEOMETRY_UNIFORM_BLOCKS = $8A2C;
  3682. GL_MAX_FRAGMENT_UNIFORM_BLOCKS = $8A2D;
  3683. GL_MAX_COMBINED_UNIFORM_BLOCKS = $8A2E;
  3684. GL_MAX_UNIFORM_BUFFER_BINDINGS = $8A2F;
  3685. GL_MAX_UNIFORM_BLOCK_SIZE = $8A30;
  3686. GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = $8A31;
  3687. GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = $8A32;
  3688. GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = $8A33;
  3689. GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = $8A34;
  3690. GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = $8A35;
  3691. GL_ACTIVE_UNIFORM_BLOCKS = $8A36;
  3692. GL_UNIFORM_TYPE = $8A37;
  3693. GL_UNIFORM_SIZE = $8A38;
  3694. GL_UNIFORM_NAME_LENGTH = $8A39;
  3695. GL_UNIFORM_BLOCK_INDEX = $8A3A;
  3696. GL_UNIFORM_OFFSET = $8A3B;
  3697. GL_UNIFORM_ARRAY_STRIDE = $8A3C;
  3698. GL_UNIFORM_MATRIX_STRIDE = $8A3D;
  3699. GL_UNIFORM_IS_ROW_MAJOR = $8A3E;
  3700. GL_UNIFORM_BLOCK_BINDING = $8A3F;
  3701. GL_UNIFORM_BLOCK_DATA_SIZE = $8A40;
  3702. GL_UNIFORM_BLOCK_NAME_LENGTH = $8A41;
  3703. GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = $8A42;
  3704. GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = $8A43;
  3705. GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = $8A44;
  3706. GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = $8A45;
  3707. GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = $8A46;
  3708. GL_INVALID_INDEX = DWord($FFFFFFFF);
  3709. var
  3710. glGetUniformIndices: procedure(_program: GLuint; uniformCount: GLsizei; const uniformNames: PPGLchar; uniformIndices: PGLuint); extdecl;
  3711. glGetActiveUniformsiv: procedure(_program: GLuint; uniformCount: GLsizei; const uniformIndices: PGLuint; pname: GLenum; params: PGLint); extdecl;
  3712. glGetActiveUniformName: procedure(_program: GLuint; uniformIndex: GLuint; bufSize: GLsizei; length: PGLsizei; uniformName: PGLchar); extdecl;
  3713. glGetUniformBlockIndex: function(_program: GLuint; const uniformBlockName: PGLchar): GLuint; extdecl;
  3714. glGetActiveUniformBlockiv: procedure(_program: GLuint; uniformBlockIndex: GLuint; pname: GLenum; params: PGLint); extdecl;
  3715. glGetActiveUniformBlockName: procedure(_program: GLuint; uniformBlockIndex: GLuint; bufSize: GLsizei; length: PGLsizei; uniformBlockName: PGLchar); extdecl;
  3716. glUniformBlockBinding: procedure(_program: GLuint; uniformBlockIndex: GLuint; uniformBlockBinding: GLuint); extdecl;
  3717. function Load_GL_ARB_uniform_buffer_object(LoadAsCore: boolean = false): Boolean;
  3718. //**** GL_ARB_draw_elements_base_vertex *****//
  3719. var
  3720. glDrawElementsBaseVertex: procedure(mode: GLenum; count: GLsizei; _type: GLenum; const indices: PGLvoid; basevertex: GLint); extdecl;
  3721. glDrawRangeElementsBaseVertex: procedure(mode: GLenum; start: GLuint; _end: GLuint; count: GLsizei; _type: GLenum; const indices: PGLvoid; basevertex: GLint); extdecl;
  3722. glDrawElementsInstancedBaseVertex: procedure(mode: GLenum; count: GLsizei; _type: GLenum; const indices: PGLvoid; primcount: GLsizei; basevertex: GLint); extdecl;
  3723. glMultiDrawElementsBaseVertex: procedure(mode: GLenum; const count: PGLsizei; _type: GLenum; const indices: PPGLvoid; primcount: GLsizei; const basevertex: PGLint); extdecl;
  3724. function Load_GL_ARB_draw_elements_base_vertex(LoadAsCore: boolean = false): Boolean;
  3725. //**** GL_ARB_provoking_vertex *****//
  3726. const
  3727. GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = $8E4C;
  3728. GL_FIRST_VERTEX_CONVENTION = $8E4D;
  3729. GL_LAST_VERTEX_CONVENTION = $8E4E;
  3730. GL_PROVOKING_VERTEX = $8E4F;
  3731. var
  3732. glProvokingVertex: procedure(mode: GLenum); extdecl;
  3733. function Load_GL_ARB_provoking_vertex(LoadAsCore: boolean = false): Boolean;
  3734. //**** GL_ARB_sync *****//
  3735. type
  3736. GLsync = Pointer;
  3737. TGLsync = GLSync;
  3738. PGLsync = ^GLSync;
  3739. const
  3740. GL_MAX_SERVER_WAIT_TIMEOUT = $9111;
  3741. GL_OBJECT_TYPE = $9112;
  3742. GL_SYNC_CONDITION = $9113;
  3743. GL_SYNC_STATUS = $9114;
  3744. GL_SYNC_FLAGS = $9115;
  3745. GL_SYNC_FENCE = $9116;
  3746. GL_SYNC_GPU_COMMANDS_COMPLETE = $9117;
  3747. GL_UNSIGNALED = $9118;
  3748. GL_SIGNALED = $9119;
  3749. GL_ALREADY_SIGNALED = $911A;
  3750. GL_TIMEOUT_EXPIRED = $911B;
  3751. GL_CONDITION_SATISFIED = $911C;
  3752. GL_WAIT_FAILED = $911D;
  3753. GL_SYNC_FLUSH_COMMANDS_BIT = $00000001;
  3754. GL_TIMEOUT_IGNORED = QWord($FFFFFFFFFFFFFFFF);
  3755. var
  3756. glFenceSync: function(condition: GLenum; flags: GLbitfield): GLsync; extdecl;
  3757. glIsSync: function(sync: GLsync): GLboolean; extdecl;
  3758. glDeleteSync: procedure(sync: GLsync); extdecl;
  3759. glClientWaitSync: function(sync: GLsync; flags: GLbitfield; timeout: GLuint64): GLenum; extdecl;
  3760. glWaitSync: procedure(sync: GLsync; flags: GLbitfield; timeout: GLuint64); extdecl;
  3761. glGetInteger64v: procedure(pname: GLenum; params: PGLint64); extdecl;
  3762. glGetSynciv: procedure(sync: GLsync; pname: GLenum; bufSize: GLsizei; length: PGLsizei; values: PGLint); extdecl;
  3763. function Load_GL_ARB_sync(LoadAsCore: boolean = false): Boolean;
  3764. //**** GL_ARB_texture_multisample *****//
  3765. const
  3766. GL_SAMPLE_POSITION = $8E50;
  3767. GL_SAMPLE_MASK = $8E51;
  3768. GL_SAMPLE_MASK_VALUE = $8E52;
  3769. GL_MAX_SAMPLE_MASK_WORDS = $8E59;
  3770. GL_TEXTURE_2D_MULTISAMPLE = $9100;
  3771. GL_PROXY_TEXTURE_2D_MULTISAMPLE = $9101;
  3772. GL_TEXTURE_2D_MULTISAMPLE_ARRAY = $9102;
  3773. GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = $9103;
  3774. GL_TEXTURE_BINDING_2D_MULTISAMPLE = $9104;
  3775. GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = $9105;
  3776. GL_TEXTURE_SAMPLES = $9106;
  3777. GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = $9107;
  3778. GL_SAMPLER_2D_MULTISAMPLE = $9108;
  3779. GL_INT_SAMPLER_2D_MULTISAMPLE = $9109;
  3780. GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = $910A;
  3781. GL_SAMPLER_2D_MULTISAMPLE_ARRAY = $910B;
  3782. GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = $910C;
  3783. GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = $910D;
  3784. GL_MAX_COLOR_TEXTURE_SAMPLES = $910E;
  3785. GL_MAX_DEPTH_TEXTURE_SAMPLES = $910F;
  3786. GL_MAX_INTEGER_SAMPLES = $9110;
  3787. var
  3788. glTexImage2DMultisample: procedure(target: GLenum; samples: GLsizei; internalformat: GLint; width: GLsizei; height: GLsizei; fixedsamplelocations: GLboolean); extdecl;
  3789. glTexImage3DMultisample: procedure(target: GLenum; samples: GLsizei; internalformat: GLint; width: GLsizei; height: GLsizei; depth: GLsizei; fixedsamplelocations: GLboolean); extdecl;
  3790. glGetMultisamplefv: procedure(pname: GLenum; index: GLuint; val: PGLfloat); extdecl;
  3791. glSampleMaski: procedure(index: GLuint; mask: GLbitfield); extdecl;
  3792. function Load_GL_ARB_texture_multisample(LoadAsCore: boolean = false): Boolean;
  3793. //**** GL_ARB_blend_func_extended *****//
  3794. const
  3795. GL_SRC1_COLOR = $88F9;
  3796. // reuse GL_SRC1_ALPHA
  3797. const
  3798. GL_ONE_MINUS_SRC1_COLOR = $88FA;
  3799. GL_ONE_MINUS_SRC1_ALPHA = $88FB;
  3800. GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = $88FC;
  3801. var
  3802. glBindFragDataLocationIndexed: procedure(_program: GLuint; colorNumber: GLuint; index: GLuint; const name: PGLchar); extdecl;
  3803. glGetFragDataIndex: function(_program: GLuint; const name: PGLchar): GLint; extdecl;
  3804. function Load_GL_ARB_blend_func_extended(LoadAsCore: boolean = false): Boolean;
  3805. //**** GL_ARB_sampler_objects *****//
  3806. const
  3807. GL_SAMPLER_BINDING = $8919;
  3808. var
  3809. glGenSamplers: procedure(count: GLsizei; samplers: PGLuint); extdecl;
  3810. glDeleteSamplers: procedure(count: GLsizei; const samplers: PGLuint); extdecl;
  3811. glIsSampler: function(sampler: GLuint): GLboolean; extdecl;
  3812. glBindSampler: procedure(_unit: GLenum; sampler: GLuint); extdecl;
  3813. glSamplerParameteri: procedure(sampler: GLuint; pname: GLenum; param: GLint); extdecl;
  3814. glSamplerParameteriv: procedure(sampler: GLuint; pname: GLenum; const param: PGLint); extdecl;
  3815. glSamplerParameterf: procedure(sampler: GLuint; pname: GLenum; param: GLfloat); extdecl;
  3816. glSamplerParameterfv: procedure(sampler: GLuint; pname: GLenum; const param: PGLfloat); extdecl;
  3817. glSamplerParameterIiv: procedure(sampler: GLuint; pname: GLenum; const param: PGLint); extdecl;
  3818. glSamplerParameterIuiv: procedure(sampler: GLuint; pname: GLenum; const param: PGLuint); extdecl;
  3819. glGetSamplerParameteriv: procedure(sampler: GLuint; pname: GLenum; params: PGLint); extdecl;
  3820. glGetSamplerParameterIiv: procedure(sampler: GLuint; pname: GLenum; params: PGLint); extdecl;
  3821. glGetSamplerParameterfv: procedure(sampler: GLuint; pname: GLenum; params: PGLfloat); extdecl;
  3822. glGetSamplerParameterIuiv: procedure(sampler: GLuint; pname: GLenum; params: PGLuint); extdecl;
  3823. function Load_GL_ARB_sampler_objects(LoadAsCore: boolean = false): Boolean;
  3824. //**** GL_ARB_timer_query *****//
  3825. const
  3826. GL_TIME_ELAPSED = $88BF;
  3827. GL_TIMESTAMP = $8E28;
  3828. var
  3829. glQueryCounter: procedure(id: GLuint; target: GLenum); extdecl;
  3830. glGetQueryObjecti64v: procedure(id: GLuint; pname: GLenum; params: PGLint64); extdecl;
  3831. glGetQueryObjectui64v: procedure(id: GLuint; pname: GLenum; params: PGLuint64); extdecl;
  3832. function Load_GL_ARB_timer_query(LoadAsCore: boolean = false): Boolean;
  3833. //**** GL_ARB_vertex_type_2_10_10_10_rev *****//
  3834. const
  3835. GL_INT_2_10_10_10_REV = $8D9F;
  3836. var
  3837. glVertexP2ui: procedure(_type: GLenum; value: GLuint); extdecl;
  3838. glVertexP2uiv: procedure(_type: GLenum; const value: PGLuint); extdecl;
  3839. glVertexP3ui: procedure(_type: GLenum; value: GLuint); extdecl;
  3840. glVertexP3uiv: procedure(_type: GLenum; const value: PGLuint); extdecl;
  3841. glVertexP4ui: procedure(_type: GLenum; value: GLuint); extdecl;
  3842. glVertexP4uiv: procedure(_type: GLenum; const value: PGLuint); extdecl;
  3843. glTexCoordP1ui: procedure(_type: GLenum; coords: GLuint); extdecl;
  3844. glTexCoordP1uiv: procedure(_type: GLenum; const coords: PGLuint); extdecl;
  3845. glTexCoordP2ui: procedure(_type: GLenum; coords: GLuint); extdecl;
  3846. glTexCoordP2uiv: procedure(_type: GLenum; const coords: PGLuint); extdecl;
  3847. glTexCoordP3ui: procedure(_type: GLenum; coords: GLuint); extdecl;
  3848. glTexCoordP3uiv: procedure(_type: GLenum; const coords: PGLuint); extdecl;
  3849. glTexCoordP4ui: procedure(_type: GLenum; coords: GLuint); extdecl;
  3850. glTexCoordP4uiv: procedure(_type: GLenum; const coords: PGLuint); extdecl;
  3851. glMultiTexCoordP1ui: procedure(texture: GLenum; _type: GLenum; coords: GLuint); extdecl;
  3852. glMultiTexCoordP1uiv: procedure(texture: GLenum; _type: GLenum; const coords: PGLuint); extdecl;
  3853. glMultiTexCoordP2ui: procedure(texture: GLenum; _type: GLenum; coords: GLuint); extdecl;
  3854. glMultiTexCoordP2uiv: procedure(texture: GLenum; _type: GLenum; const coords: PGLuint); extdecl;
  3855. glMultiTexCoordP3ui: procedure(texture: GLenum; _type: GLenum; coords: GLuint); extdecl;
  3856. glMultiTexCoordP3uiv: procedure(texture: GLenum; _type: GLenum; const coords: PGLuint); extdecl;
  3857. glMultiTexCoordP4ui: procedure(texture: GLenum; _type: GLenum; coords: GLuint); extdecl;
  3858. glMultiTexCoordP4uiv: procedure(texture: GLenum; _type: GLenum; const coords: PGLuint); extdecl;
  3859. glNormalP3ui: procedure(_type: GLenum; coords: GLuint); extdecl;
  3860. glNormalP3uiv: procedure(_type: GLenum; const coords: PGLuint); extdecl;
  3861. glColorP3ui: procedure(_type: GLenum; color: GLuint); extdecl;
  3862. glColorP3uiv: procedure(_type: GLenum; const color: PGLuint); extdecl;
  3863. glColorP4ui: procedure(_type: GLenum; color: GLuint); extdecl;
  3864. glColorP4uiv: procedure(_type: GLenum; const color: PGLuint); extdecl;
  3865. glSecondaryColorP3ui: procedure(_type: GLenum; color: GLuint); extdecl;
  3866. glSecondaryColorP3uiv: procedure(_type: GLenum; const color: PGLuint); extdecl;
  3867. glVertexAttribP1ui: procedure(index: GLuint; _type: GLenum; normalized: GLboolean; value: GLuint); extdecl;
  3868. glVertexAttribP1uiv: procedure(index: GLuint; _type: GLenum; normalized: GLboolean; const value: PGLuint); extdecl;
  3869. glVertexAttribP2ui: procedure(index: GLuint; _type: GLenum; normalized: GLboolean; value: GLuint); extdecl;
  3870. glVertexAttribP2uiv: procedure(index: GLuint; _type: GLenum; normalized: GLboolean; const value: PGLuint); extdecl;
  3871. glVertexAttribP3ui: procedure(index: GLuint; _type: GLenum; normalized: GLboolean; value: GLuint); extdecl;
  3872. glVertexAttribP3uiv: procedure(index: GLuint; _type: GLenum; normalized: GLboolean; const value: PGLuint); extdecl;
  3873. glVertexAttribP4ui: procedure(index: GLuint; _type: GLenum; normalized: GLboolean; value: GLuint); extdecl;
  3874. glVertexAttribP4uiv: procedure(index: GLuint; _type: GLenum; normalized: GLboolean; const value: PGLuint); extdecl;
  3875. function Load_GL_ARB_vertex_type_2_10_10_10_rev(LoadAsCore: boolean = false): Boolean;
  3876. //**** GL_ARB_gpu_shader_fp64 *****//
  3877. // reuse GL_DOUBLE
  3878. const
  3879. GL_DOUBLE_VEC2 = $8FFC;
  3880. GL_DOUBLE_VEC3 = $8FFD;
  3881. GL_DOUBLE_VEC4 = $8FFE;
  3882. GL_DOUBLE_MAT2 = $8F46;
  3883. GL_DOUBLE_MAT3 = $8F47;
  3884. GL_DOUBLE_MAT4 = $8F48;
  3885. GL_DOUBLE_MAT2x3 = $8F49;
  3886. GL_DOUBLE_MAT2x4 = $8F4A;
  3887. GL_DOUBLE_MAT3x2 = $8F4B;
  3888. GL_DOUBLE_MAT3x4 = $8F4C;
  3889. GL_DOUBLE_MAT4x2 = $8F4D;
  3890. GL_DOUBLE_MAT4x3 = $8F4E;
  3891. var
  3892. glUniform1d: procedure(location: GLint; x: GLdouble); extdecl;
  3893. glUniform2d: procedure(location: GLint; x: GLdouble; y: GLdouble); extdecl;
  3894. glUniform3d: procedure(location: GLint; x: GLdouble; y: GLdouble; z: GLdouble); extdecl;
  3895. glUniform4d: procedure(location: GLint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl;
  3896. glUniform1dv: procedure(location: GLint; count: GLsizei; const value: PGLdouble); extdecl;
  3897. glUniform2dv: procedure(location: GLint; count: GLsizei; const value: PGLdouble); extdecl;
  3898. glUniform3dv: procedure(location: GLint; count: GLsizei; const value: PGLdouble); extdecl;
  3899. glUniform4dv: procedure(location: GLint; count: GLsizei; const value: PGLdouble); extdecl;
  3900. glUniformMatrix2dv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3901. glUniformMatrix3dv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3902. glUniformMatrix4dv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3903. glUniformMatrix2x3dv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3904. glUniformMatrix2x4dv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3905. glUniformMatrix3x2dv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3906. glUniformMatrix3x4dv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3907. glUniformMatrix4x2dv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3908. glUniformMatrix4x3dv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3909. glGetUniformdv: procedure(_program: GLuint; location: GLint; params: PGLdouble); extdecl;
  3910. { All of the following ProgramUniform* functions are supported if and only
  3911. if EXT_direct_state_access is supported.
  3912. (See http://www.opengl.org/registry/specs/ARB/gpu_shader_fp64.txt)
  3913. Load_GL_ARB_gpu_shader_fp64 will try to load them, but their presence/absence
  3914. will have no effect on the result of Load_GL_ARB_gpu_shader_fp64 and
  3915. Load_GL_VERSION_4_0 functions. (Because they are not mandatory parts of
  3916. the extension or OpenGL 4.0 core spec.) }
  3917. glProgramUniform1dEXT: procedure(_program: GLuint; location: GLint; x: GLdouble); extdecl;
  3918. glProgramUniform2dEXT: procedure(_program: GLuint; location: GLint; x: GLdouble; y: GLdouble); extdecl;
  3919. glProgramUniform3dEXT: procedure(_program: GLuint; location: GLint; x: GLdouble; y: GLdouble; z: GLdouble); extdecl;
  3920. glProgramUniform4dEXT: procedure(_program: GLuint; location: GLint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl;
  3921. glProgramUniform1dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; const value: PGLdouble); extdecl;
  3922. glProgramUniform2dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; const value: PGLdouble); extdecl;
  3923. glProgramUniform3dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; const value: PGLdouble); extdecl;
  3924. glProgramUniform4dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; const value: PGLdouble); extdecl;
  3925. glProgramUniformMatrix2dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3926. glProgramUniformMatrix3dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3927. glProgramUniformMatrix4dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3928. glProgramUniformMatrix2x3dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3929. glProgramUniformMatrix2x4dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3930. glProgramUniformMatrix3x2dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3931. glProgramUniformMatrix3x4dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3932. glProgramUniformMatrix4x2dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3933. glProgramUniformMatrix4x3dvEXT: procedure(_program: GLuint; location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLdouble); extdecl;
  3934. function Load_GL_ARB_gpu_shader_fp64(LoadAsCore: boolean = false): Boolean;
  3935. //**** GL_ARB_shader_subroutine *****//
  3936. const
  3937. GL_ACTIVE_SUBROUTINES = $8DE5;
  3938. GL_ACTIVE_SUBROUTINE_UNIFORMS = $8DE6;
  3939. GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = $8E47;
  3940. GL_ACTIVE_SUBROUTINE_MAX_LENGTH = $8E48;
  3941. GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = $8E49;
  3942. GL_MAX_SUBROUTINES = $8DE7;
  3943. GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = $8DE8;
  3944. GL_NUM_COMPATIBLE_SUBROUTINES = $8E4A;
  3945. GL_COMPATIBLE_SUBROUTINES = $8E4B;
  3946. var
  3947. glGetSubroutineUniformLocation: function(_program: GLuint; shadertype: GLenum; const name: PGLchar): GLint; extdecl;
  3948. glGetSubroutineIndex: function(_program: GLuint; shadertype: GLenum; const name: PGLchar): GLuint; extdecl;
  3949. glGetActiveSubroutineUniformiv: procedure(_program: GLuint; shadertype: GLenum; index: GLuint; pname: GLenum; values: PGLint); extdecl;
  3950. glGetActiveSubroutineUniformName: procedure(_program: GLuint; shadertype: GLenum; index: GLuint; bufsize: GLsizei; length: PGLsizei; name: PGLchar); extdecl;
  3951. glGetActiveSubroutineName: procedure(_program: GLuint; shadertype: GLenum; index: GLuint; bufsize: GLsizei; length: PGLsizei; name: PGLchar); extdecl;
  3952. glUniformSubroutinesuiv: procedure(shadertype: GLenum; count: GLsizei; const indices: PGLuint); extdecl;
  3953. glGetUniformSubroutineuiv: procedure(shadertype: GLenum; location: GLint; params: PGLuint); extdecl;
  3954. glGetProgramStageiv: procedure(_program: GLuint; shadertype: GLenum; pname: GLenum; values: PGLint); extdecl;
  3955. function Load_GL_ARB_shader_subroutine(LoadAsCore: boolean = false): Boolean;
  3956. //**** GL_ARB_tessellation_shader *****//
  3957. const
  3958. GL_PATCHES = $000E;
  3959. GL_PATCH_VERTICES = $8E72;
  3960. GL_PATCH_DEFAULT_INNER_LEVEL = $8E73;
  3961. GL_PATCH_DEFAULT_OUTER_LEVEL = $8E74;
  3962. GL_TESS_CONTROL_OUTPUT_VERTICES = $8E75;
  3963. GL_TESS_GEN_MODE = $8E76;
  3964. GL_TESS_GEN_SPACING = $8E77;
  3965. GL_TESS_GEN_VERTEX_ORDER = $8E78;
  3966. GL_TESS_GEN_POINT_MODE = $8E79;
  3967. // reuse GL_TRIANGLES
  3968. // reuse GL_QUADS
  3969. const
  3970. GL_ISOLINES = $8E7A;
  3971. // reuse GL_EQUAL
  3972. const
  3973. GL_FRACTIONAL_ODD = $8E7B;
  3974. GL_FRACTIONAL_EVEN = $8E7C;
  3975. // reuse GL_CCW
  3976. // reuse GL_CW
  3977. const
  3978. GL_MAX_PATCH_VERTICES = $8E7D;
  3979. GL_MAX_TESS_GEN_LEVEL = $8E7E;
  3980. GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = $8E7F;
  3981. GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = $8E80;
  3982. GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = $8E81;
  3983. GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = $8E82;
  3984. GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = $8E83;
  3985. GL_MAX_TESS_PATCH_COMPONENTS = $8E84;
  3986. GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = $8E85;
  3987. GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = $8E86;
  3988. GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = $8E89;
  3989. GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = $8E8A;
  3990. GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = $886C;
  3991. GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = $886D;
  3992. GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = $8E1E;
  3993. GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = $8E1F;
  3994. GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = $84F0;
  3995. GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = $84F1;
  3996. GL_TESS_EVALUATION_SHADER = $8E87;
  3997. GL_TESS_CONTROL_SHADER = $8E88;
  3998. var
  3999. glPatchParameteri: procedure(pname: GLenum; value: GLint); extdecl;
  4000. glPatchParameterfv: procedure(pname: GLenum; const values: PGLfloat); extdecl;
  4001. function Load_GL_ARB_tessellation_shader(LoadAsCore: boolean = false): Boolean;
  4002. //**** GL_ARB_transform_feedback2 *****//
  4003. const
  4004. GL_TRANSFORM_FEEDBACK = $8E22;
  4005. GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = $8E23;
  4006. GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = $8E24;
  4007. GL_TRANSFORM_FEEDBACK_BINDING = $8E25;
  4008. var
  4009. glBindTransformFeedback: procedure(target: GLenum; id: GLuint); extdecl;
  4010. glDeleteTransformFeedbacks: procedure(n: GLsizei; const ids: PGLuint); extdecl;
  4011. glGenTransformFeedbacks: procedure(n: GLsizei; ids: PGLuint); extdecl;
  4012. glIsTransformFeedback: function(id: GLuint): GLboolean; extdecl;
  4013. glPauseTransformFeedback: procedure(); extdecl;
  4014. glResumeTransformFeedback: procedure(); extdecl;
  4015. glDrawTransformFeedback: procedure(mode: GLenum; id: GLuint); extdecl;
  4016. function Load_GL_ARB_transform_feedback2(LoadAsCore: boolean = false): Boolean;
  4017. //**** GL_ARB_transform_feedback3 *****//
  4018. const
  4019. GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = $8E70;
  4020. var
  4021. glDrawTransformFeedbackStream: procedure(mode: GLenum; id: GLuint; stream: GLuint); extdecl;
  4022. glBeginQueryIndexed: procedure(target: GLenum; index: GLuint; id: GLuint); extdecl;
  4023. glEndQueryIndexed: procedure(target: GLenum; index: GLuint); extdecl;
  4024. glGetQueryIndexediv: procedure(target: GLenum; index: GLuint; pname: GLenum; params: PGLint); extdecl;
  4025. function Load_GL_ARB_transform_feedback3(LoadAsCore: boolean = false): Boolean;
  4026. //***** GL_version_1_4 *****//
  4027. const
  4028. GL_BLEND_DST_RGB = $80C8;
  4029. GL_BLEND_SRC_RGB = $80C9;
  4030. GL_BLEND_DST_ALPHA = $80CA;
  4031. GL_BLEND_SRC_ALPHA = $80CB;
  4032. GL_POINT_SIZE_MIN = $8126;
  4033. GL_POINT_SIZE_MAX = $8127;
  4034. GL_POINT_FADE_THRESHOLD_SIZE = $8128;
  4035. GL_POINT_DISTANCE_ATTENUATION = $8129;
  4036. GL_GENERATE_MIPMAP = $8191;
  4037. GL_GENERATE_MIPMAP_HINT = $8192;
  4038. GL_DEPTH_COMPONENT16 = $81A5;
  4039. GL_DEPTH_COMPONENT24 = $81A6;
  4040. GL_DEPTH_COMPONENT32 = $81A7;
  4041. GL_MIRRORED_REPEAT = $8370;
  4042. GL_FOG_COORDINATE_SOURCE = $8450;
  4043. GL_FOG_COORDINATE = $8451;
  4044. GL_FRAGMENT_DEPTH = $8452;
  4045. GL_CURRENT_FOG_COORDINATE = $8453;
  4046. GL_FOG_COORDINATE_ARRAY_TYPE = $8454;
  4047. GL_FOG_COORDINATE_ARRAY_STRIDE = $8455;
  4048. GL_FOG_COORDINATE_ARRAY_POINTER = $8456;
  4049. GL_FOG_COORDINATE_ARRAY = $8457;
  4050. GL_COLOR_SUM = $8458;
  4051. GL_CURRENT_SECONDARY_COLOR = $8459;
  4052. GL_SECONDARY_COLOR_ARRAY_SIZE = $845A;
  4053. GL_SECONDARY_COLOR_ARRAY_TYPE = $845B;
  4054. GL_SECONDARY_COLOR_ARRAY_STRIDE = $845C;
  4055. GL_SECONDARY_COLOR_ARRAY_POINTER = $845D;
  4056. GL_SECONDARY_COLOR_ARRAY = $845E;
  4057. GL_MAX_TEXTURE_LOD_BIAS = $84FD;
  4058. GL_TEXTURE_FILTER_CONTROL = $8500;
  4059. GL_TEXTURE_LOD_BIAS = $8501;
  4060. GL_INCR_WRAP = $8507;
  4061. GL_DECR_WRAP = $8508;
  4062. GL_TEXTURE_DEPTH_SIZE = $884A;
  4063. GL_DEPTH_TEXTURE_MODE = $884B;
  4064. GL_TEXTURE_COMPARE_MODE = $884C;
  4065. GL_TEXTURE_COMPARE_FUNC = $884D;
  4066. GL_COMPARE_R_TO_TEXTURE = $884E;
  4067. var
  4068. glBlendFuncSeparate: procedure(sfactorRGB: GLenum; dfactorRGB: GLenum; sfactorAlpha: GLenum; dfactorAlpha: GLenum); extdecl;
  4069. glFogCoordf: procedure(coord: GLfloat); extdecl;
  4070. glFogCoordfv: procedure(const coord: PGLfloat); extdecl;
  4071. glFogCoordd: procedure(coord: GLdouble); extdecl;
  4072. glFogCoorddv: procedure(const coord: PGLdouble); extdecl;
  4073. glFogCoordPointer: procedure(_type: GLenum; stride: GLsizei; const pointer: PGLvoid); extdecl;
  4074. glMultiDrawArrays: procedure(mode: GLenum; first: PGLint; count: PGLsizei; primcount: GLsizei); extdecl;
  4075. glMultiDrawElements: procedure(mode: GLenum; const count: PGLsizei; _type: GLenum; const indices: PGLvoid; primcount: GLsizei); extdecl;
  4076. glPointParameterf: procedure(pname: GLenum; param: GLfloat); extdecl;
  4077. glPointParameterfv: procedure(pname: GLenum; const params: PGLfloat); extdecl;
  4078. glPointParameteri: procedure(pname: GLenum; param: GLint); extdecl;
  4079. glPointParameteriv: procedure(pname: GLenum; const params: PGLint); extdecl;
  4080. glSecondaryColor3b: procedure(red: GLbyte; green: GLbyte; blue: GLbyte); extdecl;
  4081. glSecondaryColor3bv: procedure(const v: PGLbyte); extdecl;
  4082. glSecondaryColor3d: procedure(red: GLdouble; green: GLdouble; blue: GLdouble); extdecl;
  4083. glSecondaryColor3dv: procedure(const v: PGLdouble); extdecl;
  4084. glSecondaryColor3f: procedure(red: GLfloat; green: GLfloat; blue: GLfloat); extdecl;
  4085. glSecondaryColor3fv: procedure(const v: PGLfloat); extdecl;
  4086. glSecondaryColor3i: procedure(red: GLint; green: GLint; blue: GLint); extdecl;
  4087. glSecondaryColor3iv: procedure(const v: PGLint); extdecl;
  4088. glSecondaryColor3s: procedure(red: GLshort; green: GLshort; blue: GLshort); extdecl;
  4089. glSecondaryColor3sv: procedure(const v: PGLshort); extdecl;
  4090. glSecondaryColor3ub: procedure(red: GLubyte; green: GLubyte; blue: GLubyte); extdecl;
  4091. glSecondaryColor3ubv: procedure(const v: PGLubyte); extdecl;
  4092. glSecondaryColor3ui: procedure(red: GLuint; green: GLuint; blue: GLuint); extdecl;
  4093. glSecondaryColor3uiv: procedure(const v: PGLuint); extdecl;
  4094. glSecondaryColor3us: procedure(red: GLushort; green: GLushort; blue: GLushort); extdecl;
  4095. glSecondaryColor3usv: procedure(const v: PGLushort); extdecl;
  4096. glSecondaryColorPointer: procedure(size: GLint; _type: GLenum; stride: GLsizei; const pointer: PGLvoid); extdecl;
  4097. glWindowPos2d: procedure(x: GLdouble; y: GLdouble); extdecl;
  4098. glWindowPos2dv: procedure(const v: PGLdouble); extdecl;
  4099. glWindowPos2f: procedure(x: GLfloat; y: GLfloat); extdecl;
  4100. glWindowPos2fv: procedure(const v: PGLfloat); extdecl;
  4101. glWindowPos2i: procedure(x: GLint; y: GLint); extdecl;
  4102. glWindowPos2iv: procedure(const v: PGLint); extdecl;
  4103. glWindowPos2s: procedure(x: GLshort; y: GLshort); extdecl;
  4104. glWindowPos2sv: procedure(const v: PGLshort); extdecl;
  4105. glWindowPos3d: procedure(x: GLdouble; y: GLdouble; z: GLdouble); extdecl;
  4106. glWindowPos3dv: procedure(const v: PGLdouble); extdecl;
  4107. glWindowPos3f: procedure(x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  4108. glWindowPos3fv: procedure(const v: PGLfloat); extdecl;
  4109. glWindowPos3i: procedure(x: GLint; y: GLint; z: GLint); extdecl;
  4110. glWindowPos3iv: procedure(const v: PGLint); extdecl;
  4111. glWindowPos3s: procedure(x: GLshort; y: GLshort; z: GLshort); extdecl;
  4112. glWindowPos3sv: procedure(const v: PGLshort); extdecl;
  4113. function Load_GL_version_1_4: Boolean;
  4114. //***** GL_version_1_5 *****//
  4115. const
  4116. GL_BUFFER_SIZE = $8764;
  4117. GL_BUFFER_USAGE = $8765;
  4118. GL_QUERY_COUNTER_BITS = $8864;
  4119. GL_CURRENT_QUERY = $8865;
  4120. GL_QUERY_RESULT = $8866;
  4121. GL_QUERY_RESULT_AVAILABLE = $8867;
  4122. GL_ARRAY_BUFFER = $8892;
  4123. GL_ELEMENT_ARRAY_BUFFER = $8893;
  4124. GL_ARRAY_BUFFER_BINDING = $8894;
  4125. GL_ELEMENT_ARRAY_BUFFER_BINDING = $8895;
  4126. GL_VERTEX_ARRAY_BUFFER_BINDING = $8896;
  4127. GL_NORMAL_ARRAY_BUFFER_BINDING = $8897;
  4128. GL_COLOR_ARRAY_BUFFER_BINDING = $8898;
  4129. GL_INDEX_ARRAY_BUFFER_BINDING = $8899;
  4130. GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = $889A;
  4131. GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = $889B;
  4132. GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = $889C;
  4133. GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = $889D;
  4134. GL_WEIGHT_ARRAY_BUFFER_BINDING = $889E;
  4135. GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = $889F;
  4136. GL_READ_ONLY = $88B8;
  4137. GL_WRITE_ONLY = $88B9;
  4138. GL_READ_WRITE = $88BA;
  4139. GL_BUFFER_ACCESS = $88BB;
  4140. GL_BUFFER_MAPPED = $88BC;
  4141. GL_BUFFER_MAP_POINTER = $88BD;
  4142. GL_STREAM_DRAW = $88E0;
  4143. GL_STREAM_READ = $88E1;
  4144. GL_STREAM_COPY = $88E2;
  4145. GL_STATIC_DRAW = $88E4;
  4146. GL_STATIC_READ = $88E5;
  4147. GL_STATIC_COPY = $88E6;
  4148. GL_DYNAMIC_DRAW = $88E8;
  4149. GL_DYNAMIC_READ = $88E9;
  4150. GL_DYNAMIC_COPY = $88EA;
  4151. GL_SAMPLES_PASSED = $8914;
  4152. GL_FOG_COORD_SRC = $8450;
  4153. GL_FOG_COORD = $8451;
  4154. GL_CURRENT_FOG_COORD = $8453;
  4155. GL_FOG_COORD_ARRAY_TYPE = $8454;
  4156. GL_FOG_COORD_ARRAY_STRIDE = $8455;
  4157. GL_FOG_COORD_ARRAY_POINTER = $8456;
  4158. GL_FOG_COORD_ARRAY = $8457;
  4159. GL_FOG_COORD_ARRAY_BUFFER_BINDING = $889D;
  4160. GL_SRC0_RGB = $8580;
  4161. GL_SRC1_RGB = $8581;
  4162. GL_SRC2_RGB = $8582;
  4163. GL_SRC0_ALPHA = $8588;
  4164. GL_SRC1_ALPHA = $8589;
  4165. GL_SRC2_ALPHA = $858A;
  4166. var
  4167. glGenQueries: procedure(n: GLsizei; ids: PGLuint); extdecl;
  4168. glDeleteQueries: procedure(n: GLsizei; const ids: PGLuint); extdecl;
  4169. glIsQuery: function(id: GLuint): GLboolean; extdecl;
  4170. glBeginQuery: procedure(target: GLenum; id: GLuint); extdecl;
  4171. glEndQuery: procedure(target: GLenum); extdecl;
  4172. glGetQueryiv: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  4173. glGetQueryObjectiv: procedure(id: GLuint; pname: GLenum; params: PGLint); extdecl;
  4174. glGetQueryObjectuiv: procedure(id: GLuint; pname: GLenum; params: PGLuint); extdecl;
  4175. glBindBuffer: procedure(target: GLenum; buffer: GLuint); extdecl;
  4176. glDeleteBuffers: procedure(n: GLsizei; const buffers: PGLuint); extdecl;
  4177. glGenBuffers: procedure(n: GLsizei; buffers: PGLuint); extdecl;
  4178. glIsBuffer: function(buffer: GLuint): GLboolean; extdecl;
  4179. glBufferData: procedure(target: GLenum; size: GLsizeiptr; const data: PGLvoid; usage: GLenum); extdecl;
  4180. glBufferSubData: procedure(target: GLenum; offset: GLintptr; size: GLsizeiptr; const data: PGLvoid); extdecl;
  4181. glGetBufferSubData: procedure(target: GLenum; offset: GLintptr; size: GLsizeiptr; data: PGLvoid); extdecl;
  4182. glMapBuffer: function(target: GLenum; access: GLenum): PGLvoid; extdecl;
  4183. glUnmapBuffer: function(target: GLenum): GLboolean; extdecl;
  4184. glGetBufferParameteriv: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  4185. glGetBufferPointerv: procedure(target: GLenum; pname: GLenum; params: PGLvoid); extdecl;
  4186. function Load_GL_version_1_5: Boolean;
  4187. //***** GL_version_2_0 *****//
  4188. const
  4189. GL_BLEND_EQUATION_RGB = $8009;
  4190. GL_VERTEX_ATTRIB_ARRAY_ENABLED = $8622;
  4191. GL_VERTEX_ATTRIB_ARRAY_SIZE = $8623;
  4192. GL_VERTEX_ATTRIB_ARRAY_STRIDE = $8624;
  4193. GL_VERTEX_ATTRIB_ARRAY_TYPE = $8625;
  4194. GL_CURRENT_VERTEX_ATTRIB = $8626;
  4195. GL_VERTEX_PROGRAM_POINT_SIZE = $8642;
  4196. GL_VERTEX_PROGRAM_TWO_SIDE = $8643;
  4197. GL_VERTEX_ATTRIB_ARRAY_POINTER = $8645;
  4198. GL_STENCIL_BACK_FUNC = $8800;
  4199. GL_STENCIL_BACK_FAIL = $8801;
  4200. GL_STENCIL_BACK_PASS_DEPTH_FAIL = $8802;
  4201. GL_STENCIL_BACK_PASS_DEPTH_PASS = $8803;
  4202. GL_MAX_DRAW_BUFFERS = $8824;
  4203. GL_DRAW_BUFFER0 = $8825;
  4204. GL_DRAW_BUFFER1 = $8826;
  4205. GL_DRAW_BUFFER2 = $8827;
  4206. GL_DRAW_BUFFER3 = $8828;
  4207. GL_DRAW_BUFFER4 = $8829;
  4208. GL_DRAW_BUFFER5 = $882A;
  4209. GL_DRAW_BUFFER6 = $882B;
  4210. GL_DRAW_BUFFER7 = $882C;
  4211. GL_DRAW_BUFFER8 = $882D;
  4212. GL_DRAW_BUFFER9 = $882E;
  4213. GL_DRAW_BUFFER10 = $882F;
  4214. GL_DRAW_BUFFER11 = $8830;
  4215. GL_DRAW_BUFFER12 = $8831;
  4216. GL_DRAW_BUFFER13 = $8832;
  4217. GL_DRAW_BUFFER14 = $8833;
  4218. GL_DRAW_BUFFER15 = $8834;
  4219. GL_BLEND_EQUATION_ALPHA = $883D;
  4220. GL_POINT_SPRITE = $8861;
  4221. GL_COORD_REPLACE = $8862;
  4222. GL_MAX_VERTEX_ATTRIBS = $8869;
  4223. GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = $886A;
  4224. GL_MAX_TEXTURE_COORDS = $8871;
  4225. GL_MAX_TEXTURE_IMAGE_UNITS = $8872;
  4226. GL_FRAGMENT_SHADER = $8B30;
  4227. GL_VERTEX_SHADER = $8B31;
  4228. GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = $8B49;
  4229. GL_MAX_VERTEX_UNIFORM_COMPONENTS = $8B4A;
  4230. GL_MAX_VARYING_FLOATS = $8B4B;
  4231. GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = $8B4C;
  4232. GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = $8B4D;
  4233. GL_SHADER_TYPE = $8B4F;
  4234. GL_FLOAT_VEC2 = $8B50;
  4235. GL_FLOAT_VEC3 = $8B51;
  4236. GL_FLOAT_VEC4 = $8B52;
  4237. GL_INT_VEC2 = $8B53;
  4238. GL_INT_VEC3 = $8B54;
  4239. GL_INT_VEC4 = $8B55;
  4240. GL_BOOL = $8B56;
  4241. GL_BOOL_VEC2 = $8B57;
  4242. GL_BOOL_VEC3 = $8B58;
  4243. GL_BOOL_VEC4 = $8B59;
  4244. GL_FLOAT_MAT2 = $8B5A;
  4245. GL_FLOAT_MAT3 = $8B5B;
  4246. GL_FLOAT_MAT4 = $8B5C;
  4247. GL_SAMPLER_1D = $8B5D;
  4248. GL_SAMPLER_2D = $8B5E;
  4249. GL_SAMPLER_3D = $8B5F;
  4250. GL_SAMPLER_CUBE = $8B60;
  4251. GL_SAMPLER_1D_SHADOW = $8B61;
  4252. GL_SAMPLER_2D_SHADOW = $8B62;
  4253. GL_DELETE_STATUS = $8B80;
  4254. GL_COMPILE_STATUS = $8B81;
  4255. GL_LINK_STATUS = $8B82;
  4256. GL_VALIDATE_STATUS = $8B83;
  4257. GL_INFO_LOG_LENGTH = $8B84;
  4258. GL_ATTACHED_SHADERS = $8B85;
  4259. GL_ACTIVE_UNIFORMS = $8B86;
  4260. GL_ACTIVE_UNIFORM_MAX_LENGTH = $8B87;
  4261. GL_SHADER_SOURCE_LENGTH = $8B88;
  4262. GL_ACTIVE_ATTRIBUTES = $8B89;
  4263. GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = $8B8A;
  4264. GL_FRAGMENT_SHADER_DERIVATIVE_HINT = $8B8B;
  4265. GL_SHADING_LANGUAGE_VERSION = $8B8C;
  4266. GL_CURRENT_PROGRAM = $8B8D;
  4267. GL_POINT_SPRITE_COORD_ORIGIN = $8CA0;
  4268. GL_LOWER_LEFT = $8CA1;
  4269. GL_UPPER_LEFT = $8CA2;
  4270. GL_STENCIL_BACK_REF = $8CA3;
  4271. GL_STENCIL_BACK_VALUE_MASK = $8CA4;
  4272. GL_STENCIL_BACK_WRITEMASK = $8CA5;
  4273. var
  4274. glBlendEquationSeparate: procedure(modeRGB: GLenum; modeAlpha: GLenum); extdecl;
  4275. glDrawBuffers: procedure(n: GLsizei; const bufs: PGLenum); extdecl;
  4276. glStencilOpSeparate: procedure(face: GLenum; sfail: GLenum; dpfail: GLenum; dppass: GLenum); extdecl;
  4277. glStencilFuncSeparate: procedure(frontfunc: GLenum; backfunc: GLenum; ref: GLint; mask: GLuint); extdecl;
  4278. glStencilMaskSeparate: procedure(face: GLenum; mask: GLuint); extdecl;
  4279. glAttachShader: procedure(_program: GLuint; shader: GLuint); extdecl;
  4280. glBindAttribLocation: procedure(_program: GLuint; index: GLuint; const name: PGLchar); extdecl;
  4281. glCompileShader: procedure(shader: GLuint); extdecl;
  4282. glCreateProgram: function(): GLuint; extdecl;
  4283. glCreateShader: function(_type: GLenum): GLuint; extdecl;
  4284. glDeleteProgram: procedure(_program: GLuint); extdecl;
  4285. glDeleteShader: procedure(shader: GLuint); extdecl;
  4286. glDetachShader: procedure(_program: GLuint; shader: GLuint); extdecl;
  4287. glDisableVertexAttribArray: procedure(index: GLuint); extdecl;
  4288. glEnableVertexAttribArray: procedure(index: GLuint); extdecl;
  4289. glGetActiveAttrib: procedure(_program: GLuint; index: GLuint; bufSize: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLchar); extdecl;
  4290. glGetActiveUniform: procedure(_program: GLuint; index: GLuint; bufSize: GLsizei; length: PGLsizei; size: PGLint; _type: PGLenum; name: PGLchar); extdecl;
  4291. glGetAttachedShaders: procedure(_program: GLuint; maxCount: GLsizei; count: PGLsizei; obj: PGLuint); extdecl;
  4292. glGetAttribLocation: function(_program: GLuint; const name: PGLchar): GLint; extdecl;
  4293. glGetProgramiv: procedure(_program: GLuint; pname: GLenum; params: PGLint); extdecl;
  4294. glGetProgramInfoLog: procedure(_program: GLuint; bufSize: GLsizei; length: PGLsizei; infoLog: PGLchar); extdecl;
  4295. glGetShaderiv: procedure(shader: GLuint; pname: GLenum; params: PGLint); extdecl;
  4296. glGetShaderInfoLog: procedure(shader: GLuint; bufSize: GLsizei; length: PGLsizei; infoLog: PGLchar); extdecl;
  4297. glGetShaderSource: procedure(shader: GLuint; bufSize: GLsizei; length: PGLsizei; source: PGLchar); extdecl;
  4298. glGetUniformLocation: function(_program: GLuint; const name: PGLchar): GLint; extdecl;
  4299. glGetUniformfv: procedure(_program: GLuint; location: GLint; params: PGLfloat); extdecl;
  4300. glGetUniformiv: procedure(_program: GLuint; location: GLint; params: PGLint); extdecl;
  4301. glGetVertexAttribdv: procedure(index: GLuint; pname: GLenum; params: PGLdouble); extdecl;
  4302. glGetVertexAttribfv: procedure(index: GLuint; pname: GLenum; params: PGLfloat); extdecl;
  4303. glGetVertexAttribiv: procedure(index: GLuint; pname: GLenum; params: PGLint); extdecl;
  4304. glGetVertexAttribPointerv: procedure(index: GLuint; pname: GLenum; pointer: PGLvoid); extdecl;
  4305. glIsProgram: function(_program: GLuint): GLboolean; extdecl;
  4306. glIsShader: function(shader: GLuint): GLboolean; extdecl;
  4307. glLinkProgram: procedure(_program: GLuint); extdecl;
  4308. glShaderSource: procedure(shader: GLuint; count: GLsizei; const _string: PGLchar; const length: PGLint); extdecl;
  4309. glUseProgram: procedure(_program: GLuint); extdecl;
  4310. glUniform1f: procedure(location: GLint; v0: GLfloat); extdecl;
  4311. glUniform2f: procedure(location: GLint; v0: GLfloat; v1: GLfloat); extdecl;
  4312. glUniform3f: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat); extdecl;
  4313. glUniform4f: procedure(location: GLint; v0: GLfloat; v1: GLfloat; v2: GLfloat; v3: GLfloat); extdecl;
  4314. glUniform1i: procedure(location: GLint; v0: GLint); extdecl;
  4315. glUniform2i: procedure(location: GLint; v0: GLint; v1: GLint); extdecl;
  4316. glUniform3i: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint); extdecl;
  4317. glUniform4i: procedure(location: GLint; v0: GLint; v1: GLint; v2: GLint; v3: GLint); extdecl;
  4318. glUniform1fv: procedure(location: GLint; count: GLsizei; const value: PGLfloat); extdecl;
  4319. glUniform2fv: procedure(location: GLint; count: GLsizei; const value: PGLfloat); extdecl;
  4320. glUniform3fv: procedure(location: GLint; count: GLsizei; const value: PGLfloat); extdecl;
  4321. glUniform4fv: procedure(location: GLint; count: GLsizei; const value: PGLfloat); extdecl;
  4322. glUniform1iv: procedure(location: GLint; count: GLsizei; const value: PGLint); extdecl;
  4323. glUniform2iv: procedure(location: GLint; count: GLsizei; const value: PGLint); extdecl;
  4324. glUniform3iv: procedure(location: GLint; count: GLsizei; const value: PGLint); extdecl;
  4325. glUniform4iv: procedure(location: GLint; count: GLsizei; const value: PGLint); extdecl;
  4326. glUniformMatrix2fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
  4327. glUniformMatrix3fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
  4328. glUniformMatrix4fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
  4329. glValidateProgram: procedure(_program: GLuint); extdecl;
  4330. glVertexAttrib1d: procedure(index: GLuint; x: GLdouble); extdecl;
  4331. glVertexAttrib1dv: procedure(index: GLuint; const v: PGLdouble); extdecl;
  4332. glVertexAttrib1f: procedure(index: GLuint; x: GLfloat); extdecl;
  4333. glVertexAttrib1fv: procedure(index: GLuint; const v: PGLfloat); extdecl;
  4334. glVertexAttrib1s: procedure(index: GLuint; x: GLshort); extdecl;
  4335. glVertexAttrib1sv: procedure(index: GLuint; const v: PGLshort); extdecl;
  4336. glVertexAttrib2d: procedure(index: GLuint; x: GLdouble; y: GLdouble); extdecl;
  4337. glVertexAttrib2dv: procedure(index: GLuint; const v: PGLdouble); extdecl;
  4338. glVertexAttrib2f: procedure(index: GLuint; x: GLfloat; y: GLfloat); extdecl;
  4339. glVertexAttrib2fv: procedure(index: GLuint; const v: PGLfloat); extdecl;
  4340. glVertexAttrib2s: procedure(index: GLuint; x: GLshort; y: GLshort); extdecl;
  4341. glVertexAttrib2sv: procedure(index: GLuint; const v: PGLshort); extdecl;
  4342. glVertexAttrib3d: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble); extdecl;
  4343. glVertexAttrib3dv: procedure(index: GLuint; const v: PGLdouble); extdecl;
  4344. glVertexAttrib3f: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat); extdecl;
  4345. glVertexAttrib3fv: procedure(index: GLuint; const v: PGLfloat); extdecl;
  4346. glVertexAttrib3s: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort); extdecl;
  4347. glVertexAttrib3sv: procedure(index: GLuint; const v: PGLshort); extdecl;
  4348. glVertexAttrib4Nbv: procedure(index: GLuint; const v: PGLbyte); extdecl;
  4349. glVertexAttrib4Niv: procedure(index: GLuint; const v: PGLint); extdecl;
  4350. glVertexAttrib4Nsv: procedure(index: GLuint; const v: PGLshort); extdecl;
  4351. glVertexAttrib4Nub: procedure(index: GLuint; x: GLubyte; y: GLubyte; z: GLubyte; w: GLubyte); extdecl;
  4352. glVertexAttrib4Nubv: procedure(index: GLuint; const v: PGLubyte); extdecl;
  4353. glVertexAttrib4Nuiv: procedure(index: GLuint; const v: PGLuint); extdecl;
  4354. glVertexAttrib4Nusv: procedure(index: GLuint; const v: PGLushort); extdecl;
  4355. glVertexAttrib4bv: procedure(index: GLuint; const v: PGLbyte); extdecl;
  4356. glVertexAttrib4d: procedure(index: GLuint; x: GLdouble; y: GLdouble; z: GLdouble; w: GLdouble); extdecl;
  4357. glVertexAttrib4dv: procedure(index: GLuint; const v: PGLdouble); extdecl;
  4358. glVertexAttrib4f: procedure(index: GLuint; x: GLfloat; y: GLfloat; z: GLfloat; w: GLfloat); extdecl;
  4359. glVertexAttrib4fv: procedure(index: GLuint; const v: PGLfloat); extdecl;
  4360. glVertexAttrib4iv: procedure(index: GLuint; const v: PGLint); extdecl;
  4361. glVertexAttrib4s: procedure(index: GLuint; x: GLshort; y: GLshort; z: GLshort; w: GLshort); extdecl;
  4362. glVertexAttrib4sv: procedure(index: GLuint; const v: PGLshort); extdecl;
  4363. glVertexAttrib4ubv: procedure(index: GLuint; const v: PGLubyte); extdecl;
  4364. glVertexAttrib4uiv: procedure(index: GLuint; const v: PGLuint); extdecl;
  4365. glVertexAttrib4usv: procedure(index: GLuint; const v: PGLushort); extdecl;
  4366. glVertexAttribPointer: procedure(index: GLuint; size: GLint; _type: GLenum; normalized: GLboolean; stride: GLsizei; const pointer: PGLvoid); extdecl;
  4367. function Load_GL_version_2_0: Boolean;
  4368. //**** GL_VERSION_2_1 *****//
  4369. const
  4370. GL_PIXEL_PACK_BUFFER = $88EB;
  4371. GL_PIXEL_UNPACK_BUFFER = $88EC;
  4372. GL_PIXEL_PACK_BUFFER_BINDING = $88ED;
  4373. GL_PIXEL_UNPACK_BUFFER_BINDING = $88EF;
  4374. GL_FLOAT_MAT2x3 = $8B65;
  4375. GL_FLOAT_MAT2x4 = $8B66;
  4376. GL_FLOAT_MAT3x2 = $8B67;
  4377. GL_FLOAT_MAT3x4 = $8B68;
  4378. GL_FLOAT_MAT4x2 = $8B69;
  4379. GL_FLOAT_MAT4x3 = $8B6A;
  4380. GL_SRGB = $8C40;
  4381. GL_SRGB8 = $8C41;
  4382. GL_SRGB_ALPHA = $8C42;
  4383. GL_SRGB8_ALPHA8 = $8C43;
  4384. GL_COMPRESSED_SRGB = $8C48;
  4385. GL_COMPRESSED_SRGB_ALPHA = $8C49;
  4386. var
  4387. glUniformMatrix2x3fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
  4388. glUniformMatrix3x2fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
  4389. glUniformMatrix2x4fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
  4390. glUniformMatrix4x2fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
  4391. glUniformMatrix3x4fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
  4392. glUniformMatrix4x3fv: procedure(location: GLint; count: GLsizei; transpose: GLboolean; const value: PGLfloat); extdecl;
  4393. function Load_GL_VERSION_2_1(): Boolean;
  4394. //**** GL_VERSION_2_1 DEPRECATED *****//
  4395. const
  4396. GL_CURRENT_RASTER_SECONDARY_COLOR = $845F;
  4397. GL_SLUMINANCE_ALPHA = $8C44;
  4398. GL_SLUMINANCE8_ALPHA8 = $8C45;
  4399. GL_SLUMINANCE = $8C46;
  4400. GL_SLUMINANCE8 = $8C47;
  4401. GL_COMPRESSED_SLUMINANCE = $8C4A;
  4402. GL_COMPRESSED_SLUMINANCE_ALPHA = $8C4B;
  4403. //**** GL_VERSION_3_0 *****//
  4404. const
  4405. GL_COMPARE_REF_TO_TEXTURE = $884E;
  4406. GL_CLIP_DISTANCE0 = $3000;
  4407. GL_CLIP_DISTANCE1 = $3001;
  4408. GL_CLIP_DISTANCE2 = $3002;
  4409. GL_CLIP_DISTANCE3 = $3003;
  4410. GL_CLIP_DISTANCE4 = $3004;
  4411. GL_CLIP_DISTANCE5 = $3005;
  4412. GL_CLIP_DISTANCE6 = $3006;
  4413. GL_CLIP_DISTANCE7 = $3007;
  4414. GL_MAX_CLIP_DISTANCES = $0D32;
  4415. GL_MAJOR_VERSION = $821B;
  4416. GL_MINOR_VERSION = $821C;
  4417. GL_NUM_EXTENSIONS = $821D;
  4418. GL_CONTEXT_FLAGS = $821E;
  4419. GL_DEPTH_BUFFER = $8223;
  4420. GL_STENCIL_BUFFER = $8224;
  4421. GL_COMPRESSED_RED = $8225;
  4422. GL_COMPRESSED_RG = $8226;
  4423. GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = $0001;
  4424. GL_RGBA32F = $8814;
  4425. GL_RGB32F = $8815;
  4426. GL_RGBA16F = $881A;
  4427. GL_RGB16F = $881B;
  4428. GL_VERTEX_ATTRIB_ARRAY_INTEGER = $88FD;
  4429. GL_MAX_ARRAY_TEXTURE_LAYERS = $88FF;
  4430. GL_MIN_PROGRAM_TEXEL_OFFSET = $8904;
  4431. GL_MAX_PROGRAM_TEXEL_OFFSET = $8905;
  4432. GL_CLAMP_READ_COLOR = $891C;
  4433. GL_FIXED_ONLY = $891D;
  4434. GL_MAX_VARYING_COMPONENTS = $8B4B;
  4435. GL_TEXTURE_1D_ARRAY = $8C18;
  4436. GL_PROXY_TEXTURE_1D_ARRAY = $8C19;
  4437. GL_TEXTURE_2D_ARRAY = $8C1A;
  4438. GL_PROXY_TEXTURE_2D_ARRAY = $8C1B;
  4439. GL_TEXTURE_BINDING_1D_ARRAY = $8C1C;
  4440. GL_TEXTURE_BINDING_2D_ARRAY = $8C1D;
  4441. GL_R11F_G11F_B10F = $8C3A;
  4442. GL_UNSIGNED_INT_10F_11F_11F_REV = $8C3B;
  4443. GL_RGB9_E5 = $8C3D;
  4444. GL_UNSIGNED_INT_5_9_9_9_REV = $8C3E;
  4445. GL_TEXTURE_SHARED_SIZE = $8C3F;
  4446. GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = $8C76;
  4447. GL_TRANSFORM_FEEDBACK_BUFFER_MODE = $8C7F;
  4448. GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = $8C80;
  4449. GL_TRANSFORM_FEEDBACK_VARYINGS = $8C83;
  4450. GL_TRANSFORM_FEEDBACK_BUFFER_START = $8C84;
  4451. GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = $8C85;
  4452. GL_PRIMITIVES_GENERATED = $8C87;
  4453. GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = $8C88;
  4454. GL_RASTERIZER_DISCARD = $8C89;
  4455. GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = $8C8A;
  4456. GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = $8C8B;
  4457. GL_INTERLEAVED_ATTRIBS = $8C8C;
  4458. GL_SEPARATE_ATTRIBS = $8C8D;
  4459. GL_TRANSFORM_FEEDBACK_BUFFER = $8C8E;
  4460. GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = $8C8F;
  4461. GL_RGBA32UI = $8D70;
  4462. GL_RGB32UI = $8D71;
  4463. GL_RGBA16UI = $8D76;
  4464. GL_RGB16UI = $8D77;
  4465. GL_RGBA8UI = $8D7C;
  4466. GL_RGB8UI = $8D7D;
  4467. GL_RGBA32I = $8D82;
  4468. GL_RGB32I = $8D83;
  4469. GL_RGBA16I = $8D88;
  4470. GL_RGB16I = $8D89;
  4471. GL_RGBA8I = $8D8E;
  4472. GL_RGB8I = $8D8F;
  4473. GL_RED_INTEGER = $8D94;
  4474. GL_GREEN_INTEGER = $8D95;
  4475. GL_BLUE_INTEGER = $8D96;
  4476. GL_RGB_INTEGER = $8D98;
  4477. GL_RGBA_INTEGER = $8D99;
  4478. GL_BGR_INTEGER = $8D9A;
  4479. GL_BGRA_INTEGER = $8D9B;
  4480. GL_SAMPLER_1D_ARRAY = $8DC0;
  4481. GL_SAMPLER_2D_ARRAY = $8DC1;
  4482. GL_SAMPLER_1D_ARRAY_SHADOW = $8DC3;
  4483. GL_SAMPLER_2D_ARRAY_SHADOW = $8DC4;
  4484. GL_SAMPLER_CUBE_SHADOW = $8DC5;
  4485. GL_UNSIGNED_INT_VEC2 = $8DC6;
  4486. GL_UNSIGNED_INT_VEC3 = $8DC7;
  4487. GL_UNSIGNED_INT_VEC4 = $8DC8;
  4488. GL_INT_SAMPLER_1D = $8DC9;
  4489. GL_INT_SAMPLER_2D = $8DCA;
  4490. GL_INT_SAMPLER_3D = $8DCB;
  4491. GL_INT_SAMPLER_CUBE = $8DCC;
  4492. GL_INT_SAMPLER_1D_ARRAY = $8DCE;
  4493. GL_INT_SAMPLER_2D_ARRAY = $8DCF;
  4494. GL_UNSIGNED_INT_SAMPLER_1D = $8DD1;
  4495. GL_UNSIGNED_INT_SAMPLER_2D = $8DD2;
  4496. GL_UNSIGNED_INT_SAMPLER_3D = $8DD3;
  4497. GL_UNSIGNED_INT_SAMPLER_CUBE = $8DD4;
  4498. GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = $8DD6;
  4499. GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = $8DD7;
  4500. GL_QUERY_WAIT = $8E13;
  4501. GL_QUERY_NO_WAIT = $8E14;
  4502. GL_QUERY_BY_REGION_WAIT = $8E15;
  4503. GL_QUERY_BY_REGION_NO_WAIT = $8E16;
  4504. GL_BUFFER_ACCESS_FLAGS = $911F;
  4505. GL_BUFFER_MAP_LENGTH = $9120;
  4506. GL_BUFFER_MAP_OFFSET = $9121;
  4507. var
  4508. glColorMaski: procedure(index: GLuint; r: GLboolean; g: GLboolean; b: GLboolean; a: GLboolean); extdecl;
  4509. glGetBooleani_v: procedure(target: GLenum; index: GLuint; data: PGLboolean); extdecl;
  4510. glGetIntegeri_v: procedure(target: GLenum; index: GLuint; data: PGLint); extdecl; (* Also used in GL_ARB_uniform_buffer_object *)
  4511. glEnablei: procedure(target: GLenum; index: GLuint); extdecl;
  4512. glDisablei: procedure(target: GLenum; index: GLuint); extdecl;
  4513. glIsEnabledi: function(target: GLenum; index: GLuint): GLboolean; extdecl;
  4514. glBeginTransformFeedback: procedure(primitiveMode: GLenum); extdecl;
  4515. glEndTransformFeedback: procedure(); extdecl;
  4516. glBindBufferRange: procedure(target: GLenum; index: GLuint; buffer: GLuint; offset: GLintptr; size: GLsizeiptr); extdecl; (* Also used in GL_ARB_uniform_buffer_object *)
  4517. glBindBufferBase: procedure(target: GLenum; index: GLuint; buffer: GLuint); extdecl; (* Also used in GL_ARB_uniform_buffer_object *)
  4518. glTransformFeedbackVaryings: procedure(_program: GLuint; count: GLsizei; const varyings: PPGLchar; bufferMode: GLenum); extdecl;
  4519. glGetTransformFeedbackVarying: procedure(_program: GLuint; index: GLuint; bufSize: GLsizei; length: PGLsizei; size: PGLsizei; _type: PGLenum; name: PGLchar); extdecl;
  4520. glClampColor: procedure(target: GLenum; clamp: GLenum); extdecl;
  4521. glBeginConditionalRender: procedure(id: GLuint; mode: GLenum); extdecl;
  4522. glEndConditionalRender: procedure(); extdecl;
  4523. glVertexAttribIPointer: procedure(index: GLuint; size: GLint; _type: GLenum; stride: GLsizei; const _pointer: PGLvoid); extdecl;
  4524. glGetVertexAttribIiv: procedure(index: GLuint; pname: GLenum; params: PGLint); extdecl;
  4525. glGetVertexAttribIuiv: procedure(index: GLuint; pname: GLenum; params: PGLuint); extdecl;
  4526. glVertexAttribI1i: procedure(index: GLuint; x: GLint); extdecl;
  4527. glVertexAttribI2i: procedure(index: GLuint; x: GLint; y: GLint); extdecl;
  4528. glVertexAttribI3i: procedure(index: GLuint; x: GLint; y: GLint; z: GLint); extdecl;
  4529. glVertexAttribI4i: procedure(index: GLuint; x: GLint; y: GLint; z: GLint; w: GLint); extdecl;
  4530. glVertexAttribI1ui: procedure(index: GLuint; x: GLuint); extdecl;
  4531. glVertexAttribI2ui: procedure(index: GLuint; x: GLuint; y: GLuint); extdecl;
  4532. glVertexAttribI3ui: procedure(index: GLuint; x: GLuint; y: GLuint; z: GLuint); extdecl;
  4533. glVertexAttribI4ui: procedure(index: GLuint; x: GLuint; y: GLuint; z: GLuint; w: GLuint); extdecl;
  4534. glVertexAttribI1iv: procedure(index: GLuint; const v: PGLint); extdecl;
  4535. glVertexAttribI2iv: procedure(index: GLuint; const v: PGLint); extdecl;
  4536. glVertexAttribI3iv: procedure(index: GLuint; const v: PGLint); extdecl;
  4537. glVertexAttribI4iv: procedure(index: GLuint; const v: PGLint); extdecl;
  4538. glVertexAttribI1uiv: procedure(index: GLuint; const v: PGLuint); extdecl;
  4539. glVertexAttribI2uiv: procedure(index: GLuint; const v: PGLuint); extdecl;
  4540. glVertexAttribI3uiv: procedure(index: GLuint; const v: PGLuint); extdecl;
  4541. glVertexAttribI4uiv: procedure(index: GLuint; const v: PGLuint); extdecl;
  4542. glVertexAttribI4bv: procedure(index: GLuint; const v: PGLbyte); extdecl;
  4543. glVertexAttribI4sv: procedure(index: GLuint; const v: PGLshort); extdecl;
  4544. glVertexAttribI4ubv: procedure(index: GLuint; const v: PGLubyte); extdecl;
  4545. glVertexAttribI4usv: procedure(index: GLuint; const v: PGLushort); extdecl;
  4546. glGetUniformuiv: procedure(_program: GLuint; location: GLint; params: PGLuint); extdecl;
  4547. glBindFragDataLocation: procedure(_program: GLuint; color: GLuint; const name: PGLchar); extdecl;
  4548. glGetFragDataLocation: function(_program: GLuint; const name: PGLchar): GLint; extdecl;
  4549. glUniform1ui: procedure(location: GLint; v0: GLuint); extdecl;
  4550. glUniform2ui: procedure(location: GLint; v0: GLuint; v1: GLuint); extdecl;
  4551. glUniform3ui: procedure(location: GLint; v0: GLuint; v1: GLuint; v2: GLuint); extdecl;
  4552. glUniform4ui: procedure(location: GLint; v0: GLuint; v1: GLuint; v2: GLuint; v3: GLuint); extdecl;
  4553. glUniform1uiv: procedure(location: GLint; count: GLsizei; const value: PGLuint); extdecl;
  4554. glUniform2uiv: procedure(location: GLint; count: GLsizei; const value: PGLuint); extdecl;
  4555. glUniform3uiv: procedure(location: GLint; count: GLsizei; const value: PGLuint); extdecl;
  4556. glUniform4uiv: procedure(location: GLint; count: GLsizei; const value: PGLuint); extdecl;
  4557. glTexParameterIiv: procedure(target: GLenum; pname: GLenum; const params: PGLint); extdecl;
  4558. glTexParameterIuiv: procedure(target: GLenum; pname: GLenum; const params: PGLuint); extdecl;
  4559. glGetTexParameterIiv: procedure(target: GLenum; pname: GLenum; params: PGLint); extdecl;
  4560. glGetTexParameterIuiv: procedure(target: GLenum; pname: GLenum; params: PGLuint); extdecl;
  4561. glClearBufferiv: procedure(buffer: GLenum; drawbuffer: GLint; const value: PGLint); extdecl;
  4562. glClearBufferuiv: procedure(buffer: GLenum; drawbuffer: GLint; const value: PGLuint); extdecl;
  4563. glClearBufferfv: procedure(buffer: GLenum; drawbuffer: GLint; const value: PGLfloat); extdecl;
  4564. glClearBufferfi: procedure(buffer: GLenum; drawbuffer: GLint; depth: GLfloat; stencil: GLint); extdecl;
  4565. glGetStringi: function(name: GLenum; index: GLuint): PGLubyte; extdecl;
  4566. function Load_GL_VERSION_3_0(): Boolean; //returns false if any legacy components missing
  4567. function Load_GL_VERSION_3_0_CORE(): Boolean; //returns false only if core 3.0 functions are missing
  4568. function Load_GL_version_3_1_CORE(): boolean;
  4569. function Load_GL_version_3_2_CORE(): boolean;
  4570. function Load_GL_version_3_3_CORE(): boolean;
  4571. function Load_GL_version_4_0_CORE(): boolean;
  4572. function Load_GL_version_4_3_CORE(): boolean;
  4573. //**** GL_VERSION_3_0 DEPRECATED *****//
  4574. const
  4575. GL_CLAMP_VERTEX_COLOR = $891A;
  4576. GL_CLAMP_FRAGMENT_COLOR = $891B;
  4577. GL_ALPHA_INTEGER = $8D97;
  4578. //**** GL_VERSION_3_1 *****//
  4579. const
  4580. GL_SAMPLER_2D_RECT = $8B63;
  4581. GL_SAMPLER_2D_RECT_SHADOW = $8B64;
  4582. GL_SAMPLER_BUFFER = $8DC2;
  4583. GL_INT_SAMPLER_2D_RECT = $8DCD;
  4584. GL_INT_SAMPLER_BUFFER = $8DD0;
  4585. GL_UNSIGNED_INT_SAMPLER_2D_RECT = $8DD5;
  4586. GL_UNSIGNED_INT_SAMPLER_BUFFER = $8DD8;
  4587. GL_TEXTURE_BUFFER = $8C2A;
  4588. GL_MAX_TEXTURE_BUFFER_SIZE = $8C2B;
  4589. GL_TEXTURE_BINDING_BUFFER = $8C2C;
  4590. GL_TEXTURE_BUFFER_DATA_STORE_BINDING = $8C2D;
  4591. GL_TEXTURE_BUFFER_FORMAT = $8C2E;
  4592. GL_TEXTURE_RECTANGLE = $84F5;
  4593. GL_TEXTURE_BINDING_RECTANGLE = $84F6;
  4594. GL_PROXY_TEXTURE_RECTANGLE = $84F7;
  4595. GL_MAX_RECTANGLE_TEXTURE_SIZE = $84F8;
  4596. GL_RED_SNORM = $8F90;
  4597. GL_RG_SNORM = $8F91;
  4598. GL_RGB_SNORM = $8F92;
  4599. GL_RGBA_SNORM = $8F93;
  4600. GL_R8_SNORM = $8F94;
  4601. GL_RG8_SNORM = $8F95;
  4602. GL_RGB8_SNORM = $8F96;
  4603. GL_RGBA8_SNORM = $8F97;
  4604. GL_R16_SNORM = $8F98;
  4605. GL_RG16_SNORM = $8F99;
  4606. GL_RGB16_SNORM = $8F9A;
  4607. GL_RGBA16_SNORM = $8F9B;
  4608. GL_SIGNED_NORMALIZED = $8F9C;
  4609. GL_PRIMITIVE_RESTART = $8F9D;
  4610. GL_PRIMITIVE_RESTART_INDEX = $8F9E;
  4611. var
  4612. glDrawArraysInstanced: procedure(mode: GLenum; first: GLint; count: GLsizei; primcount: GLsizei); extdecl;
  4613. glDrawElementsInstanced: procedure(mode: GLenum; count: GLsizei; _type: GLenum; const indices: PGLvoid; primcount: GLsizei); extdecl;
  4614. glTexBuffer: procedure(target: GLenum; internalformat: GLenum; buffer: GLuint); extdecl;
  4615. glPrimitiveRestartIndex: procedure(index: GLuint); extdecl;
  4616. function Load_GL_VERSION_3_1(): Boolean;
  4617. //**** GL_VERSION_3_2 *****//
  4618. const
  4619. GL_CONTEXT_CORE_PROFILE_BIT = $00000001;
  4620. GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = $00000002;
  4621. GL_LINES_ADJACENCY = $000A;
  4622. GL_LINE_STRIP_ADJACENCY = $000B;
  4623. GL_TRIANGLES_ADJACENCY = $000C;
  4624. GL_TRIANGLE_STRIP_ADJACENCY = $000D;
  4625. GL_PROGRAM_POINT_SIZE = $8642;
  4626. GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = $8C29;
  4627. GL_FRAMEBUFFER_ATTACHMENT_LAYERED = $8DA7;
  4628. GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = $8DA8;
  4629. GL_GEOMETRY_SHADER = $8DD9;
  4630. GL_GEOMETRY_VERTICES_OUT = $8916;
  4631. GL_GEOMETRY_INPUT_TYPE = $8917;
  4632. GL_GEOMETRY_OUTPUT_TYPE = $8918;
  4633. GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = $8DDF;
  4634. GL_MAX_GEOMETRY_OUTPUT_VERTICES = $8DE0;
  4635. GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = $8DE1;
  4636. GL_MAX_VERTEX_OUTPUT_COMPONENTS = $9122;
  4637. GL_MAX_GEOMETRY_INPUT_COMPONENTS = $9123;
  4638. GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = $9124;
  4639. GL_MAX_FRAGMENT_INPUT_COMPONENTS = $9125;
  4640. GL_CONTEXT_PROFILE_MASK = $9126;
  4641. var
  4642. glGetInteger64i_v: procedure(target: GLenum; index: GLuint; data: PGLint64); extdecl;
  4643. glGetBufferParameteri64v: procedure(target: GLenum; pname: GLenum; params: PGLint64); extdecl;
  4644. glProgramParameteri: procedure(_program: GLuint; pname: GLenum; value: GLint); extdecl;
  4645. glFramebufferTexture: procedure(target: GLenum; attachment: GLenum; texture: GLuint; level: GLint); extdecl;
  4646. glVertexAttribDivisor: procedure(index: GLuint; divisor: GLuint); extdecl;
  4647. function Load_GL_VERSION_3_2(): Boolean;
  4648. //**** GL_VERSION_3_3 *****//
  4649. function Load_GL_VERSION_3_3(): Boolean;
  4650. //**** GL_VERSION_4_0 *****//
  4651. function Load_GL_VERSION_4_0(): Boolean;
  4652. //**** GL_VERSION_4_3 *****//
  4653. const
  4654. GL_DEBUG_OUTPUT = $92E0;
  4655. GL_DONT_CARE = $1100;
  4656. GL_CONTEXT_FLAG_DEBUG_BIT = $00000002;
  4657. GL_STACK_OVERFLOW = $0503;
  4658. GL_STACK_UNDERFLOW = $0504;
  4659. GL_DEBUG_OUTPUT_SYNCHRONOUS = $8242;
  4660. GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = $8243;
  4661. GL_DEBUG_CALLBACK_FUNCTION = $8244;
  4662. GL_DEBUG_CALLBACK_USER_PARAM = $8245;
  4663. GL_DEBUG_SOURCE_API = $8246;
  4664. GL_DEBUG_SOURCE_WINDOW_SYSTEM = $8247;
  4665. GL_DEBUG_SOURCE_SHADER_COMPILER = $8248;
  4666. GL_DEBUG_SOURCE_THIRD_PARTY = $8249;
  4667. GL_DEBUG_SOURCE_APPLICATION = $824A;
  4668. GL_DEBUG_SOURCE_OTHER = $824B;
  4669. GL_DEBUG_TYPE_ERROR = $824C;
  4670. GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = $824D;
  4671. GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = $824E;
  4672. GL_DEBUG_TYPE_PORTABILITY = $824F;
  4673. GL_DEBUG_TYPE_PERFORMANCE = $8250;
  4674. GL_DEBUG_TYPE_OTHER = $8251;
  4675. GL_DEBUG_TYPE_MARKER = $8268;
  4676. GL_DEBUG_TYPE_PUSH_GROUP = $8269;
  4677. GL_DEBUG_TYPE_POP_GROUP = $826A;
  4678. GL_DEBUG_SEVERITY_NOTIFICATION = $826B;
  4679. GL_MAX_DEBUG_GROUP_STACK_DEPTH = $826C;
  4680. GL_DEBUG_GROUP_STACK_DEPTH = $826D;
  4681. GL_BUFFER = $82E0;
  4682. GL_SHADER = $82E1;
  4683. GL_PROGRAM = $82E2;
  4684. GL_QUERY = $82E3;
  4685. GL_PROGRAM_PIPELINE = $82E4;
  4686. GL_SAMPLER = $82E6;
  4687. GL_DISPLAY_LIST = $82E7;
  4688. GL_MAX_LABEL_LENGTH = $82E8;
  4689. GL_MAX_DEBUG_MESSAGE_LENGTH = $9143;
  4690. GL_MAX_DEBUG_LOGGED_MESSAGES = $9144;
  4691. GL_DEBUG_LOGGED_MESSAGES = $9145;
  4692. GL_DEBUG_SEVERITY_HIGH = $9146;
  4693. GL_DEBUG_SEVERITY_MEDIUM = $9147;
  4694. GL_DEBUG_SEVERITY_LOW = $9148;
  4695. type
  4696. GLDEBUGPROC = procedure (source:GLenum; _type:GLenum; id:GLuint; severity:GLenum; length:GLsizei; message:PGLchar; userParam:PGLvoid );extdecl;
  4697. var
  4698. glDebugMessageCallback:procedure (callback:GLDEBUGPROC; userParam:PGLvoid); extdecl;
  4699. glDebugMessageControl :procedure (source:GLenum; _type:GLenum; severity:GLenum; count:GLsizei; ids:PGLuint; enabled:GLboolean); extdecl;
  4700. function Load_GL_Debug_output(): Boolean;
  4701. function Load_GL_VERSION_4_3(): Boolean;
  4702. implementation
  4703. {$IFNDEF Windows}
  4704. function wglGetProcAddress(proc: PAnsiChar): Pointer;
  4705. begin
  4706. Result := GetProcAddress(LibGL, proc);
  4707. end;
  4708. {$ENDIF}
  4709. function glext_ExtensionSupported(const extension: AnsiString; const searchIn: AnsiString): Boolean;
  4710. var
  4711. extensions: PAnsiChar;
  4712. start: PAnsiChar;
  4713. where, terminator: PAnsiChar;
  4714. begin
  4715. if (Pos(' ', extension) <> 0) or (extension = '') then
  4716. begin
  4717. Result := FALSE;
  4718. Exit;
  4719. end;
  4720. if searchIn = '' then extensions := PAnsiChar(glGetString(GL_EXTENSIONS))
  4721. else extensions := PAnsiChar(searchIn);
  4722. start := extensions;
  4723. while TRUE do
  4724. begin
  4725. where := StrPos(start, PAnsiChar(extension));
  4726. if where = nil then Break;
  4727. terminator := Pointer(PtrUInt(where) + Length(extension));
  4728. if (where = start) or (PAnsiChar(PtrUInt(where) - 1)^ = ' ') then
  4729. begin
  4730. if (terminator^ = ' ') or (terminator^ = #0) then
  4731. begin
  4732. Result := TRUE;
  4733. Exit;
  4734. end;
  4735. end;
  4736. start := terminator;
  4737. end;
  4738. Result := FALSE;
  4739. end;
  4740. procedure Load_GL_version_1_2x(var allOK: Boolean);
  4741. begin
  4742. glBlendColor := wglGetProcAddress('glBlendColor');
  4743. if not Assigned(glBlendColor) then allOK := False;
  4744. glBlendEquation := wglGetProcAddress('glBlendEquation');
  4745. if not Assigned(glBlendEquation) then allOK := False;
  4746. glDrawRangeElements := wglGetProcAddress('glDrawRangeElements');
  4747. if not Assigned(glDrawRangeElements) then allOK := False;
  4748. glTexImage3D := wglGetProcAddress('glTexImage3D');
  4749. if not Assigned(glTexImage3D) then allOK := False;
  4750. glTexSubImage3D := wglGetProcAddress('glTexSubImage3D');
  4751. if not Assigned(glTexSubImage3D) then allOK := False;
  4752. glCopyTexSubImage3D := wglGetProcAddress('glCopyTexSubImage3D');
  4753. if not Assigned(glCopyTexSubImage3D) then allOK := False;
  4754. end;
  4755. function Load_GL_version_1_2: boolean;
  4756. begin
  4757. result := true;
  4758. Load_GL_version_1_2x(result);
  4759. end;
  4760. function Load_GL_ARB_imaging: Boolean;
  4761. var
  4762. extstring: AnsiString;
  4763. begin
  4764. Result := FALSE;
  4765. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  4766. if glext_ExtensionSupported('GL_ARB_imaging', extstring) then
  4767. begin
  4768. glColorTable := wglGetProcAddress('glColorTable');
  4769. if not Assigned(glColorTable) then Exit;
  4770. glColorTableParameterfv := wglGetProcAddress('glColorTableParameterfv');
  4771. if not Assigned(glColorTableParameterfv) then Exit;
  4772. glColorTableParameteriv := wglGetProcAddress('glColorTableParameteriv');
  4773. if not Assigned(glColorTableParameteriv) then Exit;
  4774. glCopyColorTable := wglGetProcAddress('glCopyColorTable');
  4775. if not Assigned(glCopyColorTable) then Exit;
  4776. glGetColorTable := wglGetProcAddress('glGetColorTable');
  4777. if not Assigned(glGetColorTable) then Exit;
  4778. glGetColorTableParameterfv := wglGetProcAddress('glGetColorTableParameterfv');
  4779. if not Assigned(glGetColorTableParameterfv) then Exit;
  4780. glGetColorTableParameteriv := wglGetProcAddress('glGetColorTableParameteriv');
  4781. if not Assigned(glGetColorTableParameteriv) then Exit;
  4782. glColorSubTable := wglGetProcAddress('glColorSubTable');
  4783. if not Assigned(glColorSubTable) then Exit;
  4784. glCopyColorSubTable := wglGetProcAddress('glCopyColorSubTable');
  4785. if not Assigned(glCopyColorSubTable) then Exit;
  4786. glConvolutionFilter1D := wglGetProcAddress('glConvolutionFilter1D');
  4787. if not Assigned(glConvolutionFilter1D) then Exit;
  4788. glConvolutionFilter2D := wglGetProcAddress('glConvolutionFilter2D');
  4789. if not Assigned(glConvolutionFilter2D) then Exit;
  4790. glConvolutionParameterf := wglGetProcAddress('glConvolutionParameterf');
  4791. if not Assigned(glConvolutionParameterf) then Exit;
  4792. glConvolutionParameterfv := wglGetProcAddress('glConvolutionParameterfv');
  4793. if not Assigned(glConvolutionParameterfv) then Exit;
  4794. glConvolutionParameteri := wglGetProcAddress('glConvolutionParameteri');
  4795. if not Assigned(glConvolutionParameteri) then Exit;
  4796. glConvolutionParameteriv := wglGetProcAddress('glConvolutionParameteriv');
  4797. if not Assigned(glConvolutionParameteriv) then Exit;
  4798. glCopyConvolutionFilter1D := wglGetProcAddress('glCopyConvolutionFilter1D');
  4799. if not Assigned(glCopyConvolutionFilter1D) then Exit;
  4800. glCopyConvolutionFilter2D := wglGetProcAddress('glCopyConvolutionFilter2D');
  4801. if not Assigned(glCopyConvolutionFilter2D) then Exit;
  4802. glGetConvolutionFilter := wglGetProcAddress('glGetConvolutionFilter');
  4803. if not Assigned(glGetConvolutionFilter) then Exit;
  4804. glGetConvolutionParameterfv := wglGetProcAddress('glGetConvolutionParameterfv');
  4805. if not Assigned(glGetConvolutionParameterfv) then Exit;
  4806. glGetConvolutionParameteriv := wglGetProcAddress('glGetConvolutionParameteriv');
  4807. if not Assigned(glGetConvolutionParameteriv) then Exit;
  4808. glGetSeparableFilter := wglGetProcAddress('glGetSeparableFilter');
  4809. if not Assigned(glGetSeparableFilter) then Exit;
  4810. glSeparableFilter2D := wglGetProcAddress('glSeparableFilter2D');
  4811. if not Assigned(glSeparableFilter2D) then Exit;
  4812. glGetHistogram := wglGetProcAddress('glGetHistogram');
  4813. if not Assigned(glGetHistogram) then Exit;
  4814. glGetHistogramParameterfv := wglGetProcAddress('glGetHistogramParameterfv');
  4815. if not Assigned(glGetHistogramParameterfv) then Exit;
  4816. glGetHistogramParameteriv := wglGetProcAddress('glGetHistogramParameteriv');
  4817. if not Assigned(glGetHistogramParameteriv) then Exit;
  4818. glGetMinmax := wglGetProcAddress('glGetMinmax');
  4819. if not Assigned(glGetMinmax) then Exit;
  4820. glGetMinmaxParameterfv := wglGetProcAddress('glGetMinmaxParameterfv');
  4821. if not Assigned(glGetMinmaxParameterfv) then Exit;
  4822. glGetMinmaxParameteriv := wglGetProcAddress('glGetMinmaxParameteriv');
  4823. if not Assigned(glGetMinmaxParameteriv) then Exit;
  4824. glHistogram := wglGetProcAddress('glHistogram');
  4825. if not Assigned(glHistogram) then Exit;
  4826. glMinmax := wglGetProcAddress('glMinmax');
  4827. if not Assigned(glMinmax) then Exit;
  4828. glResetHistogram := wglGetProcAddress('glResetHistogram');
  4829. if not Assigned(glResetHistogram) then Exit;
  4830. glResetMinmax := wglGetProcAddress('glResetMinmax');
  4831. if not Assigned(glResetMinmax) then Exit;
  4832. Result := TRUE;
  4833. end;
  4834. end;
  4835. procedure Load_GL_version_1_3x(var allOK: Boolean);
  4836. begin
  4837. glActiveTexture := wglGetProcAddress('glActiveTexture');
  4838. if not Assigned(glActiveTexture) then allOK := false;
  4839. glClientActiveTexture := wglGetProcAddress('glClientActiveTexture');
  4840. if not Assigned(glClientActiveTexture) then allOK := false;
  4841. glMultiTexCoord1d := wglGetProcAddress('glMultiTexCoord1d');
  4842. if not Assigned(glMultiTexCoord1d) then allOK := false;
  4843. glMultiTexCoord1dv := wglGetProcAddress('glMultiTexCoord1dv');
  4844. if not Assigned(glMultiTexCoord1dv) then allOK := false;
  4845. glMultiTexCoord1f := wglGetProcAddress('glMultiTexCoord1f');
  4846. if not Assigned(glMultiTexCoord1f) then allOK := false;
  4847. glMultiTexCoord1fv := wglGetProcAddress('glMultiTexCoord1fv');
  4848. if not Assigned(glMultiTexCoord1fv) then allOK := false;
  4849. glMultiTexCoord1i := wglGetProcAddress('glMultiTexCoord1i');
  4850. if not Assigned(glMultiTexCoord1i) then allOK := false;
  4851. glMultiTexCoord1iv := wglGetProcAddress('glMultiTexCoord1iv');
  4852. if not Assigned(glMultiTexCoord1iv) then allOK := false;
  4853. glMultiTexCoord1s := wglGetProcAddress('glMultiTexCoord1s');
  4854. if not Assigned(glMultiTexCoord1s) then allOK := false;
  4855. glMultiTexCoord1sv := wglGetProcAddress('glMultiTexCoord1sv');
  4856. if not Assigned(glMultiTexCoord1sv) then allOK := false;
  4857. glMultiTexCoord2d := wglGetProcAddress('glMultiTexCoord2d');
  4858. if not Assigned(glMultiTexCoord2d) then allOK := false;
  4859. glMultiTexCoord2dv := wglGetProcAddress('glMultiTexCoord2dv');
  4860. if not Assigned(glMultiTexCoord2dv) then allOK := false;
  4861. glMultiTexCoord2f := wglGetProcAddress('glMultiTexCoord2f');
  4862. if not Assigned(glMultiTexCoord2f) then allOK := false;
  4863. glMultiTexCoord2fv := wglGetProcAddress('glMultiTexCoord2fv');
  4864. if not Assigned(glMultiTexCoord2fv) then allOK := false;
  4865. glMultiTexCoord2i := wglGetProcAddress('glMultiTexCoord2i');
  4866. if not Assigned(glMultiTexCoord2i) then allOK := false;
  4867. glMultiTexCoord2iv := wglGetProcAddress('glMultiTexCoord2iv');
  4868. if not Assigned(glMultiTexCoord2iv) then allOK := false;
  4869. glMultiTexCoord2s := wglGetProcAddress('glMultiTexCoord2s');
  4870. if not Assigned(glMultiTexCoord2s) then allOK := false;
  4871. glMultiTexCoord2sv := wglGetProcAddress('glMultiTexCoord2sv');
  4872. if not Assigned(glMultiTexCoord2sv) then allOK := false;
  4873. glMultiTexCoord3d := wglGetProcAddress('glMultiTexCoord3d');
  4874. if not Assigned(glMultiTexCoord3d) then allOK := false;
  4875. glMultiTexCoord3dv := wglGetProcAddress('glMultiTexCoord3dv');
  4876. if not Assigned(glMultiTexCoord3dv) then allOK := false;
  4877. glMultiTexCoord3f := wglGetProcAddress('glMultiTexCoord3f');
  4878. if not Assigned(glMultiTexCoord3f) then allOK := false;
  4879. glMultiTexCoord3fv := wglGetProcAddress('glMultiTexCoord3fv');
  4880. if not Assigned(glMultiTexCoord3fv) then allOK := false;
  4881. glMultiTexCoord3i := wglGetProcAddress('glMultiTexCoord3i');
  4882. if not Assigned(glMultiTexCoord3i) then allOK := false;
  4883. glMultiTexCoord3iv := wglGetProcAddress('glMultiTexCoord3iv');
  4884. if not Assigned(glMultiTexCoord3iv) then allOK := false;
  4885. glMultiTexCoord3s := wglGetProcAddress('glMultiTexCoord3s');
  4886. if not Assigned(glMultiTexCoord3s) then allOK := false;
  4887. glMultiTexCoord3sv := wglGetProcAddress('glMultiTexCoord3sv');
  4888. if not Assigned(glMultiTexCoord3sv) then allOK := false;
  4889. glMultiTexCoord4d := wglGetProcAddress('glMultiTexCoord4d');
  4890. if not Assigned(glMultiTexCoord4d) then allOK := false;
  4891. glMultiTexCoord4dv := wglGetProcAddress('glMultiTexCoord4dv');
  4892. if not Assigned(glMultiTexCoord4dv) then allOK := false;
  4893. glMultiTexCoord4f := wglGetProcAddress('glMultiTexCoord4f');
  4894. if not Assigned(glMultiTexCoord4f) then allOK := false;
  4895. glMultiTexCoord4fv := wglGetProcAddress('glMultiTexCoord4fv');
  4896. if not Assigned(glMultiTexCoord4fv) then allOK := false;
  4897. glMultiTexCoord4i := wglGetProcAddress('glMultiTexCoord4i');
  4898. if not Assigned(glMultiTexCoord4i) then allOK := false;
  4899. glMultiTexCoord4iv := wglGetProcAddress('glMultiTexCoord4iv');
  4900. if not Assigned(glMultiTexCoord4iv) then allOK := false;
  4901. glMultiTexCoord4s := wglGetProcAddress('glMultiTexCoord4s');
  4902. if not Assigned(glMultiTexCoord4s) then allOK := false;
  4903. glMultiTexCoord4sv := wglGetProcAddress('glMultiTexCoord4sv');
  4904. if not Assigned(glMultiTexCoord4sv) then allOK := false;
  4905. glLoadTransposeMatrixf := wglGetProcAddress('glLoadTransposeMatrixf');
  4906. if not Assigned(glLoadTransposeMatrixf) then allOK := false;
  4907. glLoadTransposeMatrixd := wglGetProcAddress('glLoadTransposeMatrixd');
  4908. if not Assigned(glLoadTransposeMatrixd) then allOK := false;
  4909. glMultTransposeMatrixf := wglGetProcAddress('glMultTransposeMatrixf');
  4910. if not Assigned(glMultTransposeMatrixf) then allOK := false;
  4911. glMultTransposeMatrixd := wglGetProcAddress('glMultTransposeMatrixd');
  4912. if not Assigned(glMultTransposeMatrixd) then allOK := false;
  4913. glSampleCoverage := wglGetProcAddress('glSampleCoverage');
  4914. if not Assigned(glSampleCoverage) then allOK := false;
  4915. glCompressedTexImage3D := wglGetProcAddress('glCompressedTexImage3D');
  4916. if not Assigned(glCompressedTexImage3D) then allOK := false;
  4917. glCompressedTexImage2D := wglGetProcAddress('glCompressedTexImage2D');
  4918. if not Assigned(glCompressedTexImage2D) then allOK := false;
  4919. glCompressedTexImage1D := wglGetProcAddress('glCompressedTexImage1D');
  4920. if not Assigned(glCompressedTexImage1D) then allOK := false;
  4921. glCompressedTexSubImage3D := wglGetProcAddress('glCompressedTexSubImage3D');
  4922. if not Assigned(glCompressedTexSubImage3D) then allOK := false;
  4923. glCompressedTexSubImage2D := wglGetProcAddress('glCompressedTexSubImage2D');
  4924. if not Assigned(glCompressedTexSubImage2D) then allOK := false;
  4925. glCompressedTexSubImage1D := wglGetProcAddress('glCompressedTexSubImage1D');
  4926. if not Assigned(glCompressedTexSubImage1D) then allOK := false;
  4927. glGetCompressedTexImage := wglGetProcAddress('glGetCompressedTexImage');
  4928. if not Assigned(glGetCompressedTexImage) then allOK := false;
  4929. Load_GL_version_1_2x(allOK);
  4930. end;
  4931. function Load_GL_version_1_3: boolean;
  4932. begin
  4933. result := true;
  4934. Load_GL_version_1_3x(result);
  4935. end;
  4936. function Load_GL_ARB_multitexture: Boolean;
  4937. var
  4938. extstring: AnsiString;
  4939. begin
  4940. Result := FALSE;
  4941. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  4942. if glext_ExtensionSupported('GL_ARB_multitexture', extstring) then
  4943. begin
  4944. glActiveTextureARB := wglGetProcAddress('glActiveTextureARB');
  4945. if not Assigned(glActiveTextureARB) then Exit;
  4946. glClientActiveTextureARB := wglGetProcAddress('glClientActiveTextureARB');
  4947. if not Assigned(glClientActiveTextureARB) then Exit;
  4948. glMultiTexCoord1dARB := wglGetProcAddress('glMultiTexCoord1dARB');
  4949. if not Assigned(glMultiTexCoord1dARB) then Exit;
  4950. glMultiTexCoord1dvARB := wglGetProcAddress('glMultiTexCoord1dvARB');
  4951. if not Assigned(glMultiTexCoord1dvARB) then Exit;
  4952. glMultiTexCoord1fARB := wglGetProcAddress('glMultiTexCoord1fARB');
  4953. if not Assigned(glMultiTexCoord1fARB) then Exit;
  4954. glMultiTexCoord1fvARB := wglGetProcAddress('glMultiTexCoord1fvARB');
  4955. if not Assigned(glMultiTexCoord1fvARB) then Exit;
  4956. glMultiTexCoord1iARB := wglGetProcAddress('glMultiTexCoord1iARB');
  4957. if not Assigned(glMultiTexCoord1iARB) then Exit;
  4958. glMultiTexCoord1ivARB := wglGetProcAddress('glMultiTexCoord1ivARB');
  4959. if not Assigned(glMultiTexCoord1ivARB) then Exit;
  4960. glMultiTexCoord1sARB := wglGetProcAddress('glMultiTexCoord1sARB');
  4961. if not Assigned(glMultiTexCoord1sARB) then Exit;
  4962. glMultiTexCoord1svARB := wglGetProcAddress('glMultiTexCoord1svARB');
  4963. if not Assigned(glMultiTexCoord1svARB) then Exit;
  4964. glMultiTexCoord2dARB := wglGetProcAddress('glMultiTexCoord2dARB');
  4965. if not Assigned(glMultiTexCoord2dARB) then Exit;
  4966. glMultiTexCoord2dvARB := wglGetProcAddress('glMultiTexCoord2dvARB');
  4967. if not Assigned(glMultiTexCoord2dvARB) then Exit;
  4968. glMultiTexCoord2fARB := wglGetProcAddress('glMultiTexCoord2fARB');
  4969. if not Assigned(glMultiTexCoord2fARB) then Exit;
  4970. glMultiTexCoord2fvARB := wglGetProcAddress('glMultiTexCoord2fvARB');
  4971. if not Assigned(glMultiTexCoord2fvARB) then Exit;
  4972. glMultiTexCoord2iARB := wglGetProcAddress('glMultiTexCoord2iARB');
  4973. if not Assigned(glMultiTexCoord2iARB) then Exit;
  4974. glMultiTexCoord2ivARB := wglGetProcAddress('glMultiTexCoord2ivARB');
  4975. if not Assigned(glMultiTexCoord2ivARB) then Exit;
  4976. glMultiTexCoord2sARB := wglGetProcAddress('glMultiTexCoord2sARB');
  4977. if not Assigned(glMultiTexCoord2sARB) then Exit;
  4978. glMultiTexCoord2svARB := wglGetProcAddress('glMultiTexCoord2svARB');
  4979. if not Assigned(glMultiTexCoord2svARB) then Exit;
  4980. glMultiTexCoord3dARB := wglGetProcAddress('glMultiTexCoord3dARB');
  4981. if not Assigned(glMultiTexCoord3dARB) then Exit;
  4982. glMultiTexCoord3dvARB := wglGetProcAddress('glMultiTexCoord3dvARB');
  4983. if not Assigned(glMultiTexCoord3dvARB) then Exit;
  4984. glMultiTexCoord3fARB := wglGetProcAddress('glMultiTexCoord3fARB');
  4985. if not Assigned(glMultiTexCoord3fARB) then Exit;
  4986. glMultiTexCoord3fvARB := wglGetProcAddress('glMultiTexCoord3fvARB');
  4987. if not Assigned(glMultiTexCoord3fvARB) then Exit;
  4988. glMultiTexCoord3iARB := wglGetProcAddress('glMultiTexCoord3iARB');
  4989. if not Assigned(glMultiTexCoord3iARB) then Exit;
  4990. glMultiTexCoord3ivARB := wglGetProcAddress('glMultiTexCoord3ivARB');
  4991. if not Assigned(glMultiTexCoord3ivARB) then Exit;
  4992. glMultiTexCoord3sARB := wglGetProcAddress('glMultiTexCoord3sARB');
  4993. if not Assigned(glMultiTexCoord3sARB) then Exit;
  4994. glMultiTexCoord3svARB := wglGetProcAddress('glMultiTexCoord3svARB');
  4995. if not Assigned(glMultiTexCoord3svARB) then Exit;
  4996. glMultiTexCoord4dARB := wglGetProcAddress('glMultiTexCoord4dARB');
  4997. if not Assigned(glMultiTexCoord4dARB) then Exit;
  4998. glMultiTexCoord4dvARB := wglGetProcAddress('glMultiTexCoord4dvARB');
  4999. if not Assigned(glMultiTexCoord4dvARB) then Exit;
  5000. glMultiTexCoord4fARB := wglGetProcAddress('glMultiTexCoord4fARB');
  5001. if not Assigned(glMultiTexCoord4fARB) then Exit;
  5002. glMultiTexCoord4fvARB := wglGetProcAddress('glMultiTexCoord4fvARB');
  5003. if not Assigned(glMultiTexCoord4fvARB) then Exit;
  5004. glMultiTexCoord4iARB := wglGetProcAddress('glMultiTexCoord4iARB');
  5005. if not Assigned(glMultiTexCoord4iARB) then Exit;
  5006. glMultiTexCoord4ivARB := wglGetProcAddress('glMultiTexCoord4ivARB');
  5007. if not Assigned(glMultiTexCoord4ivARB) then Exit;
  5008. glMultiTexCoord4sARB := wglGetProcAddress('glMultiTexCoord4sARB');
  5009. if not Assigned(glMultiTexCoord4sARB) then Exit;
  5010. glMultiTexCoord4svARB := wglGetProcAddress('glMultiTexCoord4svARB');
  5011. if not Assigned(glMultiTexCoord4svARB) then Exit;
  5012. Result := TRUE;
  5013. end;
  5014. end;
  5015. function Load_GL_ARB_transpose_matrix: Boolean;
  5016. var
  5017. extstring: AnsiString;
  5018. begin
  5019. Result := FALSE;
  5020. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5021. if glext_ExtensionSupported('GL_ARB_transpose_matrix', extstring) then
  5022. begin
  5023. glLoadTransposeMatrixfARB := wglGetProcAddress('glLoadTransposeMatrixfARB');
  5024. if not Assigned(glLoadTransposeMatrixfARB) then Exit;
  5025. glLoadTransposeMatrixdARB := wglGetProcAddress('glLoadTransposeMatrixdARB');
  5026. if not Assigned(glLoadTransposeMatrixdARB) then Exit;
  5027. glMultTransposeMatrixfARB := wglGetProcAddress('glMultTransposeMatrixfARB');
  5028. if not Assigned(glMultTransposeMatrixfARB) then Exit;
  5029. glMultTransposeMatrixdARB := wglGetProcAddress('glMultTransposeMatrixdARB');
  5030. if not Assigned(glMultTransposeMatrixdARB) then Exit;
  5031. Result := TRUE;
  5032. end;
  5033. end;
  5034. function Load_GL_ARB_multisample: Boolean;
  5035. var
  5036. extstring: AnsiString;
  5037. begin
  5038. Result := FALSE;
  5039. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5040. if glext_ExtensionSupported('GL_ARB_multisample', extstring) then
  5041. begin
  5042. glSampleCoverageARB := wglGetProcAddress('glSampleCoverageARB');
  5043. if not Assigned(glSampleCoverageARB) then Exit;
  5044. Result := TRUE;
  5045. end;
  5046. end;
  5047. function Load_GL_ARB_texture_env_add: Boolean;
  5048. var
  5049. extstring: AnsiString;
  5050. begin
  5051. Result := FALSE;
  5052. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5053. if glext_ExtensionSupported('GL_ARB_texture_env_add', extstring) then
  5054. begin
  5055. Result := TRUE;
  5056. end;
  5057. end;
  5058. {$IFDEF Windows}
  5059. function Load_WGL_ARB_extensions_string: Boolean;
  5060. var
  5061. extstring: AnsiString;
  5062. begin
  5063. Result := FALSE;
  5064. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  5065. if not Assigned(wglGetExtensionsStringARB) then Exit;
  5066. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  5067. if glext_ExtensionSupported('WGL_ARB_extensions_string', extstring) then
  5068. begin
  5069. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  5070. if not Assigned(wglGetExtensionsStringARB) then Exit;
  5071. Result := TRUE;
  5072. end;
  5073. end;
  5074. function Load_WGL_ARB_buffer_region: Boolean;
  5075. var
  5076. extstring: AnsiString;
  5077. begin
  5078. Result := FALSE;
  5079. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  5080. if not Assigned(wglGetExtensionsStringARB) then Exit;
  5081. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  5082. if glext_ExtensionSupported('WGL_ARB_buffer_region', extstring) then
  5083. begin
  5084. wglCreateBufferRegionARB := wglGetProcAddress('wglCreateBufferRegionARB');
  5085. if not Assigned(wglCreateBufferRegionARB) then Exit;
  5086. wglDeleteBufferRegionARB := wglGetProcAddress('wglDeleteBufferRegionARB');
  5087. if not Assigned(wglDeleteBufferRegionARB) then Exit;
  5088. wglSaveBufferRegionARB := wglGetProcAddress('wglSaveBufferRegionARB');
  5089. if not Assigned(wglSaveBufferRegionARB) then Exit;
  5090. wglRestoreBufferRegionARB := wglGetProcAddress('wglRestoreBufferRegionARB');
  5091. if not Assigned(wglRestoreBufferRegionARB) then Exit;
  5092. Result := TRUE;
  5093. end;
  5094. end;
  5095. {$ENDIF}
  5096. function Load_GL_ARB_texture_cube_map: Boolean;
  5097. var
  5098. extstring: AnsiString;
  5099. begin
  5100. Result := FALSE;
  5101. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5102. if glext_ExtensionSupported('GL_ARB_texture_cube_map', extstring) then
  5103. begin
  5104. Result := TRUE;
  5105. end;
  5106. end;
  5107. function Load_GL_ARB_depth_texture: Boolean;
  5108. var
  5109. extstring: AnsiString;
  5110. begin
  5111. Result := FALSE;
  5112. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5113. if glext_ExtensionSupported('GL_ARB_depth_texture', extstring) then
  5114. begin
  5115. Result := TRUE;
  5116. end;
  5117. end;
  5118. function Load_GL_ARB_point_parameters: Boolean;
  5119. var
  5120. extstring: AnsiString;
  5121. begin
  5122. Result := FALSE;
  5123. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5124. if glext_ExtensionSupported('GL_ARB_point_parameters', extstring) then
  5125. begin
  5126. glPointParameterfARB := wglGetProcAddress('glPointParameterfARB');
  5127. if not Assigned(glPointParameterfARB) then Exit;
  5128. glPointParameterfvARB := wglGetProcAddress('glPointParameterfvARB');
  5129. if not Assigned(glPointParameterfvARB) then Exit;
  5130. Result := TRUE;
  5131. end;
  5132. end;
  5133. function Load_GL_ARB_shadow: Boolean;
  5134. var
  5135. extstring: AnsiString;
  5136. begin
  5137. Result := FALSE;
  5138. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5139. if glext_ExtensionSupported('GL_ARB_shadow', extstring) then
  5140. begin
  5141. Result := TRUE;
  5142. end;
  5143. end;
  5144. function Load_GL_ARB_shadow_ambient: Boolean;
  5145. var
  5146. extstring: AnsiString;
  5147. begin
  5148. Result := FALSE;
  5149. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5150. if glext_ExtensionSupported('GL_ARB_shadow_ambient', extstring) then
  5151. begin
  5152. Result := TRUE;
  5153. end;
  5154. end;
  5155. function Load_GL_ARB_texture_border_clamp: Boolean;
  5156. var
  5157. extstring: AnsiString;
  5158. begin
  5159. Result := FALSE;
  5160. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5161. if glext_ExtensionSupported('GL_ARB_texture_border_clamp', extstring) then
  5162. begin
  5163. Result := TRUE;
  5164. end;
  5165. end;
  5166. function Load_GL_ARB_texture_compression: Boolean;
  5167. var
  5168. extstring: AnsiString;
  5169. begin
  5170. Result := FALSE;
  5171. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5172. if glext_ExtensionSupported('GL_ARB_texture_compression', extstring) then
  5173. begin
  5174. glCompressedTexImage3DARB := wglGetProcAddress('glCompressedTexImage3DARB');
  5175. if not Assigned(glCompressedTexImage3DARB) then Exit;
  5176. glCompressedTexImage2DARB := wglGetProcAddress('glCompressedTexImage2DARB');
  5177. if not Assigned(glCompressedTexImage2DARB) then Exit;
  5178. glCompressedTexImage1DARB := wglGetProcAddress('glCompressedTexImage1DARB');
  5179. if not Assigned(glCompressedTexImage1DARB) then Exit;
  5180. glCompressedTexSubImage3DARB := wglGetProcAddress('glCompressedTexSubImage3DARB');
  5181. if not Assigned(glCompressedTexSubImage3DARB) then Exit;
  5182. glCompressedTexSubImage2DARB := wglGetProcAddress('glCompressedTexSubImage2DARB');
  5183. if not Assigned(glCompressedTexSubImage2DARB) then Exit;
  5184. glCompressedTexSubImage1DARB := wglGetProcAddress('glCompressedTexSubImage1DARB');
  5185. if not Assigned(glCompressedTexSubImage1DARB) then Exit;
  5186. glGetCompressedTexImageARB := wglGetProcAddress('glGetCompressedTexImageARB');
  5187. if not Assigned(glGetCompressedTexImageARB) then Exit;
  5188. Result := TRUE;
  5189. end;
  5190. end;
  5191. function Load_GL_ARB_texture_env_combine: Boolean;
  5192. var
  5193. extstring: AnsiString;
  5194. begin
  5195. Result := FALSE;
  5196. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5197. if glext_ExtensionSupported('GL_ARB_texture_env_combine', extstring) then
  5198. begin
  5199. Result := TRUE;
  5200. end;
  5201. end;
  5202. function Load_GL_ARB_texture_env_crossbar: Boolean;
  5203. var
  5204. extstring: AnsiString;
  5205. begin
  5206. Result := FALSE;
  5207. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5208. if glext_ExtensionSupported('GL_ARB_texture_env_crossbar', extstring) then
  5209. begin
  5210. Result := TRUE;
  5211. end;
  5212. end;
  5213. function Load_GL_ARB_texture_env_dot3: Boolean;
  5214. var
  5215. extstring: AnsiString;
  5216. begin
  5217. Result := FALSE;
  5218. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5219. if glext_ExtensionSupported('GL_ARB_texture_env_dot3', extstring) then
  5220. begin
  5221. Result := TRUE;
  5222. end;
  5223. end;
  5224. function Load_GL_ARB_texture_mirrored_repeat: Boolean;
  5225. var
  5226. extstring: AnsiString;
  5227. begin
  5228. Result := FALSE;
  5229. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5230. if glext_ExtensionSupported('GL_ARB_texture_mirrored_repeat', extstring) then
  5231. begin
  5232. Result := TRUE;
  5233. end;
  5234. end;
  5235. function Load_GL_ARB_vertex_blend: Boolean;
  5236. var
  5237. extstring: AnsiString;
  5238. begin
  5239. Result := FALSE;
  5240. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5241. if glext_ExtensionSupported('GL_ARB_vertex_blend', extstring) then
  5242. begin
  5243. glWeightbvARB := wglGetProcAddress('glWeightbvARB');
  5244. if not Assigned(glWeightbvARB) then Exit;
  5245. glWeightsvARB := wglGetProcAddress('glWeightsvARB');
  5246. if not Assigned(glWeightsvARB) then Exit;
  5247. glWeightivARB := wglGetProcAddress('glWeightivARB');
  5248. if not Assigned(glWeightivARB) then Exit;
  5249. glWeightfvARB := wglGetProcAddress('glWeightfvARB');
  5250. if not Assigned(glWeightfvARB) then Exit;
  5251. glWeightdvARB := wglGetProcAddress('glWeightdvARB');
  5252. if not Assigned(glWeightdvARB) then Exit;
  5253. glWeightvARB := wglGetProcAddress('glWeightvARB');
  5254. if not Assigned(glWeightvARB) then Exit;
  5255. glWeightubvARB := wglGetProcAddress('glWeightubvARB');
  5256. if not Assigned(glWeightubvARB) then Exit;
  5257. glWeightusvARB := wglGetProcAddress('glWeightusvARB');
  5258. if not Assigned(glWeightusvARB) then Exit;
  5259. glWeightuivARB := wglGetProcAddress('glWeightuivARB');
  5260. if not Assigned(glWeightuivARB) then Exit;
  5261. glWeightPointerARB := wglGetProcAddress('glWeightPointerARB');
  5262. if not Assigned(glWeightPointerARB) then Exit;
  5263. glVertexBlendARB := wglGetProcAddress('glVertexBlendARB');
  5264. if not Assigned(glVertexBlendARB) then Exit;
  5265. Result := TRUE;
  5266. end;
  5267. end;
  5268. function Load_GL_ARB_vertex_program: Boolean;
  5269. var
  5270. extstring: AnsiString;
  5271. begin
  5272. Result := FALSE;
  5273. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5274. if glext_ExtensionSupported('GL_ARB_vertex_program', extstring) then
  5275. begin
  5276. glVertexAttrib1sARB := wglGetProcAddress('glVertexAttrib1sARB');
  5277. if not Assigned(glVertexAttrib1sARB) then Exit;
  5278. glVertexAttrib1fARB := wglGetProcAddress('glVertexAttrib1fARB');
  5279. if not Assigned(glVertexAttrib1fARB) then Exit;
  5280. glVertexAttrib1dARB := wglGetProcAddress('glVertexAttrib1dARB');
  5281. if not Assigned(glVertexAttrib1dARB) then Exit;
  5282. glVertexAttrib2sARB := wglGetProcAddress('glVertexAttrib2sARB');
  5283. if not Assigned(glVertexAttrib2sARB) then Exit;
  5284. glVertexAttrib2fARB := wglGetProcAddress('glVertexAttrib2fARB');
  5285. if not Assigned(glVertexAttrib2fARB) then Exit;
  5286. glVertexAttrib2dARB := wglGetProcAddress('glVertexAttrib2dARB');
  5287. if not Assigned(glVertexAttrib2dARB) then Exit;
  5288. glVertexAttrib3sARB := wglGetProcAddress('glVertexAttrib3sARB');
  5289. if not Assigned(glVertexAttrib3sARB) then Exit;
  5290. glVertexAttrib3fARB := wglGetProcAddress('glVertexAttrib3fARB');
  5291. if not Assigned(glVertexAttrib3fARB) then Exit;
  5292. glVertexAttrib3dARB := wglGetProcAddress('glVertexAttrib3dARB');
  5293. if not Assigned(glVertexAttrib3dARB) then Exit;
  5294. glVertexAttrib4sARB := wglGetProcAddress('glVertexAttrib4sARB');
  5295. if not Assigned(glVertexAttrib4sARB) then Exit;
  5296. glVertexAttrib4fARB := wglGetProcAddress('glVertexAttrib4fARB');
  5297. if not Assigned(glVertexAttrib4fARB) then Exit;
  5298. glVertexAttrib4dARB := wglGetProcAddress('glVertexAttrib4dARB');
  5299. if not Assigned(glVertexAttrib4dARB) then Exit;
  5300. glVertexAttrib4NubARB := wglGetProcAddress('glVertexAttrib4NubARB');
  5301. if not Assigned(glVertexAttrib4NubARB) then Exit;
  5302. glVertexAttrib1svARB := wglGetProcAddress('glVertexAttrib1svARB');
  5303. if not Assigned(glVertexAttrib1svARB) then Exit;
  5304. glVertexAttrib1fvARB := wglGetProcAddress('glVertexAttrib1fvARB');
  5305. if not Assigned(glVertexAttrib1fvARB) then Exit;
  5306. glVertexAttrib1dvARB := wglGetProcAddress('glVertexAttrib1dvARB');
  5307. if not Assigned(glVertexAttrib1dvARB) then Exit;
  5308. glVertexAttrib2svARB := wglGetProcAddress('glVertexAttrib2svARB');
  5309. if not Assigned(glVertexAttrib2svARB) then Exit;
  5310. glVertexAttrib2fvARB := wglGetProcAddress('glVertexAttrib2fvARB');
  5311. if not Assigned(glVertexAttrib2fvARB) then Exit;
  5312. glVertexAttrib2dvARB := wglGetProcAddress('glVertexAttrib2dvARB');
  5313. if not Assigned(glVertexAttrib2dvARB) then Exit;
  5314. glVertexAttrib3svARB := wglGetProcAddress('glVertexAttrib3svARB');
  5315. if not Assigned(glVertexAttrib3svARB) then Exit;
  5316. glVertexAttrib3fvARB := wglGetProcAddress('glVertexAttrib3fvARB');
  5317. if not Assigned(glVertexAttrib3fvARB) then Exit;
  5318. glVertexAttrib3dvARB := wglGetProcAddress('glVertexAttrib3dvARB');
  5319. if not Assigned(glVertexAttrib3dvARB) then Exit;
  5320. glVertexAttrib4bvARB := wglGetProcAddress('glVertexAttrib4bvARB');
  5321. if not Assigned(glVertexAttrib4bvARB) then Exit;
  5322. glVertexAttrib4svARB := wglGetProcAddress('glVertexAttrib4svARB');
  5323. if not Assigned(glVertexAttrib4svARB) then Exit;
  5324. glVertexAttrib4ivARB := wglGetProcAddress('glVertexAttrib4ivARB');
  5325. if not Assigned(glVertexAttrib4ivARB) then Exit;
  5326. glVertexAttrib4ubvARB := wglGetProcAddress('glVertexAttrib4ubvARB');
  5327. if not Assigned(glVertexAttrib4ubvARB) then Exit;
  5328. glVertexAttrib4usvARB := wglGetProcAddress('glVertexAttrib4usvARB');
  5329. if not Assigned(glVertexAttrib4usvARB) then Exit;
  5330. glVertexAttrib4uivARB := wglGetProcAddress('glVertexAttrib4uivARB');
  5331. if not Assigned(glVertexAttrib4uivARB) then Exit;
  5332. glVertexAttrib4fvARB := wglGetProcAddress('glVertexAttrib4fvARB');
  5333. if not Assigned(glVertexAttrib4fvARB) then Exit;
  5334. glVertexAttrib4dvARB := wglGetProcAddress('glVertexAttrib4dvARB');
  5335. if not Assigned(glVertexAttrib4dvARB) then Exit;
  5336. glVertexAttrib4NbvARB := wglGetProcAddress('glVertexAttrib4NbvARB');
  5337. if not Assigned(glVertexAttrib4NbvARB) then Exit;
  5338. glVertexAttrib4NsvARB := wglGetProcAddress('glVertexAttrib4NsvARB');
  5339. if not Assigned(glVertexAttrib4NsvARB) then Exit;
  5340. glVertexAttrib4NivARB := wglGetProcAddress('glVertexAttrib4NivARB');
  5341. if not Assigned(glVertexAttrib4NivARB) then Exit;
  5342. glVertexAttrib4NubvARB := wglGetProcAddress('glVertexAttrib4NubvARB');
  5343. if not Assigned(glVertexAttrib4NubvARB) then Exit;
  5344. glVertexAttrib4NusvARB := wglGetProcAddress('glVertexAttrib4NusvARB');
  5345. if not Assigned(glVertexAttrib4NusvARB) then Exit;
  5346. glVertexAttrib4NuivARB := wglGetProcAddress('glVertexAttrib4NuivARB');
  5347. if not Assigned(glVertexAttrib4NuivARB) then Exit;
  5348. glVertexAttribPointerARB := wglGetProcAddress('glVertexAttribPointerARB');
  5349. if not Assigned(glVertexAttribPointerARB) then Exit;
  5350. glEnableVertexAttribArrayARB := wglGetProcAddress('glEnableVertexAttribArrayARB');
  5351. if not Assigned(glEnableVertexAttribArrayARB) then Exit;
  5352. glDisableVertexAttribArrayARB := wglGetProcAddress('glDisableVertexAttribArrayARB');
  5353. if not Assigned(glDisableVertexAttribArrayARB) then Exit;
  5354. glProgramStringARB := wglGetProcAddress('glProgramStringARB');
  5355. if not Assigned(glProgramStringARB) then Exit;
  5356. glBindProgramARB := wglGetProcAddress('glBindProgramARB');
  5357. if not Assigned(glBindProgramARB) then Exit;
  5358. glDeleteProgramsARB := wglGetProcAddress('glDeleteProgramsARB');
  5359. if not Assigned(glDeleteProgramsARB) then Exit;
  5360. glGenProgramsARB := wglGetProcAddress('glGenProgramsARB');
  5361. if not Assigned(glGenProgramsARB) then Exit;
  5362. glProgramEnvParameter4dARB := wglGetProcAddress('glProgramEnvParameter4dARB');
  5363. if not Assigned(glProgramEnvParameter4dARB) then Exit;
  5364. glProgramEnvParameter4dvARB := wglGetProcAddress('glProgramEnvParameter4dvARB');
  5365. if not Assigned(glProgramEnvParameter4dvARB) then Exit;
  5366. glProgramEnvParameter4fARB := wglGetProcAddress('glProgramEnvParameter4fARB');
  5367. if not Assigned(glProgramEnvParameter4fARB) then Exit;
  5368. glProgramEnvParameter4fvARB := wglGetProcAddress('glProgramEnvParameter4fvARB');
  5369. if not Assigned(glProgramEnvParameter4fvARB) then Exit;
  5370. glProgramLocalParameter4dARB := wglGetProcAddress('glProgramLocalParameter4dARB');
  5371. if not Assigned(glProgramLocalParameter4dARB) then Exit;
  5372. glProgramLocalParameter4dvARB := wglGetProcAddress('glProgramLocalParameter4dvARB');
  5373. if not Assigned(glProgramLocalParameter4dvARB) then Exit;
  5374. glProgramLocalParameter4fARB := wglGetProcAddress('glProgramLocalParameter4fARB');
  5375. if not Assigned(glProgramLocalParameter4fARB) then Exit;
  5376. glProgramLocalParameter4fvARB := wglGetProcAddress('glProgramLocalParameter4fvARB');
  5377. if not Assigned(glProgramLocalParameter4fvARB) then Exit;
  5378. glGetProgramEnvParameterdvARB := wglGetProcAddress('glGetProgramEnvParameterdvARB');
  5379. if not Assigned(glGetProgramEnvParameterdvARB) then Exit;
  5380. glGetProgramEnvParameterfvARB := wglGetProcAddress('glGetProgramEnvParameterfvARB');
  5381. if not Assigned(glGetProgramEnvParameterfvARB) then Exit;
  5382. glGetProgramLocalParameterdvARB := wglGetProcAddress('glGetProgramLocalParameterdvARB');
  5383. if not Assigned(glGetProgramLocalParameterdvARB) then Exit;
  5384. glGetProgramLocalParameterfvARB := wglGetProcAddress('glGetProgramLocalParameterfvARB');
  5385. if not Assigned(glGetProgramLocalParameterfvARB) then Exit;
  5386. glGetProgramivARB := wglGetProcAddress('glGetProgramivARB');
  5387. if not Assigned(glGetProgramivARB) then Exit;
  5388. glGetProgramStringARB := wglGetProcAddress('glGetProgramStringARB');
  5389. if not Assigned(glGetProgramStringARB) then Exit;
  5390. glGetVertexAttribdvARB := wglGetProcAddress('glGetVertexAttribdvARB');
  5391. if not Assigned(glGetVertexAttribdvARB) then Exit;
  5392. glGetVertexAttribfvARB := wglGetProcAddress('glGetVertexAttribfvARB');
  5393. if not Assigned(glGetVertexAttribfvARB) then Exit;
  5394. glGetVertexAttribivARB := wglGetProcAddress('glGetVertexAttribivARB');
  5395. if not Assigned(glGetVertexAttribivARB) then Exit;
  5396. glGetVertexAttribPointervARB := wglGetProcAddress('glGetVertexAttribPointervARB');
  5397. if not Assigned(glGetVertexAttribPointervARB) then Exit;
  5398. glIsProgramARB := wglGetProcAddress('glIsProgramARB');
  5399. if not Assigned(glIsProgramARB) then Exit;
  5400. Result := TRUE;
  5401. end;
  5402. end;
  5403. function Load_GL_ARB_window_pos: Boolean;
  5404. var
  5405. extstring: AnsiString;
  5406. begin
  5407. Result := FALSE;
  5408. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5409. if glext_ExtensionSupported('GL_ARB_window_pos', extstring) then
  5410. begin
  5411. glWindowPos2dARB := wglGetProcAddress('glWindowPos2dARB');
  5412. if not Assigned(glWindowPos2dARB) then Exit;
  5413. glWindowPos2fARB := wglGetProcAddress('glWindowPos2fARB');
  5414. if not Assigned(glWindowPos2fARB) then Exit;
  5415. glWindowPos2iARB := wglGetProcAddress('glWindowPos2iARB');
  5416. if not Assigned(glWindowPos2iARB) then Exit;
  5417. glWindowPos2sARB := wglGetProcAddress('glWindowPos2sARB');
  5418. if not Assigned(glWindowPos2sARB) then Exit;
  5419. glWindowPos2dvARB := wglGetProcAddress('glWindowPos2dvARB');
  5420. if not Assigned(glWindowPos2dvARB) then Exit;
  5421. glWindowPos2fvARB := wglGetProcAddress('glWindowPos2fvARB');
  5422. if not Assigned(glWindowPos2fvARB) then Exit;
  5423. glWindowPos2ivARB := wglGetProcAddress('glWindowPos2ivARB');
  5424. if not Assigned(glWindowPos2ivARB) then Exit;
  5425. glWindowPos2svARB := wglGetProcAddress('glWindowPos2svARB');
  5426. if not Assigned(glWindowPos2svARB) then Exit;
  5427. glWindowPos3dARB := wglGetProcAddress('glWindowPos3dARB');
  5428. if not Assigned(glWindowPos3dARB) then Exit;
  5429. glWindowPos3fARB := wglGetProcAddress('glWindowPos3fARB');
  5430. if not Assigned(glWindowPos3fARB) then Exit;
  5431. glWindowPos3iARB := wglGetProcAddress('glWindowPos3iARB');
  5432. if not Assigned(glWindowPos3iARB) then Exit;
  5433. glWindowPos3sARB := wglGetProcAddress('glWindowPos3sARB');
  5434. if not Assigned(glWindowPos3sARB) then Exit;
  5435. glWindowPos3dvARB := wglGetProcAddress('glWindowPos3dvARB');
  5436. if not Assigned(glWindowPos3dvARB) then Exit;
  5437. glWindowPos3fvARB := wglGetProcAddress('glWindowPos3fvARB');
  5438. if not Assigned(glWindowPos3fvARB) then Exit;
  5439. glWindowPos3ivARB := wglGetProcAddress('glWindowPos3ivARB');
  5440. if not Assigned(glWindowPos3ivARB) then Exit;
  5441. glWindowPos3svARB := wglGetProcAddress('glWindowPos3svARB');
  5442. if not Assigned(glWindowPos3svARB) then Exit;
  5443. Result := TRUE;
  5444. end;
  5445. end;
  5446. function Load_GL_EXT_422_pixels: Boolean;
  5447. var
  5448. extstring: AnsiString;
  5449. begin
  5450. Result := FALSE;
  5451. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5452. if glext_ExtensionSupported('GL_EXT_422_pixels', extstring) then
  5453. begin
  5454. Result := TRUE;
  5455. end;
  5456. end;
  5457. function Load_GL_EXT_abgr: Boolean;
  5458. var
  5459. extstring: AnsiString;
  5460. begin
  5461. Result := FALSE;
  5462. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5463. if glext_ExtensionSupported('GL_EXT_abgr', extstring) then
  5464. begin
  5465. Result := TRUE;
  5466. end;
  5467. end;
  5468. function Load_GL_EXT_bgra: Boolean;
  5469. var
  5470. extstring: AnsiString;
  5471. begin
  5472. Result := FALSE;
  5473. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5474. if glext_ExtensionSupported('GL_EXT_bgra', extstring) then
  5475. begin
  5476. Result := TRUE;
  5477. end;
  5478. end;
  5479. function Load_GL_EXT_blend_color: Boolean;
  5480. var
  5481. extstring: AnsiString;
  5482. begin
  5483. Result := FALSE;
  5484. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5485. if glext_ExtensionSupported('GL_EXT_blend_color', extstring) then
  5486. begin
  5487. glBlendColorEXT := wglGetProcAddress('glBlendColorEXT');
  5488. if not Assigned(glBlendColorEXT) then Exit;
  5489. Result := TRUE;
  5490. end;
  5491. end;
  5492. function Load_GL_EXT_blend_func_separate: Boolean;
  5493. var
  5494. extstring: AnsiString;
  5495. begin
  5496. Result := FALSE;
  5497. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5498. if glext_ExtensionSupported('GL_EXT_blend_func_separate', extstring) then
  5499. begin
  5500. glBlendFuncSeparateEXT := wglGetProcAddress('glBlendFuncSeparateEXT');
  5501. if not Assigned(glBlendFuncSeparateEXT) then Exit;
  5502. Result := TRUE;
  5503. end;
  5504. end;
  5505. function Load_GL_EXT_blend_logic_op: Boolean;
  5506. var
  5507. extstring: AnsiString;
  5508. begin
  5509. Result := FALSE;
  5510. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5511. if glext_ExtensionSupported('GL_EXT_blend_logic_op', extstring) then
  5512. begin
  5513. Result := TRUE;
  5514. end;
  5515. end;
  5516. function Load_GL_EXT_blend_minmax: Boolean;
  5517. var
  5518. extstring: AnsiString;
  5519. begin
  5520. Result := FALSE;
  5521. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5522. if glext_ExtensionSupported('GL_EXT_blend_minmax', extstring) then
  5523. begin
  5524. glBlendEquationEXT := wglGetProcAddress('glBlendEquationEXT');
  5525. if not Assigned(glBlendEquationEXT) then Exit;
  5526. Result := TRUE;
  5527. end;
  5528. end;
  5529. function Load_GL_EXT_blend_subtract: Boolean;
  5530. var
  5531. extstring: AnsiString;
  5532. begin
  5533. Result := FALSE;
  5534. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5535. if glext_ExtensionSupported('GL_EXT_blend_subtract', extstring) then
  5536. begin
  5537. Result := TRUE;
  5538. end;
  5539. end;
  5540. function Load_GL_EXT_clip_volume_hint: Boolean;
  5541. var
  5542. extstring: AnsiString;
  5543. begin
  5544. Result := FALSE;
  5545. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5546. if glext_ExtensionSupported('GL_EXT_clip_volume_hint', extstring) then
  5547. begin
  5548. Result := TRUE;
  5549. end;
  5550. end;
  5551. function Load_GL_EXT_color_subtable: Boolean;
  5552. var
  5553. extstring: AnsiString;
  5554. begin
  5555. Result := FALSE;
  5556. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5557. if glext_ExtensionSupported('GL_EXT_color_subtable', extstring) then
  5558. begin
  5559. glColorSubTableEXT := wglGetProcAddress('glColorSubTableEXT');
  5560. if not Assigned(glColorSubTableEXT) then Exit;
  5561. glCopyColorSubTableEXT := wglGetProcAddress('glCopyColorSubTableEXT');
  5562. if not Assigned(glCopyColorSubTableEXT) then Exit;
  5563. Result := TRUE;
  5564. end;
  5565. end;
  5566. function Load_GL_EXT_compiled_vertex_array: Boolean;
  5567. var
  5568. extstring: AnsiString;
  5569. begin
  5570. Result := FALSE;
  5571. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5572. if glext_ExtensionSupported('GL_EXT_compiled_vertex_array', extstring) then
  5573. begin
  5574. glLockArraysEXT := wglGetProcAddress('glLockArraysEXT');
  5575. if not Assigned(glLockArraysEXT) then Exit;
  5576. glUnlockArraysEXT := wglGetProcAddress('glUnlockArraysEXT');
  5577. if not Assigned(glUnlockArraysEXT) then Exit;
  5578. Result := TRUE;
  5579. end;
  5580. end;
  5581. function Load_GL_EXT_convolution: Boolean;
  5582. var
  5583. extstring: AnsiString;
  5584. begin
  5585. Result := FALSE;
  5586. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5587. if glext_ExtensionSupported('GL_EXT_convolution', extstring) then
  5588. begin
  5589. glConvolutionFilter1DEXT := wglGetProcAddress('glConvolutionFilter1DEXT');
  5590. if not Assigned(glConvolutionFilter1DEXT) then Exit;
  5591. glConvolutionFilter2DEXT := wglGetProcAddress('glConvolutionFilter2DEXT');
  5592. if not Assigned(glConvolutionFilter2DEXT) then Exit;
  5593. glCopyConvolutionFilter1DEXT := wglGetProcAddress('glCopyConvolutionFilter1DEXT');
  5594. if not Assigned(glCopyConvolutionFilter1DEXT) then Exit;
  5595. glCopyConvolutionFilter2DEXT := wglGetProcAddress('glCopyConvolutionFilter2DEXT');
  5596. if not Assigned(glCopyConvolutionFilter2DEXT) then Exit;
  5597. glGetConvolutionFilterEXT := wglGetProcAddress('glGetConvolutionFilterEXT');
  5598. if not Assigned(glGetConvolutionFilterEXT) then Exit;
  5599. glSeparableFilter2DEXT := wglGetProcAddress('glSeparableFilter2DEXT');
  5600. if not Assigned(glSeparableFilter2DEXT) then Exit;
  5601. glGetSeparableFilterEXT := wglGetProcAddress('glGetSeparableFilterEXT');
  5602. if not Assigned(glGetSeparableFilterEXT) then Exit;
  5603. glConvolutionParameteriEXT := wglGetProcAddress('glConvolutionParameteriEXT');
  5604. if not Assigned(glConvolutionParameteriEXT) then Exit;
  5605. glConvolutionParameterivEXT := wglGetProcAddress('glConvolutionParameterivEXT');
  5606. if not Assigned(glConvolutionParameterivEXT) then Exit;
  5607. glConvolutionParameterfEXT := wglGetProcAddress('glConvolutionParameterfEXT');
  5608. if not Assigned(glConvolutionParameterfEXT) then Exit;
  5609. glConvolutionParameterfvEXT := wglGetProcAddress('glConvolutionParameterfvEXT');
  5610. if not Assigned(glConvolutionParameterfvEXT) then Exit;
  5611. glGetConvolutionParameterivEXT := wglGetProcAddress('glGetConvolutionParameterivEXT');
  5612. if not Assigned(glGetConvolutionParameterivEXT) then Exit;
  5613. glGetConvolutionParameterfvEXT := wglGetProcAddress('glGetConvolutionParameterfvEXT');
  5614. if not Assigned(glGetConvolutionParameterfvEXT) then Exit;
  5615. Result := TRUE;
  5616. end;
  5617. end;
  5618. function Load_GL_EXT_fog_coord: Boolean;
  5619. var
  5620. extstring: AnsiString;
  5621. begin
  5622. Result := FALSE;
  5623. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5624. if glext_ExtensionSupported('GL_EXT_fog_coord', extstring) then
  5625. begin
  5626. glFogCoordfEXT := wglGetProcAddress('glFogCoordfEXT');
  5627. if not Assigned(glFogCoordfEXT) then Exit;
  5628. glFogCoorddEXT := wglGetProcAddress('glFogCoorddEXT');
  5629. if not Assigned(glFogCoorddEXT) then Exit;
  5630. glFogCoordfvEXT := wglGetProcAddress('glFogCoordfvEXT');
  5631. if not Assigned(glFogCoordfvEXT) then Exit;
  5632. glFogCoorddvEXT := wglGetProcAddress('glFogCoorddvEXT');
  5633. if not Assigned(glFogCoorddvEXT) then Exit;
  5634. glFogCoordPointerEXT := wglGetProcAddress('glFogCoordPointerEXT');
  5635. if not Assigned(glFogCoordPointerEXT) then Exit;
  5636. Result := TRUE;
  5637. end;
  5638. end;
  5639. function Load_GL_EXT_histogram: Boolean;
  5640. var
  5641. extstring: AnsiString;
  5642. begin
  5643. Result := FALSE;
  5644. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5645. if glext_ExtensionSupported('GL_EXT_histogram', extstring) then
  5646. begin
  5647. glHistogramEXT := wglGetProcAddress('glHistogramEXT');
  5648. if not Assigned(glHistogramEXT) then Exit;
  5649. glResetHistogramEXT := wglGetProcAddress('glResetHistogramEXT');
  5650. if not Assigned(glResetHistogramEXT) then Exit;
  5651. glGetHistogramEXT := wglGetProcAddress('glGetHistogramEXT');
  5652. if not Assigned(glGetHistogramEXT) then Exit;
  5653. glGetHistogramParameterivEXT := wglGetProcAddress('glGetHistogramParameterivEXT');
  5654. if not Assigned(glGetHistogramParameterivEXT) then Exit;
  5655. glGetHistogramParameterfvEXT := wglGetProcAddress('glGetHistogramParameterfvEXT');
  5656. if not Assigned(glGetHistogramParameterfvEXT) then Exit;
  5657. glMinmaxEXT := wglGetProcAddress('glMinmaxEXT');
  5658. if not Assigned(glMinmaxEXT) then Exit;
  5659. glResetMinmaxEXT := wglGetProcAddress('glResetMinmaxEXT');
  5660. if not Assigned(glResetMinmaxEXT) then Exit;
  5661. glGetMinmaxEXT := wglGetProcAddress('glGetMinmaxEXT');
  5662. if not Assigned(glGetMinmaxEXT) then Exit;
  5663. glGetMinmaxParameterivEXT := wglGetProcAddress('glGetMinmaxParameterivEXT');
  5664. if not Assigned(glGetMinmaxParameterivEXT) then Exit;
  5665. glGetMinmaxParameterfvEXT := wglGetProcAddress('glGetMinmaxParameterfvEXT');
  5666. if not Assigned(glGetMinmaxParameterfvEXT) then Exit;
  5667. Result := TRUE;
  5668. end;
  5669. end;
  5670. function Load_GL_EXT_multi_draw_arrays: Boolean;
  5671. var
  5672. extstring: AnsiString;
  5673. begin
  5674. Result := FALSE;
  5675. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5676. if glext_ExtensionSupported('GL_EXT_multi_draw_arrays', extstring) then
  5677. begin
  5678. glMultiDrawArraysEXT := wglGetProcAddress('glMultiDrawArraysEXT');
  5679. if not Assigned(glMultiDrawArraysEXT) then Exit;
  5680. glMultiDrawElementsEXT := wglGetProcAddress('glMultiDrawElementsEXT');
  5681. if not Assigned(glMultiDrawElementsEXT) then Exit;
  5682. Result := TRUE;
  5683. end;
  5684. end;
  5685. function Load_GL_EXT_packed_depth_stencil: Boolean;
  5686. var
  5687. extstring: AnsiString;
  5688. begin
  5689. Result := FALSE;
  5690. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5691. if glext_ExtensionSupported('GL_EXT_packed_depth_stencil', extstring) then
  5692. begin
  5693. Result := TRUE;
  5694. end;
  5695. end;
  5696. function Load_GL_EXT_packed_pixels: Boolean;
  5697. var
  5698. extstring: AnsiString;
  5699. begin
  5700. Result := FALSE;
  5701. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5702. if glext_ExtensionSupported('GL_EXT_packed_pixels', extstring) then
  5703. begin
  5704. Result := TRUE;
  5705. end;
  5706. end;
  5707. function Load_GL_EXT_paletted_texture: Boolean;
  5708. var
  5709. extstring: AnsiString;
  5710. begin
  5711. Result := FALSE;
  5712. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5713. if glext_ExtensionSupported('GL_EXT_paletted_texture', extstring) then
  5714. begin
  5715. glColorTableEXT := wglGetProcAddress('glColorTableEXT');
  5716. if not Assigned(glColorTableEXT) then Exit;
  5717. glColorSubTableEXT := wglGetProcAddress('glColorSubTableEXT');
  5718. if not Assigned(glColorSubTableEXT) then Exit;
  5719. glGetColorTableEXT := wglGetProcAddress('glGetColorTableEXT');
  5720. if not Assigned(glGetColorTableEXT) then Exit;
  5721. glGetColorTableParameterivEXT := wglGetProcAddress('glGetColorTableParameterivEXT');
  5722. if not Assigned(glGetColorTableParameterivEXT) then Exit;
  5723. glGetColorTableParameterfvEXT := wglGetProcAddress('glGetColorTableParameterfvEXT');
  5724. if not Assigned(glGetColorTableParameterfvEXT) then Exit;
  5725. Result := TRUE;
  5726. end;
  5727. end;
  5728. function Load_GL_EXT_point_parameters: Boolean;
  5729. var
  5730. extstring: AnsiString;
  5731. begin
  5732. Result := FALSE;
  5733. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5734. if glext_ExtensionSupported('GL_EXT_point_parameters', extstring) then
  5735. begin
  5736. glPointParameterfEXT := wglGetProcAddress('glPointParameterfEXT');
  5737. if not Assigned(glPointParameterfEXT) then Exit;
  5738. glPointParameterfvEXT := wglGetProcAddress('glPointParameterfvEXT');
  5739. if not Assigned(glPointParameterfvEXT) then Exit;
  5740. Result := TRUE;
  5741. end;
  5742. end;
  5743. function Load_GL_EXT_polygon_offset: Boolean;
  5744. var
  5745. extstring: AnsiString;
  5746. begin
  5747. Result := FALSE;
  5748. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5749. if glext_ExtensionSupported('GL_EXT_polygon_offset', extstring) then
  5750. begin
  5751. glPolygonOffsetEXT := wglGetProcAddress('glPolygonOffsetEXT');
  5752. if not Assigned(glPolygonOffsetEXT) then Exit;
  5753. Result := TRUE;
  5754. end;
  5755. end;
  5756. function Load_GL_EXT_secondary_color: Boolean;
  5757. var
  5758. extstring: AnsiString;
  5759. begin
  5760. Result := FALSE;
  5761. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5762. if glext_ExtensionSupported('GL_EXT_secondary_color', extstring) then
  5763. begin
  5764. glSecondaryColor3bEXT := wglGetProcAddress('glSecondaryColor3bEXT');
  5765. if not Assigned(glSecondaryColor3bEXT) then Exit;
  5766. glSecondaryColor3sEXT := wglGetProcAddress('glSecondaryColor3sEXT');
  5767. if not Assigned(glSecondaryColor3sEXT) then Exit;
  5768. glSecondaryColor3iEXT := wglGetProcAddress('glSecondaryColor3iEXT');
  5769. if not Assigned(glSecondaryColor3iEXT) then Exit;
  5770. glSecondaryColor3fEXT := wglGetProcAddress('glSecondaryColor3fEXT');
  5771. if not Assigned(glSecondaryColor3fEXT) then Exit;
  5772. glSecondaryColor3dEXT := wglGetProcAddress('glSecondaryColor3dEXT');
  5773. if not Assigned(glSecondaryColor3dEXT) then Exit;
  5774. glSecondaryColor3ubEXT := wglGetProcAddress('glSecondaryColor3ubEXT');
  5775. if not Assigned(glSecondaryColor3ubEXT) then Exit;
  5776. glSecondaryColor3usEXT := wglGetProcAddress('glSecondaryColor3usEXT');
  5777. if not Assigned(glSecondaryColor3usEXT) then Exit;
  5778. glSecondaryColor3uiEXT := wglGetProcAddress('glSecondaryColor3uiEXT');
  5779. if not Assigned(glSecondaryColor3uiEXT) then Exit;
  5780. glSecondaryColor3bvEXT := wglGetProcAddress('glSecondaryColor3bvEXT');
  5781. if not Assigned(glSecondaryColor3bvEXT) then Exit;
  5782. glSecondaryColor3svEXT := wglGetProcAddress('glSecondaryColor3svEXT');
  5783. if not Assigned(glSecondaryColor3svEXT) then Exit;
  5784. glSecondaryColor3ivEXT := wglGetProcAddress('glSecondaryColor3ivEXT');
  5785. if not Assigned(glSecondaryColor3ivEXT) then Exit;
  5786. glSecondaryColor3fvEXT := wglGetProcAddress('glSecondaryColor3fvEXT');
  5787. if not Assigned(glSecondaryColor3fvEXT) then Exit;
  5788. glSecondaryColor3dvEXT := wglGetProcAddress('glSecondaryColor3dvEXT');
  5789. if not Assigned(glSecondaryColor3dvEXT) then Exit;
  5790. glSecondaryColor3ubvEXT := wglGetProcAddress('glSecondaryColor3ubvEXT');
  5791. if not Assigned(glSecondaryColor3ubvEXT) then Exit;
  5792. glSecondaryColor3usvEXT := wglGetProcAddress('glSecondaryColor3usvEXT');
  5793. if not Assigned(glSecondaryColor3usvEXT) then Exit;
  5794. glSecondaryColor3uivEXT := wglGetProcAddress('glSecondaryColor3uivEXT');
  5795. if not Assigned(glSecondaryColor3uivEXT) then Exit;
  5796. glSecondaryColorPointerEXT := wglGetProcAddress('glSecondaryColorPointerEXT');
  5797. if not Assigned(glSecondaryColorPointerEXT) then Exit;
  5798. Result := TRUE;
  5799. end;
  5800. end;
  5801. function Load_GL_EXT_separate_specular_color: Boolean;
  5802. var
  5803. extstring: AnsiString;
  5804. begin
  5805. Result := FALSE;
  5806. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5807. if glext_ExtensionSupported('GL_EXT_separate_specular_color', extstring) then
  5808. begin
  5809. Result := TRUE;
  5810. end;
  5811. end;
  5812. function Load_GL_EXT_shadow_funcs: Boolean;
  5813. var
  5814. extstring: AnsiString;
  5815. begin
  5816. Result := FALSE;
  5817. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5818. if glext_ExtensionSupported('GL_EXT_shadow_funcs', extstring) then
  5819. begin
  5820. Result := TRUE;
  5821. end;
  5822. end;
  5823. function Load_GL_EXT_shared_texture_palette: Boolean;
  5824. var
  5825. extstring: AnsiString;
  5826. begin
  5827. Result := FALSE;
  5828. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5829. if glext_ExtensionSupported('GL_EXT_shared_texture_palette', extstring) then
  5830. begin
  5831. Result := TRUE;
  5832. end;
  5833. end;
  5834. function Load_GL_EXT_stencil_two_side: Boolean;
  5835. var
  5836. extstring: AnsiString;
  5837. begin
  5838. Result := FALSE;
  5839. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5840. if glext_ExtensionSupported('GL_EXT_stencil_two_side', extstring) then
  5841. begin
  5842. glActiveStencilFaceEXT := wglGetProcAddress('glActiveStencilFaceEXT');
  5843. if not Assigned(glActiveStencilFaceEXT) then Exit;
  5844. Result := TRUE;
  5845. end;
  5846. end;
  5847. function Load_GL_EXT_stencil_wrap: Boolean;
  5848. var
  5849. extstring: AnsiString;
  5850. begin
  5851. Result := FALSE;
  5852. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5853. if glext_ExtensionSupported('GL_EXT_stencil_wrap', extstring) then
  5854. begin
  5855. Result := TRUE;
  5856. end;
  5857. end;
  5858. function Load_GL_EXT_subtexture: Boolean;
  5859. var
  5860. extstring: AnsiString;
  5861. begin
  5862. Result := FALSE;
  5863. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5864. if glext_ExtensionSupported('GL_EXT_subtexture', extstring) then
  5865. begin
  5866. glTexSubImage1DEXT := wglGetProcAddress('glTexSubImage1DEXT');
  5867. if not Assigned(glTexSubImage1DEXT) then Exit;
  5868. glTexSubImage2DEXT := wglGetProcAddress('glTexSubImage2DEXT');
  5869. if not Assigned(glTexSubImage2DEXT) then Exit;
  5870. glTexSubImage3DEXT := wglGetProcAddress('glTexSubImage3DEXT');
  5871. if not Assigned(glTexSubImage3DEXT) then Exit;
  5872. Result := TRUE;
  5873. end;
  5874. end;
  5875. function Load_GL_EXT_texture3D: Boolean;
  5876. var
  5877. extstring: AnsiString;
  5878. begin
  5879. Result := FALSE;
  5880. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5881. if glext_ExtensionSupported('GL_EXT_texture3D', extstring) then
  5882. begin
  5883. glTexImage3DEXT := wglGetProcAddress('glTexImage3DEXT');
  5884. if not Assigned(glTexImage3DEXT) then Exit;
  5885. Result := TRUE;
  5886. end;
  5887. end;
  5888. function Load_GL_EXT_texture_compression_s3tc: Boolean;
  5889. var
  5890. extstring: AnsiString;
  5891. begin
  5892. Result := FALSE;
  5893. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5894. if glext_ExtensionSupported('GL_EXT_texture_compression_s3tc', extstring) then
  5895. begin
  5896. Result := TRUE;
  5897. end;
  5898. end;
  5899. function Load_GL_EXT_texture_env_add: Boolean;
  5900. var
  5901. extstring: AnsiString;
  5902. begin
  5903. Result := FALSE;
  5904. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5905. if glext_ExtensionSupported('GL_EXT_texture_env_add', extstring) then
  5906. begin
  5907. Result := TRUE;
  5908. end;
  5909. end;
  5910. function Load_GL_EXT_texture_env_combine: Boolean;
  5911. var
  5912. extstring: AnsiString;
  5913. begin
  5914. Result := FALSE;
  5915. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5916. if glext_ExtensionSupported('GL_EXT_texture_env_combine', extstring) then
  5917. begin
  5918. Result := TRUE;
  5919. end;
  5920. end;
  5921. function Load_GL_EXT_texture_env_dot3: Boolean;
  5922. var
  5923. extstring: AnsiString;
  5924. begin
  5925. Result := FALSE;
  5926. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5927. if glext_ExtensionSupported('GL_EXT_texture_env_dot3', extstring) then
  5928. begin
  5929. Result := TRUE;
  5930. end;
  5931. end;
  5932. function Load_GL_EXT_texture_filter_anisotropic: Boolean;
  5933. var
  5934. extstring: AnsiString;
  5935. begin
  5936. Result := FALSE;
  5937. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5938. if glext_ExtensionSupported('GL_EXT_texture_filter_anisotropic', extstring) then
  5939. begin
  5940. Result := TRUE;
  5941. end;
  5942. end;
  5943. function Load_GL_EXT_texture_lod_bias: Boolean;
  5944. var
  5945. extstring: AnsiString;
  5946. begin
  5947. Result := FALSE;
  5948. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5949. if glext_ExtensionSupported('GL_EXT_texture_lod_bias', extstring) then
  5950. begin
  5951. Result := TRUE;
  5952. end;
  5953. end;
  5954. function Load_GL_EXT_texture_object: Boolean;
  5955. var
  5956. extstring: AnsiString;
  5957. begin
  5958. Result := FALSE;
  5959. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5960. if glext_ExtensionSupported('GL_EXT_texture_object', extstring) then
  5961. begin
  5962. glGenTexturesEXT := wglGetProcAddress('glGenTexturesEXT');
  5963. if not Assigned(glGenTexturesEXT) then Exit;
  5964. glDeleteTexturesEXT := wglGetProcAddress('glDeleteTexturesEXT');
  5965. if not Assigned(glDeleteTexturesEXT) then Exit;
  5966. glBindTextureEXT := wglGetProcAddress('glBindTextureEXT');
  5967. if not Assigned(glBindTextureEXT) then Exit;
  5968. glPrioritizeTexturesEXT := wglGetProcAddress('glPrioritizeTexturesEXT');
  5969. if not Assigned(glPrioritizeTexturesEXT) then Exit;
  5970. glAreTexturesResidentEXT := wglGetProcAddress('glAreTexturesResidentEXT');
  5971. if not Assigned(glAreTexturesResidentEXT) then Exit;
  5972. glIsTextureEXT := wglGetProcAddress('glIsTextureEXT');
  5973. if not Assigned(glIsTextureEXT) then Exit;
  5974. Result := TRUE;
  5975. end;
  5976. end;
  5977. function Load_GL_EXT_vertex_array: Boolean;
  5978. var
  5979. extstring: AnsiString;
  5980. begin
  5981. Result := FALSE;
  5982. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  5983. if glext_ExtensionSupported('GL_EXT_vertex_array', extstring) then
  5984. begin
  5985. glArrayElementEXT := wglGetProcAddress('glArrayElementEXT');
  5986. if not Assigned(glArrayElementEXT) then Exit;
  5987. glDrawArraysEXT := wglGetProcAddress('glDrawArraysEXT');
  5988. if not Assigned(glDrawArraysEXT) then Exit;
  5989. glVertexPointerEXT := wglGetProcAddress('glVertexPointerEXT');
  5990. if not Assigned(glVertexPointerEXT) then Exit;
  5991. glNormalPointerEXT := wglGetProcAddress('glNormalPointerEXT');
  5992. if not Assigned(glNormalPointerEXT) then Exit;
  5993. glColorPointerEXT := wglGetProcAddress('glColorPointerEXT');
  5994. if not Assigned(glColorPointerEXT) then Exit;
  5995. glIndexPointerEXT := wglGetProcAddress('glIndexPointerEXT');
  5996. if not Assigned(glIndexPointerEXT) then Exit;
  5997. glTexCoordPointerEXT := wglGetProcAddress('glTexCoordPointerEXT');
  5998. if not Assigned(glTexCoordPointerEXT) then Exit;
  5999. glEdgeFlagPointerEXT := wglGetProcAddress('glEdgeFlagPointerEXT');
  6000. if not Assigned(glEdgeFlagPointerEXT) then Exit;
  6001. glGetPointervEXT := wglGetProcAddress('glGetPointervEXT');
  6002. if not Assigned(glGetPointervEXT) then Exit;
  6003. Result := TRUE;
  6004. end;
  6005. end;
  6006. function Load_GL_EXT_vertex_shader: Boolean;
  6007. var
  6008. extstring: AnsiString;
  6009. begin
  6010. Result := FALSE;
  6011. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6012. if glext_ExtensionSupported('GL_EXT_vertex_shader', extstring) then
  6013. begin
  6014. glBeginVertexShaderEXT := wglGetProcAddress('glBeginVertexShaderEXT');
  6015. if not Assigned(glBeginVertexShaderEXT) then Exit;
  6016. glEndVertexShaderEXT := wglGetProcAddress('glEndVertexShaderEXT');
  6017. if not Assigned(glEndVertexShaderEXT) then Exit;
  6018. glBindVertexShaderEXT := wglGetProcAddress('glBindVertexShaderEXT');
  6019. if not Assigned(glBindVertexShaderEXT) then Exit;
  6020. glGenVertexShadersEXT := wglGetProcAddress('glGenVertexShadersEXT');
  6021. if not Assigned(glGenVertexShadersEXT) then Exit;
  6022. glDeleteVertexShaderEXT := wglGetProcAddress('glDeleteVertexShaderEXT');
  6023. if not Assigned(glDeleteVertexShaderEXT) then Exit;
  6024. glShaderOp1EXT := wglGetProcAddress('glShaderOp1EXT');
  6025. if not Assigned(glShaderOp1EXT) then Exit;
  6026. glShaderOp2EXT := wglGetProcAddress('glShaderOp2EXT');
  6027. if not Assigned(glShaderOp2EXT) then Exit;
  6028. glShaderOp3EXT := wglGetProcAddress('glShaderOp3EXT');
  6029. if not Assigned(glShaderOp3EXT) then Exit;
  6030. glSwizzleEXT := wglGetProcAddress('glSwizzleEXT');
  6031. if not Assigned(glSwizzleEXT) then Exit;
  6032. glWriteMaskEXT := wglGetProcAddress('glWriteMaskEXT');
  6033. if not Assigned(glWriteMaskEXT) then Exit;
  6034. glInsertComponentEXT := wglGetProcAddress('glInsertComponentEXT');
  6035. if not Assigned(glInsertComponentEXT) then Exit;
  6036. glExtractComponentEXT := wglGetProcAddress('glExtractComponentEXT');
  6037. if not Assigned(glExtractComponentEXT) then Exit;
  6038. glGenSymbolsEXT := wglGetProcAddress('glGenSymbolsEXT');
  6039. if not Assigned(glGenSymbolsEXT) then Exit;
  6040. glSetInvariantEXT := wglGetProcAddress('glSetInvariantEXT');
  6041. if not Assigned(glSetInvariantEXT) then Exit;
  6042. glSetLocalConstantEXT := wglGetProcAddress('glSetLocalConstantEXT');
  6043. if not Assigned(glSetLocalConstantEXT) then Exit;
  6044. glVariantbvEXT := wglGetProcAddress('glVariantbvEXT');
  6045. if not Assigned(glVariantbvEXT) then Exit;
  6046. glVariantsvEXT := wglGetProcAddress('glVariantsvEXT');
  6047. if not Assigned(glVariantsvEXT) then Exit;
  6048. glVariantivEXT := wglGetProcAddress('glVariantivEXT');
  6049. if not Assigned(glVariantivEXT) then Exit;
  6050. glVariantfvEXT := wglGetProcAddress('glVariantfvEXT');
  6051. if not Assigned(glVariantfvEXT) then Exit;
  6052. glVariantdvEXT := wglGetProcAddress('glVariantdvEXT');
  6053. if not Assigned(glVariantdvEXT) then Exit;
  6054. glVariantubvEXT := wglGetProcAddress('glVariantubvEXT');
  6055. if not Assigned(glVariantubvEXT) then Exit;
  6056. glVariantusvEXT := wglGetProcAddress('glVariantusvEXT');
  6057. if not Assigned(glVariantusvEXT) then Exit;
  6058. glVariantuivEXT := wglGetProcAddress('glVariantuivEXT');
  6059. if not Assigned(glVariantuivEXT) then Exit;
  6060. glVariantPointerEXT := wglGetProcAddress('glVariantPointerEXT');
  6061. if not Assigned(glVariantPointerEXT) then Exit;
  6062. glEnableVariantClientStateEXT := wglGetProcAddress('glEnableVariantClientStateEXT');
  6063. if not Assigned(glEnableVariantClientStateEXT) then Exit;
  6064. glDisableVariantClientStateEXT := wglGetProcAddress('glDisableVariantClientStateEXT');
  6065. if not Assigned(glDisableVariantClientStateEXT) then Exit;
  6066. glBindLightParameterEXT := wglGetProcAddress('glBindLightParameterEXT');
  6067. if not Assigned(glBindLightParameterEXT) then Exit;
  6068. glBindMaterialParameterEXT := wglGetProcAddress('glBindMaterialParameterEXT');
  6069. if not Assigned(glBindMaterialParameterEXT) then Exit;
  6070. glBindTexGenParameterEXT := wglGetProcAddress('glBindTexGenParameterEXT');
  6071. if not Assigned(glBindTexGenParameterEXT) then Exit;
  6072. glBindTextureUnitParameterEXT := wglGetProcAddress('glBindTextureUnitParameterEXT');
  6073. if not Assigned(glBindTextureUnitParameterEXT) then Exit;
  6074. glBindParameterEXT := wglGetProcAddress('glBindParameterEXT');
  6075. if not Assigned(glBindParameterEXT) then Exit;
  6076. glIsVariantEnabledEXT := wglGetProcAddress('glIsVariantEnabledEXT');
  6077. if not Assigned(glIsVariantEnabledEXT) then Exit;
  6078. glGetVariantBooleanvEXT := wglGetProcAddress('glGetVariantBooleanvEXT');
  6079. if not Assigned(glGetVariantBooleanvEXT) then Exit;
  6080. glGetVariantIntegervEXT := wglGetProcAddress('glGetVariantIntegervEXT');
  6081. if not Assigned(glGetVariantIntegervEXT) then Exit;
  6082. glGetVariantFloatvEXT := wglGetProcAddress('glGetVariantFloatvEXT');
  6083. if not Assigned(glGetVariantFloatvEXT) then Exit;
  6084. glGetVariantPointervEXT := wglGetProcAddress('glGetVariantPointervEXT');
  6085. if not Assigned(glGetVariantPointervEXT) then Exit;
  6086. glGetInvariantBooleanvEXT := wglGetProcAddress('glGetInvariantBooleanvEXT');
  6087. if not Assigned(glGetInvariantBooleanvEXT) then Exit;
  6088. glGetInvariantIntegervEXT := wglGetProcAddress('glGetInvariantIntegervEXT');
  6089. if not Assigned(glGetInvariantIntegervEXT) then Exit;
  6090. glGetInvariantFloatvEXT := wglGetProcAddress('glGetInvariantFloatvEXT');
  6091. if not Assigned(glGetInvariantFloatvEXT) then Exit;
  6092. glGetLocalConstantBooleanvEXT := wglGetProcAddress('glGetLocalConstantBooleanvEXT');
  6093. if not Assigned(glGetLocalConstantBooleanvEXT) then Exit;
  6094. glGetLocalConstantIntegervEXT := wglGetProcAddress('glGetLocalConstantIntegervEXT');
  6095. if not Assigned(glGetLocalConstantIntegervEXT) then Exit;
  6096. glGetLocalConstantFloatvEXT := wglGetProcAddress('glGetLocalConstantFloatvEXT');
  6097. if not Assigned(glGetLocalConstantFloatvEXT) then Exit;
  6098. Result := TRUE;
  6099. end;
  6100. end;
  6101. function Load_GL_EXT_vertex_weighting: Boolean;
  6102. var
  6103. extstring: AnsiString;
  6104. begin
  6105. Result := FALSE;
  6106. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6107. if glext_ExtensionSupported('GL_EXT_vertex_weighting', extstring) then
  6108. begin
  6109. glVertexWeightfEXT := wglGetProcAddress('glVertexWeightfEXT');
  6110. if not Assigned(glVertexWeightfEXT) then Exit;
  6111. glVertexWeightfvEXT := wglGetProcAddress('glVertexWeightfvEXT');
  6112. if not Assigned(glVertexWeightfvEXT) then Exit;
  6113. glVertexWeightPointerEXT := wglGetProcAddress('glVertexWeightPointerEXT');
  6114. if not Assigned(glVertexWeightPointerEXT) then Exit;
  6115. Result := TRUE;
  6116. end;
  6117. end;
  6118. function Load_GL_HP_occlusion_test: Boolean;
  6119. var
  6120. extstring: AnsiString;
  6121. begin
  6122. Result := FALSE;
  6123. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6124. if glext_ExtensionSupported('GL_HP_occlusion_test', extstring) then
  6125. begin
  6126. Result := TRUE;
  6127. end;
  6128. end;
  6129. function Load_GL_NV_blend_square: Boolean;
  6130. var
  6131. extstring: AnsiString;
  6132. begin
  6133. Result := FALSE;
  6134. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6135. if glext_ExtensionSupported('GL_NV_blend_square', extstring) then
  6136. begin
  6137. Result := TRUE;
  6138. end;
  6139. end;
  6140. function Load_GL_NV_copy_depth_to_color: Boolean;
  6141. var
  6142. extstring: AnsiString;
  6143. begin
  6144. Result := FALSE;
  6145. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6146. if glext_ExtensionSupported('GL_NV_copy_depth_to_color', extstring) then
  6147. begin
  6148. Result := TRUE;
  6149. end;
  6150. end;
  6151. function Load_GL_NV_depth_clamp: Boolean;
  6152. var
  6153. extstring: AnsiString;
  6154. begin
  6155. Result := FALSE;
  6156. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6157. if glext_ExtensionSupported('GL_NV_depth_clamp', extstring) then
  6158. begin
  6159. Result := TRUE;
  6160. end;
  6161. end;
  6162. function Load_GL_NV_evaluators: Boolean;
  6163. var
  6164. extstring: AnsiString;
  6165. begin
  6166. Result := FALSE;
  6167. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6168. if glext_ExtensionSupported('GL_NV_evaluators', extstring) then
  6169. begin
  6170. glMapControlPointsNV := wglGetProcAddress('glMapControlPointsNV');
  6171. if not Assigned(glMapControlPointsNV) then Exit;
  6172. glMapParameterivNV := wglGetProcAddress('glMapParameterivNV');
  6173. if not Assigned(glMapParameterivNV) then Exit;
  6174. glMapParameterfvNV := wglGetProcAddress('glMapParameterfvNV');
  6175. if not Assigned(glMapParameterfvNV) then Exit;
  6176. glGetMapControlPointsNV := wglGetProcAddress('glGetMapControlPointsNV');
  6177. if not Assigned(glGetMapControlPointsNV) then Exit;
  6178. glGetMapParameterivNV := wglGetProcAddress('glGetMapParameterivNV');
  6179. if not Assigned(glGetMapParameterivNV) then Exit;
  6180. glGetMapParameterfvNV := wglGetProcAddress('glGetMapParameterfvNV');
  6181. if not Assigned(glGetMapParameterfvNV) then Exit;
  6182. glGetMapAttribParameterivNV := wglGetProcAddress('glGetMapAttribParameterivNV');
  6183. if not Assigned(glGetMapAttribParameterivNV) then Exit;
  6184. glGetMapAttribParameterfvNV := wglGetProcAddress('glGetMapAttribParameterfvNV');
  6185. if not Assigned(glGetMapAttribParameterfvNV) then Exit;
  6186. glEvalMapsNV := wglGetProcAddress('glEvalMapsNV');
  6187. if not Assigned(glEvalMapsNV) then Exit;
  6188. Result := TRUE;
  6189. end;
  6190. end;
  6191. function Load_GL_NV_fence: Boolean;
  6192. var
  6193. extstring: AnsiString;
  6194. begin
  6195. Result := FALSE;
  6196. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6197. if glext_ExtensionSupported('GL_NV_fence', extstring) then
  6198. begin
  6199. glGenFencesNV := wglGetProcAddress('glGenFencesNV');
  6200. if not Assigned(glGenFencesNV) then Exit;
  6201. glDeleteFencesNV := wglGetProcAddress('glDeleteFencesNV');
  6202. if not Assigned(glDeleteFencesNV) then Exit;
  6203. glSetFenceNV := wglGetProcAddress('glSetFenceNV');
  6204. if not Assigned(glSetFenceNV) then Exit;
  6205. glTestFenceNV := wglGetProcAddress('glTestFenceNV');
  6206. if not Assigned(glTestFenceNV) then Exit;
  6207. glFinishFenceNV := wglGetProcAddress('glFinishFenceNV');
  6208. if not Assigned(glFinishFenceNV) then Exit;
  6209. glIsFenceNV := wglGetProcAddress('glIsFenceNV');
  6210. if not Assigned(glIsFenceNV) then Exit;
  6211. glGetFenceivNV := wglGetProcAddress('glGetFenceivNV');
  6212. if not Assigned(glGetFenceivNV) then Exit;
  6213. Result := TRUE;
  6214. end;
  6215. end;
  6216. function Load_GL_NV_fog_distance: Boolean;
  6217. var
  6218. extstring: AnsiString;
  6219. begin
  6220. Result := FALSE;
  6221. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6222. if glext_ExtensionSupported('GL_NV_fog_distance', extstring) then
  6223. begin
  6224. Result := TRUE;
  6225. end;
  6226. end;
  6227. function Load_GL_NV_light_max_exponent: Boolean;
  6228. var
  6229. extstring: AnsiString;
  6230. begin
  6231. Result := FALSE;
  6232. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6233. if glext_ExtensionSupported('GL_NV_light_max_exponent', extstring) then
  6234. begin
  6235. Result := TRUE;
  6236. end;
  6237. end;
  6238. function Load_GL_NV_multisample_filter_hint: Boolean;
  6239. var
  6240. extstring: AnsiString;
  6241. begin
  6242. Result := FALSE;
  6243. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6244. if glext_ExtensionSupported('GL_NV_multisample_filter_hint', extstring) then
  6245. begin
  6246. Result := TRUE;
  6247. end;
  6248. end;
  6249. function Load_GL_NV_occlusion_query: Boolean;
  6250. var
  6251. extstring: AnsiString;
  6252. begin
  6253. Result := FALSE;
  6254. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6255. if glext_ExtensionSupported('GL_NV_occlusion_query', extstring) then
  6256. begin
  6257. glGenOcclusionQueriesNV := wglGetProcAddress('glGenOcclusionQueriesNV');
  6258. if not Assigned(glGenOcclusionQueriesNV) then Exit;
  6259. glDeleteOcclusionQueriesNV := wglGetProcAddress('glDeleteOcclusionQueriesNV');
  6260. if not Assigned(glDeleteOcclusionQueriesNV) then Exit;
  6261. glIsOcclusionQueryNV := wglGetProcAddress('glIsOcclusionQueryNV');
  6262. if not Assigned(glIsOcclusionQueryNV) then Exit;
  6263. glBeginOcclusionQueryNV := wglGetProcAddress('glBeginOcclusionQueryNV');
  6264. if not Assigned(glBeginOcclusionQueryNV) then Exit;
  6265. glEndOcclusionQueryNV := wglGetProcAddress('glEndOcclusionQueryNV');
  6266. if not Assigned(glEndOcclusionQueryNV) then Exit;
  6267. glGetOcclusionQueryivNV := wglGetProcAddress('glGetOcclusionQueryivNV');
  6268. if not Assigned(glGetOcclusionQueryivNV) then Exit;
  6269. glGetOcclusionQueryuivNV := wglGetProcAddress('glGetOcclusionQueryuivNV');
  6270. if not Assigned(glGetOcclusionQueryuivNV) then Exit;
  6271. Result := TRUE;
  6272. end;
  6273. end;
  6274. function Load_GL_NV_packed_depth_stencil: Boolean;
  6275. var
  6276. extstring: AnsiString;
  6277. begin
  6278. Result := FALSE;
  6279. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6280. if glext_ExtensionSupported('GL_NV_packed_depth_stencil', extstring) then
  6281. begin
  6282. Result := TRUE;
  6283. end;
  6284. end;
  6285. function Load_GL_NV_point_sprite: Boolean;
  6286. var
  6287. extstring: AnsiString;
  6288. begin
  6289. Result := FALSE;
  6290. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6291. if glext_ExtensionSupported('GL_NV_point_sprite', extstring) then
  6292. begin
  6293. glPointParameteriNV := wglGetProcAddress('glPointParameteriNV');
  6294. if not Assigned(glPointParameteriNV) then Exit;
  6295. glPointParameterivNV := wglGetProcAddress('glPointParameterivNV');
  6296. if not Assigned(glPointParameterivNV) then Exit;
  6297. Result := TRUE;
  6298. end;
  6299. end;
  6300. function Load_GL_NV_register_combiners: Boolean;
  6301. var
  6302. extstring: AnsiString;
  6303. begin
  6304. Result := FALSE;
  6305. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6306. if glext_ExtensionSupported('GL_NV_register_combiners', extstring) then
  6307. begin
  6308. glCombinerParameterfvNV := wglGetProcAddress('glCombinerParameterfvNV');
  6309. if not Assigned(glCombinerParameterfvNV) then Exit;
  6310. glCombinerParameterivNV := wglGetProcAddress('glCombinerParameterivNV');
  6311. if not Assigned(glCombinerParameterivNV) then Exit;
  6312. glCombinerParameterfNV := wglGetProcAddress('glCombinerParameterfNV');
  6313. if not Assigned(glCombinerParameterfNV) then Exit;
  6314. glCombinerParameteriNV := wglGetProcAddress('glCombinerParameteriNV');
  6315. if not Assigned(glCombinerParameteriNV) then Exit;
  6316. glCombinerInputNV := wglGetProcAddress('glCombinerInputNV');
  6317. if not Assigned(glCombinerInputNV) then Exit;
  6318. glCombinerOutputNV := wglGetProcAddress('glCombinerOutputNV');
  6319. if not Assigned(glCombinerOutputNV) then Exit;
  6320. glFinalCombinerInputNV := wglGetProcAddress('glFinalCombinerInputNV');
  6321. if not Assigned(glFinalCombinerInputNV) then Exit;
  6322. glGetCombinerInputParameterfvNV := wglGetProcAddress('glGetCombinerInputParameterfvNV');
  6323. if not Assigned(glGetCombinerInputParameterfvNV) then Exit;
  6324. glGetCombinerInputParameterivNV := wglGetProcAddress('glGetCombinerInputParameterivNV');
  6325. if not Assigned(glGetCombinerInputParameterivNV) then Exit;
  6326. glGetCombinerOutputParameterfvNV := wglGetProcAddress('glGetCombinerOutputParameterfvNV');
  6327. if not Assigned(glGetCombinerOutputParameterfvNV) then Exit;
  6328. glGetCombinerOutputParameterivNV := wglGetProcAddress('glGetCombinerOutputParameterivNV');
  6329. if not Assigned(glGetCombinerOutputParameterivNV) then Exit;
  6330. glGetFinalCombinerInputParameterfvNV := wglGetProcAddress('glGetFinalCombinerInputParameterfvNV');
  6331. if not Assigned(glGetFinalCombinerInputParameterfvNV) then Exit;
  6332. glGetFinalCombinerInputParameterivNV := wglGetProcAddress('glGetFinalCombinerInputParameterivNV');
  6333. if not Assigned(glGetFinalCombinerInputParameterivNV) then Exit;
  6334. Result := TRUE;
  6335. end;
  6336. end;
  6337. function Load_GL_NV_register_combiners2: Boolean;
  6338. var
  6339. extstring: AnsiString;
  6340. begin
  6341. Result := FALSE;
  6342. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6343. if glext_ExtensionSupported('GL_NV_register_combiners2', extstring) then
  6344. begin
  6345. glCombinerStageParameterfvNV := wglGetProcAddress('glCombinerStageParameterfvNV');
  6346. if not Assigned(glCombinerStageParameterfvNV) then Exit;
  6347. glGetCombinerStageParameterfvNV := wglGetProcAddress('glGetCombinerStageParameterfvNV');
  6348. if not Assigned(glGetCombinerStageParameterfvNV) then Exit;
  6349. Result := TRUE;
  6350. end;
  6351. end;
  6352. function Load_GL_NV_texgen_emboss: Boolean;
  6353. var
  6354. extstring: AnsiString;
  6355. begin
  6356. Result := FALSE;
  6357. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6358. if glext_ExtensionSupported('GL_NV_texgen_emboss', extstring) then
  6359. begin
  6360. Result := TRUE;
  6361. end;
  6362. end;
  6363. function Load_GL_NV_texgen_reflection: Boolean;
  6364. var
  6365. extstring: AnsiString;
  6366. begin
  6367. Result := FALSE;
  6368. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6369. if glext_ExtensionSupported('GL_NV_texgen_reflection', extstring) then
  6370. begin
  6371. Result := TRUE;
  6372. end;
  6373. end;
  6374. function Load_GL_NV_texture_compression_vtc: Boolean;
  6375. var
  6376. extstring: AnsiString;
  6377. begin
  6378. Result := FALSE;
  6379. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6380. if glext_ExtensionSupported('GL_NV_texture_compression_vtc', extstring) then
  6381. begin
  6382. Result := TRUE;
  6383. end;
  6384. end;
  6385. function Load_GL_NV_texture_env_combine4: Boolean;
  6386. var
  6387. extstring: AnsiString;
  6388. begin
  6389. Result := FALSE;
  6390. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6391. if glext_ExtensionSupported('GL_NV_texture_env_combine4', extstring) then
  6392. begin
  6393. Result := TRUE;
  6394. end;
  6395. end;
  6396. function Load_GL_NV_texture_rectangle: Boolean;
  6397. var
  6398. extstring: AnsiString;
  6399. begin
  6400. Result := FALSE;
  6401. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6402. if glext_ExtensionSupported('GL_NV_texture_rectangle', extstring) then
  6403. begin
  6404. Result := TRUE;
  6405. end;
  6406. end;
  6407. function Load_GL_NV_texture_shader: Boolean;
  6408. var
  6409. extstring: AnsiString;
  6410. begin
  6411. Result := FALSE;
  6412. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6413. if glext_ExtensionSupported('GL_NV_texture_shader', extstring) then
  6414. begin
  6415. Result := TRUE;
  6416. end;
  6417. end;
  6418. function Load_GL_NV_texture_shader2: Boolean;
  6419. var
  6420. extstring: AnsiString;
  6421. begin
  6422. Result := FALSE;
  6423. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6424. if glext_ExtensionSupported('GL_NV_texture_shader2', extstring) then
  6425. begin
  6426. Result := TRUE;
  6427. end;
  6428. end;
  6429. function Load_GL_NV_texture_shader3: Boolean;
  6430. var
  6431. extstring: AnsiString;
  6432. begin
  6433. Result := FALSE;
  6434. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6435. if glext_ExtensionSupported('GL_NV_texture_shader3', extstring) then
  6436. begin
  6437. Result := TRUE;
  6438. end;
  6439. end;
  6440. function Load_GL_NV_vertex_array_range: Boolean;
  6441. var
  6442. extstring: AnsiString;
  6443. begin
  6444. Result := FALSE;
  6445. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6446. if glext_ExtensionSupported('GL_NV_vertex_array_range', extstring) then
  6447. begin
  6448. glVertexArrayRangeNV := wglGetProcAddress('glVertexArrayRangeNV');
  6449. if not Assigned(glVertexArrayRangeNV) then Exit;
  6450. glFlushVertexArrayRangeNV := wglGetProcAddress('glFlushVertexArrayRangeNV');
  6451. if not Assigned(glFlushVertexArrayRangeNV) then Exit;
  6452. {$IFDEF Windows}
  6453. wglAllocateMemoryNV := wglGetProcAddress('wglAllocateMemoryNV');
  6454. if not Assigned(wglAllocateMemoryNV) then Exit;
  6455. wglFreeMemoryNV := wglGetProcAddress('wglFreeMemoryNV');
  6456. if not Assigned(wglFreeMemoryNV) then Exit;
  6457. {$ENDIF}
  6458. Result := TRUE;
  6459. end;
  6460. end;
  6461. function Load_GL_NV_vertex_array_range2: Boolean;
  6462. var
  6463. extstring: AnsiString;
  6464. begin
  6465. Result := FALSE;
  6466. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6467. if glext_ExtensionSupported('GL_NV_vertex_array_range2', extstring) then
  6468. begin
  6469. Result := TRUE;
  6470. end;
  6471. end;
  6472. function Load_GL_NV_vertex_program: Boolean;
  6473. var
  6474. extstring: AnsiString;
  6475. begin
  6476. Result := FALSE;
  6477. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6478. if glext_ExtensionSupported('GL_NV_vertex_program', extstring) then
  6479. begin
  6480. glBindProgramNV := wglGetProcAddress('glBindProgramNV');
  6481. if not Assigned(glBindProgramNV) then Exit;
  6482. glDeleteProgramsNV := wglGetProcAddress('glDeleteProgramsNV');
  6483. if not Assigned(glDeleteProgramsNV) then Exit;
  6484. glExecuteProgramNV := wglGetProcAddress('glExecuteProgramNV');
  6485. if not Assigned(glExecuteProgramNV) then Exit;
  6486. glGenProgramsNV := wglGetProcAddress('glGenProgramsNV');
  6487. if not Assigned(glGenProgramsNV) then Exit;
  6488. glAreProgramsResidentNV := wglGetProcAddress('glAreProgramsResidentNV');
  6489. if not Assigned(glAreProgramsResidentNV) then Exit;
  6490. glRequestResidentProgramsNV := wglGetProcAddress('glRequestResidentProgramsNV');
  6491. if not Assigned(glRequestResidentProgramsNV) then Exit;
  6492. glGetProgramParameterfvNV := wglGetProcAddress('glGetProgramParameterfvNV');
  6493. if not Assigned(glGetProgramParameterfvNV) then Exit;
  6494. glGetProgramParameterdvNV := wglGetProcAddress('glGetProgramParameterdvNV');
  6495. if not Assigned(glGetProgramParameterdvNV) then Exit;
  6496. glGetProgramivNV := wglGetProcAddress('glGetProgramivNV');
  6497. if not Assigned(glGetProgramivNV) then Exit;
  6498. glGetProgramStringNV := wglGetProcAddress('glGetProgramStringNV');
  6499. if not Assigned(glGetProgramStringNV) then Exit;
  6500. glGetTrackMatrixivNV := wglGetProcAddress('glGetTrackMatrixivNV');
  6501. if not Assigned(glGetTrackMatrixivNV) then Exit;
  6502. glGetVertexAttribdvNV := wglGetProcAddress('glGetVertexAttribdvNV');
  6503. if not Assigned(glGetVertexAttribdvNV) then Exit;
  6504. glGetVertexAttribfvNV := wglGetProcAddress('glGetVertexAttribfvNV');
  6505. if not Assigned(glGetVertexAttribfvNV) then Exit;
  6506. glGetVertexAttribivNV := wglGetProcAddress('glGetVertexAttribivNV');
  6507. if not Assigned(glGetVertexAttribivNV) then Exit;
  6508. glGetVertexAttribPointervNV := wglGetProcAddress('glGetVertexAttribPointervNV');
  6509. if not Assigned(glGetVertexAttribPointervNV) then Exit;
  6510. glIsProgramNV := wglGetProcAddress('glIsProgramNV');
  6511. if not Assigned(glIsProgramNV) then Exit;
  6512. glLoadProgramNV := wglGetProcAddress('glLoadProgramNV');
  6513. if not Assigned(glLoadProgramNV) then Exit;
  6514. glProgramParameter4fNV := wglGetProcAddress('glProgramParameter4fNV');
  6515. if not Assigned(glProgramParameter4fNV) then Exit;
  6516. glProgramParameter4fvNV := wglGetProcAddress('glProgramParameter4fvNV');
  6517. if not Assigned(glProgramParameter4fvNV) then Exit;
  6518. glProgramParameters4dvNV := wglGetProcAddress('glProgramParameters4dvNV');
  6519. if not Assigned(glProgramParameters4dvNV) then Exit;
  6520. glProgramParameters4fvNV := wglGetProcAddress('glProgramParameters4fvNV');
  6521. if not Assigned(glProgramParameters4fvNV) then Exit;
  6522. glTrackMatrixNV := wglGetProcAddress('glTrackMatrixNV');
  6523. if not Assigned(glTrackMatrixNV) then Exit;
  6524. glVertexAttribPointerNV := wglGetProcAddress('glVertexAttribPointerNV');
  6525. if not Assigned(glVertexAttribPointerNV) then Exit;
  6526. glVertexAttrib1sNV := wglGetProcAddress('glVertexAttrib1sNV');
  6527. if not Assigned(glVertexAttrib1sNV) then Exit;
  6528. glVertexAttrib1fNV := wglGetProcAddress('glVertexAttrib1fNV');
  6529. if not Assigned(glVertexAttrib1fNV) then Exit;
  6530. glVertexAttrib1dNV := wglGetProcAddress('glVertexAttrib1dNV');
  6531. if not Assigned(glVertexAttrib1dNV) then Exit;
  6532. glVertexAttrib2sNV := wglGetProcAddress('glVertexAttrib2sNV');
  6533. if not Assigned(glVertexAttrib2sNV) then Exit;
  6534. glVertexAttrib2fNV := wglGetProcAddress('glVertexAttrib2fNV');
  6535. if not Assigned(glVertexAttrib2fNV) then Exit;
  6536. glVertexAttrib2dNV := wglGetProcAddress('glVertexAttrib2dNV');
  6537. if not Assigned(glVertexAttrib2dNV) then Exit;
  6538. glVertexAttrib3sNV := wglGetProcAddress('glVertexAttrib3sNV');
  6539. if not Assigned(glVertexAttrib3sNV) then Exit;
  6540. glVertexAttrib3fNV := wglGetProcAddress('glVertexAttrib3fNV');
  6541. if not Assigned(glVertexAttrib3fNV) then Exit;
  6542. glVertexAttrib3dNV := wglGetProcAddress('glVertexAttrib3dNV');
  6543. if not Assigned(glVertexAttrib3dNV) then Exit;
  6544. glVertexAttrib4sNV := wglGetProcAddress('glVertexAttrib4sNV');
  6545. if not Assigned(glVertexAttrib4sNV) then Exit;
  6546. glVertexAttrib4fNV := wglGetProcAddress('glVertexAttrib4fNV');
  6547. if not Assigned(glVertexAttrib4fNV) then Exit;
  6548. glVertexAttrib4dNV := wglGetProcAddress('glVertexAttrib4dNV');
  6549. if not Assigned(glVertexAttrib4dNV) then Exit;
  6550. glVertexAttrib4ubNV := wglGetProcAddress('glVertexAttrib4ubNV');
  6551. if not Assigned(glVertexAttrib4ubNV) then Exit;
  6552. glVertexAttrib1svNV := wglGetProcAddress('glVertexAttrib1svNV');
  6553. if not Assigned(glVertexAttrib1svNV) then Exit;
  6554. glVertexAttrib1fvNV := wglGetProcAddress('glVertexAttrib1fvNV');
  6555. if not Assigned(glVertexAttrib1fvNV) then Exit;
  6556. glVertexAttrib1dvNV := wglGetProcAddress('glVertexAttrib1dvNV');
  6557. if not Assigned(glVertexAttrib1dvNV) then Exit;
  6558. glVertexAttrib2svNV := wglGetProcAddress('glVertexAttrib2svNV');
  6559. if not Assigned(glVertexAttrib2svNV) then Exit;
  6560. glVertexAttrib2fvNV := wglGetProcAddress('glVertexAttrib2fvNV');
  6561. if not Assigned(glVertexAttrib2fvNV) then Exit;
  6562. glVertexAttrib2dvNV := wglGetProcAddress('glVertexAttrib2dvNV');
  6563. if not Assigned(glVertexAttrib2dvNV) then Exit;
  6564. glVertexAttrib3svNV := wglGetProcAddress('glVertexAttrib3svNV');
  6565. if not Assigned(glVertexAttrib3svNV) then Exit;
  6566. glVertexAttrib3fvNV := wglGetProcAddress('glVertexAttrib3fvNV');
  6567. if not Assigned(glVertexAttrib3fvNV) then Exit;
  6568. glVertexAttrib3dvNV := wglGetProcAddress('glVertexAttrib3dvNV');
  6569. if not Assigned(glVertexAttrib3dvNV) then Exit;
  6570. glVertexAttrib4svNV := wglGetProcAddress('glVertexAttrib4svNV');
  6571. if not Assigned(glVertexAttrib4svNV) then Exit;
  6572. glVertexAttrib4fvNV := wglGetProcAddress('glVertexAttrib4fvNV');
  6573. if not Assigned(glVertexAttrib4fvNV) then Exit;
  6574. glVertexAttrib4dvNV := wglGetProcAddress('glVertexAttrib4dvNV');
  6575. if not Assigned(glVertexAttrib4dvNV) then Exit;
  6576. glVertexAttrib4ubvNV := wglGetProcAddress('glVertexAttrib4ubvNV');
  6577. if not Assigned(glVertexAttrib4ubvNV) then Exit;
  6578. glVertexAttribs1svNV := wglGetProcAddress('glVertexAttribs1svNV');
  6579. if not Assigned(glVertexAttribs1svNV) then Exit;
  6580. glVertexAttribs1fvNV := wglGetProcAddress('glVertexAttribs1fvNV');
  6581. if not Assigned(glVertexAttribs1fvNV) then Exit;
  6582. glVertexAttribs1dvNV := wglGetProcAddress('glVertexAttribs1dvNV');
  6583. if not Assigned(glVertexAttribs1dvNV) then Exit;
  6584. glVertexAttribs2svNV := wglGetProcAddress('glVertexAttribs2svNV');
  6585. if not Assigned(glVertexAttribs2svNV) then Exit;
  6586. glVertexAttribs2fvNV := wglGetProcAddress('glVertexAttribs2fvNV');
  6587. if not Assigned(glVertexAttribs2fvNV) then Exit;
  6588. glVertexAttribs2dvNV := wglGetProcAddress('glVertexAttribs2dvNV');
  6589. if not Assigned(glVertexAttribs2dvNV) then Exit;
  6590. glVertexAttribs3svNV := wglGetProcAddress('glVertexAttribs3svNV');
  6591. if not Assigned(glVertexAttribs3svNV) then Exit;
  6592. glVertexAttribs3fvNV := wglGetProcAddress('glVertexAttribs3fvNV');
  6593. if not Assigned(glVertexAttribs3fvNV) then Exit;
  6594. glVertexAttribs3dvNV := wglGetProcAddress('glVertexAttribs3dvNV');
  6595. if not Assigned(glVertexAttribs3dvNV) then Exit;
  6596. glVertexAttribs4svNV := wglGetProcAddress('glVertexAttribs4svNV');
  6597. if not Assigned(glVertexAttribs4svNV) then Exit;
  6598. glVertexAttribs4fvNV := wglGetProcAddress('glVertexAttribs4fvNV');
  6599. if not Assigned(glVertexAttribs4fvNV) then Exit;
  6600. glVertexAttribs4dvNV := wglGetProcAddress('glVertexAttribs4dvNV');
  6601. if not Assigned(glVertexAttribs4dvNV) then Exit;
  6602. glVertexAttribs4ubvNV := wglGetProcAddress('glVertexAttribs4ubvNV');
  6603. if not Assigned(glVertexAttribs4ubvNV) then Exit;
  6604. Result := TRUE;
  6605. end;
  6606. end;
  6607. function Load_GL_NV_vertex_program1_1: Boolean;
  6608. var
  6609. extstring: AnsiString;
  6610. begin
  6611. Result := FALSE;
  6612. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6613. if glext_ExtensionSupported('GL_NV_vertex_program1_1', extstring) then
  6614. begin
  6615. Result := TRUE;
  6616. end;
  6617. end;
  6618. function Load_GL_ATI_element_array: Boolean;
  6619. var
  6620. extstring: AnsiString;
  6621. begin
  6622. Result := FALSE;
  6623. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6624. if glext_ExtensionSupported('GL_ATI_element_array', extstring) then
  6625. begin
  6626. glElementPointerATI := wglGetProcAddress('glElementPointerATI');
  6627. if not Assigned(glElementPointerATI) then Exit;
  6628. glDrawElementArrayATI := wglGetProcAddress('glDrawElementArrayATI');
  6629. if not Assigned(glDrawElementArrayATI) then Exit;
  6630. glDrawRangeElementArrayATI := wglGetProcAddress('glDrawRangeElementArrayATI');
  6631. if not Assigned(glDrawRangeElementArrayATI) then Exit;
  6632. Result := TRUE;
  6633. end;
  6634. end;
  6635. function Load_GL_ATI_envmap_bumpmap: Boolean;
  6636. var
  6637. extstring: AnsiString;
  6638. begin
  6639. Result := FALSE;
  6640. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6641. if glext_ExtensionSupported('GL_ATI_envmap_bumpmap', extstring) then
  6642. begin
  6643. glTexBumpParameterivATI := wglGetProcAddress('glTexBumpParameterivATI');
  6644. if not Assigned(glTexBumpParameterivATI) then Exit;
  6645. glTexBumpParameterfvATI := wglGetProcAddress('glTexBumpParameterfvATI');
  6646. if not Assigned(glTexBumpParameterfvATI) then Exit;
  6647. glGetTexBumpParameterivATI := wglGetProcAddress('glGetTexBumpParameterivATI');
  6648. if not Assigned(glGetTexBumpParameterivATI) then Exit;
  6649. glGetTexBumpParameterfvATI := wglGetProcAddress('glGetTexBumpParameterfvATI');
  6650. if not Assigned(glGetTexBumpParameterfvATI) then Exit;
  6651. Result := TRUE;
  6652. end;
  6653. end;
  6654. function Load_GL_ATI_fragment_shader: Boolean;
  6655. var
  6656. extstring: AnsiString;
  6657. begin
  6658. Result := FALSE;
  6659. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6660. if glext_ExtensionSupported('GL_ATI_fragment_shader', extstring) then
  6661. begin
  6662. glGenFragmentShadersATI := wglGetProcAddress('glGenFragmentShadersATI');
  6663. if not Assigned(glGenFragmentShadersATI) then Exit;
  6664. glBindFragmentShaderATI := wglGetProcAddress('glBindFragmentShaderATI');
  6665. if not Assigned(glBindFragmentShaderATI) then Exit;
  6666. glDeleteFragmentShaderATI := wglGetProcAddress('glDeleteFragmentShaderATI');
  6667. if not Assigned(glDeleteFragmentShaderATI) then Exit;
  6668. glBeginFragmentShaderATI := wglGetProcAddress('glBeginFragmentShaderATI');
  6669. if not Assigned(glBeginFragmentShaderATI) then Exit;
  6670. glEndFragmentShaderATI := wglGetProcAddress('glEndFragmentShaderATI');
  6671. if not Assigned(glEndFragmentShaderATI) then Exit;
  6672. glPassTexCoordATI := wglGetProcAddress('glPassTexCoordATI');
  6673. if not Assigned(glPassTexCoordATI) then Exit;
  6674. glSampleMapATI := wglGetProcAddress('glSampleMapATI');
  6675. if not Assigned(glSampleMapATI) then Exit;
  6676. glColorFragmentOp1ATI := wglGetProcAddress('glColorFragmentOp1ATI');
  6677. if not Assigned(glColorFragmentOp1ATI) then Exit;
  6678. glColorFragmentOp2ATI := wglGetProcAddress('glColorFragmentOp2ATI');
  6679. if not Assigned(glColorFragmentOp2ATI) then Exit;
  6680. glColorFragmentOp3ATI := wglGetProcAddress('glColorFragmentOp3ATI');
  6681. if not Assigned(glColorFragmentOp3ATI) then Exit;
  6682. glAlphaFragmentOp1ATI := wglGetProcAddress('glAlphaFragmentOp1ATI');
  6683. if not Assigned(glAlphaFragmentOp1ATI) then Exit;
  6684. glAlphaFragmentOp2ATI := wglGetProcAddress('glAlphaFragmentOp2ATI');
  6685. if not Assigned(glAlphaFragmentOp2ATI) then Exit;
  6686. glAlphaFragmentOp3ATI := wglGetProcAddress('glAlphaFragmentOp3ATI');
  6687. if not Assigned(glAlphaFragmentOp3ATI) then Exit;
  6688. glSetFragmentShaderConstantATI := wglGetProcAddress('glSetFragmentShaderConstantATI');
  6689. if not Assigned(glSetFragmentShaderConstantATI) then Exit;
  6690. Result := TRUE;
  6691. end;
  6692. end;
  6693. function Load_GL_ATI_pn_triangles: Boolean;
  6694. var
  6695. extstring: AnsiString;
  6696. begin
  6697. Result := FALSE;
  6698. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6699. if glext_ExtensionSupported('GL_ATI_pn_triangles', extstring) then
  6700. begin
  6701. glPNTrianglesiATI := wglGetProcAddress('glPNTrianglesiATI');
  6702. if not Assigned(glPNTrianglesiATI) then Exit;
  6703. glPNTrianglesfATI := wglGetProcAddress('glPNTrianglesfATI');
  6704. if not Assigned(glPNTrianglesfATI) then Exit;
  6705. Result := TRUE;
  6706. end;
  6707. end;
  6708. function Load_GL_ATI_texture_mirror_once: Boolean;
  6709. var
  6710. extstring: AnsiString;
  6711. begin
  6712. Result := FALSE;
  6713. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6714. if glext_ExtensionSupported('GL_ATI_texture_mirror_once', extstring) then
  6715. begin
  6716. Result := TRUE;
  6717. end;
  6718. end;
  6719. function Load_GL_ATI_vertex_array_object: Boolean;
  6720. var
  6721. extstring: AnsiString;
  6722. begin
  6723. Result := FALSE;
  6724. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6725. if glext_ExtensionSupported('GL_ATI_vertex_array_object', extstring) then
  6726. begin
  6727. glNewObjectBufferATI := wglGetProcAddress('glNewObjectBufferATI');
  6728. if not Assigned(glNewObjectBufferATI) then Exit;
  6729. glIsObjectBufferATI := wglGetProcAddress('glIsObjectBufferATI');
  6730. if not Assigned(glIsObjectBufferATI) then Exit;
  6731. glUpdateObjectBufferATI := wglGetProcAddress('glUpdateObjectBufferATI');
  6732. if not Assigned(glUpdateObjectBufferATI) then Exit;
  6733. glGetObjectBufferfvATI := wglGetProcAddress('glGetObjectBufferfvATI');
  6734. if not Assigned(glGetObjectBufferfvATI) then Exit;
  6735. glGetObjectBufferivATI := wglGetProcAddress('glGetObjectBufferivATI');
  6736. if not Assigned(glGetObjectBufferivATI) then Exit;
  6737. glDeleteObjectBufferATI := wglGetProcAddress('glDeleteObjectBufferATI');
  6738. if not Assigned(glDeleteObjectBufferATI) then Exit;
  6739. glArrayObjectATI := wglGetProcAddress('glArrayObjectATI');
  6740. if not Assigned(glArrayObjectATI) then Exit;
  6741. glGetArrayObjectfvATI := wglGetProcAddress('glGetArrayObjectfvATI');
  6742. if not Assigned(glGetArrayObjectfvATI) then Exit;
  6743. glGetArrayObjectivATI := wglGetProcAddress('glGetArrayObjectivATI');
  6744. if not Assigned(glGetArrayObjectivATI) then Exit;
  6745. glVariantArrayObjectATI := wglGetProcAddress('glVariantArrayObjectATI');
  6746. if not Assigned(glVariantArrayObjectATI) then Exit;
  6747. glGetVariantArrayObjectfvATI := wglGetProcAddress('glGetVariantArrayObjectfvATI');
  6748. if not Assigned(glGetVariantArrayObjectfvATI) then Exit;
  6749. glGetVariantArrayObjectivATI := wglGetProcAddress('glGetVariantArrayObjectivATI');
  6750. if not Assigned(glGetVariantArrayObjectivATI) then Exit;
  6751. Result := TRUE;
  6752. end;
  6753. end;
  6754. function Load_GL_ATI_vertex_streams: Boolean;
  6755. var
  6756. extstring: AnsiString;
  6757. begin
  6758. Result := FALSE;
  6759. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6760. if glext_ExtensionSupported('GL_ATI_vertex_streams', extstring) then
  6761. begin
  6762. glVertexStream1s := wglGetProcAddress('glVertexStream1s');
  6763. if not Assigned(glVertexStream1s) then Exit;
  6764. glVertexStream1i := wglGetProcAddress('glVertexStream1i');
  6765. if not Assigned(glVertexStream1i) then Exit;
  6766. glVertexStream1f := wglGetProcAddress('glVertexStream1f');
  6767. if not Assigned(glVertexStream1f) then Exit;
  6768. glVertexStream1d := wglGetProcAddress('glVertexStream1d');
  6769. if not Assigned(glVertexStream1d) then Exit;
  6770. glVertexStream1sv := wglGetProcAddress('glVertexStream1sv');
  6771. if not Assigned(glVertexStream1sv) then Exit;
  6772. glVertexStream1iv := wglGetProcAddress('glVertexStream1iv');
  6773. if not Assigned(glVertexStream1iv) then Exit;
  6774. glVertexStream1fv := wglGetProcAddress('glVertexStream1fv');
  6775. if not Assigned(glVertexStream1fv) then Exit;
  6776. glVertexStream1dv := wglGetProcAddress('glVertexStream1dv');
  6777. if not Assigned(glVertexStream1dv) then Exit;
  6778. glVertexStream2s := wglGetProcAddress('glVertexStream2s');
  6779. if not Assigned(glVertexStream2s) then Exit;
  6780. glVertexStream2i := wglGetProcAddress('glVertexStream2i');
  6781. if not Assigned(glVertexStream2i) then Exit;
  6782. glVertexStream2f := wglGetProcAddress('glVertexStream2f');
  6783. if not Assigned(glVertexStream2f) then Exit;
  6784. glVertexStream2d := wglGetProcAddress('glVertexStream2d');
  6785. if not Assigned(glVertexStream2d) then Exit;
  6786. glVertexStream2sv := wglGetProcAddress('glVertexStream2sv');
  6787. if not Assigned(glVertexStream2sv) then Exit;
  6788. glVertexStream2iv := wglGetProcAddress('glVertexStream2iv');
  6789. if not Assigned(glVertexStream2iv) then Exit;
  6790. glVertexStream2fv := wglGetProcAddress('glVertexStream2fv');
  6791. if not Assigned(glVertexStream2fv) then Exit;
  6792. glVertexStream2dv := wglGetProcAddress('glVertexStream2dv');
  6793. if not Assigned(glVertexStream2dv) then Exit;
  6794. glVertexStream3s := wglGetProcAddress('glVertexStream3s');
  6795. if not Assigned(glVertexStream3s) then Exit;
  6796. glVertexStream3i := wglGetProcAddress('glVertexStream3i');
  6797. if not Assigned(glVertexStream3i) then Exit;
  6798. glVertexStream3f := wglGetProcAddress('glVertexStream3f');
  6799. if not Assigned(glVertexStream3f) then Exit;
  6800. glVertexStream3d := wglGetProcAddress('glVertexStream3d');
  6801. if not Assigned(glVertexStream3d) then Exit;
  6802. glVertexStream3sv := wglGetProcAddress('glVertexStream3sv');
  6803. if not Assigned(glVertexStream3sv) then Exit;
  6804. glVertexStream3iv := wglGetProcAddress('glVertexStream3iv');
  6805. if not Assigned(glVertexStream3iv) then Exit;
  6806. glVertexStream3fv := wglGetProcAddress('glVertexStream3fv');
  6807. if not Assigned(glVertexStream3fv) then Exit;
  6808. glVertexStream3dv := wglGetProcAddress('glVertexStream3dv');
  6809. if not Assigned(glVertexStream3dv) then Exit;
  6810. glVertexStream4s := wglGetProcAddress('glVertexStream4s');
  6811. if not Assigned(glVertexStream4s) then Exit;
  6812. glVertexStream4i := wglGetProcAddress('glVertexStream4i');
  6813. if not Assigned(glVertexStream4i) then Exit;
  6814. glVertexStream4f := wglGetProcAddress('glVertexStream4f');
  6815. if not Assigned(glVertexStream4f) then Exit;
  6816. glVertexStream4d := wglGetProcAddress('glVertexStream4d');
  6817. if not Assigned(glVertexStream4d) then Exit;
  6818. glVertexStream4sv := wglGetProcAddress('glVertexStream4sv');
  6819. if not Assigned(glVertexStream4sv) then Exit;
  6820. glVertexStream4iv := wglGetProcAddress('glVertexStream4iv');
  6821. if not Assigned(glVertexStream4iv) then Exit;
  6822. glVertexStream4fv := wglGetProcAddress('glVertexStream4fv');
  6823. if not Assigned(glVertexStream4fv) then Exit;
  6824. glVertexStream4dv := wglGetProcAddress('glVertexStream4dv');
  6825. if not Assigned(glVertexStream4dv) then Exit;
  6826. glNormalStream3b := wglGetProcAddress('glNormalStream3b');
  6827. if not Assigned(glNormalStream3b) then Exit;
  6828. glNormalStream3s := wglGetProcAddress('glNormalStream3s');
  6829. if not Assigned(glNormalStream3s) then Exit;
  6830. glNormalStream3i := wglGetProcAddress('glNormalStream3i');
  6831. if not Assigned(glNormalStream3i) then Exit;
  6832. glNormalStream3f := wglGetProcAddress('glNormalStream3f');
  6833. if not Assigned(glNormalStream3f) then Exit;
  6834. glNormalStream3d := wglGetProcAddress('glNormalStream3d');
  6835. if not Assigned(glNormalStream3d) then Exit;
  6836. glNormalStream3bv := wglGetProcAddress('glNormalStream3bv');
  6837. if not Assigned(glNormalStream3bv) then Exit;
  6838. glNormalStream3sv := wglGetProcAddress('glNormalStream3sv');
  6839. if not Assigned(glNormalStream3sv) then Exit;
  6840. glNormalStream3iv := wglGetProcAddress('glNormalStream3iv');
  6841. if not Assigned(glNormalStream3iv) then Exit;
  6842. glNormalStream3fv := wglGetProcAddress('glNormalStream3fv');
  6843. if not Assigned(glNormalStream3fv) then Exit;
  6844. glNormalStream3dv := wglGetProcAddress('glNormalStream3dv');
  6845. if not Assigned(glNormalStream3dv) then Exit;
  6846. glClientActiveVertexStream := wglGetProcAddress('glClientActiveVertexStream');
  6847. if not Assigned(glClientActiveVertexStream) then Exit;
  6848. glVertexBlendEnvi := wglGetProcAddress('glVertexBlendEnvi');
  6849. if not Assigned(glVertexBlendEnvi) then Exit;
  6850. glVertexBlendEnvf := wglGetProcAddress('glVertexBlendEnvf');
  6851. if not Assigned(glVertexBlendEnvf) then Exit;
  6852. Result := TRUE;
  6853. end;
  6854. end;
  6855. {$IFDEF Windows}
  6856. function Load_WGL_I3D_image_buffer: Boolean;
  6857. var
  6858. extstring: AnsiString;
  6859. begin
  6860. Result := FALSE;
  6861. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  6862. if not Assigned(wglGetExtensionsStringARB) then Exit;
  6863. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  6864. if glext_ExtensionSupported('WGL_I3D_image_buffer', extstring) then
  6865. begin
  6866. wglCreateImageBufferI3D := wglGetProcAddress('wglCreateImageBufferI3D');
  6867. if not Assigned(wglCreateImageBufferI3D) then Exit;
  6868. wglDestroyImageBufferI3D := wglGetProcAddress('wglDestroyImageBufferI3D');
  6869. if not Assigned(wglDestroyImageBufferI3D) then Exit;
  6870. wglAssociateImageBufferEventsI3D := wglGetProcAddress('wglAssociateImageBufferEventsI3D');
  6871. if not Assigned(wglAssociateImageBufferEventsI3D) then Exit;
  6872. wglReleaseImageBufferEventsI3D := wglGetProcAddress('wglReleaseImageBufferEventsI3D');
  6873. if not Assigned(wglReleaseImageBufferEventsI3D) then Exit;
  6874. Result := TRUE;
  6875. end;
  6876. end;
  6877. function Load_WGL_I3D_swap_frame_lock: Boolean;
  6878. var
  6879. extstring: AnsiString;
  6880. begin
  6881. Result := FALSE;
  6882. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  6883. if not Assigned(wglGetExtensionsStringARB) then Exit;
  6884. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  6885. if glext_ExtensionSupported('WGL_I3D_swap_frame_lock', extstring) then
  6886. begin
  6887. wglEnableFrameLockI3D := wglGetProcAddress('wglEnableFrameLockI3D');
  6888. if not Assigned(wglEnableFrameLockI3D) then Exit;
  6889. wglDisableFrameLockI3D := wglGetProcAddress('wglDisableFrameLockI3D');
  6890. if not Assigned(wglDisableFrameLockI3D) then Exit;
  6891. wglIsEnabledFrameLockI3D := wglGetProcAddress('wglIsEnabledFrameLockI3D');
  6892. if not Assigned(wglIsEnabledFrameLockI3D) then Exit;
  6893. wglQueryFrameLockMasterI3D := wglGetProcAddress('wglQueryFrameLockMasterI3D');
  6894. if not Assigned(wglQueryFrameLockMasterI3D) then Exit;
  6895. Result := TRUE;
  6896. end;
  6897. end;
  6898. function Load_WGL_I3D_swap_frame_usage: Boolean;
  6899. var
  6900. extstring: AnsiString;
  6901. begin
  6902. Result := FALSE;
  6903. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  6904. if not Assigned(wglGetExtensionsStringARB) then Exit;
  6905. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  6906. if glext_ExtensionSupported('WGL_I3D_swap_frame_usage', extstring) then
  6907. begin
  6908. wglGetFrameUsageI3D := wglGetProcAddress('wglGetFrameUsageI3D');
  6909. if not Assigned(wglGetFrameUsageI3D) then Exit;
  6910. wglBeginFrameTrackingI3D := wglGetProcAddress('wglBeginFrameTrackingI3D');
  6911. if not Assigned(wglBeginFrameTrackingI3D) then Exit;
  6912. wglEndFrameTrackingI3D := wglGetProcAddress('wglEndFrameTrackingI3D');
  6913. if not Assigned(wglEndFrameTrackingI3D) then Exit;
  6914. wglQueryFrameTrackingI3D := wglGetProcAddress('wglQueryFrameTrackingI3D');
  6915. if not Assigned(wglQueryFrameTrackingI3D) then Exit;
  6916. Result := TRUE;
  6917. end;
  6918. end;
  6919. {$ENDIF}
  6920. function Load_GL_3DFX_texture_compression_FXT1: Boolean;
  6921. var
  6922. extstring: AnsiString;
  6923. begin
  6924. Result := FALSE;
  6925. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6926. if glext_ExtensionSupported('GL_3DFX_texture_compression_FXT1', extstring) then
  6927. begin
  6928. Result := TRUE;
  6929. end;
  6930. end;
  6931. function Load_GL_IBM_cull_vertex: Boolean;
  6932. var
  6933. extstring: AnsiString;
  6934. begin
  6935. Result := FALSE;
  6936. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6937. if glext_ExtensionSupported('GL_IBM_cull_vertex', extstring) then
  6938. begin
  6939. Result := TRUE;
  6940. end;
  6941. end;
  6942. function Load_GL_IBM_multimode_draw_arrays: Boolean;
  6943. var
  6944. extstring: AnsiString;
  6945. begin
  6946. Result := FALSE;
  6947. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6948. if glext_ExtensionSupported('GL_IBM_multimode_draw_arrays', extstring) then
  6949. begin
  6950. glMultiModeDrawArraysIBM := wglGetProcAddress('glMultiModeDrawArraysIBM');
  6951. if not Assigned(glMultiModeDrawArraysIBM) then Exit;
  6952. glMultiModeDrawElementsIBM := wglGetProcAddress('glMultiModeDrawElementsIBM');
  6953. if not Assigned(glMultiModeDrawElementsIBM) then Exit;
  6954. Result := TRUE;
  6955. end;
  6956. end;
  6957. function Load_GL_IBM_raster_pos_clip: Boolean;
  6958. var
  6959. extstring: AnsiString;
  6960. begin
  6961. Result := FALSE;
  6962. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6963. if glext_ExtensionSupported('GL_IBM_raster_pos_clip', extstring) then
  6964. begin
  6965. Result := TRUE;
  6966. end;
  6967. end;
  6968. function Load_GL_IBM_texture_mirrored_repeat: Boolean;
  6969. var
  6970. extstring: AnsiString;
  6971. begin
  6972. Result := FALSE;
  6973. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6974. if glext_ExtensionSupported('GL_IBM_texture_mirrored_repeat', extstring) then
  6975. begin
  6976. Result := TRUE;
  6977. end;
  6978. end;
  6979. function Load_GL_IBM_vertex_array_lists: Boolean;
  6980. var
  6981. extstring: AnsiString;
  6982. begin
  6983. Result := FALSE;
  6984. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  6985. if glext_ExtensionSupported('GL_IBM_vertex_array_lists', extstring) then
  6986. begin
  6987. glColorPointerListIBM := wglGetProcAddress('glColorPointerListIBM');
  6988. if not Assigned(glColorPointerListIBM) then Exit;
  6989. glSecondaryColorPointerListIBM := wglGetProcAddress('glSecondaryColorPointerListIBM');
  6990. if not Assigned(glSecondaryColorPointerListIBM) then Exit;
  6991. glEdgeFlagPointerListIBM := wglGetProcAddress('glEdgeFlagPointerListIBM');
  6992. if not Assigned(glEdgeFlagPointerListIBM) then Exit;
  6993. glFogCoordPointerListIBM := wglGetProcAddress('glFogCoordPointerListIBM');
  6994. if not Assigned(glFogCoordPointerListIBM) then Exit;
  6995. glNormalPointerListIBM := wglGetProcAddress('glNormalPointerListIBM');
  6996. if not Assigned(glNormalPointerListIBM) then Exit;
  6997. glTexCoordPointerListIBM := wglGetProcAddress('glTexCoordPointerListIBM');
  6998. if not Assigned(glTexCoordPointerListIBM) then Exit;
  6999. glVertexPointerListIBM := wglGetProcAddress('glVertexPointerListIBM');
  7000. if not Assigned(glVertexPointerListIBM) then Exit;
  7001. Result := TRUE;
  7002. end;
  7003. end;
  7004. function Load_GL_MESA_resize_buffers: Boolean;
  7005. var
  7006. extstring: AnsiString;
  7007. begin
  7008. Result := FALSE;
  7009. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7010. if glext_ExtensionSupported('GL_MESA_resize_buffers', extstring) then
  7011. begin
  7012. glResizeBuffersMESA := wglGetProcAddress('glResizeBuffersMESA');
  7013. if not Assigned(glResizeBuffersMESA) then Exit;
  7014. Result := TRUE;
  7015. end;
  7016. end;
  7017. function Load_GL_MESA_window_pos: Boolean;
  7018. var
  7019. extstring: AnsiString;
  7020. begin
  7021. Result := FALSE;
  7022. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7023. if glext_ExtensionSupported('GL_MESA_window_pos', extstring) then
  7024. begin
  7025. glWindowPos2dMESA := wglGetProcAddress('glWindowPos2dMESA');
  7026. if not Assigned(glWindowPos2dMESA) then Exit;
  7027. glWindowPos2fMESA := wglGetProcAddress('glWindowPos2fMESA');
  7028. if not Assigned(glWindowPos2fMESA) then Exit;
  7029. glWindowPos2iMESA := wglGetProcAddress('glWindowPos2iMESA');
  7030. if not Assigned(glWindowPos2iMESA) then Exit;
  7031. glWindowPos2sMESA := wglGetProcAddress('glWindowPos2sMESA');
  7032. if not Assigned(glWindowPos2sMESA) then Exit;
  7033. glWindowPos2ivMESA := wglGetProcAddress('glWindowPos2ivMESA');
  7034. if not Assigned(glWindowPos2ivMESA) then Exit;
  7035. glWindowPos2svMESA := wglGetProcAddress('glWindowPos2svMESA');
  7036. if not Assigned(glWindowPos2svMESA) then Exit;
  7037. glWindowPos2fvMESA := wglGetProcAddress('glWindowPos2fvMESA');
  7038. if not Assigned(glWindowPos2fvMESA) then Exit;
  7039. glWindowPos2dvMESA := wglGetProcAddress('glWindowPos2dvMESA');
  7040. if not Assigned(glWindowPos2dvMESA) then Exit;
  7041. glWindowPos3iMESA := wglGetProcAddress('glWindowPos3iMESA');
  7042. if not Assigned(glWindowPos3iMESA) then Exit;
  7043. glWindowPos3sMESA := wglGetProcAddress('glWindowPos3sMESA');
  7044. if not Assigned(glWindowPos3sMESA) then Exit;
  7045. glWindowPos3fMESA := wglGetProcAddress('glWindowPos3fMESA');
  7046. if not Assigned(glWindowPos3fMESA) then Exit;
  7047. glWindowPos3dMESA := wglGetProcAddress('glWindowPos3dMESA');
  7048. if not Assigned(glWindowPos3dMESA) then Exit;
  7049. glWindowPos3ivMESA := wglGetProcAddress('glWindowPos3ivMESA');
  7050. if not Assigned(glWindowPos3ivMESA) then Exit;
  7051. glWindowPos3svMESA := wglGetProcAddress('glWindowPos3svMESA');
  7052. if not Assigned(glWindowPos3svMESA) then Exit;
  7053. glWindowPos3fvMESA := wglGetProcAddress('glWindowPos3fvMESA');
  7054. if not Assigned(glWindowPos3fvMESA) then Exit;
  7055. glWindowPos3dvMESA := wglGetProcAddress('glWindowPos3dvMESA');
  7056. if not Assigned(glWindowPos3dvMESA) then Exit;
  7057. glWindowPos4iMESA := wglGetProcAddress('glWindowPos4iMESA');
  7058. if not Assigned(glWindowPos4iMESA) then Exit;
  7059. glWindowPos4sMESA := wglGetProcAddress('glWindowPos4sMESA');
  7060. if not Assigned(glWindowPos4sMESA) then Exit;
  7061. glWindowPos4fMESA := wglGetProcAddress('glWindowPos4fMESA');
  7062. if not Assigned(glWindowPos4fMESA) then Exit;
  7063. glWindowPos4dMESA := wglGetProcAddress('glWindowPos4dMESA');
  7064. if not Assigned(glWindowPos4dMESA) then Exit;
  7065. glWindowPos4ivMESA := wglGetProcAddress('glWindowPos4ivMESA');
  7066. if not Assigned(glWindowPos4ivMESA) then Exit;
  7067. glWindowPos4svMESA := wglGetProcAddress('glWindowPos4svMESA');
  7068. if not Assigned(glWindowPos4svMESA) then Exit;
  7069. glWindowPos4fvMESA := wglGetProcAddress('glWindowPos4fvMESA');
  7070. if not Assigned(glWindowPos4fvMESA) then Exit;
  7071. glWindowPos4dvMESA := wglGetProcAddress('glWindowPos4dvMESA');
  7072. if not Assigned(glWindowPos4dvMESA) then Exit;
  7073. Result := TRUE;
  7074. end;
  7075. end;
  7076. function Load_GL_OML_interlace: Boolean;
  7077. var
  7078. extstring: AnsiString;
  7079. begin
  7080. Result := FALSE;
  7081. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7082. if glext_ExtensionSupported('GL_OML_interlace', extstring) then
  7083. begin
  7084. Result := TRUE;
  7085. end;
  7086. end;
  7087. function Load_GL_OML_resample: Boolean;
  7088. var
  7089. extstring: AnsiString;
  7090. begin
  7091. Result := FALSE;
  7092. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7093. if glext_ExtensionSupported('GL_OML_resample', extstring) then
  7094. begin
  7095. Result := TRUE;
  7096. end;
  7097. end;
  7098. function Load_GL_OML_subsample: Boolean;
  7099. var
  7100. extstring: AnsiString;
  7101. begin
  7102. Result := FALSE;
  7103. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7104. if glext_ExtensionSupported('GL_OML_subsample', extstring) then
  7105. begin
  7106. Result := TRUE;
  7107. end;
  7108. end;
  7109. function Load_GL_SGIS_generate_mipmap: Boolean;
  7110. var
  7111. extstring: AnsiString;
  7112. begin
  7113. Result := FALSE;
  7114. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7115. if glext_ExtensionSupported('GL_SGIS_generate_mipmap', extstring) then
  7116. begin
  7117. Result := TRUE;
  7118. end;
  7119. end;
  7120. function Load_GL_SGIS_multisample: Boolean;
  7121. var
  7122. extstring: AnsiString;
  7123. begin
  7124. Result := FALSE;
  7125. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7126. if glext_ExtensionSupported('GL_SGIS_multisample', extstring) then
  7127. begin
  7128. glSampleMaskSGIS := wglGetProcAddress('glSampleMaskSGIS');
  7129. if not Assigned(glSampleMaskSGIS) then Exit;
  7130. glSamplePatternSGIS := wglGetProcAddress('glSamplePatternSGIS');
  7131. if not Assigned(glSamplePatternSGIS) then Exit;
  7132. Result := TRUE;
  7133. end;
  7134. end;
  7135. function Load_GL_SGIS_pixel_texture: Boolean;
  7136. var
  7137. extstring: AnsiString;
  7138. begin
  7139. Result := FALSE;
  7140. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7141. if glext_ExtensionSupported('GL_SGIS_pixel_texture', extstring) then
  7142. begin
  7143. glPixelTexGenParameteriSGIS := wglGetProcAddress('glPixelTexGenParameteriSGIS');
  7144. if not Assigned(glPixelTexGenParameteriSGIS) then Exit;
  7145. glPixelTexGenParameterfSGIS := wglGetProcAddress('glPixelTexGenParameterfSGIS');
  7146. if not Assigned(glPixelTexGenParameterfSGIS) then Exit;
  7147. glGetPixelTexGenParameterivSGIS := wglGetProcAddress('glGetPixelTexGenParameterivSGIS');
  7148. if not Assigned(glGetPixelTexGenParameterivSGIS) then Exit;
  7149. glGetPixelTexGenParameterfvSGIS := wglGetProcAddress('glGetPixelTexGenParameterfvSGIS');
  7150. if not Assigned(glGetPixelTexGenParameterfvSGIS) then Exit;
  7151. Result := TRUE;
  7152. end;
  7153. end;
  7154. function Load_GL_SGIS_texture_border_clamp: Boolean;
  7155. var
  7156. extstring: AnsiString;
  7157. begin
  7158. Result := FALSE;
  7159. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7160. if glext_ExtensionSupported('GL_SGIS_texture_border_clamp', extstring) then
  7161. begin
  7162. Result := TRUE;
  7163. end;
  7164. end;
  7165. function Load_GL_SGIS_texture_color_mask: Boolean;
  7166. var
  7167. extstring: AnsiString;
  7168. begin
  7169. Result := FALSE;
  7170. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7171. if glext_ExtensionSupported('GL_SGIS_texture_color_mask', extstring) then
  7172. begin
  7173. glTextureColorMaskSGIS := wglGetProcAddress('glTextureColorMaskSGIS');
  7174. if not Assigned(glTextureColorMaskSGIS) then Exit;
  7175. Result := TRUE;
  7176. end;
  7177. end;
  7178. function Load_GL_SGIS_texture_edge_clamp: Boolean;
  7179. var
  7180. extstring: AnsiString;
  7181. begin
  7182. Result := FALSE;
  7183. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7184. if glext_ExtensionSupported('GL_SGIS_texture_edge_clamp', extstring) then
  7185. begin
  7186. Result := TRUE;
  7187. end;
  7188. end;
  7189. function Load_GL_SGIS_texture_lod: Boolean;
  7190. var
  7191. extstring: AnsiString;
  7192. begin
  7193. Result := FALSE;
  7194. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7195. if glext_ExtensionSupported('GL_SGIS_texture_lod', extstring) then
  7196. begin
  7197. Result := TRUE;
  7198. end;
  7199. end;
  7200. function Load_GL_SGIS_depth_texture: Boolean;
  7201. var
  7202. extstring: AnsiString;
  7203. begin
  7204. Result := FALSE;
  7205. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7206. if glext_ExtensionSupported('GL_SGIS_depth_texture', extstring) then
  7207. begin
  7208. Result := TRUE;
  7209. end;
  7210. end;
  7211. function Load_GL_SGIX_fog_offset: Boolean;
  7212. var
  7213. extstring: AnsiString;
  7214. begin
  7215. Result := FALSE;
  7216. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7217. if glext_ExtensionSupported('GL_SGIX_fog_offset', extstring) then
  7218. begin
  7219. Result := TRUE;
  7220. end;
  7221. end;
  7222. function Load_GL_SGIX_interlace: Boolean;
  7223. var
  7224. extstring: AnsiString;
  7225. begin
  7226. Result := FALSE;
  7227. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7228. if glext_ExtensionSupported('GL_SGIX_interlace', extstring) then
  7229. begin
  7230. Result := TRUE;
  7231. end;
  7232. end;
  7233. function Load_GL_SGIX_shadow_ambient: Boolean;
  7234. var
  7235. extstring: AnsiString;
  7236. begin
  7237. Result := FALSE;
  7238. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7239. if glext_ExtensionSupported('GL_SGIX_shadow_ambient', extstring) then
  7240. begin
  7241. Result := TRUE;
  7242. end;
  7243. end;
  7244. function Load_GL_SGI_color_matrix: Boolean;
  7245. var
  7246. extstring: AnsiString;
  7247. begin
  7248. Result := FALSE;
  7249. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7250. if glext_ExtensionSupported('GL_SGI_color_matrix', extstring) then
  7251. begin
  7252. Result := TRUE;
  7253. end;
  7254. end;
  7255. function Load_GL_SGI_color_table: Boolean;
  7256. var
  7257. extstring: AnsiString;
  7258. begin
  7259. Result := FALSE;
  7260. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7261. if glext_ExtensionSupported('GL_SGI_color_table', extstring) then
  7262. begin
  7263. glColorTableSGI := wglGetProcAddress('glColorTableSGI');
  7264. if not Assigned(glColorTableSGI) then Exit;
  7265. glCopyColorTableSGI := wglGetProcAddress('glCopyColorTableSGI');
  7266. if not Assigned(glCopyColorTableSGI) then Exit;
  7267. glColorTableParameterivSGI := wglGetProcAddress('glColorTableParameterivSGI');
  7268. if not Assigned(glColorTableParameterivSGI) then Exit;
  7269. glColorTableParameterfvSGI := wglGetProcAddress('glColorTableParameterfvSGI');
  7270. if not Assigned(glColorTableParameterfvSGI) then Exit;
  7271. glGetColorTableSGI := wglGetProcAddress('glGetColorTableSGI');
  7272. if not Assigned(glGetColorTableSGI) then Exit;
  7273. glGetColorTableParameterivSGI := wglGetProcAddress('glGetColorTableParameterivSGI');
  7274. if not Assigned(glGetColorTableParameterivSGI) then Exit;
  7275. glGetColorTableParameterfvSGI := wglGetProcAddress('glGetColorTableParameterfvSGI');
  7276. if not Assigned(glGetColorTableParameterfvSGI) then Exit;
  7277. Result := TRUE;
  7278. end;
  7279. end;
  7280. function Load_GL_SGI_texture_color_table: Boolean;
  7281. var
  7282. extstring: AnsiString;
  7283. begin
  7284. Result := FALSE;
  7285. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7286. if glext_ExtensionSupported('GL_SGI_texture_color_table', extstring) then
  7287. begin
  7288. Result := TRUE;
  7289. end;
  7290. end;
  7291. function Load_GL_SUN_vertex: Boolean;
  7292. var
  7293. extstring: AnsiString;
  7294. begin
  7295. Result := FALSE;
  7296. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7297. if glext_ExtensionSupported('GL_SUN_vertex', extstring) then
  7298. begin
  7299. glColor4ubVertex2fSUN := wglGetProcAddress('glColor4ubVertex2fSUN');
  7300. if not Assigned(glColor4ubVertex2fSUN) then Exit;
  7301. glColor4ubVertex2fvSUN := wglGetProcAddress('glColor4ubVertex2fvSUN');
  7302. if not Assigned(glColor4ubVertex2fvSUN) then Exit;
  7303. glColor4ubVertex3fSUN := wglGetProcAddress('glColor4ubVertex3fSUN');
  7304. if not Assigned(glColor4ubVertex3fSUN) then Exit;
  7305. glColor4ubVertex3fvSUN := wglGetProcAddress('glColor4ubVertex3fvSUN');
  7306. if not Assigned(glColor4ubVertex3fvSUN) then Exit;
  7307. glColor3fVertex3fSUN := wglGetProcAddress('glColor3fVertex3fSUN');
  7308. if not Assigned(glColor3fVertex3fSUN) then Exit;
  7309. glColor3fVertex3fvSUN := wglGetProcAddress('glColor3fVertex3fvSUN');
  7310. if not Assigned(glColor3fVertex3fvSUN) then Exit;
  7311. glNormal3fVertex3fSUN := wglGetProcAddress('glNormal3fVertex3fSUN');
  7312. if not Assigned(glNormal3fVertex3fSUN) then Exit;
  7313. glNormal3fVertex3fvSUN := wglGetProcAddress('glNormal3fVertex3fvSUN');
  7314. if not Assigned(glNormal3fVertex3fvSUN) then Exit;
  7315. glColor4fNormal3fVertex3fSUN := wglGetProcAddress('glColor4fNormal3fVertex3fSUN');
  7316. if not Assigned(glColor4fNormal3fVertex3fSUN) then Exit;
  7317. glColor4fNormal3fVertex3fvSUN := wglGetProcAddress('glColor4fNormal3fVertex3fvSUN');
  7318. if not Assigned(glColor4fNormal3fVertex3fvSUN) then Exit;
  7319. glTexCoord2fVertex3fSUN := wglGetProcAddress('glTexCoord2fVertex3fSUN');
  7320. if not Assigned(glTexCoord2fVertex3fSUN) then Exit;
  7321. glTexCoord2fVertex3fvSUN := wglGetProcAddress('glTexCoord2fVertex3fvSUN');
  7322. if not Assigned(glTexCoord2fVertex3fvSUN) then Exit;
  7323. glTexCoord4fVertex4fSUN := wglGetProcAddress('glTexCoord4fVertex4fSUN');
  7324. if not Assigned(glTexCoord4fVertex4fSUN) then Exit;
  7325. glTexCoord4fVertex4fvSUN := wglGetProcAddress('glTexCoord4fVertex4fvSUN');
  7326. if not Assigned(glTexCoord4fVertex4fvSUN) then Exit;
  7327. glTexCoord2fColor4ubVertex3fSUN := wglGetProcAddress('glTexCoord2fColor4ubVertex3fSUN');
  7328. if not Assigned(glTexCoord2fColor4ubVertex3fSUN) then Exit;
  7329. glTexCoord2fColor4ubVertex3fvSUN := wglGetProcAddress('glTexCoord2fColor4ubVertex3fvSUN');
  7330. if not Assigned(glTexCoord2fColor4ubVertex3fvSUN) then Exit;
  7331. glTexCoord2fColor3fVertex3fSUN := wglGetProcAddress('glTexCoord2fColor3fVertex3fSUN');
  7332. if not Assigned(glTexCoord2fColor3fVertex3fSUN) then Exit;
  7333. glTexCoord2fColor3fVertex3fvSUN := wglGetProcAddress('glTexCoord2fColor3fVertex3fvSUN');
  7334. if not Assigned(glTexCoord2fColor3fVertex3fvSUN) then Exit;
  7335. glTexCoord2fNormal3fVertex3fSUN := wglGetProcAddress('glTexCoord2fNormal3fVertex3fSUN');
  7336. if not Assigned(glTexCoord2fNormal3fVertex3fSUN) then Exit;
  7337. glTexCoord2fNormal3fVertex3fvSUN := wglGetProcAddress('glTexCoord2fNormal3fVertex3fvSUN');
  7338. if not Assigned(glTexCoord2fNormal3fVertex3fvSUN) then Exit;
  7339. glTexCoord2fColor4fNormal3fVertex3fSUN := wglGetProcAddress('glTexCoord2fColor4fNormal3fVertex3fSUN');
  7340. if not Assigned(glTexCoord2fColor4fNormal3fVertex3fSUN) then Exit;
  7341. glTexCoord2fColor4fNormal3fVertex3fvSUN := wglGetProcAddress('glTexCoord2fColor4fNormal3fVertex3fvSUN');
  7342. if not Assigned(glTexCoord2fColor4fNormal3fVertex3fvSUN) then Exit;
  7343. glTexCoord4fColor4fNormal3fVertex4fSUN := wglGetProcAddress('glTexCoord4fColor4fNormal3fVertex4fSUN');
  7344. if not Assigned(glTexCoord4fColor4fNormal3fVertex4fSUN) then Exit;
  7345. glTexCoord4fColor4fNormal3fVertex4fvSUN := wglGetProcAddress('glTexCoord4fColor4fNormal3fVertex4fvSUN');
  7346. if not Assigned(glTexCoord4fColor4fNormal3fVertex4fvSUN) then Exit;
  7347. glReplacementCodeuiVertex3fSUN := wglGetProcAddress('glReplacementCodeuiVertex3fSUN');
  7348. if not Assigned(glReplacementCodeuiVertex3fSUN) then Exit;
  7349. glReplacementCodeuiVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiVertex3fvSUN');
  7350. if not Assigned(glReplacementCodeuiVertex3fvSUN) then Exit;
  7351. glReplacementCodeuiColor4ubVertex3fSUN := wglGetProcAddress('glReplacementCodeuiColor4ubVertex3fSUN');
  7352. if not Assigned(glReplacementCodeuiColor4ubVertex3fSUN) then Exit;
  7353. glReplacementCodeuiColor4ubVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiColor4ubVertex3fvSUN');
  7354. if not Assigned(glReplacementCodeuiColor4ubVertex3fvSUN) then Exit;
  7355. glReplacementCodeuiColor3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiColor3fVertex3fSUN');
  7356. if not Assigned(glReplacementCodeuiColor3fVertex3fSUN) then Exit;
  7357. glReplacementCodeuiColor3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiColor3fVertex3fvSUN');
  7358. if not Assigned(glReplacementCodeuiColor3fVertex3fvSUN) then Exit;
  7359. glReplacementCodeuiNormal3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiNormal3fVertex3fSUN');
  7360. if not Assigned(glReplacementCodeuiNormal3fVertex3fSUN) then Exit;
  7361. glReplacementCodeuiNormal3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiNormal3fVertex3fvSUN');
  7362. if not Assigned(glReplacementCodeuiNormal3fVertex3fvSUN) then Exit;
  7363. glReplacementCodeuiColor4fNormal3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiColor4fNormal3fVertex3fSUN');
  7364. if not Assigned(glReplacementCodeuiColor4fNormal3fVertex3fSUN) then Exit;
  7365. glReplacementCodeuiColor4fNormal3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiColor4fNormal3fVertex3fvSUN');
  7366. if not Assigned(glReplacementCodeuiColor4fNormal3fVertex3fvSUN) then Exit;
  7367. glReplacementCodeuiTexCoord2fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fVertex3fSUN');
  7368. if not Assigned(glReplacementCodeuiTexCoord2fVertex3fSUN) then Exit;
  7369. glReplacementCodeuiTexCoord2fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fVertex3fvSUN');
  7370. if not Assigned(glReplacementCodeuiTexCoord2fVertex3fvSUN) then Exit;
  7371. glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN');
  7372. if not Assigned(glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN) then Exit;
  7373. glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN');
  7374. if not Assigned(glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN) then Exit;
  7375. glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN');
  7376. if not Assigned(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN) then Exit;
  7377. glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN := wglGetProcAddress('glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN');
  7378. if not Assigned(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN) then Exit;
  7379. Result := TRUE;
  7380. end;
  7381. end;
  7382. function Load_GL_ARB_fragment_program: Boolean;
  7383. var
  7384. extstring: AnsiString;
  7385. begin
  7386. Result := FALSE;
  7387. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7388. if glext_ExtensionSupported('GL_ARB_fragment_program', extstring) then
  7389. begin
  7390. glProgramStringARB := wglGetProcAddress('glProgramStringARB');
  7391. if not Assigned(glProgramStringARB) then Exit;
  7392. glBindProgramARB := wglGetProcAddress('glBindProgramARB');
  7393. if not Assigned(glBindProgramARB) then Exit;
  7394. glDeleteProgramsARB := wglGetProcAddress('glDeleteProgramsARB');
  7395. if not Assigned(glDeleteProgramsARB) then Exit;
  7396. glGenProgramsARB := wglGetProcAddress('glGenProgramsARB');
  7397. if not Assigned(glGenProgramsARB) then Exit;
  7398. glProgramEnvParameter4dARB := wglGetProcAddress('glProgramEnvParameter4dARB');
  7399. if not Assigned(glProgramEnvParameter4dARB) then Exit;
  7400. glProgramEnvParameter4dvARB := wglGetProcAddress('glProgramEnvParameter4dvARB');
  7401. if not Assigned(glProgramEnvParameter4dvARB) then Exit;
  7402. glProgramEnvParameter4fARB := wglGetProcAddress('glProgramEnvParameter4fARB');
  7403. if not Assigned(glProgramEnvParameter4fARB) then Exit;
  7404. glProgramEnvParameter4fvARB := wglGetProcAddress('glProgramEnvParameter4fvARB');
  7405. if not Assigned(glProgramEnvParameter4fvARB) then Exit;
  7406. glProgramLocalParameter4dARB := wglGetProcAddress('glProgramLocalParameter4dARB');
  7407. if not Assigned(glProgramLocalParameter4dARB) then Exit;
  7408. glProgramLocalParameter4dvARB := wglGetProcAddress('glProgramLocalParameter4dvARB');
  7409. if not Assigned(glProgramLocalParameter4dvARB) then Exit;
  7410. glProgramLocalParameter4fARB := wglGetProcAddress('glProgramLocalParameter4fARB');
  7411. if not Assigned(glProgramLocalParameter4fARB) then Exit;
  7412. glProgramLocalParameter4fvARB := wglGetProcAddress('glProgramLocalParameter4fvARB');
  7413. if not Assigned(glProgramLocalParameter4fvARB) then Exit;
  7414. glGetProgramEnvParameterdvARB := wglGetProcAddress('glGetProgramEnvParameterdvARB');
  7415. if not Assigned(glGetProgramEnvParameterdvARB) then Exit;
  7416. glGetProgramEnvParameterfvARB := wglGetProcAddress('glGetProgramEnvParameterfvARB');
  7417. if not Assigned(glGetProgramEnvParameterfvARB) then Exit;
  7418. glGetProgramLocalParameterdvARB := wglGetProcAddress('glGetProgramLocalParameterdvARB');
  7419. if not Assigned(glGetProgramLocalParameterdvARB) then Exit;
  7420. glGetProgramLocalParameterfvARB := wglGetProcAddress('glGetProgramLocalParameterfvARB');
  7421. if not Assigned(glGetProgramLocalParameterfvARB) then Exit;
  7422. glGetProgramivARB := wglGetProcAddress('glGetProgramivARB');
  7423. if not Assigned(glGetProgramivARB) then Exit;
  7424. glGetProgramStringARB := wglGetProcAddress('glGetProgramStringARB');
  7425. if not Assigned(glGetProgramStringARB) then Exit;
  7426. glIsProgramARB := wglGetProcAddress('glIsProgramARB');
  7427. if not Assigned(glIsProgramARB) then Exit;
  7428. Result := TRUE;
  7429. end;
  7430. end;
  7431. function Load_GL_ATI_text_fragment_shader: Boolean;
  7432. var
  7433. extstring: AnsiString;
  7434. begin
  7435. Result := FALSE;
  7436. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7437. if glext_ExtensionSupported('GL_ATI_text_fragment_shader', extstring) then
  7438. begin
  7439. Result := TRUE;
  7440. end;
  7441. end;
  7442. function Load_GL_APPLE_client_storage: Boolean;
  7443. var
  7444. extstring: AnsiString;
  7445. begin
  7446. Result := FALSE;
  7447. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7448. if glext_ExtensionSupported('GL_APPLE_client_storage', extstring) then
  7449. begin
  7450. Result := TRUE;
  7451. end;
  7452. end;
  7453. function Load_GL_APPLE_element_array: Boolean;
  7454. var
  7455. extstring: AnsiString;
  7456. begin
  7457. Result := FALSE;
  7458. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7459. if glext_ExtensionSupported('GL_APPLE_element_array', extstring) then
  7460. begin
  7461. glElementPointerAPPLE := wglGetProcAddress('glElementPointerAPPLE');
  7462. if not Assigned(glElementPointerAPPLE) then Exit;
  7463. glDrawElementArrayAPPLE := wglGetProcAddress('glDrawElementArrayAPPLE');
  7464. if not Assigned(glDrawElementArrayAPPLE) then Exit;
  7465. glDrawRangeElementArrayAPPLE := wglGetProcAddress('glDrawRangeElementArrayAPPLE');
  7466. if not Assigned(glDrawRangeElementArrayAPPLE) then Exit;
  7467. glMultiDrawElementArrayAPPLE := wglGetProcAddress('glMultiDrawElementArrayAPPLE');
  7468. if not Assigned(glMultiDrawElementArrayAPPLE) then Exit;
  7469. glMultiDrawRangeElementArrayAPPLE := wglGetProcAddress('glMultiDrawRangeElementArrayAPPLE');
  7470. if not Assigned(glMultiDrawRangeElementArrayAPPLE) then Exit;
  7471. Result := TRUE;
  7472. end;
  7473. end;
  7474. function Load_GL_APPLE_fence: Boolean;
  7475. var
  7476. extstring: AnsiString;
  7477. begin
  7478. Result := FALSE;
  7479. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7480. if glext_ExtensionSupported('GL_APPLE_fence', extstring) then
  7481. begin
  7482. glGenFencesAPPLE := wglGetProcAddress('glGenFencesAPPLE');
  7483. if not Assigned(glGenFencesAPPLE) then Exit;
  7484. glDeleteFencesAPPLE := wglGetProcAddress('glDeleteFencesAPPLE');
  7485. if not Assigned(glDeleteFencesAPPLE) then Exit;
  7486. glSetFenceAPPLE := wglGetProcAddress('glSetFenceAPPLE');
  7487. if not Assigned(glSetFenceAPPLE) then Exit;
  7488. glIsFenceAPPLE := wglGetProcAddress('glIsFenceAPPLE');
  7489. if not Assigned(glIsFenceAPPLE) then Exit;
  7490. glTestFenceAPPLE := wglGetProcAddress('glTestFenceAPPLE');
  7491. if not Assigned(glTestFenceAPPLE) then Exit;
  7492. glFinishFenceAPPLE := wglGetProcAddress('glFinishFenceAPPLE');
  7493. if not Assigned(glFinishFenceAPPLE) then Exit;
  7494. glTestObjectAPPLE := wglGetProcAddress('glTestObjectAPPLE');
  7495. if not Assigned(glTestObjectAPPLE) then Exit;
  7496. glFinishObjectAPPLE := wglGetProcAddress('glFinishObjectAPPLE');
  7497. if not Assigned(glFinishObjectAPPLE) then Exit;
  7498. Result := TRUE;
  7499. end;
  7500. end;
  7501. function Load_GL_APPLE_vertex_array_object: Boolean;
  7502. var
  7503. extstring: AnsiString;
  7504. begin
  7505. Result := FALSE;
  7506. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7507. if glext_ExtensionSupported('GL_APPLE_vertex_array_object', extstring) then
  7508. begin
  7509. glBindVertexArrayAPPLE := wglGetProcAddress('glBindVertexArrayAPPLE');
  7510. if not Assigned(glBindVertexArrayAPPLE) then Exit;
  7511. glDeleteVertexArraysAPPLE := wglGetProcAddress('glDeleteVertexArraysAPPLE');
  7512. if not Assigned(glDeleteVertexArraysAPPLE) then Exit;
  7513. glGenVertexArraysAPPLE := wglGetProcAddress('glGenVertexArraysAPPLE');
  7514. if not Assigned(glGenVertexArraysAPPLE) then Exit;
  7515. glIsVertexArrayAPPLE := wglGetProcAddress('glIsVertexArrayAPPLE');
  7516. if not Assigned(glIsVertexArrayAPPLE) then Exit;
  7517. Result := TRUE;
  7518. end;
  7519. end;
  7520. function Load_GL_APPLE_vertex_array_range: Boolean;
  7521. var
  7522. extstring: AnsiString;
  7523. begin
  7524. Result := FALSE;
  7525. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7526. if glext_ExtensionSupported('GL_APPLE_vertex_array_range', extstring) then
  7527. begin
  7528. glVertexArrayRangeAPPLE := wglGetProcAddress('glVertexArrayRangeAPPLE');
  7529. if not Assigned(glVertexArrayRangeAPPLE) then Exit;
  7530. glFlushVertexArrayRangeAPPLE := wglGetProcAddress('glFlushVertexArrayRangeAPPLE');
  7531. if not Assigned(glFlushVertexArrayRangeAPPLE) then Exit;
  7532. glVertexArrayParameteriAPPLE := wglGetProcAddress('glVertexArrayParameteriAPPLE');
  7533. if not Assigned(glVertexArrayParameteriAPPLE) then Exit;
  7534. Result := TRUE;
  7535. end;
  7536. end;
  7537. function load_GL_ARB_vertex_buffer_object : boolean;
  7538. var extstring:AnsiString;
  7539. begin
  7540. Result:=false;
  7541. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7542. if glext_ExtensionSupported('GL_ARB_vertex_buffer_object',extstring) then
  7543. begin
  7544. glBindBufferARB := wglGetProcAddress('glBindBufferARB');
  7545. if not Assigned(glBindBufferARB) then Exit;
  7546. glDeleteBuffersARB := wglGetProcAddress('glDeleteBuffersARB');
  7547. if not Assigned(glDeleteBuffersARB) then Exit;
  7548. glGenBuffersARB := wglGetProcAddress('glGenBuffersARB');
  7549. if not Assigned(glGenBuffersARB) then Exit;
  7550. glIsBufferARB := wglGetProcAddress('glIsBufferARB');
  7551. if not Assigned(glIsBufferARB) then Exit;
  7552. glBufferDataARB := wglGetProcAddress('glBufferDataARB');
  7553. if not Assigned(glBufferDataARB) then Exit;
  7554. glBufferSubDataARB := wglGetProcAddress('glBufferSubDataARB');
  7555. if not Assigned(glBufferSubDataARB) then Exit;
  7556. glGetBufferSubDataARB := wglGetProcAddress('glGetBufferSubDataARB');
  7557. if not Assigned(glGetBufferSubDataARB) then Exit;
  7558. glMapBufferARB := wglGetProcAddress('glMapBufferARB');
  7559. if not Assigned(glMapBufferARB) then Exit;
  7560. glUnmapBufferARB := wglGetProcAddress('glUnmapBufferARB');
  7561. if not Assigned(glMapBufferARB) then Exit;
  7562. glGetBufferParameterivARB := wglGetProcAddress('glGetBufferParameterivARB');
  7563. if not Assigned(glGetBufferParameterivARB) then Exit;
  7564. glGetBufferPointervARB := wglGetProcAddress('glGetBufferPointervARB');
  7565. if not Assigned(glGetBufferPointervARB) then Exit;
  7566. Result:=true;
  7567. end;
  7568. end;
  7569. {$IFDEF Windows}
  7570. function Load_WGL_ARB_pixel_format: Boolean;
  7571. var
  7572. extstring: AnsiString;
  7573. begin
  7574. Result := FALSE;
  7575. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7576. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7577. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7578. if glext_ExtensionSupported('WGL_ARB_pixel_format', extstring) then
  7579. begin
  7580. wglGetPixelFormatAttribivARB := wglGetProcAddress('wglGetPixelFormatAttribivARB');
  7581. if not Assigned(wglGetPixelFormatAttribivARB) then Exit;
  7582. wglGetPixelFormatAttribfvARB := wglGetProcAddress('wglGetPixelFormatAttribfvARB');
  7583. if not Assigned(wglGetPixelFormatAttribfvARB) then Exit;
  7584. wglChoosePixelFormatARB := wglGetProcAddress('wglChoosePixelFormatARB');
  7585. if not Assigned(wglChoosePixelFormatARB) then Exit;
  7586. Result := TRUE;
  7587. end;
  7588. end;
  7589. function Load_WGL_ARB_make_current_read: Boolean;
  7590. var
  7591. extstring: AnsiString;
  7592. begin
  7593. Result := FALSE;
  7594. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7595. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7596. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7597. if glext_ExtensionSupported('WGL_ARB_make_current_read', extstring) then
  7598. begin
  7599. wglMakeContextCurrentARB := wglGetProcAddress('wglMakeContextCurrentARB');
  7600. if not Assigned(wglMakeContextCurrentARB) then Exit;
  7601. wglGetCurrentReadDCARB := wglGetProcAddress('wglGetCurrentReadDCARB');
  7602. if not Assigned(wglGetCurrentReadDCARB) then Exit;
  7603. Result := TRUE;
  7604. end;
  7605. end;
  7606. function Load_WGL_ARB_pbuffer: Boolean;
  7607. var
  7608. extstring: AnsiString;
  7609. begin
  7610. Result := FALSE;
  7611. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7612. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7613. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7614. if glext_ExtensionSupported('WGL_ARB_pbuffer', extstring) then
  7615. begin
  7616. wglCreatePbufferARB := wglGetProcAddress('wglCreatePbufferARB');
  7617. if not Assigned(wglCreatePbufferARB) then Exit;
  7618. wglGetPbufferDCARB := wglGetProcAddress('wglGetPbufferDCARB');
  7619. if not Assigned(wglGetPbufferDCARB) then Exit;
  7620. wglReleasePbufferDCARB := wglGetProcAddress('wglReleasePbufferDCARB');
  7621. if not Assigned(wglReleasePbufferDCARB) then Exit;
  7622. wglDestroyPbufferARB := wglGetProcAddress('wglDestroyPbufferARB');
  7623. if not Assigned(wglDestroyPbufferARB) then Exit;
  7624. wglQueryPbufferARB := wglGetProcAddress('wglQueryPbufferARB');
  7625. if not Assigned(wglQueryPbufferARB) then Exit;
  7626. Result := TRUE;
  7627. end;
  7628. end;
  7629. function Load_WGL_EXT_swap_control: Boolean;
  7630. var
  7631. extstring: AnsiString;
  7632. begin
  7633. Result := FALSE;
  7634. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7635. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7636. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7637. if glext_ExtensionSupported('WGL_EXT_swap_control', extstring) then
  7638. begin
  7639. wglSwapIntervalEXT := wglGetProcAddress('wglSwapIntervalEXT');
  7640. if not Assigned(wglSwapIntervalEXT) then Exit;
  7641. wglGetSwapIntervalEXT := wglGetProcAddress('wglGetSwapIntervalEXT');
  7642. if not Assigned(wglGetSwapIntervalEXT) then Exit;
  7643. Result := TRUE;
  7644. end;
  7645. end;
  7646. function Load_WGL_ARB_render_texture: Boolean;
  7647. var
  7648. extstring: AnsiString;
  7649. begin
  7650. Result := FALSE;
  7651. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7652. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7653. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7654. if glext_ExtensionSupported('WGL_ARB_render_texture', extstring) then
  7655. begin
  7656. wglBindTexImageARB := wglGetProcAddress('wglBindTexImageARB');
  7657. if not Assigned(wglBindTexImageARB) then Exit;
  7658. wglReleaseTexImageARB := wglGetProcAddress('wglReleaseTexImageARB');
  7659. if not Assigned(wglReleaseTexImageARB) then Exit;
  7660. wglSetPbufferAttribARB := wglGetProcAddress('wglSetPbufferAttribARB');
  7661. if not Assigned(wglSetPbufferAttribARB) then Exit;
  7662. Result := TRUE;
  7663. end;
  7664. end;
  7665. function Load_WGL_EXT_extensions_string: Boolean;
  7666. var
  7667. extstring: AnsiString;
  7668. begin
  7669. Result := FALSE;
  7670. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7671. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7672. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7673. if glext_ExtensionSupported('WGL_EXT_extensions_string', extstring) then
  7674. begin
  7675. wglGetExtensionsStringEXT := wglGetProcAddress('wglGetExtensionsStringEXT');
  7676. if not Assigned(wglGetExtensionsStringEXT) then Exit;
  7677. Result := TRUE;
  7678. end;
  7679. end;
  7680. function Load_WGL_EXT_make_current_read: Boolean;
  7681. var
  7682. extstring: AnsiString;
  7683. begin
  7684. Result := FALSE;
  7685. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7686. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7687. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7688. if glext_ExtensionSupported('WGL_EXT_make_current_read', extstring) then
  7689. begin
  7690. wglMakeContextCurrentEXT := wglGetProcAddress('wglMakeContextCurrentEXT');
  7691. if not Assigned(wglMakeContextCurrentEXT) then Exit;
  7692. wglGetCurrentReadDCEXT := wglGetProcAddress('wglGetCurrentReadDCEXT');
  7693. if not Assigned(wglGetCurrentReadDCEXT) then Exit;
  7694. Result := TRUE;
  7695. end;
  7696. end;
  7697. function Load_WGL_EXT_pbuffer: Boolean;
  7698. var
  7699. extstring: AnsiString;
  7700. begin
  7701. Result := FALSE;
  7702. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7703. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7704. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7705. if glext_ExtensionSupported('WGL_EXT_pbuffer', extstring) then
  7706. begin
  7707. wglCreatePbufferEXT := wglGetProcAddress('wglCreatePbufferEXT');
  7708. if not Assigned(wglCreatePbufferEXT) then Exit;
  7709. wglGetPbufferDCEXT := wglGetProcAddress('wglGetPbufferDCEXT');
  7710. if not Assigned(wglGetPbufferDCEXT) then Exit;
  7711. wglReleasePbufferDCEXT := wglGetProcAddress('wglReleasePbufferDCEXT');
  7712. if not Assigned(wglReleasePbufferDCEXT) then Exit;
  7713. wglDestroyPbufferEXT := wglGetProcAddress('wglDestroyPbufferEXT');
  7714. if not Assigned(wglDestroyPbufferEXT) then Exit;
  7715. wglQueryPbufferEXT := wglGetProcAddress('wglQueryPbufferEXT');
  7716. if not Assigned(wglQueryPbufferEXT) then Exit;
  7717. Result := TRUE;
  7718. end;
  7719. end;
  7720. function Load_WGL_EXT_pixel_format: Boolean;
  7721. var
  7722. extstring: AnsiString;
  7723. begin
  7724. Result := FALSE;
  7725. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7726. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7727. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7728. if glext_ExtensionSupported('WGL_EXT_pixel_format', extstring) then
  7729. begin
  7730. wglGetPixelFormatAttribivEXT := wglGetProcAddress('wglGetPixelFormatAttribivEXT');
  7731. if not Assigned(wglGetPixelFormatAttribivEXT) then Exit;
  7732. wglGetPixelFormatAttribfvEXT := wglGetProcAddress('wglGetPixelFormatAttribfvEXT');
  7733. if not Assigned(wglGetPixelFormatAttribfvEXT) then Exit;
  7734. wglChoosePixelFormatEXT := wglGetProcAddress('wglChoosePixelFormatEXT');
  7735. if not Assigned(wglChoosePixelFormatEXT) then Exit;
  7736. Result := TRUE;
  7737. end;
  7738. end;
  7739. function Load_WGL_I3D_digital_video_control: Boolean;
  7740. var
  7741. extstring: AnsiString;
  7742. begin
  7743. Result := FALSE;
  7744. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7745. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7746. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7747. if glext_ExtensionSupported('WGL_I3D_digital_video_control', extstring) then
  7748. begin
  7749. wglGetDigitalVideoParametersI3D := wglGetProcAddress('wglGetDigitalVideoParametersI3D');
  7750. if not Assigned(wglGetDigitalVideoParametersI3D) then Exit;
  7751. wglSetDigitalVideoParametersI3D := wglGetProcAddress('wglSetDigitalVideoParametersI3D');
  7752. if not Assigned(wglSetDigitalVideoParametersI3D) then Exit;
  7753. Result := TRUE;
  7754. end;
  7755. end;
  7756. function Load_WGL_I3D_gamma: Boolean;
  7757. var
  7758. extstring: AnsiString;
  7759. begin
  7760. Result := FALSE;
  7761. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7762. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7763. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7764. if glext_ExtensionSupported('WGL_I3D_gamma', extstring) then
  7765. begin
  7766. wglGetGammaTableParametersI3D := wglGetProcAddress('wglGetGammaTableParametersI3D');
  7767. if not Assigned(wglGetGammaTableParametersI3D) then Exit;
  7768. wglSetGammaTableParametersI3D := wglGetProcAddress('wglSetGammaTableParametersI3D');
  7769. if not Assigned(wglSetGammaTableParametersI3D) then Exit;
  7770. wglGetGammaTableI3D := wglGetProcAddress('wglGetGammaTableI3D');
  7771. if not Assigned(wglGetGammaTableI3D) then Exit;
  7772. wglSetGammaTableI3D := wglGetProcAddress('wglSetGammaTableI3D');
  7773. if not Assigned(wglSetGammaTableI3D) then Exit;
  7774. Result := TRUE;
  7775. end;
  7776. end;
  7777. function Load_WGL_I3D_genlock: Boolean;
  7778. var
  7779. extstring: AnsiString;
  7780. begin
  7781. Result := FALSE;
  7782. wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7783. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7784. extstring := AnsiString(PAnsiChar(wglGetExtensionsStringARB(wglGetCurrentDC)));
  7785. if glext_ExtensionSupported('WGL_I3D_genlock', extstring) then
  7786. begin
  7787. wglEnableGenlockI3D := wglGetProcAddress('wglEnableGenlockI3D');
  7788. if not Assigned(wglEnableGenlockI3D) then Exit;
  7789. wglDisableGenlockI3D := wglGetProcAddress('wglDisableGenlockI3D');
  7790. if not Assigned(wglDisableGenlockI3D) then Exit;
  7791. wglIsEnabledGenlockI3D := wglGetProcAddress('wglIsEnabledGenlockI3D');
  7792. if not Assigned(wglIsEnabledGenlockI3D) then Exit;
  7793. wglGenlockSourceI3D := wglGetProcAddress('wglGenlockSourceI3D');
  7794. if not Assigned(wglGenlockSourceI3D) then Exit;
  7795. wglGetGenlockSourceI3D := wglGetProcAddress('wglGetGenlockSourceI3D');
  7796. if not Assigned(wglGetGenlockSourceI3D) then Exit;
  7797. wglGenlockSourceEdgeI3D := wglGetProcAddress('wglGenlockSourceEdgeI3D');
  7798. if not Assigned(wglGenlockSourceEdgeI3D) then Exit;
  7799. wglGetGenlockSourceEdgeI3D := wglGetProcAddress('wglGetGenlockSourceEdgeI3D');
  7800. if not Assigned(wglGetGenlockSourceEdgeI3D) then Exit;
  7801. wglGenlockSampleRateI3D := wglGetProcAddress('wglGenlockSampleRateI3D');
  7802. if not Assigned(wglGenlockSampleRateI3D) then Exit;
  7803. wglGetGenlockSampleRateI3D := wglGetProcAddress('wglGetGenlockSampleRateI3D');
  7804. if not Assigned(wglGetGenlockSampleRateI3D) then Exit;
  7805. wglGenlockSourceDelayI3D := wglGetProcAddress('wglGenlockSourceDelayI3D');
  7806. if not Assigned(wglGenlockSourceDelayI3D) then Exit;
  7807. wglGetGenlockSourceDelayI3D := wglGetProcAddress('wglGetGenlockSourceDelayI3D');
  7808. if not Assigned(wglGetGenlockSourceDelayI3D) then Exit;
  7809. wglQueryGenlockMaxSourceDelayI3D := wglGetProcAddress('wglQueryGenlockMaxSourceDelayI3D');
  7810. if not Assigned(wglQueryGenlockMaxSourceDelayI3D) then Exit;
  7811. Result := TRUE;
  7812. end;
  7813. end;
  7814. {$ENDIF}
  7815. function Load_GL_ARB_matrix_palette: Boolean;
  7816. var
  7817. extstring: AnsiString;
  7818. begin
  7819. Result := FALSE;
  7820. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7821. if glext_ExtensionSupported('GL_ARB_matrix_palette', extstring) then
  7822. begin
  7823. glCurrentPaletteMatrixARB := wglGetProcAddress('glCurrentPaletteMatrixARB');
  7824. if not Assigned(glCurrentPaletteMatrixARB) then Exit;
  7825. glMatrixIndexubvARB := wglGetProcAddress('glMatrixIndexubvARB');
  7826. if not Assigned(glMatrixIndexubvARB) then Exit;
  7827. glMatrixIndexusvARB := wglGetProcAddress('glMatrixIndexusvARB');
  7828. if not Assigned(glMatrixIndexusvARB) then Exit;
  7829. glMatrixIndexuivARB := wglGetProcAddress('glMatrixIndexuivARB');
  7830. if not Assigned(glMatrixIndexuivARB) then Exit;
  7831. glMatrixIndexPointerARB := wglGetProcAddress('glMatrixIndexPointerARB');
  7832. if not Assigned(glMatrixIndexPointerARB) then Exit;
  7833. Result := TRUE;
  7834. end;
  7835. end;
  7836. function Load_GL_NV_element_array: Boolean;
  7837. var
  7838. extstring: AnsiString;
  7839. begin
  7840. Result := FALSE;
  7841. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7842. if glext_ExtensionSupported('GL_NV_element_array', extstring) then
  7843. begin
  7844. glElementPointerNV := wglGetProcAddress('glElementPointerNV');
  7845. if not Assigned(glElementPointerNV) then Exit;
  7846. glDrawElementArrayNV := wglGetProcAddress('glDrawElementArrayNV');
  7847. if not Assigned(glDrawElementArrayNV) then Exit;
  7848. glDrawRangeElementArrayNV := wglGetProcAddress('glDrawRangeElementArrayNV');
  7849. if not Assigned(glDrawRangeElementArrayNV) then Exit;
  7850. glMultiDrawElementArrayNV := wglGetProcAddress('glMultiDrawElementArrayNV');
  7851. if not Assigned(glMultiDrawElementArrayNV) then Exit;
  7852. glMultiDrawRangeElementArrayNV := wglGetProcAddress('glMultiDrawRangeElementArrayNV');
  7853. if not Assigned(glMultiDrawRangeElementArrayNV) then Exit;
  7854. Result := TRUE;
  7855. end;
  7856. end;
  7857. function Load_GL_NV_float_buffer: Boolean;
  7858. var
  7859. extstring: AnsiString;
  7860. begin
  7861. Result := FALSE;
  7862. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7863. if glext_ExtensionSupported('GL_NV_float_buffer', extstring) then
  7864. begin
  7865. Result := TRUE;
  7866. end;
  7867. end;
  7868. function Load_GL_NV_fragment_program: Boolean;
  7869. var
  7870. extstring: AnsiString;
  7871. begin
  7872. Result := FALSE;
  7873. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7874. if glext_ExtensionSupported('GL_NV_fragment_program', extstring) then
  7875. begin
  7876. glProgramNamedParameter4fNV := wglGetProcAddress('glProgramNamedParameter4fNV');
  7877. if not Assigned(glProgramNamedParameter4fNV) then Exit;
  7878. glProgramNamedParameter4dNV := wglGetProcAddress('glProgramNamedParameter4dNV');
  7879. if not Assigned(glProgramNamedParameter4dNV) then Exit;
  7880. glGetProgramNamedParameterfvNV := wglGetProcAddress('glGetProgramNamedParameterfvNV');
  7881. if not Assigned(glGetProgramNamedParameterfvNV) then Exit;
  7882. glGetProgramNamedParameterdvNV := wglGetProcAddress('glGetProgramNamedParameterdvNV');
  7883. if not Assigned(glGetProgramNamedParameterdvNV) then Exit;
  7884. glProgramLocalParameter4dARB := wglGetProcAddress('glProgramLocalParameter4dARB');
  7885. if not Assigned(glProgramLocalParameter4dARB) then Exit;
  7886. glProgramLocalParameter4dvARB := wglGetProcAddress('glProgramLocalParameter4dvARB');
  7887. if not Assigned(glProgramLocalParameter4dvARB) then Exit;
  7888. glProgramLocalParameter4fARB := wglGetProcAddress('glProgramLocalParameter4fARB');
  7889. if not Assigned(glProgramLocalParameter4fARB) then Exit;
  7890. glProgramLocalParameter4fvARB := wglGetProcAddress('glProgramLocalParameter4fvARB');
  7891. if not Assigned(glProgramLocalParameter4fvARB) then Exit;
  7892. glGetProgramLocalParameterdvARB := wglGetProcAddress('glGetProgramLocalParameterdvARB');
  7893. if not Assigned(glGetProgramLocalParameterdvARB) then Exit;
  7894. glGetProgramLocalParameterfvARB := wglGetProcAddress('glGetProgramLocalParameterfvARB');
  7895. if not Assigned(glGetProgramLocalParameterfvARB) then Exit;
  7896. Result := TRUE;
  7897. end;
  7898. end;
  7899. function Load_GL_NV_primitive_restart: Boolean;
  7900. var
  7901. extstring: AnsiString;
  7902. begin
  7903. Result := FALSE;
  7904. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7905. if glext_ExtensionSupported('GL_NV_primitive_restart', extstring) then
  7906. begin
  7907. glPrimitiveRestartNV := wglGetProcAddress('glPrimitiveRestartNV');
  7908. if not Assigned(glPrimitiveRestartNV) then Exit;
  7909. glPrimitiveRestartIndexNV := wglGetProcAddress('glPrimitiveRestartIndexNV');
  7910. if not Assigned(glPrimitiveRestartIndexNV) then Exit;
  7911. Result := TRUE;
  7912. end;
  7913. end;
  7914. function Load_GL_NV_vertex_program2: Boolean;
  7915. var
  7916. extstring: AnsiString;
  7917. begin
  7918. Result := FALSE;
  7919. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7920. if glext_ExtensionSupported('GL_NV_vertex_program2', extstring) then
  7921. begin
  7922. Result := TRUE;
  7923. end;
  7924. end;
  7925. {$IFDEF Windows}
  7926. function Load_WGL_NV_render_texture_rectangle: Boolean;
  7927. var
  7928. extstring: AnsiString;
  7929. begin
  7930. Result := FALSE;
  7931. @wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  7932. if not Assigned(wglGetExtensionsStringARB) then Exit;
  7933. extstring := wglGetExtensionsStringARB(wglGetCurrentDC);
  7934. if glext_ExtensionSupported('WGL_NV_render_texture_rectangle', extstring) then
  7935. begin
  7936. Result := TRUE;
  7937. end;
  7938. end;
  7939. {$ENDIF}
  7940. function Load_GL_NV_pixel_data_range: Boolean;
  7941. var
  7942. extstring: AnsiString;
  7943. begin
  7944. Result := FALSE;
  7945. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7946. if glext_ExtensionSupported('GL_NV_pixel_data_range', extstring) then
  7947. begin
  7948. @glPixelDataRangeNV := wglGetProcAddress('glPixelDataRangeNV');
  7949. if not Assigned(glPixelDataRangeNV) then Exit;
  7950. @glFlushPixelDataRangeNV := wglGetProcAddress('glFlushPixelDataRangeNV');
  7951. if not Assigned(glFlushPixelDataRangeNV) then Exit;
  7952. {$IFDEF Windows}
  7953. @wglAllocateMemoryNV := wglGetProcAddress('wglAllocateMemoryNV');
  7954. if not Assigned(wglAllocateMemoryNV) then Exit;
  7955. @wglFreeMemoryNV := wglGetProcAddress('wglFreeMemoryNV');
  7956. if not Assigned(wglFreeMemoryNV) then Exit;
  7957. {$ENDIF}
  7958. Result := TRUE;
  7959. end;
  7960. end;
  7961. function Load_GL_EXT_texture_rectangle: Boolean;
  7962. var
  7963. extstring: AnsiString;
  7964. begin
  7965. Result := FALSE;
  7966. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7967. if glext_ExtensionSupported('GL_EXT_texture_rectangle', extstring) then
  7968. begin
  7969. Result := TRUE;
  7970. end;
  7971. end;
  7972. function Load_GL_S3_s3tc: Boolean;
  7973. var
  7974. extstring: AnsiString;
  7975. begin
  7976. Result := FALSE;
  7977. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7978. if glext_ExtensionSupported('GL_S3_s3tc', extstring) then
  7979. begin
  7980. Result := TRUE;
  7981. end;
  7982. end;
  7983. function Load_GL_ATI_draw_buffers: Boolean;
  7984. var
  7985. extstring: AnsiString;
  7986. begin
  7987. Result := FALSE;
  7988. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  7989. if glext_ExtensionSupported('GL_ATI_draw_buffers', extstring) then
  7990. begin
  7991. @glDrawBuffersATI := wglGetProcAddress('glDrawBuffersATI');
  7992. if not Assigned(glDrawBuffersATI) then Exit;
  7993. Result := TRUE;
  7994. end;
  7995. end;
  7996. {$IFDEF Windows}
  7997. function Load_WGL_ATI_pixel_format_float: Boolean;
  7998. var
  7999. extstring: AnsiString;
  8000. begin
  8001. Result := FALSE;
  8002. @wglGetExtensionsStringARB := wglGetProcAddress('wglGetExtensionsStringARB');
  8003. if not Assigned(wglGetExtensionsStringARB) then Exit;
  8004. extstring := wglGetExtensionsStringARB(wglGetCurrentDC);
  8005. if glext_ExtensionSupported('WGL_ATI_pixel_format_float', extstring) then
  8006. begin
  8007. Result := TRUE;
  8008. end;
  8009. end;
  8010. {$ENDIF}
  8011. function Load_GL_ATI_texture_env_combine3: Boolean;
  8012. var
  8013. extstring: AnsiString;
  8014. begin
  8015. Result := FALSE;
  8016. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8017. if glext_ExtensionSupported('GL_ATI_texture_env_combine3', extstring) then
  8018. begin
  8019. Result := TRUE;
  8020. end;
  8021. end;
  8022. function Load_GL_ATI_texture_float: Boolean;
  8023. var
  8024. extstring: AnsiString;
  8025. begin
  8026. Result := FALSE;
  8027. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8028. if glext_ExtensionSupported('GL_ATI_texture_float', extstring) then
  8029. begin
  8030. Result := TRUE;
  8031. end;
  8032. end;
  8033. function Load_GL_NV_texture_expand_normal: Boolean;
  8034. var
  8035. extstring: AnsiString;
  8036. begin
  8037. Result := FALSE;
  8038. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8039. if glext_ExtensionSupported('GL_NV_texture_expand_normal', extstring) then
  8040. begin
  8041. Result := TRUE;
  8042. end;
  8043. end;
  8044. function Load_GL_NV_half_float: Boolean;
  8045. var
  8046. extstring: AnsiString;
  8047. begin
  8048. Result := FALSE;
  8049. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8050. if glext_ExtensionSupported('GL_NV_half_float', extstring) then
  8051. begin
  8052. @glVertex2hNV := wglGetProcAddress('glVertex2hNV');
  8053. if not Assigned(glVertex2hNV) then Exit;
  8054. @glVertex2hvNV := wglGetProcAddress('glVertex2hvNV');
  8055. if not Assigned(glVertex2hvNV) then Exit;
  8056. @glVertex3hNV := wglGetProcAddress('glVertex3hNV');
  8057. if not Assigned(glVertex3hNV) then Exit;
  8058. @glVertex3hvNV := wglGetProcAddress('glVertex3hvNV');
  8059. if not Assigned(glVertex3hvNV) then Exit;
  8060. @glVertex4hNV := wglGetProcAddress('glVertex4hNV');
  8061. if not Assigned(glVertex4hNV) then Exit;
  8062. @glVertex4hvNV := wglGetProcAddress('glVertex4hvNV');
  8063. if not Assigned(glVertex4hvNV) then Exit;
  8064. @glNormal3hNV := wglGetProcAddress('glNormal3hNV');
  8065. if not Assigned(glNormal3hNV) then Exit;
  8066. @glNormal3hvNV := wglGetProcAddress('glNormal3hvNV');
  8067. if not Assigned(glNormal3hvNV) then Exit;
  8068. @glColor3hNV := wglGetProcAddress('glColor3hNV');
  8069. if not Assigned(glColor3hNV) then Exit;
  8070. @glColor3hvNV := wglGetProcAddress('glColor3hvNV');
  8071. if not Assigned(glColor3hvNV) then Exit;
  8072. @glColor4hNV := wglGetProcAddress('glColor4hNV');
  8073. if not Assigned(glColor4hNV) then Exit;
  8074. @glColor4hvNV := wglGetProcAddress('glColor4hvNV');
  8075. if not Assigned(glColor4hvNV) then Exit;
  8076. @glTexCoord1hNV := wglGetProcAddress('glTexCoord1hNV');
  8077. if not Assigned(glTexCoord1hNV) then Exit;
  8078. @glTexCoord1hvNV := wglGetProcAddress('glTexCoord1hvNV');
  8079. if not Assigned(glTexCoord1hvNV) then Exit;
  8080. @glTexCoord2hNV := wglGetProcAddress('glTexCoord2hNV');
  8081. if not Assigned(glTexCoord2hNV) then Exit;
  8082. @glTexCoord2hvNV := wglGetProcAddress('glTexCoord2hvNV');
  8083. if not Assigned(glTexCoord2hvNV) then Exit;
  8084. @glTexCoord3hNV := wglGetProcAddress('glTexCoord3hNV');
  8085. if not Assigned(glTexCoord3hNV) then Exit;
  8086. @glTexCoord3hvNV := wglGetProcAddress('glTexCoord3hvNV');
  8087. if not Assigned(glTexCoord3hvNV) then Exit;
  8088. @glTexCoord4hNV := wglGetProcAddress('glTexCoord4hNV');
  8089. if not Assigned(glTexCoord4hNV) then Exit;
  8090. @glTexCoord4hvNV := wglGetProcAddress('glTexCoord4hvNV');
  8091. if not Assigned(glTexCoord4hvNV) then Exit;
  8092. @glMultiTexCoord1hNV := wglGetProcAddress('glMultiTexCoord1hNV');
  8093. if not Assigned(glMultiTexCoord1hNV) then Exit;
  8094. @glMultiTexCoord1hvNV := wglGetProcAddress('glMultiTexCoord1hvNV');
  8095. if not Assigned(glMultiTexCoord1hvNV) then Exit;
  8096. @glMultiTexCoord2hNV := wglGetProcAddress('glMultiTexCoord2hNV');
  8097. if not Assigned(glMultiTexCoord2hNV) then Exit;
  8098. @glMultiTexCoord2hvNV := wglGetProcAddress('glMultiTexCoord2hvNV');
  8099. if not Assigned(glMultiTexCoord2hvNV) then Exit;
  8100. @glMultiTexCoord3hNV := wglGetProcAddress('glMultiTexCoord3hNV');
  8101. if not Assigned(glMultiTexCoord3hNV) then Exit;
  8102. @glMultiTexCoord3hvNV := wglGetProcAddress('glMultiTexCoord3hvNV');
  8103. if not Assigned(glMultiTexCoord3hvNV) then Exit;
  8104. @glMultiTexCoord4hNV := wglGetProcAddress('glMultiTexCoord4hNV');
  8105. if not Assigned(glMultiTexCoord4hNV) then Exit;
  8106. @glMultiTexCoord4hvNV := wglGetProcAddress('glMultiTexCoord4hvNV');
  8107. if not Assigned(glMultiTexCoord4hvNV) then Exit;
  8108. @glFogCoordhNV := wglGetProcAddress('glFogCoordhNV');
  8109. if not Assigned(glFogCoordhNV) then Exit;
  8110. @glFogCoordhvNV := wglGetProcAddress('glFogCoordhvNV');
  8111. if not Assigned(glFogCoordhvNV) then Exit;
  8112. @glSecondaryColor3hNV := wglGetProcAddress('glSecondaryColor3hNV');
  8113. if not Assigned(glSecondaryColor3hNV) then Exit;
  8114. @glSecondaryColor3hvNV := wglGetProcAddress('glSecondaryColor3hvNV');
  8115. if not Assigned(glSecondaryColor3hvNV) then Exit;
  8116. @glVertexWeighthNV := wglGetProcAddress('glVertexWeighthNV');
  8117. if not Assigned(glVertexWeighthNV) then Exit;
  8118. @glVertexWeighthvNV := wglGetProcAddress('glVertexWeighthvNV');
  8119. if not Assigned(glVertexWeighthvNV) then Exit;
  8120. @glVertexAttrib1hNV := wglGetProcAddress('glVertexAttrib1hNV');
  8121. if not Assigned(glVertexAttrib1hNV) then Exit;
  8122. @glVertexAttrib1hvNV := wglGetProcAddress('glVertexAttrib1hvNV');
  8123. if not Assigned(glVertexAttrib1hvNV) then Exit;
  8124. @glVertexAttrib2hNV := wglGetProcAddress('glVertexAttrib2hNV');
  8125. if not Assigned(glVertexAttrib2hNV) then Exit;
  8126. @glVertexAttrib2hvNV := wglGetProcAddress('glVertexAttrib2hvNV');
  8127. if not Assigned(glVertexAttrib2hvNV) then Exit;
  8128. @glVertexAttrib3hNV := wglGetProcAddress('glVertexAttrib3hNV');
  8129. if not Assigned(glVertexAttrib3hNV) then Exit;
  8130. @glVertexAttrib3hvNV := wglGetProcAddress('glVertexAttrib3hvNV');
  8131. if not Assigned(glVertexAttrib3hvNV) then Exit;
  8132. @glVertexAttrib4hNV := wglGetProcAddress('glVertexAttrib4hNV');
  8133. if not Assigned(glVertexAttrib4hNV) then Exit;
  8134. @glVertexAttrib4hvNV := wglGetProcAddress('glVertexAttrib4hvNV');
  8135. if not Assigned(glVertexAttrib4hvNV) then Exit;
  8136. @glVertexAttribs1hvNV := wglGetProcAddress('glVertexAttribs1hvNV');
  8137. if not Assigned(glVertexAttribs1hvNV) then Exit;
  8138. @glVertexAttribs2hvNV := wglGetProcAddress('glVertexAttribs2hvNV');
  8139. if not Assigned(glVertexAttribs2hvNV) then Exit;
  8140. @glVertexAttribs3hvNV := wglGetProcAddress('glVertexAttribs3hvNV');
  8141. if not Assigned(glVertexAttribs3hvNV) then Exit;
  8142. @glVertexAttribs4hvNV := wglGetProcAddress('glVertexAttribs4hvNV');
  8143. if not Assigned(glVertexAttribs4hvNV) then Exit;
  8144. Result := TRUE;
  8145. end;
  8146. end;
  8147. function Load_GL_ATI_map_object_buffer: Boolean;
  8148. var
  8149. extstring: AnsiString;
  8150. begin
  8151. Result := FALSE;
  8152. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8153. if glext_ExtensionSupported('GL_ATI_map_object_buffer', extstring) then
  8154. begin
  8155. @glMapObjectBufferATI := wglGetProcAddress('glMapObjectBufferATI');
  8156. if not Assigned(glMapObjectBufferATI) then Exit;
  8157. @glUnmapObjectBufferATI := wglGetProcAddress('glUnmapObjectBufferATI');
  8158. if not Assigned(glUnmapObjectBufferATI) then Exit;
  8159. Result := TRUE;
  8160. end;
  8161. end;
  8162. function Load_GL_ATI_separate_stencil: Boolean;
  8163. var
  8164. extstring: AnsiString;
  8165. begin
  8166. Result := FALSE;
  8167. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8168. if glext_ExtensionSupported('GL_ATI_separate_stencil', extstring) then
  8169. begin
  8170. @glStencilOpSeparateATI := wglGetProcAddress('glStencilOpSeparateATI');
  8171. if not Assigned(glStencilOpSeparateATI) then Exit;
  8172. @glStencilFuncSeparateATI := wglGetProcAddress('glStencilFuncSeparateATI');
  8173. if not Assigned(glStencilFuncSeparateATI) then Exit;
  8174. Result := TRUE;
  8175. end;
  8176. end;
  8177. function Load_GL_ATI_vertex_attrib_array_object: Boolean;
  8178. var
  8179. extstring: AnsiString;
  8180. begin
  8181. Result := FALSE;
  8182. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8183. if glext_ExtensionSupported('GL_ATI_vertex_attrib_array_object', extstring) then
  8184. begin
  8185. @glVertexAttribArrayObjectATI := wglGetProcAddress('glVertexAttribArrayObjectATI');
  8186. if not Assigned(glVertexAttribArrayObjectATI) then Exit;
  8187. @glGetVertexAttribArrayObjectfvATI := wglGetProcAddress('glGetVertexAttribArrayObjectfvATI');
  8188. if not Assigned(glGetVertexAttribArrayObjectfvATI) then Exit;
  8189. @glGetVertexAttribArrayObjectivATI := wglGetProcAddress('glGetVertexAttribArrayObjectivATI');
  8190. if not Assigned(glGetVertexAttribArrayObjectivATI) then Exit;
  8191. Result := TRUE;
  8192. end;
  8193. end;
  8194. function Load_GL_ARB_occlusion_query: Boolean;
  8195. var
  8196. extstring: AnsiString;
  8197. begin
  8198. Result := FALSE;
  8199. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8200. if glext_ExtensionSupported('GL_ARB_occlusion_query', extstring) then
  8201. begin
  8202. @glGenQueriesARB := wglGetProcAddress('glGenQueriesARB');
  8203. if not Assigned(glGenQueriesARB) then Exit;
  8204. @glDeleteQueriesARB := wglGetProcAddress('glDeleteQueriesARB');
  8205. if not Assigned(glDeleteQueriesARB) then Exit;
  8206. @glIsQueryARB := wglGetProcAddress('glIsQueryARB');
  8207. if not Assigned(glIsQueryARB) then Exit;
  8208. @glBeginQueryARB := wglGetProcAddress('glBeginQueryARB');
  8209. if not Assigned(glBeginQueryARB) then Exit;
  8210. @glEndQueryARB := wglGetProcAddress('glEndQueryARB');
  8211. if not Assigned(glEndQueryARB) then Exit;
  8212. @glGetQueryivARB := wglGetProcAddress('glGetQueryivARB');
  8213. if not Assigned(glGetQueryivARB) then Exit;
  8214. @glGetQueryObjectivARB := wglGetProcAddress('glGetQueryObjectivARB');
  8215. if not Assigned(glGetQueryObjectivARB) then Exit;
  8216. @glGetQueryObjectuivARB := wglGetProcAddress('glGetQueryObjectuivARB');
  8217. if not Assigned(glGetQueryObjectuivARB) then Exit;
  8218. Result := TRUE;
  8219. end;
  8220. end;
  8221. function Load_GL_ARB_shader_objects: Boolean;
  8222. var
  8223. extstring: AnsiString;
  8224. begin
  8225. Result := FALSE;
  8226. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8227. if glext_ExtensionSupported('GL_ARB_shader_objects', extstring) then
  8228. begin
  8229. @glDeleteObjectARB := wglGetProcAddress('glDeleteObjectARB');
  8230. if not Assigned(glDeleteObjectARB) then Exit;
  8231. @glGetHandleARB := wglGetProcAddress('glGetHandleARB');
  8232. if not Assigned(glGetHandleARB) then Exit;
  8233. @glDetachObjectARB := wglGetProcAddress('glDetachObjectARB');
  8234. if not Assigned(glDetachObjectARB) then Exit;
  8235. @glCreateShaderObjectARB := wglGetProcAddress('glCreateShaderObjectARB');
  8236. if not Assigned(glCreateShaderObjectARB) then Exit;
  8237. @glShaderSourceARB := wglGetProcAddress('glShaderSourceARB');
  8238. if not Assigned(glShaderSourceARB) then Exit;
  8239. @glCompileShaderARB := wglGetProcAddress('glCompileShaderARB');
  8240. if not Assigned(glCompileShaderARB) then Exit;
  8241. @glCreateProgramObjectARB := wglGetProcAddress('glCreateProgramObjectARB');
  8242. if not Assigned(glCreateProgramObjectARB) then Exit;
  8243. @glAttachObjectARB := wglGetProcAddress('glAttachObjectARB');
  8244. if not Assigned(glAttachObjectARB) then Exit;
  8245. @glLinkProgramARB := wglGetProcAddress('glLinkProgramARB');
  8246. if not Assigned(glLinkProgramARB) then Exit;
  8247. @glUseProgramObjectARB := wglGetProcAddress('glUseProgramObjectARB');
  8248. if not Assigned(glUseProgramObjectARB) then Exit;
  8249. @glValidateProgramARB := wglGetProcAddress('glValidateProgramARB');
  8250. if not Assigned(glValidateProgramARB) then Exit;
  8251. @glUniform1fARB := wglGetProcAddress('glUniform1fARB');
  8252. if not Assigned(glUniform1fARB) then Exit;
  8253. @glUniform2fARB := wglGetProcAddress('glUniform2fARB');
  8254. if not Assigned(glUniform2fARB) then Exit;
  8255. @glUniform3fARB := wglGetProcAddress('glUniform3fARB');
  8256. if not Assigned(glUniform3fARB) then Exit;
  8257. @glUniform4fARB := wglGetProcAddress('glUniform4fARB');
  8258. if not Assigned(glUniform4fARB) then Exit;
  8259. @glUniform1iARB := wglGetProcAddress('glUniform1iARB');
  8260. if not Assigned(glUniform1iARB) then Exit;
  8261. @glUniform2iARB := wglGetProcAddress('glUniform2iARB');
  8262. if not Assigned(glUniform2iARB) then Exit;
  8263. @glUniform3iARB := wglGetProcAddress('glUniform3iARB');
  8264. if not Assigned(glUniform3iARB) then Exit;
  8265. @glUniform4iARB := wglGetProcAddress('glUniform4iARB');
  8266. if not Assigned(glUniform4iARB) then Exit;
  8267. @glUniform1fvARB := wglGetProcAddress('glUniform1fvARB');
  8268. if not Assigned(glUniform1fvARB) then Exit;
  8269. @glUniform2fvARB := wglGetProcAddress('glUniform2fvARB');
  8270. if not Assigned(glUniform2fvARB) then Exit;
  8271. @glUniform3fvARB := wglGetProcAddress('glUniform3fvARB');
  8272. if not Assigned(glUniform3fvARB) then Exit;
  8273. @glUniform4fvARB := wglGetProcAddress('glUniform4fvARB');
  8274. if not Assigned(glUniform4fvARB) then Exit;
  8275. @glUniform1ivARB := wglGetProcAddress('glUniform1ivARB');
  8276. if not Assigned(glUniform1ivARB) then Exit;
  8277. @glUniform2ivARB := wglGetProcAddress('glUniform2ivARB');
  8278. if not Assigned(glUniform2ivARB) then Exit;
  8279. @glUniform3ivARB := wglGetProcAddress('glUniform3ivARB');
  8280. if not Assigned(glUniform3ivARB) then Exit;
  8281. @glUniform4ivARB := wglGetProcAddress('glUniform4ivARB');
  8282. if not Assigned(glUniform4ivARB) then Exit;
  8283. @glUniformMatrix2fvARB := wglGetProcAddress('glUniformMatrix2fvARB');
  8284. if not Assigned(glUniformMatrix2fvARB) then Exit;
  8285. @glUniformMatrix3fvARB := wglGetProcAddress('glUniformMatrix3fvARB');
  8286. if not Assigned(glUniformMatrix3fvARB) then Exit;
  8287. @glUniformMatrix4fvARB := wglGetProcAddress('glUniformMatrix4fvARB');
  8288. if not Assigned(glUniformMatrix4fvARB) then Exit;
  8289. @glGetObjectParameterfvARB := wglGetProcAddress('glGetObjectParameterfvARB');
  8290. if not Assigned(glGetObjectParameterfvARB) then Exit;
  8291. @glGetObjectParameterivARB := wglGetProcAddress('glGetObjectParameterivARB');
  8292. if not Assigned(glGetObjectParameterivARB) then Exit;
  8293. @glGetInfoLogARB := wglGetProcAddress('glGetInfoLogARB');
  8294. if not Assigned(glGetInfoLogARB) then Exit;
  8295. @glGetAttachedObjectsARB := wglGetProcAddress('glGetAttachedObjectsARB');
  8296. if not Assigned(glGetAttachedObjectsARB) then Exit;
  8297. @glGetUniformLocationARB := wglGetProcAddress('glGetUniformLocationARB');
  8298. if not Assigned(glGetUniformLocationARB) then Exit;
  8299. @glGetActiveUniformARB := wglGetProcAddress('glGetActiveUniformARB');
  8300. if not Assigned(glGetActiveUniformARB) then Exit;
  8301. @glGetUniformfvARB := wglGetProcAddress('glGetUniformfvARB');
  8302. if not Assigned(glGetUniformfvARB) then Exit;
  8303. @glGetUniformivARB := wglGetProcAddress('glGetUniformivARB');
  8304. if not Assigned(glGetUniformivARB) then Exit;
  8305. @glGetShaderSourceARB := wglGetProcAddress('glGetShaderSourceARB');
  8306. if not Assigned(glGetShaderSourceARB) then Exit;
  8307. Result := TRUE;
  8308. end;
  8309. end;
  8310. function Load_GL_ARB_vertex_shader: Boolean;
  8311. var
  8312. extstring: AnsiString;
  8313. begin
  8314. Result := FALSE;
  8315. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8316. if glext_ExtensionSupported('GL_ARB_vertex_shader', extstring) then
  8317. begin
  8318. @glVertexAttrib1fARB := wglGetProcAddress('glVertexAttrib1fARB');
  8319. if not Assigned(glVertexAttrib1fARB) then Exit;
  8320. @glVertexAttrib1sARB := wglGetProcAddress('glVertexAttrib1sARB');
  8321. if not Assigned(glVertexAttrib1sARB) then Exit;
  8322. @glVertexAttrib1dARB := wglGetProcAddress('glVertexAttrib1dARB');
  8323. if not Assigned(glVertexAttrib1dARB) then Exit;
  8324. @glVertexAttrib2fARB := wglGetProcAddress('glVertexAttrib2fARB');
  8325. if not Assigned(glVertexAttrib2fARB) then Exit;
  8326. @glVertexAttrib2sARB := wglGetProcAddress('glVertexAttrib2sARB');
  8327. if not Assigned(glVertexAttrib2sARB) then Exit;
  8328. @glVertexAttrib2dARB := wglGetProcAddress('glVertexAttrib2dARB');
  8329. if not Assigned(glVertexAttrib2dARB) then Exit;
  8330. @glVertexAttrib3fARB := wglGetProcAddress('glVertexAttrib3fARB');
  8331. if not Assigned(glVertexAttrib3fARB) then Exit;
  8332. @glVertexAttrib3sARB := wglGetProcAddress('glVertexAttrib3sARB');
  8333. if not Assigned(glVertexAttrib3sARB) then Exit;
  8334. @glVertexAttrib3dARB := wglGetProcAddress('glVertexAttrib3dARB');
  8335. if not Assigned(glVertexAttrib3dARB) then Exit;
  8336. @glVertexAttrib4fARB := wglGetProcAddress('glVertexAttrib4fARB');
  8337. if not Assigned(glVertexAttrib4fARB) then Exit;
  8338. @glVertexAttrib4sARB := wglGetProcAddress('glVertexAttrib4sARB');
  8339. if not Assigned(glVertexAttrib4sARB) then Exit;
  8340. @glVertexAttrib4dARB := wglGetProcAddress('glVertexAttrib4dARB');
  8341. if not Assigned(glVertexAttrib4dARB) then Exit;
  8342. @glVertexAttrib4NubARB := wglGetProcAddress('glVertexAttrib4NubARB');
  8343. if not Assigned(glVertexAttrib4NubARB) then Exit;
  8344. @glVertexAttrib1fvARB := wglGetProcAddress('glVertexAttrib1fvARB');
  8345. if not Assigned(glVertexAttrib1fvARB) then Exit;
  8346. @glVertexAttrib1svARB := wglGetProcAddress('glVertexAttrib1svARB');
  8347. if not Assigned(glVertexAttrib1svARB) then Exit;
  8348. @glVertexAttrib1dvARB := wglGetProcAddress('glVertexAttrib1dvARB');
  8349. if not Assigned(glVertexAttrib1dvARB) then Exit;
  8350. @glVertexAttrib2fvARB := wglGetProcAddress('glVertexAttrib2fvARB');
  8351. if not Assigned(glVertexAttrib2fvARB) then Exit;
  8352. @glVertexAttrib2svARB := wglGetProcAddress('glVertexAttrib2svARB');
  8353. if not Assigned(glVertexAttrib2svARB) then Exit;
  8354. @glVertexAttrib2dvARB := wglGetProcAddress('glVertexAttrib2dvARB');
  8355. if not Assigned(glVertexAttrib2dvARB) then Exit;
  8356. @glVertexAttrib3fvARB := wglGetProcAddress('glVertexAttrib3fvARB');
  8357. if not Assigned(glVertexAttrib3fvARB) then Exit;
  8358. @glVertexAttrib3svARB := wglGetProcAddress('glVertexAttrib3svARB');
  8359. if not Assigned(glVertexAttrib3svARB) then Exit;
  8360. @glVertexAttrib3dvARB := wglGetProcAddress('glVertexAttrib3dvARB');
  8361. if not Assigned(glVertexAttrib3dvARB) then Exit;
  8362. @glVertexAttrib4fvARB := wglGetProcAddress('glVertexAttrib4fvARB');
  8363. if not Assigned(glVertexAttrib4fvARB) then Exit;
  8364. @glVertexAttrib4svARB := wglGetProcAddress('glVertexAttrib4svARB');
  8365. if not Assigned(glVertexAttrib4svARB) then Exit;
  8366. @glVertexAttrib4dvARB := wglGetProcAddress('glVertexAttrib4dvARB');
  8367. if not Assigned(glVertexAttrib4dvARB) then Exit;
  8368. @glVertexAttrib4ivARB := wglGetProcAddress('glVertexAttrib4ivARB');
  8369. if not Assigned(glVertexAttrib4ivARB) then Exit;
  8370. @glVertexAttrib4bvARB := wglGetProcAddress('glVertexAttrib4bvARB');
  8371. if not Assigned(glVertexAttrib4bvARB) then Exit;
  8372. @glVertexAttrib4ubvARB := wglGetProcAddress('glVertexAttrib4ubvARB');
  8373. if not Assigned(glVertexAttrib4ubvARB) then Exit;
  8374. @glVertexAttrib4usvARB := wglGetProcAddress('glVertexAttrib4usvARB');
  8375. if not Assigned(glVertexAttrib4usvARB) then Exit;
  8376. @glVertexAttrib4uivARB := wglGetProcAddress('glVertexAttrib4uivARB');
  8377. if not Assigned(glVertexAttrib4uivARB) then Exit;
  8378. @glVertexAttrib4NbvARB := wglGetProcAddress('glVertexAttrib4NbvARB');
  8379. if not Assigned(glVertexAttrib4NbvARB) then Exit;
  8380. @glVertexAttrib4NsvARB := wglGetProcAddress('glVertexAttrib4NsvARB');
  8381. if not Assigned(glVertexAttrib4NsvARB) then Exit;
  8382. @glVertexAttrib4NivARB := wglGetProcAddress('glVertexAttrib4NivARB');
  8383. if not Assigned(glVertexAttrib4NivARB) then Exit;
  8384. @glVertexAttrib4NubvARB := wglGetProcAddress('glVertexAttrib4NubvARB');
  8385. if not Assigned(glVertexAttrib4NubvARB) then Exit;
  8386. @glVertexAttrib4NusvARB := wglGetProcAddress('glVertexAttrib4NusvARB');
  8387. if not Assigned(glVertexAttrib4NusvARB) then Exit;
  8388. @glVertexAttrib4NuivARB := wglGetProcAddress('glVertexAttrib4NuivARB');
  8389. if not Assigned(glVertexAttrib4NuivARB) then Exit;
  8390. @glVertexAttribPointerARB := wglGetProcAddress('glVertexAttribPointerARB');
  8391. if not Assigned(glVertexAttribPointerARB) then Exit;
  8392. @glEnableVertexAttribArrayARB := wglGetProcAddress('glEnableVertexAttribArrayARB');
  8393. if not Assigned(glEnableVertexAttribArrayARB) then Exit;
  8394. @glDisableVertexAttribArrayARB := wglGetProcAddress('glDisableVertexAttribArrayARB');
  8395. if not Assigned(glDisableVertexAttribArrayARB) then Exit;
  8396. @glBindAttribLocationARB := wglGetProcAddress('glBindAttribLocationARB');
  8397. if not Assigned(glBindAttribLocationARB) then Exit;
  8398. @glGetActiveAttribARB := wglGetProcAddress('glGetActiveAttribARB');
  8399. if not Assigned(glGetActiveAttribARB) then Exit;
  8400. @glGetAttribLocationARB := wglGetProcAddress('glGetAttribLocationARB');
  8401. if not Assigned(glGetAttribLocationARB) then Exit;
  8402. @glGetVertexAttribdvARB := wglGetProcAddress('glGetVertexAttribdvARB');
  8403. if not Assigned(glGetVertexAttribdvARB) then Exit;
  8404. @glGetVertexAttribfvARB := wglGetProcAddress('glGetVertexAttribfvARB');
  8405. if not Assigned(glGetVertexAttribfvARB) then Exit;
  8406. @glGetVertexAttribivARB := wglGetProcAddress('glGetVertexAttribivARB');
  8407. if not Assigned(glGetVertexAttribivARB) then Exit;
  8408. @glGetVertexAttribPointervARB := wglGetProcAddress('glGetVertexAttribPointervARB');
  8409. if not Assigned(glGetVertexAttribPointervARB) then Exit;
  8410. Result := TRUE;
  8411. end;
  8412. end;
  8413. function Load_GL_ARB_fragment_shader: Boolean;
  8414. var
  8415. extstring: AnsiString;
  8416. begin
  8417. Result := FALSE;
  8418. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8419. if glext_ExtensionSupported('GL_ARB_fragment_shader', extstring) then
  8420. begin
  8421. Result := TRUE;
  8422. end;
  8423. end;
  8424. function Load_GL_ARB_shading_language_100: Boolean;
  8425. var
  8426. extstring: AnsiString;
  8427. begin
  8428. Result := FALSE;
  8429. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8430. if glext_ExtensionSupported('GL_ARB_shading_language_100', extstring) then
  8431. begin
  8432. Result := TRUE;
  8433. end;
  8434. end;
  8435. function Load_GL_ARB_texture_non_power_of_two: Boolean;
  8436. var
  8437. extstring: AnsiString;
  8438. begin
  8439. Result := FALSE;
  8440. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8441. if glext_ExtensionSupported('GL_ARB_texture_non_power_of_two', extstring) then
  8442. begin
  8443. Result := TRUE;
  8444. end;
  8445. end;
  8446. function Load_GL_ARB_point_sprite: Boolean;
  8447. var
  8448. extstring: AnsiString;
  8449. begin
  8450. Result := FALSE;
  8451. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8452. if glext_ExtensionSupported('GL_ARB_point_sprite', extstring) then
  8453. begin
  8454. Result := TRUE;
  8455. end;
  8456. end;
  8457. function Load_GL_EXT_depth_bounds_test: Boolean;
  8458. var
  8459. extstring: AnsiString;
  8460. begin
  8461. Result := FALSE;
  8462. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8463. if glext_ExtensionSupported('GL_EXT_depth_bounds_test', extstring) then
  8464. begin
  8465. @glDepthBoundsEXT := wglGetProcAddress('glDepthBoundsEXT');
  8466. if not Assigned(glDepthBoundsEXT) then Exit;
  8467. Result := TRUE;
  8468. end;
  8469. end;
  8470. function Load_GL_EXT_texture_mirror_clamp: Boolean;
  8471. var
  8472. extstring: AnsiString;
  8473. begin
  8474. Result := FALSE;
  8475. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8476. if glext_ExtensionSupported('GL_EXT_texture_mirror_clamp', extstring) then
  8477. begin
  8478. Result := TRUE;
  8479. end;
  8480. end;
  8481. function Load_GL_EXT_blend_equation_separate: Boolean;
  8482. var
  8483. extstring: AnsiString;
  8484. begin
  8485. Result := FALSE;
  8486. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8487. if glext_ExtensionSupported('GL_EXT_blend_equation_separate', extstring) then
  8488. begin
  8489. @glBlendEquationSeparateEXT := wglGetProcAddress('glBlendEquationSeparateEXT');
  8490. if not Assigned(glBlendEquationSeparateEXT) then Exit;
  8491. Result := TRUE;
  8492. end;
  8493. end;
  8494. function Load_GL_MESA_pack_invert: Boolean;
  8495. var
  8496. extstring: AnsiString;
  8497. begin
  8498. Result := FALSE;
  8499. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8500. if glext_ExtensionSupported('GL_MESA_pack_invert', extstring) then
  8501. begin
  8502. Result := TRUE;
  8503. end;
  8504. end;
  8505. function Load_GL_MESA_ycbcr_texture: Boolean;
  8506. var
  8507. extstring: AnsiString;
  8508. begin
  8509. Result := FALSE;
  8510. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8511. if glext_ExtensionSupported('GL_MESA_ycbcr_texture', extstring) then
  8512. begin
  8513. Result := TRUE;
  8514. end;
  8515. end;
  8516. function Load_GL_ARB_fragment_program_shadow: Boolean;
  8517. var
  8518. extstring: AnsiString;
  8519. begin
  8520. Result := FALSE;
  8521. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8522. if glext_ExtensionSupported('GL_ARB_fragment_program_shadow', extstring) then
  8523. begin
  8524. Result := TRUE;
  8525. end;
  8526. end;
  8527. function Load_GL_NV_fragment_program_option: Boolean;
  8528. var
  8529. extstring: AnsiString;
  8530. begin
  8531. Result := FALSE;
  8532. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8533. if glext_ExtensionSupported('GL_NV_fragment_program_option', extstring) then
  8534. begin
  8535. Result := TRUE;
  8536. end;
  8537. end;
  8538. function Load_GL_EXT_pixel_buffer_object: Boolean;
  8539. var
  8540. extstring: AnsiString;
  8541. begin
  8542. Result := FALSE;
  8543. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8544. if glext_ExtensionSupported('GL_EXT_pixel_buffer_object', extstring) then
  8545. begin
  8546. Result := TRUE;
  8547. end;
  8548. end;
  8549. function Load_GL_NV_fragment_program2: Boolean;
  8550. var
  8551. extstring: AnsiString;
  8552. begin
  8553. Result := FALSE;
  8554. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8555. if glext_ExtensionSupported('GL_NV_fragment_program2', extstring) then
  8556. begin
  8557. Result := TRUE;
  8558. end;
  8559. end;
  8560. function Load_GL_NV_vertex_program2_option: Boolean;
  8561. var
  8562. extstring: AnsiString;
  8563. begin
  8564. Result := FALSE;
  8565. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8566. if glext_ExtensionSupported('GL_NV_vertex_program2_option', extstring) then
  8567. begin
  8568. Result := TRUE;
  8569. end;
  8570. end;
  8571. function Load_GL_NV_vertex_program3: Boolean;
  8572. var
  8573. extstring: AnsiString;
  8574. begin
  8575. Result := FALSE;
  8576. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8577. if glext_ExtensionSupported('GL_NV_vertex_program3', extstring) then
  8578. begin
  8579. Result := TRUE;
  8580. end;
  8581. end;
  8582. function Load_GL_ARB_draw_buffers: Boolean;
  8583. var
  8584. extstring: PAnsiChar;
  8585. begin
  8586. Result := FALSE;
  8587. extstring := glGetString(GL_EXTENSIONS);
  8588. if glext_ExtensionSupported('GL_ARB_draw_buffers', extstring) then
  8589. begin
  8590. glDrawBuffersARB := wglGetProcAddress('glDrawBuffersARB');
  8591. if not Assigned(glDrawBuffersARB) then Exit;
  8592. Result := TRUE;
  8593. end;
  8594. end;
  8595. function Load_GL_ARB_texture_rectangle: Boolean;
  8596. var
  8597. extstring: PAnsiChar;
  8598. begin
  8599. Result := FALSE;
  8600. extstring := glGetString(GL_EXTENSIONS);
  8601. if glext_ExtensionSupported('GL_ARB_texture_rectangle', extstring) then
  8602. begin
  8603. Result := TRUE;
  8604. end;
  8605. end;
  8606. function Load_GL_ARB_color_buffer_float: Boolean;
  8607. var
  8608. extstring: PAnsiChar;
  8609. begin
  8610. Result := FALSE;
  8611. extstring := glGetString(GL_EXTENSIONS);
  8612. if glext_ExtensionSupported('GL_ARB_color_buffer_float', extstring) then
  8613. begin
  8614. glClampColorARB := wglGetProcAddress('glClampColorARB');
  8615. if not Assigned(glClampColorARB) then Exit;
  8616. Result := TRUE;
  8617. end;
  8618. end;
  8619. function Load_GL_ARB_half_float_pixel: Boolean;
  8620. var
  8621. extstring: PAnsiChar;
  8622. begin
  8623. Result := FALSE;
  8624. extstring := glGetString(GL_EXTENSIONS);
  8625. if glext_ExtensionSupported('GL_ARB_half_float_pixel', extstring) then
  8626. begin
  8627. Result := TRUE;
  8628. end;
  8629. end;
  8630. function Load_GL_ARB_texture_float: Boolean;
  8631. var
  8632. extstring: PAnsiChar;
  8633. begin
  8634. Result := FALSE;
  8635. extstring := glGetString(GL_EXTENSIONS);
  8636. if glext_ExtensionSupported('GL_ARB_texture_float', extstring) then
  8637. begin
  8638. Result := TRUE;
  8639. end;
  8640. end;
  8641. function Load_GL_EXT_texture_compression_dxt1: Boolean;
  8642. var
  8643. extstring: PAnsiChar;
  8644. begin
  8645. Result := FALSE;
  8646. extstring := glGetString(GL_EXTENSIONS);
  8647. if glext_ExtensionSupported('GL_EXT_texture_compression_dxt1', extstring) then
  8648. begin
  8649. Result := TRUE;
  8650. end;
  8651. end;
  8652. function Load_GL_ARB_pixel_buffer_object: Boolean;
  8653. var
  8654. extstring: PAnsiChar;
  8655. begin
  8656. Result := FALSE;
  8657. extstring := glGetString(GL_EXTENSIONS);
  8658. if glext_ExtensionSupported('GL_ARB_pixel_buffer_object', extstring) then
  8659. begin
  8660. Result := TRUE;
  8661. end;
  8662. end;
  8663. function Load_GL_EXT_framebuffer_object: Boolean;
  8664. var
  8665. extstring: PAnsiChar;
  8666. begin
  8667. Result := FALSE;
  8668. extstring := glGetString(GL_EXTENSIONS);
  8669. if glext_ExtensionSupported('GL_EXT_framebuffer_object', extstring) then
  8670. begin
  8671. glIsRenderbufferEXT := wglGetProcAddress('glIsRenderbufferEXT');
  8672. if not Assigned(glIsRenderbufferEXT) then Exit;
  8673. glBindRenderbufferEXT := wglGetProcAddress('glBindRenderbufferEXT');
  8674. if not Assigned(glBindRenderbufferEXT) then Exit;
  8675. glDeleteRenderbuffersEXT := wglGetProcAddress('glDeleteRenderbuffersEXT');
  8676. if not Assigned(glDeleteRenderbuffersEXT) then Exit;
  8677. glGenRenderbuffersEXT := wglGetProcAddress('glGenRenderbuffersEXT');
  8678. if not Assigned(glGenRenderbuffersEXT) then Exit;
  8679. glRenderbufferStorageEXT := wglGetProcAddress('glRenderbufferStorageEXT');
  8680. if not Assigned(glRenderbufferStorageEXT) then Exit;
  8681. glGetRenderbufferParameterivEXT := wglGetProcAddress('glGetRenderbufferParameterivEXT');
  8682. if not Assigned(glGetRenderbufferParameterivEXT) then Exit;
  8683. glIsFramebufferEXT := wglGetProcAddress('glIsFramebufferEXT');
  8684. if not Assigned(glIsFramebufferEXT) then Exit;
  8685. glBindFramebufferEXT := wglGetProcAddress('glBindFramebufferEXT');
  8686. if not Assigned(glBindFramebufferEXT) then Exit;
  8687. glDeleteFramebuffersEXT := wglGetProcAddress('glDeleteFramebuffersEXT');
  8688. if not Assigned(glDeleteFramebuffersEXT) then Exit;
  8689. glGenFramebuffersEXT := wglGetProcAddress('glGenFramebuffersEXT');
  8690. if not Assigned(glGenFramebuffersEXT) then Exit;
  8691. glCheckFramebufferStatusEXT := wglGetProcAddress('glCheckFramebufferStatusEXT');
  8692. if not Assigned(glCheckFramebufferStatusEXT) then Exit;
  8693. glFramebufferTexture1DEXT := wglGetProcAddress('glFramebufferTexture1DEXT');
  8694. if not Assigned(glFramebufferTexture1DEXT) then Exit;
  8695. glFramebufferTexture2DEXT := wglGetProcAddress('glFramebufferTexture2DEXT');
  8696. if not Assigned(glFramebufferTexture2DEXT) then Exit;
  8697. glFramebufferTexture3DEXT := wglGetProcAddress('glFramebufferTexture3DEXT');
  8698. if not Assigned(glFramebufferTexture3DEXT) then Exit;
  8699. glFramebufferRenderbufferEXT := wglGetProcAddress('glFramebufferRenderbufferEXT');
  8700. if not Assigned(glFramebufferRenderbufferEXT) then Exit;
  8701. glGetFramebufferAttachmentParameterivEXT := wglGetProcAddress('glGetFramebufferAttachmentParameterivEXT');
  8702. if not Assigned(glGetFramebufferAttachmentParameterivEXT) then Exit;
  8703. glGenerateMipmapEXT := wglGetProcAddress('glGenerateMipmapEXT');
  8704. if not Assigned(glGenerateMipmapEXT) then Exit;
  8705. Result := TRUE;
  8706. end;
  8707. end;
  8708. function Load_GL_ARB_framebuffer_object(LoadAsCore: boolean): Boolean;
  8709. var
  8710. extstring: AnsiString;
  8711. begin
  8712. Result := False;
  8713. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8714. if LoadAsCore or glext_ExtensionSupported('GL_ARB_framebuffer_object', extstring) then
  8715. begin
  8716. glIsRenderbuffer := wglGetProcAddress('glIsRenderbuffer');
  8717. if not Assigned(glIsRenderbuffer) then Exit;
  8718. glBindRenderbuffer := wglGetProcAddress('glBindRenderbuffer');
  8719. if not Assigned(glBindRenderbuffer) then Exit;
  8720. glDeleteRenderbuffers := wglGetProcAddress('glDeleteRenderbuffers');
  8721. if not Assigned(glDeleteRenderbuffers) then Exit;
  8722. glGenRenderbuffers := wglGetProcAddress('glGenRenderbuffers');
  8723. if not Assigned(glGenRenderbuffers) then Exit;
  8724. glRenderbufferStorage := wglGetProcAddress('glRenderbufferStorage');
  8725. if not Assigned(glRenderbufferStorage) then Exit;
  8726. glGetRenderbufferParameteriv := wglGetProcAddress('glGetRenderbufferParameteriv');
  8727. if not Assigned(glGetRenderbufferParameteriv) then Exit;
  8728. glIsFramebuffer := wglGetProcAddress('glIsFramebuffer');
  8729. if not Assigned(glIsFramebuffer) then Exit;
  8730. glBindFramebuffer := wglGetProcAddress('glBindFramebuffer');
  8731. if not Assigned(glBindFramebuffer) then Exit;
  8732. glDeleteFramebuffers := wglGetProcAddress('glDeleteFramebuffers');
  8733. if not Assigned(glDeleteFramebuffers) then Exit;
  8734. glGenFramebuffers := wglGetProcAddress('glGenFramebuffers');
  8735. if not Assigned(glGenFramebuffers) then Exit;
  8736. glCheckFramebufferStatus := wglGetProcAddress('glCheckFramebufferStatus');
  8737. if not Assigned(glCheckFramebufferStatus) then Exit;
  8738. glFramebufferTexture1D := wglGetProcAddress('glFramebufferTexture1D');
  8739. if not Assigned(glFramebufferTexture1D) then Exit;
  8740. glFramebufferTexture2D := wglGetProcAddress('glFramebufferTexture2D');
  8741. if not Assigned(glFramebufferTexture2D) then Exit;
  8742. glFramebufferTexture3D := wglGetProcAddress('glFramebufferTexture3D');
  8743. if not Assigned(glFramebufferTexture3D) then Exit;
  8744. glFramebufferRenderbuffer := wglGetProcAddress('glFramebufferRenderbuffer');
  8745. if not Assigned(glFramebufferRenderbuffer) then Exit;
  8746. glGetFramebufferAttachmentParameteriv := wglGetProcAddress('glGetFramebufferAttachmentParameteriv');
  8747. if not Assigned(glGetFramebufferAttachmentParameteriv) then Exit;
  8748. glGenerateMipmap := wglGetProcAddress('glGenerateMipmap');
  8749. if not Assigned(glGenerateMipmap) then Exit;
  8750. glBlitFramebuffer := wglGetProcAddress('glBlitFramebuffer');
  8751. if not Assigned(glBlitFramebuffer) then Exit;
  8752. glRenderbufferStorageMultisample := wglGetProcAddress('glRenderbufferStorageMultisample');
  8753. if not Assigned(glRenderbufferStorageMultisample) then Exit;
  8754. glFramebufferTextureLayer := wglGetProcAddress('glFramebufferTextureLayer');
  8755. if not Assigned(glFramebufferTextureLayer) then Exit;
  8756. Result := True;
  8757. end;
  8758. end;
  8759. function Load_GL_ARB_map_buffer_range(LoadAsCore: boolean): Boolean;
  8760. var
  8761. extstring: AnsiString;
  8762. begin
  8763. Result := False;
  8764. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8765. if LoadAsCore or glext_ExtensionSupported('GL_ARB_map_buffer_range', extstring) then
  8766. begin
  8767. glMapBufferRange := wglGetProcAddress('glMapBufferRange');
  8768. if not Assigned(glMapBufferRange) then Exit;
  8769. glFlushMappedBufferRange := wglGetProcAddress('glFlushMappedBufferRange');
  8770. if not Assigned(glFlushMappedBufferRange) then Exit;
  8771. Result := True;
  8772. end;
  8773. end;
  8774. function Load_GL_ARB_vertex_array_object(LoadAsCore: boolean): Boolean;
  8775. var
  8776. extstring: AnsiString;
  8777. begin
  8778. Result := False;
  8779. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8780. if LoadAsCore or glext_ExtensionSupported('GL_ARB_vertex_array_object', extstring) then
  8781. begin
  8782. glBindVertexArray := wglGetProcAddress('glBindVertexArray');
  8783. if not Assigned(glBindVertexArray) then Exit;
  8784. glDeleteVertexArrays := wglGetProcAddress('glDeleteVertexArrays');
  8785. if not Assigned(glDeleteVertexArrays) then Exit;
  8786. glGenVertexArrays := wglGetProcAddress('glGenVertexArrays');
  8787. if not Assigned(glGenVertexArrays) then Exit;
  8788. glIsVertexArray := wglGetProcAddress('glIsVertexArray');
  8789. if not Assigned(glIsVertexArray) then Exit;
  8790. Result := True;
  8791. end;
  8792. end;
  8793. function Load_GL_ARB_copy_buffer(LoadAsCore: boolean): Boolean;
  8794. var
  8795. extstring: AnsiString;
  8796. begin
  8797. Result := False;
  8798. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8799. if LoadAsCore or glext_ExtensionSupported('GL_ARB_copy_buffer', extstring) then
  8800. begin
  8801. glCopyBufferSubData := wglGetProcAddress('glCopyBufferSubData');
  8802. if not Assigned(glCopyBufferSubData) then Exit;
  8803. Result := True;
  8804. end;
  8805. end;
  8806. function Load_GL_ARB_uniform_buffer_object(LoadAsCore: boolean): Boolean;
  8807. var
  8808. extstring: AnsiString;
  8809. begin
  8810. Result := False;
  8811. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8812. if LoadAsCore or glext_ExtensionSupported('GL_ARB_uniform_buffer_object', extstring) then
  8813. begin
  8814. glGetUniformIndices := wglGetProcAddress('glGetUniformIndices');
  8815. if not Assigned(glGetUniformIndices) then Exit;
  8816. glGetActiveUniformsiv := wglGetProcAddress('glGetActiveUniformsiv');
  8817. if not Assigned(glGetActiveUniformsiv) then Exit;
  8818. glGetActiveUniformName := wglGetProcAddress('glGetActiveUniformName');
  8819. if not Assigned(glGetActiveUniformName) then Exit;
  8820. glGetUniformBlockIndex := wglGetProcAddress('glGetUniformBlockIndex');
  8821. if not Assigned(glGetUniformBlockIndex) then Exit;
  8822. glGetActiveUniformBlockiv := wglGetProcAddress('glGetActiveUniformBlockiv');
  8823. if not Assigned(glGetActiveUniformBlockiv) then Exit;
  8824. glGetActiveUniformBlockName := wglGetProcAddress('glGetActiveUniformBlockName');
  8825. if not Assigned(glGetActiveUniformBlockName) then Exit;
  8826. glUniformBlockBinding := wglGetProcAddress('glUniformBlockBinding');
  8827. if not Assigned(glUniformBlockBinding) then Exit;
  8828. (* Shared entry points *)
  8829. glBindBufferRange := wglGetProcAddress('glBindBufferRange');
  8830. if not Assigned(glBindBufferRange) then Exit;
  8831. glBindBufferBase := wglGetProcAddress('glBindBufferBase');
  8832. if not Assigned(glBindBufferBase) then Exit;
  8833. glGetIntegeri_v := wglGetProcAddress('glGetIntegeri_v');
  8834. if not Assigned(glGetIntegeri_v) then Exit;
  8835. Result := True;
  8836. end;
  8837. end;
  8838. function Load_GL_ARB_draw_elements_base_vertex(LoadAsCore: boolean): Boolean;
  8839. var
  8840. extstring: AnsiString;
  8841. begin
  8842. Result := False;
  8843. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8844. if LoadAsCore or glext_ExtensionSupported('GL_ARB_draw_elements_base_vertex', extstring) then
  8845. begin
  8846. glDrawElementsBaseVertex := wglGetProcAddress('glDrawElementsBaseVertex');
  8847. if not Assigned(glDrawElementsBaseVertex) then Exit;
  8848. glDrawRangeElementsBaseVertex := wglGetProcAddress('glDrawRangeElementsBaseVertex');
  8849. if not Assigned(glDrawRangeElementsBaseVertex) then Exit;
  8850. glDrawElementsInstancedBaseVertex := wglGetProcAddress('glDrawElementsInstancedBaseVertex');
  8851. if not Assigned(glDrawElementsInstancedBaseVertex) then Exit;
  8852. glMultiDrawElementsBaseVertex := wglGetProcAddress('glMultiDrawElementsBaseVertex');
  8853. if not Assigned(glMultiDrawElementsBaseVertex) then Exit;
  8854. Result := True;
  8855. end;
  8856. end;
  8857. function Load_GL_ARB_provoking_vertex(LoadAsCore: boolean): Boolean;
  8858. var
  8859. extstring: AnsiString;
  8860. begin
  8861. Result := False;
  8862. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8863. if LoadAsCore or glext_ExtensionSupported('GL_ARB_provoking_vertex', extstring) then
  8864. begin
  8865. glProvokingVertex := wglGetProcAddress('glProvokingVertex');
  8866. if not Assigned(glProvokingVertex) then Exit;
  8867. Result := True;
  8868. end;
  8869. end;
  8870. function Load_GL_ARB_sync(LoadAsCore: boolean): Boolean;
  8871. var
  8872. extstring: AnsiString;
  8873. begin
  8874. Result := False;
  8875. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8876. if LoadAsCore or glext_ExtensionSupported('GL_ARB_sync', extstring) then
  8877. begin
  8878. glFenceSync := wglGetProcAddress('glFenceSync');
  8879. if not Assigned(glFenceSync) then Exit;
  8880. glIsSync := wglGetProcAddress('glIsSync');
  8881. if not Assigned(glIsSync) then Exit;
  8882. glDeleteSync := wglGetProcAddress('glDeleteSync');
  8883. if not Assigned(glDeleteSync) then Exit;
  8884. glClientWaitSync := wglGetProcAddress('glClientWaitSync');
  8885. if not Assigned(glClientWaitSync) then Exit;
  8886. glWaitSync := wglGetProcAddress('glWaitSync');
  8887. if not Assigned(glWaitSync) then Exit;
  8888. glGetInteger64v := wglGetProcAddress('glGetInteger64v');
  8889. if not Assigned(glGetInteger64v) then Exit;
  8890. glGetSynciv := wglGetProcAddress('glGetSynciv');
  8891. if not Assigned(glGetSynciv) then Exit;
  8892. Result := True;
  8893. end;
  8894. end;
  8895. function Load_GL_ARB_texture_multisample(LoadAsCore: boolean): Boolean;
  8896. var
  8897. extstring: AnsiString;
  8898. begin
  8899. Result := False;
  8900. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8901. if LoadAsCore or glext_ExtensionSupported('GL_ARB_texture_multisample', extstring) then
  8902. begin
  8903. glTexImage2DMultisample := wglGetProcAddress('glTexImage2DMultisample');
  8904. if not Assigned(glTexImage2DMultisample) then Exit;
  8905. glTexImage3DMultisample := wglGetProcAddress('glTexImage3DMultisample');
  8906. if not Assigned(glTexImage3DMultisample) then Exit;
  8907. glGetMultisamplefv := wglGetProcAddress('glGetMultisamplefv');
  8908. if not Assigned(glGetMultisamplefv) then Exit;
  8909. glSampleMaski := wglGetProcAddress('glSampleMaski');
  8910. if not Assigned(glSampleMaski) then Exit;
  8911. Result := True;
  8912. end;
  8913. end;
  8914. function Load_GL_ARB_sampler_objects(LoadAsCore: boolean): Boolean;
  8915. var
  8916. extstring: AnsiString;
  8917. begin
  8918. Result := False;
  8919. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8920. if LoadAsCore or glext_ExtensionSupported('GL_ARB_sampler_objects', extstring) then
  8921. begin
  8922. glGenSamplers := wglGetProcAddress('glGenSamplers');
  8923. if not Assigned(glGenSamplers) then Exit;
  8924. glDeleteSamplers := wglGetProcAddress('glDeleteSamplers');
  8925. if not Assigned(glDeleteSamplers) then Exit;
  8926. glIsSampler := wglGetProcAddress('glIsSampler');
  8927. if not Assigned(glIsSampler) then Exit;
  8928. glBindSampler := wglGetProcAddress('glBindSampler');
  8929. if not Assigned(glBindSampler) then Exit;
  8930. glSamplerParameteri := wglGetProcAddress('glSamplerParameteri');
  8931. if not Assigned(glSamplerParameteri) then Exit;
  8932. glSamplerParameteriv := wglGetProcAddress('glSamplerParameteriv');
  8933. if not Assigned(glSamplerParameteriv) then Exit;
  8934. glSamplerParameterf := wglGetProcAddress('glSamplerParameterf');
  8935. if not Assigned(glSamplerParameterf) then Exit;
  8936. glSamplerParameterfv := wglGetProcAddress('glSamplerParameterfv');
  8937. if not Assigned(glSamplerParameterfv) then Exit;
  8938. glSamplerParameterIiv := wglGetProcAddress('glSamplerParameterIiv');
  8939. if not Assigned(glSamplerParameterIiv) then Exit;
  8940. glSamplerParameterIuiv := wglGetProcAddress('glSamplerParameterIuiv');
  8941. if not Assigned(glSamplerParameterIuiv) then Exit;
  8942. glGetSamplerParameteriv := wglGetProcAddress('glGetSamplerParameteriv');
  8943. if not Assigned(glGetSamplerParameteriv) then Exit;
  8944. glGetSamplerParameterIiv := wglGetProcAddress('glGetSamplerParameterIiv');
  8945. if not Assigned(glGetSamplerParameterIiv) then Exit;
  8946. glGetSamplerParameterfv := wglGetProcAddress('glGetSamplerParameterfv');
  8947. if not Assigned(glGetSamplerParameterfv) then Exit;
  8948. glGetSamplerParameterIuiv := wglGetProcAddress('glGetSamplerParameterIuiv');
  8949. if not Assigned(glGetSamplerParameterIuiv) then Exit;
  8950. Result := True;
  8951. end;
  8952. end;
  8953. function Load_GL_ARB_blend_func_extended(LoadAsCore: boolean): Boolean;
  8954. var
  8955. extstring: AnsiString;
  8956. begin
  8957. Result := False;
  8958. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8959. if LoadAsCore or glext_ExtensionSupported('GL_ARB_blend_func_extended', extstring) then
  8960. begin
  8961. glBindFragDataLocationIndexed := wglGetProcAddress('glBindFragDataLocationIndexed');
  8962. if not Assigned(glBindFragDataLocationIndexed) then Exit;
  8963. glGetFragDataIndex := wglGetProcAddress('glGetFragDataIndex');
  8964. if not Assigned(glGetFragDataIndex) then Exit;
  8965. Result := True;
  8966. end;
  8967. end;
  8968. function Load_GL_ARB_timer_query(LoadAsCore: boolean): Boolean;
  8969. var
  8970. extstring: AnsiString;
  8971. begin
  8972. Result := False;
  8973. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8974. if LoadAsCore or glext_ExtensionSupported('GL_ARB_timer_query', extstring) then
  8975. begin
  8976. glQueryCounter := wglGetProcAddress('glQueryCounter');
  8977. if not Assigned(glQueryCounter) then Exit;
  8978. glGetQueryObjecti64v := wglGetProcAddress('glGetQueryObjecti64v');
  8979. if not Assigned(glGetQueryObjecti64v) then Exit;
  8980. glGetQueryObjectui64v := wglGetProcAddress('glGetQueryObjectui64v');
  8981. if not Assigned(glGetQueryObjectui64v) then Exit;
  8982. Result := True;
  8983. end;
  8984. end;
  8985. function Load_GL_ARB_vertex_type_2_10_10_10_rev(LoadAsCore: boolean): Boolean;
  8986. var
  8987. extstring: AnsiString;
  8988. begin
  8989. Result := False;
  8990. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  8991. if LoadAsCore or glext_ExtensionSupported('GL_ARB_vertex_type_2_10_10_10_rev', extstring) then
  8992. begin
  8993. glVertexP2ui := wglGetProcAddress('glVertexP2ui');
  8994. if not Assigned(glVertexP2ui) then Exit;
  8995. glVertexP2uiv := wglGetProcAddress('glVertexP2uiv');
  8996. if not Assigned(glVertexP2uiv) then Exit;
  8997. glVertexP3ui := wglGetProcAddress('glVertexP3ui');
  8998. if not Assigned(glVertexP3ui) then Exit;
  8999. glVertexP3uiv := wglGetProcAddress('glVertexP3uiv');
  9000. if not Assigned(glVertexP3uiv) then Exit;
  9001. glVertexP4ui := wglGetProcAddress('glVertexP4ui');
  9002. if not Assigned(glVertexP4ui) then Exit;
  9003. glVertexP4uiv := wglGetProcAddress('glVertexP4uiv');
  9004. if not Assigned(glVertexP4uiv) then Exit;
  9005. glTexCoordP1ui := wglGetProcAddress('glTexCoordP1ui');
  9006. if not Assigned(glTexCoordP1ui) then Exit;
  9007. glTexCoordP1uiv := wglGetProcAddress('glTexCoordP1uiv');
  9008. if not Assigned(glTexCoordP1uiv) then Exit;
  9009. glTexCoordP2ui := wglGetProcAddress('glTexCoordP2ui');
  9010. if not Assigned(glTexCoordP2ui) then Exit;
  9011. glTexCoordP2uiv := wglGetProcAddress('glTexCoordP2uiv');
  9012. if not Assigned(glTexCoordP2uiv) then Exit;
  9013. glTexCoordP3ui := wglGetProcAddress('glTexCoordP3ui');
  9014. if not Assigned(glTexCoordP3ui) then Exit;
  9015. glTexCoordP3uiv := wglGetProcAddress('glTexCoordP3uiv');
  9016. if not Assigned(glTexCoordP3uiv) then Exit;
  9017. glTexCoordP4ui := wglGetProcAddress('glTexCoordP4ui');
  9018. if not Assigned(glTexCoordP4ui) then Exit;
  9019. glTexCoordP4uiv := wglGetProcAddress('glTexCoordP4uiv');
  9020. if not Assigned(glTexCoordP4uiv) then Exit;
  9021. glMultiTexCoordP1ui := wglGetProcAddress('glMultiTexCoordP1ui');
  9022. if not Assigned(glMultiTexCoordP1ui) then Exit;
  9023. glMultiTexCoordP1uiv := wglGetProcAddress('glMultiTexCoordP1uiv');
  9024. if not Assigned(glMultiTexCoordP1uiv) then Exit;
  9025. glMultiTexCoordP2ui := wglGetProcAddress('glMultiTexCoordP2ui');
  9026. if not Assigned(glMultiTexCoordP2ui) then Exit;
  9027. glMultiTexCoordP2uiv := wglGetProcAddress('glMultiTexCoordP2uiv');
  9028. if not Assigned(glMultiTexCoordP2uiv) then Exit;
  9029. glMultiTexCoordP3ui := wglGetProcAddress('glMultiTexCoordP3ui');
  9030. if not Assigned(glMultiTexCoordP3ui) then Exit;
  9031. glMultiTexCoordP3uiv := wglGetProcAddress('glMultiTexCoordP3uiv');
  9032. if not Assigned(glMultiTexCoordP3uiv) then Exit;
  9033. glMultiTexCoordP4ui := wglGetProcAddress('glMultiTexCoordP4ui');
  9034. if not Assigned(glMultiTexCoordP4ui) then Exit;
  9035. glMultiTexCoordP4uiv := wglGetProcAddress('glMultiTexCoordP4uiv');
  9036. if not Assigned(glMultiTexCoordP4uiv) then Exit;
  9037. glNormalP3ui := wglGetProcAddress('glNormalP3ui');
  9038. if not Assigned(glNormalP3ui) then Exit;
  9039. glNormalP3uiv := wglGetProcAddress('glNormalP3uiv');
  9040. if not Assigned(glNormalP3uiv) then Exit;
  9041. glColorP3ui := wglGetProcAddress('glColorP3ui');
  9042. if not Assigned(glColorP3ui) then Exit;
  9043. glColorP3uiv := wglGetProcAddress('glColorP3uiv');
  9044. if not Assigned(glColorP3uiv) then Exit;
  9045. glColorP4ui := wglGetProcAddress('glColorP4ui');
  9046. if not Assigned(glColorP4ui) then Exit;
  9047. glColorP4uiv := wglGetProcAddress('glColorP4uiv');
  9048. if not Assigned(glColorP4uiv) then Exit;
  9049. glSecondaryColorP3ui := wglGetProcAddress('glSecondaryColorP3ui');
  9050. if not Assigned(glSecondaryColorP3ui) then Exit;
  9051. glSecondaryColorP3uiv := wglGetProcAddress('glSecondaryColorP3uiv');
  9052. if not Assigned(glSecondaryColorP3uiv) then Exit;
  9053. glVertexAttribP1ui := wglGetProcAddress('glVertexAttribP1ui');
  9054. if not Assigned(glVertexAttribP1ui) then Exit;
  9055. glVertexAttribP1uiv := wglGetProcAddress('glVertexAttribP1uiv');
  9056. if not Assigned(glVertexAttribP1uiv) then Exit;
  9057. glVertexAttribP2ui := wglGetProcAddress('glVertexAttribP2ui');
  9058. if not Assigned(glVertexAttribP2ui) then Exit;
  9059. glVertexAttribP2uiv := wglGetProcAddress('glVertexAttribP2uiv');
  9060. if not Assigned(glVertexAttribP2uiv) then Exit;
  9061. glVertexAttribP3ui := wglGetProcAddress('glVertexAttribP3ui');
  9062. if not Assigned(glVertexAttribP3ui) then Exit;
  9063. glVertexAttribP3uiv := wglGetProcAddress('glVertexAttribP3uiv');
  9064. if not Assigned(glVertexAttribP3uiv) then Exit;
  9065. glVertexAttribP4ui := wglGetProcAddress('glVertexAttribP4ui');
  9066. if not Assigned(glVertexAttribP4ui) then Exit;
  9067. glVertexAttribP4uiv := wglGetProcAddress('glVertexAttribP4uiv');
  9068. if not Assigned(glVertexAttribP4uiv) then Exit;
  9069. Result := True;
  9070. end;
  9071. end;
  9072. function Load_GL_ARB_gpu_shader_fp64(LoadAsCore: boolean): Boolean;
  9073. var
  9074. extstring: AnsiString;
  9075. begin
  9076. Result := False;
  9077. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  9078. if LoadAsCore or glext_ExtensionSupported('GL_ARB_gpu_shader_fp64', extstring) then
  9079. begin
  9080. glUniform1d := wglGetProcAddress('glUniform1d');
  9081. if not Assigned(glUniform1d) then Exit;
  9082. glUniform2d := wglGetProcAddress('glUniform2d');
  9083. if not Assigned(glUniform2d) then Exit;
  9084. glUniform3d := wglGetProcAddress('glUniform3d');
  9085. if not Assigned(glUniform3d) then Exit;
  9086. glUniform4d := wglGetProcAddress('glUniform4d');
  9087. if not Assigned(glUniform4d) then Exit;
  9088. glUniform1dv := wglGetProcAddress('glUniform1dv');
  9089. if not Assigned(glUniform1dv) then Exit;
  9090. glUniform2dv := wglGetProcAddress('glUniform2dv');
  9091. if not Assigned(glUniform2dv) then Exit;
  9092. glUniform3dv := wglGetProcAddress('glUniform3dv');
  9093. if not Assigned(glUniform3dv) then Exit;
  9094. glUniform4dv := wglGetProcAddress('glUniform4dv');
  9095. if not Assigned(glUniform4dv) then Exit;
  9096. glUniformMatrix2dv := wglGetProcAddress('glUniformMatrix2dv');
  9097. if not Assigned(glUniformMatrix2dv) then Exit;
  9098. glUniformMatrix3dv := wglGetProcAddress('glUniformMatrix3dv');
  9099. if not Assigned(glUniformMatrix3dv) then Exit;
  9100. glUniformMatrix4dv := wglGetProcAddress('glUniformMatrix4dv');
  9101. if not Assigned(glUniformMatrix4dv) then Exit;
  9102. glUniformMatrix2x3dv := wglGetProcAddress('glUniformMatrix2x3dv');
  9103. if not Assigned(glUniformMatrix2x3dv) then Exit;
  9104. glUniformMatrix2x4dv := wglGetProcAddress('glUniformMatrix2x4dv');
  9105. if not Assigned(glUniformMatrix2x4dv) then Exit;
  9106. glUniformMatrix3x2dv := wglGetProcAddress('glUniformMatrix3x2dv');
  9107. if not Assigned(glUniformMatrix3x2dv) then Exit;
  9108. glUniformMatrix3x4dv := wglGetProcAddress('glUniformMatrix3x4dv');
  9109. if not Assigned(glUniformMatrix3x4dv) then Exit;
  9110. glUniformMatrix4x2dv := wglGetProcAddress('glUniformMatrix4x2dv');
  9111. if not Assigned(glUniformMatrix4x2dv) then Exit;
  9112. glUniformMatrix4x3dv := wglGetProcAddress('glUniformMatrix4x3dv');
  9113. if not Assigned(glUniformMatrix4x3dv) then Exit;
  9114. glGetUniformdv := wglGetProcAddress('glGetUniformdv');
  9115. if not Assigned(glGetUniformdv) then Exit;
  9116. { Ignore presence/absence of functions below.
  9117. See their special definition in
  9118. http://www.opengl.org/registry/specs/ARB/gpu_shader_fp64.txt:
  9119. "All of the following ProgramUniform* functions are supported if and only
  9120. if EXT_direct_state_access is supported." }
  9121. glProgramUniform1dEXT := wglGetProcAddress('glProgramUniform1dEXT');
  9122. // if not Assigned(glProgramUniform1dEXT) then Exit;
  9123. glProgramUniform2dEXT := wglGetProcAddress('glProgramUniform2dEXT');
  9124. // if not Assigned(glProgramUniform2dEXT) then Exit;
  9125. glProgramUniform3dEXT := wglGetProcAddress('glProgramUniform3dEXT');
  9126. // if not Assigned(glProgramUniform3dEXT) then Exit;
  9127. glProgramUniform4dEXT := wglGetProcAddress('glProgramUniform4dEXT');
  9128. // if not Assigned(glProgramUniform4dEXT) then Exit;
  9129. glProgramUniform1dvEXT := wglGetProcAddress('glProgramUniform1dvEXT');
  9130. // if not Assigned(glProgramUniform1dvEXT) then Exit;
  9131. glProgramUniform2dvEXT := wglGetProcAddress('glProgramUniform2dvEXT');
  9132. // if not Assigned(glProgramUniform2dvEXT) then Exit;
  9133. glProgramUniform3dvEXT := wglGetProcAddress('glProgramUniform3dvEXT');
  9134. // if not Assigned(glProgramUniform3dvEXT) then Exit;
  9135. glProgramUniform4dvEXT := wglGetProcAddress('glProgramUniform4dvEXT');
  9136. // if not Assigned(glProgramUniform4dvEXT) then Exit;
  9137. glProgramUniformMatrix2dvEXT := wglGetProcAddress('glProgramUniformMatrix2dvEXT');
  9138. // if not Assigned(glProgramUniformMatrix2dvEXT) then Exit;
  9139. glProgramUniformMatrix3dvEXT := wglGetProcAddress('glProgramUniformMatrix3dvEXT');
  9140. // if not Assigned(glProgramUniformMatrix3dvEXT) then Exit;
  9141. glProgramUniformMatrix4dvEXT := wglGetProcAddress('glProgramUniformMatrix4dvEXT');
  9142. // if not Assigned(glProgramUniformMatrix4dvEXT) then Exit;
  9143. glProgramUniformMatrix2x3dvEXT := wglGetProcAddress('glProgramUniformMatrix2x3dvEXT');
  9144. // if not Assigned(glProgramUniformMatrix2x3dvEXT) then Exit;
  9145. glProgramUniformMatrix2x4dvEXT := wglGetProcAddress('glProgramUniformMatrix2x4dvEXT');
  9146. // if not Assigned(glProgramUniformMatrix2x4dvEXT) then Exit;
  9147. glProgramUniformMatrix3x2dvEXT := wglGetProcAddress('glProgramUniformMatrix3x2dvEXT');
  9148. // if not Assigned(glProgramUniformMatrix3x2dvEXT) then Exit;
  9149. glProgramUniformMatrix3x4dvEXT := wglGetProcAddress('glProgramUniformMatrix3x4dvEXT');
  9150. // if not Assigned(glProgramUniformMatrix3x4dvEXT) then Exit;
  9151. glProgramUniformMatrix4x2dvEXT := wglGetProcAddress('glProgramUniformMatrix4x2dvEXT');
  9152. // if not Assigned(glProgramUniformMatrix4x2dvEXT) then Exit;
  9153. glProgramUniformMatrix4x3dvEXT := wglGetProcAddress('glProgramUniformMatrix4x3dvEXT');
  9154. // if not Assigned(glProgramUniformMatrix4x3dvEXT) then Exit;
  9155. Result := True;
  9156. end;
  9157. end;
  9158. function Load_GL_ARB_shader_subroutine(LoadAsCore: boolean): Boolean;
  9159. var
  9160. extstring: AnsiString;
  9161. begin
  9162. Result := False;
  9163. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  9164. if LoadAsCore or glext_ExtensionSupported('GL_ARB_shader_subroutine', extstring) then
  9165. begin
  9166. glGetSubroutineUniformLocation := wglGetProcAddress('glGetSubroutineUniformLocation');
  9167. if not Assigned(glGetSubroutineUniformLocation) then Exit;
  9168. glGetSubroutineIndex := wglGetProcAddress('glGetSubroutineIndex');
  9169. if not Assigned(glGetSubroutineIndex) then Exit;
  9170. glGetActiveSubroutineUniformiv := wglGetProcAddress('glGetActiveSubroutineUniformiv');
  9171. if not Assigned(glGetActiveSubroutineUniformiv) then Exit;
  9172. glGetActiveSubroutineUniformName := wglGetProcAddress('glGetActiveSubroutineUniformName');
  9173. if not Assigned(glGetActiveSubroutineUniformName) then Exit;
  9174. glGetActiveSubroutineName := wglGetProcAddress('glGetActiveSubroutineName');
  9175. if not Assigned(glGetActiveSubroutineName) then Exit;
  9176. glUniformSubroutinesuiv := wglGetProcAddress('glUniformSubroutinesuiv');
  9177. if not Assigned(glUniformSubroutinesuiv) then Exit;
  9178. glGetUniformSubroutineuiv := wglGetProcAddress('glGetUniformSubroutineuiv');
  9179. if not Assigned(glGetUniformSubroutineuiv) then Exit;
  9180. glGetProgramStageiv := wglGetProcAddress('glGetProgramStageiv');
  9181. if not Assigned(glGetProgramStageiv) then Exit;
  9182. Result := True;
  9183. end;
  9184. end;
  9185. function Load_GL_ARB_tessellation_shader(LoadAsCore: boolean): Boolean;
  9186. var
  9187. extstring: AnsiString;
  9188. begin
  9189. Result := False;
  9190. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  9191. if LoadAsCore or glext_ExtensionSupported('GL_ARB_tessellation_shader', extstring) then
  9192. begin
  9193. glPatchParameteri := wglGetProcAddress('glPatchParameteri');
  9194. if not Assigned(glPatchParameteri) then Exit;
  9195. glPatchParameterfv := wglGetProcAddress('glPatchParameterfv');
  9196. if not Assigned(glPatchParameterfv) then Exit;
  9197. Result := True;
  9198. end;
  9199. end;
  9200. function Load_GL_ARB_transform_feedback2(LoadAsCore: boolean): Boolean;
  9201. var
  9202. extstring: AnsiString;
  9203. begin
  9204. Result := False;
  9205. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  9206. if LoadAsCore or glext_ExtensionSupported('GL_ARB_transform_feedback2', extstring) then
  9207. begin
  9208. glBindTransformFeedback := wglGetProcAddress('glBindTransformFeedback');
  9209. if not Assigned(glBindTransformFeedback) then Exit;
  9210. glDeleteTransformFeedbacks := wglGetProcAddress('glDeleteTransformFeedbacks');
  9211. if not Assigned(glDeleteTransformFeedbacks) then Exit;
  9212. glGenTransformFeedbacks := wglGetProcAddress('glGenTransformFeedbacks');
  9213. if not Assigned(glGenTransformFeedbacks) then Exit;
  9214. glIsTransformFeedback := wglGetProcAddress('glIsTransformFeedback');
  9215. if not Assigned(glIsTransformFeedback) then Exit;
  9216. glPauseTransformFeedback := wglGetProcAddress('glPauseTransformFeedback');
  9217. if not Assigned(glPauseTransformFeedback) then Exit;
  9218. glResumeTransformFeedback := wglGetProcAddress('glResumeTransformFeedback');
  9219. if not Assigned(glResumeTransformFeedback) then Exit;
  9220. glDrawTransformFeedback := wglGetProcAddress('glDrawTransformFeedback');
  9221. if not Assigned(glDrawTransformFeedback) then Exit;
  9222. Result := True;
  9223. end;
  9224. end;
  9225. function Load_GL_ARB_transform_feedback3(LoadAsCore: boolean): Boolean;
  9226. var
  9227. extstring: AnsiString;
  9228. begin
  9229. Result := False;
  9230. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  9231. if LoadAsCore or glext_ExtensionSupported('GL_ARB_transform_feedback3', extstring) then
  9232. begin
  9233. glDrawTransformFeedbackStream := wglGetProcAddress('glDrawTransformFeedbackStream');
  9234. if not Assigned(glDrawTransformFeedbackStream) then Exit;
  9235. glBeginQueryIndexed := wglGetProcAddress('glBeginQueryIndexed');
  9236. if not Assigned(glBeginQueryIndexed) then Exit;
  9237. glEndQueryIndexed := wglGetProcAddress('glEndQueryIndexed');
  9238. if not Assigned(glEndQueryIndexed) then Exit;
  9239. glGetQueryIndexediv := wglGetProcAddress('glGetQueryIndexediv');
  9240. if not Assigned(glGetQueryIndexediv) then Exit;
  9241. Result := True;
  9242. end;
  9243. end;
  9244. procedure Load_GL_version_1_4x (var allOK: Boolean);
  9245. begin
  9246. glBlendFuncSeparate := wglGetProcAddress('glBlendFuncSeparate');
  9247. if not Assigned(glBlendFuncSeparate) then allOK := false;
  9248. glFogCoordf := wglGetProcAddress('glFogCoordf');
  9249. if not Assigned(glFogCoordf) then allOK := false;
  9250. glFogCoordfv := wglGetProcAddress('glFogCoordfv');
  9251. if not Assigned(glFogCoordfv) then allOK := false;
  9252. glFogCoordd := wglGetProcAddress('glFogCoordd');
  9253. if not Assigned(glFogCoordd) then allOK := false;
  9254. glFogCoorddv := wglGetProcAddress('glFogCoorddv');
  9255. if not Assigned(glFogCoorddv) then allOK := false;
  9256. glFogCoordPointer := wglGetProcAddress('glFogCoordPointer');
  9257. if not Assigned(glFogCoordPointer) then allOK := false;
  9258. glMultiDrawArrays := wglGetProcAddress('glMultiDrawArrays');
  9259. if not Assigned(glMultiDrawArrays) then allOK := false;
  9260. glMultiDrawElements := wglGetProcAddress('glMultiDrawElements');
  9261. if not Assigned(glMultiDrawElements) then allOK := false;
  9262. glPointParameterf := wglGetProcAddress('glPointParameterf');
  9263. if not Assigned(glPointParameterf) then allOK := false;
  9264. glPointParameterfv := wglGetProcAddress('glPointParameterfv');
  9265. if not Assigned(glPointParameterfv) then allOK := false;
  9266. glPointParameteri := wglGetProcAddress('glPointParameteri');
  9267. if not Assigned(glPointParameteri) then allOK := false;
  9268. glPointParameteriv := wglGetProcAddress('glPointParameteriv');
  9269. if not Assigned(glPointParameteriv) then allOK := false;
  9270. glSecondaryColor3b := wglGetProcAddress('glSecondaryColor3b');
  9271. if not Assigned(glSecondaryColor3b) then allOK := false;
  9272. glSecondaryColor3bv := wglGetProcAddress('glSecondaryColor3bv');
  9273. if not Assigned(glSecondaryColor3bv) then allOK := false;
  9274. glSecondaryColor3d := wglGetProcAddress('glSecondaryColor3d');
  9275. if not Assigned(glSecondaryColor3d) then allOK := false;
  9276. glSecondaryColor3dv := wglGetProcAddress('glSecondaryColor3dv');
  9277. if not Assigned(glSecondaryColor3dv) then allOK := false;
  9278. glSecondaryColor3f := wglGetProcAddress('glSecondaryColor3f');
  9279. if not Assigned(glSecondaryColor3f) then allOK := false;
  9280. glSecondaryColor3fv := wglGetProcAddress('glSecondaryColor3fv');
  9281. if not Assigned(glSecondaryColor3fv) then allOK := false;
  9282. glSecondaryColor3i := wglGetProcAddress('glSecondaryColor3i');
  9283. if not Assigned(glSecondaryColor3i) then allOK := false;
  9284. glSecondaryColor3iv := wglGetProcAddress('glSecondaryColor3iv');
  9285. if not Assigned(glSecondaryColor3iv) then allOK := false;
  9286. glSecondaryColor3s := wglGetProcAddress('glSecondaryColor3s');
  9287. if not Assigned(glSecondaryColor3s) then allOK := false;
  9288. glSecondaryColor3sv := wglGetProcAddress('glSecondaryColor3sv');
  9289. if not Assigned(glSecondaryColor3sv) then allOK := false;
  9290. glSecondaryColor3ub := wglGetProcAddress('glSecondaryColor3ub');
  9291. if not Assigned(glSecondaryColor3ub) then allOK := false;
  9292. glSecondaryColor3ubv := wglGetProcAddress('glSecondaryColor3ubv');
  9293. if not Assigned(glSecondaryColor3ubv) then allOK := false;
  9294. glSecondaryColor3ui := wglGetProcAddress('glSecondaryColor3ui');
  9295. if not Assigned(glSecondaryColor3ui) then allOK := false;
  9296. glSecondaryColor3uiv := wglGetProcAddress('glSecondaryColor3uiv');
  9297. if not Assigned(glSecondaryColor3uiv) then allOK := false;
  9298. glSecondaryColor3us := wglGetProcAddress('glSecondaryColor3us');
  9299. if not Assigned(glSecondaryColor3us) then allOK := false;
  9300. glSecondaryColor3usv := wglGetProcAddress('glSecondaryColor3usv');
  9301. if not Assigned(glSecondaryColor3usv) then allOK := false;
  9302. glSecondaryColorPointer := wglGetProcAddress('glSecondaryColorPointer');
  9303. if not Assigned(glSecondaryColorPointer) then allOK := false;
  9304. glWindowPos2d := wglGetProcAddress('glWindowPos2d');
  9305. if not Assigned(glWindowPos2d) then allOK := false;
  9306. glWindowPos2dv := wglGetProcAddress('glWindowPos2dv');
  9307. if not Assigned(glWindowPos2dv) then allOK := false;
  9308. glWindowPos2f := wglGetProcAddress('glWindowPos2f');
  9309. if not Assigned(glWindowPos2f) then allOK := false;
  9310. glWindowPos2fv := wglGetProcAddress('glWindowPos2fv');
  9311. if not Assigned(glWindowPos2fv) then allOK := false;
  9312. glWindowPos2i := wglGetProcAddress('glWindowPos2i');
  9313. if not Assigned(glWindowPos2i) then allOK := false;
  9314. glWindowPos2iv := wglGetProcAddress('glWindowPos2iv');
  9315. if not Assigned(glWindowPos2iv) then allOK := false;
  9316. glWindowPos2s := wglGetProcAddress('glWindowPos2s');
  9317. if not Assigned(glWindowPos2s) then allOK := false;
  9318. glWindowPos2sv := wglGetProcAddress('glWindowPos2sv');
  9319. if not Assigned(glWindowPos2sv) then allOK := false;
  9320. glWindowPos3d := wglGetProcAddress('glWindowPos3d');
  9321. if not Assigned(glWindowPos3d) then allOK := false;
  9322. glWindowPos3dv := wglGetProcAddress('glWindowPos3dv');
  9323. if not Assigned(glWindowPos3dv) then allOK := false;
  9324. glWindowPos3f := wglGetProcAddress('glWindowPos3f');
  9325. if not Assigned(glWindowPos3f) then allOK := false;
  9326. glWindowPos3fv := wglGetProcAddress('glWindowPos3fv');
  9327. if not Assigned(glWindowPos3fv) then allOK := false;
  9328. glWindowPos3i := wglGetProcAddress('glWindowPos3i');
  9329. if not Assigned(glWindowPos3i) then allOK := false;
  9330. glWindowPos3iv := wglGetProcAddress('glWindowPos3iv');
  9331. if not Assigned(glWindowPos3iv) then allOK := false;
  9332. glWindowPos3s := wglGetProcAddress('glWindowPos3s');
  9333. if not Assigned(glWindowPos3s) then allOK := false;
  9334. glWindowPos3sv := wglGetProcAddress('glWindowPos3sv');
  9335. if not Assigned(glWindowPos3sv) then allOK := false;
  9336. Load_GL_version_1_3x(allOK);
  9337. end;
  9338. function Load_GL_version_1_4: boolean;
  9339. begin
  9340. result := true;
  9341. Load_GL_version_1_4x(result);
  9342. end;
  9343. procedure Load_GL_version_1_5x (var allOK: Boolean);
  9344. begin
  9345. glGenQueries := wglGetProcAddress('glGenQueries');
  9346. if not Assigned(glGenQueries) then allOK := false;
  9347. glDeleteQueries := wglGetProcAddress('glDeleteQueries');
  9348. if not Assigned(glDeleteQueries) then allOK := false;
  9349. glIsQuery := wglGetProcAddress('glIsQuery');
  9350. if not Assigned(glIsQuery) then allOK := false;
  9351. glBeginQuery := wglGetProcAddress('glBeginQuery');
  9352. if not Assigned(glBeginQuery) then allOK := false;
  9353. glEndQuery := wglGetProcAddress('glEndQuery');
  9354. if not Assigned(glEndQuery) then allOK := false;
  9355. glGetQueryiv := wglGetProcAddress('glGetQueryiv');
  9356. if not Assigned(glGetQueryiv) then allOK := false;
  9357. glGetQueryObjectiv := wglGetProcAddress('glGetQueryObjectiv');
  9358. if not Assigned(glGetQueryObjectiv) then allOK := false;
  9359. glGetQueryObjectuiv := wglGetProcAddress('glGetQueryObjectuiv');
  9360. if not Assigned(glGetQueryObjectuiv) then allOK := false;
  9361. glBindBuffer := wglGetProcAddress('glBindBuffer');
  9362. if not Assigned(glBindBuffer) then allOK := false;
  9363. glDeleteBuffers := wglGetProcAddress('glDeleteBuffers');
  9364. if not Assigned(glDeleteBuffers) then allOK := false;
  9365. glGenBuffers := wglGetProcAddress('glGenBuffers');
  9366. if not Assigned(glGenBuffers) then allOK := false;
  9367. glIsBuffer := wglGetProcAddress('glIsBuffer');
  9368. if not Assigned(glIsBuffer) then allOK := false;
  9369. glBufferData := wglGetProcAddress('glBufferData');
  9370. if not Assigned(glBufferData) then allOK := false;
  9371. glBufferSubData := wglGetProcAddress('glBufferSubData');
  9372. if not Assigned(glBufferSubData) then allOK := false;
  9373. glGetBufferSubData := wglGetProcAddress('glGetBufferSubData');
  9374. if not Assigned(glGetBufferSubData) then allOK := false;
  9375. glMapBuffer := wglGetProcAddress('glMapBuffer');
  9376. if not Assigned(glMapBuffer) then allOK := false;
  9377. glUnmapBuffer := wglGetProcAddress('glUnmapBuffer');
  9378. if not Assigned(glUnmapBuffer) then allOK := false;
  9379. glGetBufferParameteriv := wglGetProcAddress('glGetBufferParameteriv');
  9380. if not Assigned(glGetBufferParameteriv) then allOK := false;
  9381. glGetBufferPointerv := wglGetProcAddress('glGetBufferPointerv');
  9382. if not Assigned(glGetBufferPointerv) then allOK := false;
  9383. Load_GL_version_1_4x(allOK);
  9384. end;
  9385. function Load_GL_version_1_5: boolean;
  9386. begin
  9387. result := true;
  9388. Load_GL_version_1_5x(result);
  9389. end;
  9390. procedure Load_GL_version_2_0x (var allOK: Boolean);
  9391. begin
  9392. glBlendEquationSeparate := wglGetProcAddress('glBlendEquationSeparate');
  9393. if not Assigned(glBlendEquationSeparate) then allOK := false;
  9394. glDrawBuffers := wglGetProcAddress('glDrawBuffers');
  9395. if not Assigned(glDrawBuffers) then allOK := false;
  9396. glStencilOpSeparate := wglGetProcAddress('glStencilOpSeparate');
  9397. if not Assigned(glStencilOpSeparate) then allOK := false;
  9398. glStencilFuncSeparate := wglGetProcAddress('glStencilFuncSeparate');
  9399. if not Assigned(glStencilFuncSeparate) then allOK := false;
  9400. glStencilMaskSeparate := wglGetProcAddress('glStencilMaskSeparate');
  9401. if not Assigned(glStencilMaskSeparate) then allOK := false;
  9402. glAttachShader := wglGetProcAddress('glAttachShader');
  9403. if not Assigned(glAttachShader) then allOK := false;
  9404. glBindAttribLocation := wglGetProcAddress('glBindAttribLocation');
  9405. if not Assigned(glBindAttribLocation) then allOK := false;
  9406. glCompileShader := wglGetProcAddress('glCompileShader');
  9407. if not Assigned(glCompileShader) then allOK := false;
  9408. glCreateProgram := wglGetProcAddress('glCreateProgram');
  9409. if not Assigned(glCreateProgram) then allOK := false;
  9410. glCreateShader := wglGetProcAddress('glCreateShader');
  9411. if not Assigned(glCreateShader) then allOK := false;
  9412. glDeleteProgram := wglGetProcAddress('glDeleteProgram');
  9413. if not Assigned(glDeleteProgram) then allOK := false;
  9414. glDeleteShader := wglGetProcAddress('glDeleteShader');
  9415. if not Assigned(glDeleteShader) then allOK := false;
  9416. glDetachShader := wglGetProcAddress('glDetachShader');
  9417. if not Assigned(glDetachShader) then allOK := false;
  9418. glDisableVertexAttribArray := wglGetProcAddress('glDisableVertexAttribArray');
  9419. if not Assigned(glDisableVertexAttribArray) then allOK := false;
  9420. glEnableVertexAttribArray := wglGetProcAddress('glEnableVertexAttribArray');
  9421. if not Assigned(glEnableVertexAttribArray) then allOK := false;
  9422. glGetActiveAttrib := wglGetProcAddress('glGetActiveAttrib');
  9423. if not Assigned(glGetActiveAttrib) then allOK := false;
  9424. glGetActiveUniform := wglGetProcAddress('glGetActiveUniform');
  9425. if not Assigned(glGetActiveUniform) then allOK := false;
  9426. glGetAttachedShaders := wglGetProcAddress('glGetAttachedShaders');
  9427. if not Assigned(glGetAttachedShaders) then allOK := false;
  9428. glGetAttribLocation := wglGetProcAddress('glGetAttribLocation');
  9429. if not Assigned(glGetAttribLocation) then allOK := false;
  9430. glGetProgramiv := wglGetProcAddress('glGetProgramiv');
  9431. if not Assigned(glGetProgramiv) then allOK := false;
  9432. glGetProgramInfoLog := wglGetProcAddress('glGetProgramInfoLog');
  9433. if not Assigned(glGetProgramInfoLog) then allOK := false;
  9434. glGetShaderiv := wglGetProcAddress('glGetShaderiv');
  9435. if not Assigned(glGetShaderiv) then allOK := false;
  9436. glGetShaderInfoLog := wglGetProcAddress('glGetShaderInfoLog');
  9437. if not Assigned(glGetShaderInfoLog) then allOK := false;
  9438. glGetShaderSource := wglGetProcAddress('glGetShaderSource');
  9439. if not Assigned(glGetShaderSource) then allOK := false;
  9440. glGetUniformLocation := wglGetProcAddress('glGetUniformLocation');
  9441. if not Assigned(glGetUniformLocation) then allOK := false;
  9442. glGetUniformfv := wglGetProcAddress('glGetUniformfv');
  9443. if not Assigned(glGetUniformfv) then allOK := false;
  9444. glGetUniformiv := wglGetProcAddress('glGetUniformiv');
  9445. if not Assigned(glGetUniformiv) then allOK := false;
  9446. glGetVertexAttribdv := wglGetProcAddress('glGetVertexAttribdv');
  9447. if not Assigned(glGetVertexAttribdv) then allOK := false;
  9448. glGetVertexAttribfv := wglGetProcAddress('glGetVertexAttribfv');
  9449. if not Assigned(glGetVertexAttribfv) then allOK := false;
  9450. glGetVertexAttribiv := wglGetProcAddress('glGetVertexAttribiv');
  9451. if not Assigned(glGetVertexAttribiv) then allOK := false;
  9452. glGetVertexAttribPointerv := wglGetProcAddress('glGetVertexAttribPointerv');
  9453. if not Assigned(glGetVertexAttribPointerv) then allOK := false;
  9454. glIsProgram := wglGetProcAddress('glIsProgram');
  9455. if not Assigned(glIsProgram) then allOK := false;
  9456. glIsShader := wglGetProcAddress('glIsShader');
  9457. if not Assigned(glIsShader) then allOK := false;
  9458. glLinkProgram := wglGetProcAddress('glLinkProgram');
  9459. if not Assigned(glLinkProgram) then allOK := false;
  9460. glShaderSource := wglGetProcAddress('glShaderSource');
  9461. if not Assigned(glShaderSource) then allOK := false;
  9462. glUseProgram := wglGetProcAddress('glUseProgram');
  9463. if not Assigned(glUseProgram) then allOK := false;
  9464. glUniform1f := wglGetProcAddress('glUniform1f');
  9465. if not Assigned(glUniform1f) then allOK := false;
  9466. glUniform2f := wglGetProcAddress('glUniform2f');
  9467. if not Assigned(glUniform2f) then allOK := false;
  9468. glUniform3f := wglGetProcAddress('glUniform3f');
  9469. if not Assigned(glUniform3f) then allOK := false;
  9470. glUniform4f := wglGetProcAddress('glUniform4f');
  9471. if not Assigned(glUniform4f) then allOK := false;
  9472. glUniform1i := wglGetProcAddress('glUniform1i');
  9473. if not Assigned(glUniform1i) then allOK := false;
  9474. glUniform2i := wglGetProcAddress('glUniform2i');
  9475. if not Assigned(glUniform2i) then allOK := false;
  9476. glUniform3i := wglGetProcAddress('glUniform3i');
  9477. if not Assigned(glUniform3i) then allOK := false;
  9478. glUniform4i := wglGetProcAddress('glUniform4i');
  9479. if not Assigned(glUniform4i) then allOK := false;
  9480. glUniform1fv := wglGetProcAddress('glUniform1fv');
  9481. if not Assigned(glUniform1fv) then allOK := false;
  9482. glUniform2fv := wglGetProcAddress('glUniform2fv');
  9483. if not Assigned(glUniform2fv) then allOK := false;
  9484. glUniform3fv := wglGetProcAddress('glUniform3fv');
  9485. if not Assigned(glUniform3fv) then allOK := false;
  9486. glUniform4fv := wglGetProcAddress('glUniform4fv');
  9487. if not Assigned(glUniform4fv) then allOK := false;
  9488. glUniform1iv := wglGetProcAddress('glUniform1iv');
  9489. if not Assigned(glUniform1iv) then allOK := false;
  9490. glUniform2iv := wglGetProcAddress('glUniform2iv');
  9491. if not Assigned(glUniform2iv) then allOK := false;
  9492. glUniform3iv := wglGetProcAddress('glUniform3iv');
  9493. if not Assigned(glUniform3iv) then allOK := false;
  9494. glUniform4iv := wglGetProcAddress('glUniform4iv');
  9495. if not Assigned(glUniform4iv) then allOK := false;
  9496. glUniformMatrix2fv := wglGetProcAddress('glUniformMatrix2fv');
  9497. if not Assigned(glUniformMatrix2fv) then allOK := false;
  9498. glUniformMatrix3fv := wglGetProcAddress('glUniformMatrix3fv');
  9499. if not Assigned(glUniformMatrix3fv) then allOK := false;
  9500. glUniformMatrix4fv := wglGetProcAddress('glUniformMatrix4fv');
  9501. if not Assigned(glUniformMatrix4fv) then allOK := false;
  9502. glValidateProgram := wglGetProcAddress('glValidateProgram');
  9503. if not Assigned(glValidateProgram) then allOK := false;
  9504. glVertexAttrib1d := wglGetProcAddress('glVertexAttrib1d');
  9505. if not Assigned(glVertexAttrib1d) then allOK := false;
  9506. glVertexAttrib1dv := wglGetProcAddress('glVertexAttrib1dv');
  9507. if not Assigned(glVertexAttrib1dv) then allOK := false;
  9508. glVertexAttrib1f := wglGetProcAddress('glVertexAttrib1f');
  9509. if not Assigned(glVertexAttrib1f) then allOK := false;
  9510. glVertexAttrib1fv := wglGetProcAddress('glVertexAttrib1fv');
  9511. if not Assigned(glVertexAttrib1fv) then allOK := false;
  9512. glVertexAttrib1s := wglGetProcAddress('glVertexAttrib1s');
  9513. if not Assigned(glVertexAttrib1s) then allOK := false;
  9514. glVertexAttrib1sv := wglGetProcAddress('glVertexAttrib1sv');
  9515. if not Assigned(glVertexAttrib1sv) then allOK := false;
  9516. glVertexAttrib2d := wglGetProcAddress('glVertexAttrib2d');
  9517. if not Assigned(glVertexAttrib2d) then allOK := false;
  9518. glVertexAttrib2dv := wglGetProcAddress('glVertexAttrib2dv');
  9519. if not Assigned(glVertexAttrib2dv) then allOK := false;
  9520. glVertexAttrib2f := wglGetProcAddress('glVertexAttrib2f');
  9521. if not Assigned(glVertexAttrib2f) then allOK := false;
  9522. glVertexAttrib2fv := wglGetProcAddress('glVertexAttrib2fv');
  9523. if not Assigned(glVertexAttrib2fv) then allOK := false;
  9524. glVertexAttrib2s := wglGetProcAddress('glVertexAttrib2s');
  9525. if not Assigned(glVertexAttrib2s) then allOK := false;
  9526. glVertexAttrib2sv := wglGetProcAddress('glVertexAttrib2sv');
  9527. if not Assigned(glVertexAttrib2sv) then allOK := false;
  9528. glVertexAttrib3d := wglGetProcAddress('glVertexAttrib3d');
  9529. if not Assigned(glVertexAttrib3d) then allOK := false;
  9530. glVertexAttrib3dv := wglGetProcAddress('glVertexAttrib3dv');
  9531. if not Assigned(glVertexAttrib3dv) then allOK := false;
  9532. glVertexAttrib3f := wglGetProcAddress('glVertexAttrib3f');
  9533. if not Assigned(glVertexAttrib3f) then allOK := false;
  9534. glVertexAttrib3fv := wglGetProcAddress('glVertexAttrib3fv');
  9535. if not Assigned(glVertexAttrib3fv) then allOK := false;
  9536. glVertexAttrib3s := wglGetProcAddress('glVertexAttrib3s');
  9537. if not Assigned(glVertexAttrib3s) then allOK := false;
  9538. glVertexAttrib3sv := wglGetProcAddress('glVertexAttrib3sv');
  9539. if not Assigned(glVertexAttrib3sv) then allOK := false;
  9540. glVertexAttrib4Nbv := wglGetProcAddress('glVertexAttrib4Nbv');
  9541. if not Assigned(glVertexAttrib4Nbv) then allOK := false;
  9542. glVertexAttrib4Niv := wglGetProcAddress('glVertexAttrib4Niv');
  9543. if not Assigned(glVertexAttrib4Niv) then allOK := false;
  9544. glVertexAttrib4Nsv := wglGetProcAddress('glVertexAttrib4Nsv');
  9545. if not Assigned(glVertexAttrib4Nsv) then allOK := false;
  9546. glVertexAttrib4Nub := wglGetProcAddress('glVertexAttrib4Nub');
  9547. if not Assigned(glVertexAttrib4Nub) then allOK := false;
  9548. glVertexAttrib4Nubv := wglGetProcAddress('glVertexAttrib4Nubv');
  9549. if not Assigned(glVertexAttrib4Nubv) then allOK := false;
  9550. glVertexAttrib4Nuiv := wglGetProcAddress('glVertexAttrib4Nuiv');
  9551. if not Assigned(glVertexAttrib4Nuiv) then allOK := false;
  9552. glVertexAttrib4Nusv := wglGetProcAddress('glVertexAttrib4Nusv');
  9553. if not Assigned(glVertexAttrib4Nusv) then allOK := false;
  9554. glVertexAttrib4bv := wglGetProcAddress('glVertexAttrib4bv');
  9555. if not Assigned(glVertexAttrib4bv) then allOK := false;
  9556. glVertexAttrib4d := wglGetProcAddress('glVertexAttrib4d');
  9557. if not Assigned(glVertexAttrib4d) then allOK := false;
  9558. glVertexAttrib4dv := wglGetProcAddress('glVertexAttrib4dv');
  9559. if not Assigned(glVertexAttrib4dv) then allOK := false;
  9560. glVertexAttrib4f := wglGetProcAddress('glVertexAttrib4f');
  9561. if not Assigned(glVertexAttrib4f) then allOK := false;
  9562. glVertexAttrib4fv := wglGetProcAddress('glVertexAttrib4fv');
  9563. if not Assigned(glVertexAttrib4fv) then allOK := false;
  9564. glVertexAttrib4iv := wglGetProcAddress('glVertexAttrib4iv');
  9565. if not Assigned(glVertexAttrib4iv) then allOK := false;
  9566. glVertexAttrib4s := wglGetProcAddress('glVertexAttrib4s');
  9567. if not Assigned(glVertexAttrib4s) then allOK := false;
  9568. glVertexAttrib4sv := wglGetProcAddress('glVertexAttrib4sv');
  9569. if not Assigned(glVertexAttrib4sv) then allOK := false;
  9570. glVertexAttrib4ubv := wglGetProcAddress('glVertexAttrib4ubv');
  9571. if not Assigned(glVertexAttrib4ubv) then allOK := false;
  9572. glVertexAttrib4uiv := wglGetProcAddress('glVertexAttrib4uiv');
  9573. if not Assigned(glVertexAttrib4uiv) then allOK := false;
  9574. glVertexAttrib4usv := wglGetProcAddress('glVertexAttrib4usv');
  9575. if not Assigned(glVertexAttrib4usv) then allOK := false;
  9576. glVertexAttribPointer := wglGetProcAddress('glVertexAttribPointer');
  9577. if not Assigned(glVertexAttribPointer) then allOK := false;
  9578. Load_GL_version_1_5x(allOK);
  9579. end;
  9580. function Load_GL_version_2_0: boolean;
  9581. begin
  9582. result := true;
  9583. Load_GL_version_2_0x(result);
  9584. end;
  9585. function glext_LoadExtension(ext: AnsiString): Boolean;
  9586. begin
  9587. Result := FALSE;
  9588. if ext = 'GL_version_1_2' then Result := Load_GL_version_1_2
  9589. else if ext = 'GL_ARB_imaging' then Result := Load_GL_ARB_imaging
  9590. else if ext = 'GL_version_1_3' then Result := Load_GL_version_1_3
  9591. else if ext = 'GL_ARB_multitexture' then Result := Load_GL_ARB_multitexture
  9592. else if ext = 'GL_ARB_transpose_matrix' then Result := Load_GL_ARB_transpose_matrix
  9593. else if ext = 'GL_ARB_multisample' then Result := Load_GL_ARB_multisample
  9594. else if ext = 'GL_ARB_texture_env_add' then Result := Load_GL_ARB_texture_env_add
  9595. {$IFDEF Windows}
  9596. else if ext = 'WGL_ARB_extensions_string' then Result := Load_WGL_ARB_extensions_string
  9597. else if ext = 'WGL_ARB_buffer_region' then Result := Load_WGL_ARB_buffer_region
  9598. {$ENDIF}
  9599. else if ext = 'GL_ARB_texture_cube_map' then Result := Load_GL_ARB_texture_cube_map
  9600. else if ext = 'GL_ARB_depth_texture' then Result := Load_GL_ARB_depth_texture
  9601. else if ext = 'GL_ARB_point_parameters' then Result := Load_GL_ARB_point_parameters
  9602. else if ext = 'GL_ARB_shadow' then Result := Load_GL_ARB_shadow
  9603. else if ext = 'GL_ARB_shadow_ambient' then Result := Load_GL_ARB_shadow_ambient
  9604. else if ext = 'GL_ARB_texture_border_clamp' then Result := Load_GL_ARB_texture_border_clamp
  9605. else if ext = 'GL_ARB_texture_compression' then Result := Load_GL_ARB_texture_compression
  9606. else if ext = 'GL_ARB_texture_env_combine' then Result := Load_GL_ARB_texture_env_combine
  9607. else if ext = 'GL_ARB_texture_env_crossbar' then Result := Load_GL_ARB_texture_env_crossbar
  9608. else if ext = 'GL_ARB_texture_env_dot3' then Result := Load_GL_ARB_texture_env_dot3
  9609. else if ext = 'GL_ARB_texture_mirrored_repeat' then Result := Load_GL_ARB_texture_mirrored_repeat
  9610. else if ext = 'GL_ARB_vertex_blend' then Result := Load_GL_ARB_vertex_blend
  9611. else if ext = 'GL_ARB_vertex_program' then Result := Load_GL_ARB_vertex_program
  9612. else if ext = 'GL_ARB_window_pos' then Result := Load_GL_ARB_window_pos
  9613. else if ext = 'GL_EXT_422_pixels' then Result := Load_GL_EXT_422_pixels
  9614. else if ext = 'GL_EXT_abgr' then Result := Load_GL_EXT_abgr
  9615. else if ext = 'GL_EXT_bgra' then Result := Load_GL_EXT_bgra
  9616. else if ext = 'GL_EXT_blend_color' then Result := Load_GL_EXT_blend_color
  9617. else if ext = 'GL_EXT_blend_func_separate' then Result := Load_GL_EXT_blend_func_separate
  9618. else if ext = 'GL_EXT_blend_logic_op' then Result := Load_GL_EXT_blend_logic_op
  9619. else if ext = 'GL_EXT_blend_minmax' then Result := Load_GL_EXT_blend_minmax
  9620. else if ext = 'GL_EXT_blend_subtract' then Result := Load_GL_EXT_blend_subtract
  9621. else if ext = 'GL_EXT_clip_volume_hint' then Result := Load_GL_EXT_clip_volume_hint
  9622. else if ext = 'GL_EXT_color_subtable' then Result := Load_GL_EXT_color_subtable
  9623. else if ext = 'GL_EXT_compiled_vertex_array' then Result := Load_GL_EXT_compiled_vertex_array
  9624. else if ext = 'GL_EXT_convolution' then Result := Load_GL_EXT_convolution
  9625. else if ext = 'GL_EXT_fog_coord' then Result := Load_GL_EXT_fog_coord
  9626. else if ext = 'GL_EXT_histogram' then Result := Load_GL_EXT_histogram
  9627. else if ext = 'GL_EXT_multi_draw_arrays' then Result := Load_GL_EXT_multi_draw_arrays
  9628. else if ext = 'GL_EXT_packed_pixels' then Result := Load_GL_EXT_packed_pixels
  9629. else if ext = 'GL_EXT_paletted_texture' then Result := Load_GL_EXT_paletted_texture
  9630. else if ext = 'GL_EXT_point_parameters' then Result := Load_GL_EXT_point_parameters
  9631. else if ext = 'GL_EXT_polygon_offset' then Result := Load_GL_EXT_polygon_offset
  9632. else if ext = 'GL_EXT_secondary_color' then Result := Load_GL_EXT_secondary_color
  9633. else if ext = 'GL_EXT_separate_specular_color' then Result := Load_GL_EXT_separate_specular_color
  9634. else if ext = 'GL_EXT_shadow_funcs' then Result := Load_GL_EXT_shadow_funcs
  9635. else if ext = 'GL_EXT_shared_texture_palette' then Result := Load_GL_EXT_shared_texture_palette
  9636. else if ext = 'GL_EXT_stencil_two_side' then Result := Load_GL_EXT_stencil_two_side
  9637. else if ext = 'GL_EXT_stencil_wrap' then Result := Load_GL_EXT_stencil_wrap
  9638. else if ext = 'GL_EXT_subtexture' then Result := Load_GL_EXT_subtexture
  9639. else if ext = 'GL_EXT_texture3D' then Result := Load_GL_EXT_texture3D
  9640. else if ext = 'GL_EXT_texture_compression_s3tc' then Result := Load_GL_EXT_texture_compression_s3tc
  9641. else if ext = 'GL_EXT_texture_env_add' then Result := Load_GL_EXT_texture_env_add
  9642. else if ext = 'GL_EXT_texture_env_combine' then Result := Load_GL_EXT_texture_env_combine
  9643. else if ext = 'GL_EXT_texture_env_dot3' then Result := Load_GL_EXT_texture_env_dot3
  9644. else if ext = 'GL_EXT_texture_filter_anisotropic' then Result := Load_GL_EXT_texture_filter_anisotropic
  9645. else if ext = 'GL_EXT_texture_lod_bias' then Result := Load_GL_EXT_texture_lod_bias
  9646. else if ext = 'GL_EXT_texture_object' then Result := Load_GL_EXT_texture_object
  9647. else if ext = 'GL_EXT_vertex_array' then Result := Load_GL_EXT_vertex_array
  9648. else if ext = 'GL_EXT_vertex_shader' then Result := Load_GL_EXT_vertex_shader
  9649. else if ext = 'GL_EXT_vertex_weighting' then Result := Load_GL_EXT_vertex_weighting
  9650. else if ext = 'GL_HP_occlusion_test' then Result := Load_GL_HP_occlusion_test
  9651. else if ext = 'GL_NV_blend_square' then Result := Load_GL_NV_blend_square
  9652. else if ext = 'GL_NV_copy_depth_to_color' then Result := Load_GL_NV_copy_depth_to_color
  9653. else if ext = 'GL_NV_depth_clamp' then Result := Load_GL_NV_depth_clamp
  9654. else if ext = 'GL_NV_evaluators' then Result := Load_GL_NV_evaluators
  9655. else if ext = 'GL_NV_fence' then Result := Load_GL_NV_fence
  9656. else if ext = 'GL_NV_fog_distance' then Result := Load_GL_NV_fog_distance
  9657. else if ext = 'GL_NV_light_max_exponent' then Result := Load_GL_NV_light_max_exponent
  9658. else if ext = 'GL_NV_multisample_filter_hint' then Result := Load_GL_NV_multisample_filter_hint
  9659. else if ext = 'GL_NV_occlusion_query' then Result := Load_GL_NV_occlusion_query
  9660. else if ext = 'GL_NV_packed_depth_stencil' then Result := Load_GL_NV_packed_depth_stencil
  9661. else if ext = 'GL_NV_point_sprite' then Result := Load_GL_NV_point_sprite
  9662. else if ext = 'GL_NV_register_combiners' then Result := Load_GL_NV_register_combiners
  9663. else if ext = 'GL_NV_register_combiners2' then Result := Load_GL_NV_register_combiners2
  9664. else if ext = 'GL_NV_texgen_emboss' then Result := Load_GL_NV_texgen_emboss
  9665. else if ext = 'GL_NV_texgen_reflection' then Result := Load_GL_NV_texgen_reflection
  9666. else if ext = 'GL_NV_texture_compression_vtc' then Result := Load_GL_NV_texture_compression_vtc
  9667. else if ext = 'GL_NV_texture_env_combine4' then Result := Load_GL_NV_texture_env_combine4
  9668. else if ext = 'GL_NV_texture_rectangle' then Result := Load_GL_NV_texture_rectangle
  9669. else if ext = 'GL_NV_texture_shader' then Result := Load_GL_NV_texture_shader
  9670. else if ext = 'GL_NV_texture_shader2' then Result := Load_GL_NV_texture_shader2
  9671. else if ext = 'GL_NV_texture_shader3' then Result := Load_GL_NV_texture_shader3
  9672. else if ext = 'GL_NV_vertex_array_range' then Result := Load_GL_NV_vertex_array_range
  9673. else if ext = 'GL_NV_vertex_array_range2' then Result := Load_GL_NV_vertex_array_range2
  9674. else if ext = 'GL_NV_vertex_program' then Result := Load_GL_NV_vertex_program
  9675. else if ext = 'GL_NV_vertex_program1_1' then Result := Load_GL_NV_vertex_program1_1
  9676. else if ext = 'GL_ATI_element_array' then Result := Load_GL_ATI_element_array
  9677. else if ext = 'GL_ATI_envmap_bumpmap' then Result := Load_GL_ATI_envmap_bumpmap
  9678. else if ext = 'GL_ATI_fragment_shader' then Result := Load_GL_ATI_fragment_shader
  9679. else if ext = 'GL_ATI_pn_triangles' then Result := Load_GL_ATI_pn_triangles
  9680. else if ext = 'GL_ATI_texture_mirror_once' then Result := Load_GL_ATI_texture_mirror_once
  9681. else if ext = 'GL_ATI_vertex_array_object' then Result := Load_GL_ATI_vertex_array_object
  9682. else if ext = 'GL_ATI_vertex_streams' then Result := Load_GL_ATI_vertex_streams
  9683. {$IFDEF Windows}
  9684. else if ext = 'WGL_I3D_image_buffer' then Result := Load_WGL_I3D_image_buffer
  9685. else if ext = 'WGL_I3D_swap_frame_lock' then Result := Load_WGL_I3D_swap_frame_lock
  9686. else if ext = 'WGL_I3D_swap_frame_usage' then Result := Load_WGL_I3D_swap_frame_usage
  9687. {$ENDIF}
  9688. else if ext = 'GL_3DFX_texture_compression_FXT1' then Result := Load_GL_3DFX_texture_compression_FXT1
  9689. else if ext = 'GL_IBM_cull_vertex' then Result := Load_GL_IBM_cull_vertex
  9690. else if ext = 'GL_IBM_multimode_draw_arrays' then Result := Load_GL_IBM_multimode_draw_arrays
  9691. else if ext = 'GL_IBM_raster_pos_clip' then Result := Load_GL_IBM_raster_pos_clip
  9692. else if ext = 'GL_IBM_texture_mirrored_repeat' then Result := Load_GL_IBM_texture_mirrored_repeat
  9693. else if ext = 'GL_IBM_vertex_array_lists' then Result := Load_GL_IBM_vertex_array_lists
  9694. else if ext = 'GL_MESA_resize_buffers' then Result := Load_GL_MESA_resize_buffers
  9695. else if ext = 'GL_MESA_window_pos' then Result := Load_GL_MESA_window_pos
  9696. else if ext = 'GL_OML_interlace' then Result := Load_GL_OML_interlace
  9697. else if ext = 'GL_OML_resample' then Result := Load_GL_OML_resample
  9698. else if ext = 'GL_OML_subsample' then Result := Load_GL_OML_subsample
  9699. else if ext = 'GL_SGIS_generate_mipmap' then Result := Load_GL_SGIS_generate_mipmap
  9700. else if ext = 'GL_SGIS_multisample' then Result := Load_GL_SGIS_multisample
  9701. else if ext = 'GL_SGIS_pixel_texture' then Result := Load_GL_SGIS_pixel_texture
  9702. else if ext = 'GL_SGIS_texture_border_clamp' then Result := Load_GL_SGIS_texture_border_clamp
  9703. else if ext = 'GL_SGIS_texture_color_mask' then Result := Load_GL_SGIS_texture_color_mask
  9704. else if ext = 'GL_SGIS_texture_edge_clamp' then Result := Load_GL_SGIS_texture_edge_clamp
  9705. else if ext = 'GL_SGIS_texture_lod' then Result := Load_GL_SGIS_texture_lod
  9706. else if ext = 'GL_SGIS_depth_texture' then Result := Load_GL_SGIS_depth_texture
  9707. else if ext = 'GL_SGIX_fog_offset' then Result := Load_GL_SGIX_fog_offset
  9708. else if ext = 'GL_SGIX_interlace' then Result := Load_GL_SGIX_interlace
  9709. else if ext = 'GL_SGIX_shadow_ambient' then Result := Load_GL_SGIX_shadow_ambient
  9710. else if ext = 'GL_SGI_color_matrix' then Result := Load_GL_SGI_color_matrix
  9711. else if ext = 'GL_SGI_color_table' then Result := Load_GL_SGI_color_table
  9712. else if ext = 'GL_SGI_texture_color_table' then Result := Load_GL_SGI_texture_color_table
  9713. else if ext = 'GL_SUN_vertex' then Result := Load_GL_SUN_vertex
  9714. else if ext = 'GL_ARB_fragment_program' then Result := Load_GL_ARB_fragment_program
  9715. else if ext = 'GL_ATI_text_fragment_shader' then Result := Load_GL_ATI_text_fragment_shader
  9716. else if ext = 'GL_APPLE_client_storage' then Result := Load_GL_APPLE_client_storage
  9717. else if ext = 'GL_APPLE_element_array' then Result := Load_GL_APPLE_element_array
  9718. else if ext = 'GL_APPLE_fence' then Result := Load_GL_APPLE_fence
  9719. else if ext = 'GL_APPLE_vertex_array_object' then Result := Load_GL_APPLE_vertex_array_object
  9720. else if ext = 'GL_APPLE_vertex_array_range' then Result := Load_GL_APPLE_vertex_array_range
  9721. {$IFDEF Windows}
  9722. else if ext = 'WGL_ARB_pixel_format' then Result := Load_WGL_ARB_pixel_format
  9723. else if ext = 'WGL_ARB_make_current_read' then Result := Load_WGL_ARB_make_current_read
  9724. else if ext = 'WGL_ARB_pbuffer' then Result := Load_WGL_ARB_pbuffer
  9725. else if ext = 'WGL_EXT_swap_control' then Result := Load_WGL_EXT_swap_control
  9726. else if ext = 'WGL_ARB_render_texture' then Result := Load_WGL_ARB_render_texture
  9727. else if ext = 'WGL_EXT_extensions_string' then Result := Load_WGL_EXT_extensions_string
  9728. else if ext = 'WGL_EXT_make_current_read' then Result := Load_WGL_EXT_make_current_read
  9729. else if ext = 'WGL_EXT_pbuffer' then Result := Load_WGL_EXT_pbuffer
  9730. else if ext = 'WGL_EXT_pixel_format' then Result := Load_WGL_EXT_pixel_format
  9731. else if ext = 'WGL_I3D_digital_video_control' then Result := Load_WGL_I3D_digital_video_control
  9732. else if ext = 'WGL_I3D_gamma' then Result := Load_WGL_I3D_gamma
  9733. else if ext = 'WGL_I3D_genlock' then Result := Load_WGL_I3D_genlock
  9734. {$ENDIF}
  9735. else if ext = 'GL_ARB_matrix_palette' then Result := Load_GL_ARB_matrix_palette
  9736. else if ext = 'GL_NV_element_array' then Result := Load_GL_NV_element_array
  9737. else if ext = 'GL_NV_float_buffer' then Result := Load_GL_NV_float_buffer
  9738. else if ext = 'GL_NV_fragment_program' then Result := Load_GL_NV_fragment_program
  9739. else if ext = 'GL_NV_primitive_restart' then Result := Load_GL_NV_primitive_restart
  9740. else if ext = 'GL_NV_vertex_program2' then Result := Load_GL_NV_vertex_program2
  9741. {$IFDEF Windows}
  9742. else if ext = 'WGL_NV_render_texture_rectangle' then Result := Load_WGL_NV_render_texture_rectangle
  9743. {$ENDIF}
  9744. else if ext = 'GL_NV_pixel_data_range' then Result := Load_GL_NV_pixel_data_range
  9745. else if ext = 'GL_EXT_texture_rectangle' then Result := Load_GL_EXT_texture_rectangle
  9746. else if ext = 'GL_S3_s3tc' then Result := Load_GL_S3_s3tc
  9747. else if ext = 'GL_ATI_draw_buffers' then Result := Load_GL_ATI_draw_buffers
  9748. {$IFDEF Windows}
  9749. else if ext = 'WGL_ATI_pixel_format_float' then Result := Load_WGL_ATI_pixel_format_float
  9750. {$ENDIF}
  9751. else if ext = 'GL_ATI_texture_env_combine3' then Result := Load_GL_ATI_texture_env_combine3
  9752. else if ext = 'GL_ATI_texture_float' then Result := Load_GL_ATI_texture_float
  9753. else if ext = 'GL_NV_texture_expand_normal' then Result := Load_GL_NV_texture_expand_normal
  9754. else if ext = 'GL_NV_half_float' then Result := Load_GL_NV_half_float
  9755. else if ext = 'GL_ATI_map_object_buffer' then Result := Load_GL_ATI_map_object_buffer
  9756. else if ext = 'GL_ATI_separate_stencil' then Result := Load_GL_ATI_separate_stencil
  9757. else if ext = 'GL_ATI_vertex_attrib_array_object' then Result := Load_GL_ATI_vertex_attrib_array_object
  9758. else if ext = 'GL_ARB_vertex_buffer_object' then Result := Load_GL_ARB_vertex_buffer_object
  9759. else if ext = 'GL_ARB_occlusion_query' then Result := Load_GL_ARB_occlusion_query
  9760. else if ext = 'GL_ARB_shader_objects' then Result := Load_GL_ARB_shader_objects
  9761. else if ext = 'GL_ARB_vertex_shader' then Result := Load_GL_ARB_vertex_shader
  9762. else if ext = 'GL_ARB_fragment_shader' then Result := Load_GL_ARB_fragment_shader
  9763. else if ext = 'GL_ARB_shading_language_100' then Result := Load_GL_ARB_shading_language_100
  9764. else if ext = 'GL_ARB_texture_non_power_of_two' then Result := Load_GL_ARB_texture_non_power_of_two
  9765. else if ext = 'GL_ARB_point_sprite' then Result := Load_GL_ARB_point_sprite
  9766. else if ext = 'GL_EXT_depth_bounds_test' then Result := Load_GL_EXT_depth_bounds_test
  9767. else if ext = 'GL_EXT_texture_mirror_clamp' then Result := Load_GL_EXT_texture_mirror_clamp
  9768. else if ext = 'GL_EXT_blend_equation_separate' then Result := Load_GL_EXT_blend_equation_separate
  9769. else if ext = 'GL_MESA_pack_invert' then Result := Load_GL_MESA_pack_invert
  9770. else if ext = 'GL_MESA_ycbcr_texture' then Result := Load_GL_MESA_ycbcr_texture
  9771. else if ext = 'GL_ARB_fragment_program_shadow' then Result := Load_GL_ARB_fragment_program_shadow
  9772. else if ext = 'GL_NV_fragment_program_option' then Result := Load_GL_NV_fragment_program_option
  9773. else if ext = 'GL_EXT_pixel_buffer_object' then Result := Load_GL_EXT_pixel_buffer_object
  9774. else if ext = 'GL_NV_fragment_program2' then Result := Load_GL_NV_fragment_program2
  9775. else if ext = 'GL_NV_vertex_program2_option' then Result := Load_GL_NV_vertex_program2_option
  9776. else if ext = 'GL_NV_vertex_program3' then Result := Load_GL_NV_vertex_program3
  9777. else if ext = 'GL_ARB_draw_buffers' then Result := Load_GL_ARB_draw_buffers
  9778. else if ext = 'GL_ARB_texture_rectangle' then Result := Load_GL_ARB_texture_rectangle
  9779. else if ext = 'GL_ARB_color_buffer_float' then Result := Load_GL_ARB_color_buffer_float
  9780. else if ext = 'GL_ARB_half_float_pixel' then Result := Load_GL_ARB_half_float_pixel
  9781. else if ext = 'GL_ARB_texture_float' then Result := Load_GL_ARB_texture_float
  9782. else if ext = 'GL_EXT_texture_compression_dxt1' then Result := Load_GL_EXT_texture_compression_dxt1
  9783. else if ext = 'GL_ARB_pixel_buffer_object' then Result := Load_GL_ARB_pixel_buffer_object
  9784. else if ext = 'GL_EXT_framebuffer_object' then Result := Load_GL_EXT_framebuffer_object
  9785. else if ext = 'GL_version_1_4' then Result := Load_GL_version_1_4
  9786. else if ext = 'GL_version_1_5' then Result := Load_GL_version_1_5
  9787. else if ext = 'GL_version_2_0' then Result := Load_GL_version_2_0
  9788. end;
  9789. procedure Load_GL_version_2_1x (var allOK: Boolean);
  9790. begin
  9791. glUniformMatrix2x3fv := wglGetProcAddress('glUniformMatrix2x3fv');
  9792. if not Assigned(glUniformMatrix2x3fv) then allOK := false;
  9793. glUniformMatrix3x2fv := wglGetProcAddress('glUniformMatrix3x2fv');
  9794. if not Assigned(glUniformMatrix3x2fv) then allOK := false;
  9795. glUniformMatrix2x4fv := wglGetProcAddress('glUniformMatrix2x4fv');
  9796. if not Assigned(glUniformMatrix2x4fv) then allOK := false;
  9797. glUniformMatrix4x2fv := wglGetProcAddress('glUniformMatrix4x2fv');
  9798. if not Assigned(glUniformMatrix4x2fv) then allOK := false;
  9799. glUniformMatrix3x4fv := wglGetProcAddress('glUniformMatrix3x4fv');
  9800. if not Assigned(glUniformMatrix3x4fv) then allOK := false;
  9801. glUniformMatrix4x3fv := wglGetProcAddress('glUniformMatrix4x3fv');
  9802. if not Assigned(glUniformMatrix4x3fv) then allOK := false;
  9803. Load_GL_VERSION_2_0x(allOK);
  9804. end;
  9805. function Load_GL_version_2_1: boolean;
  9806. begin
  9807. result := true;
  9808. Load_GL_version_2_1x(result);
  9809. end;
  9810. procedure Load_GL_version_3_0x (var allOK: boolean; out isVersion: Boolean);
  9811. begin
  9812. glColorMaski := wglGetProcAddress('glColorMaski');
  9813. isVersion := Assigned(glColorMaski);
  9814. if not Assigned(glColorMaski) then allOK := false;
  9815. glGetBooleani_v := wglGetProcAddress('glGetBooleani_v');
  9816. if not Assigned(glGetBooleani_v) then allOK := false;
  9817. glGetIntegeri_v := wglGetProcAddress('glGetIntegeri_v');
  9818. if not Assigned(glGetIntegeri_v) then allOK := false;
  9819. glEnablei := wglGetProcAddress('glEnablei');
  9820. if not Assigned(glEnablei) then allOK := false;
  9821. glDisablei := wglGetProcAddress('glDisablei');
  9822. if not Assigned(glDisablei) then allOK := false;
  9823. glIsEnabledi := wglGetProcAddress('glIsEnabledi');
  9824. if not Assigned(glIsEnabledi) then allOK := false;
  9825. glBeginTransformFeedback := wglGetProcAddress('glBeginTransformFeedback');
  9826. if not Assigned(glBeginTransformFeedback) then allOK := false;
  9827. glEndTransformFeedback := wglGetProcAddress('glEndTransformFeedback');
  9828. if not Assigned(glEndTransformFeedback) then allOK := false;
  9829. glBindBufferRange := wglGetProcAddress('glBindBufferRange');
  9830. if not Assigned(glBindBufferRange) then allOK := false;
  9831. glBindBufferBase := wglGetProcAddress('glBindBufferBase');
  9832. if not Assigned(glBindBufferBase) then allOK := false;
  9833. glTransformFeedbackVaryings := wglGetProcAddress('glTransformFeedbackVaryings');
  9834. if not Assigned(glTransformFeedbackVaryings) then allOK := false;
  9835. glGetTransformFeedbackVarying := wglGetProcAddress('glGetTransformFeedbackVarying');
  9836. if not Assigned(glGetTransformFeedbackVarying) then allOK := false;
  9837. glClampColor := wglGetProcAddress('glClampColor');
  9838. if not Assigned(glClampColor) then allOK := false;
  9839. glBeginConditionalRender := wglGetProcAddress('glBeginConditionalRender');
  9840. if not Assigned(glBeginConditionalRender) then allOK := false;
  9841. glEndConditionalRender := wglGetProcAddress('glEndConditionalRender');
  9842. if not Assigned(glEndConditionalRender) then allOK := false;
  9843. glVertexAttribIPointer := wglGetProcAddress('glVertexAttribIPointer');
  9844. if not Assigned(glVertexAttribIPointer) then allOK := false;
  9845. glGetVertexAttribIiv := wglGetProcAddress('glGetVertexAttribIiv');
  9846. if not Assigned(glGetVertexAttribIiv) then allOK := false;
  9847. glGetVertexAttribIuiv := wglGetProcAddress('glGetVertexAttribIuiv');
  9848. if not Assigned(glGetVertexAttribIuiv) then allOK := false;
  9849. glVertexAttribI1i := wglGetProcAddress('glVertexAttribI1i');
  9850. if not Assigned(glVertexAttribI1i) then allOK := false;
  9851. glVertexAttribI2i := wglGetProcAddress('glVertexAttribI2i');
  9852. if not Assigned(glVertexAttribI2i) then allOK := false;
  9853. glVertexAttribI3i := wglGetProcAddress('glVertexAttribI3i');
  9854. if not Assigned(glVertexAttribI3i) then allOK := false;
  9855. glVertexAttribI4i := wglGetProcAddress('glVertexAttribI4i');
  9856. if not Assigned(glVertexAttribI4i) then allOK := false;
  9857. glVertexAttribI1ui := wglGetProcAddress('glVertexAttribI1ui');
  9858. if not Assigned(glVertexAttribI1ui) then allOK := false;
  9859. glVertexAttribI2ui := wglGetProcAddress('glVertexAttribI2ui');
  9860. if not Assigned(glVertexAttribI2ui) then allOK := false;
  9861. glVertexAttribI3ui := wglGetProcAddress('glVertexAttribI3ui');
  9862. if not Assigned(glVertexAttribI3ui) then allOK := false;
  9863. glVertexAttribI4ui := wglGetProcAddress('glVertexAttribI4ui');
  9864. if not Assigned(glVertexAttribI4ui) then allOK := false;
  9865. glVertexAttribI1iv := wglGetProcAddress('glVertexAttribI1iv');
  9866. if not Assigned(glVertexAttribI1iv) then allOK := false;
  9867. glVertexAttribI2iv := wglGetProcAddress('glVertexAttribI2iv');
  9868. if not Assigned(glVertexAttribI2iv) then allOK := false;
  9869. glVertexAttribI3iv := wglGetProcAddress('glVertexAttribI3iv');
  9870. if not Assigned(glVertexAttribI3iv) then allOK := false;
  9871. glVertexAttribI4iv := wglGetProcAddress('glVertexAttribI4iv');
  9872. if not Assigned(glVertexAttribI4iv) then allOK := false;
  9873. glVertexAttribI1uiv := wglGetProcAddress('glVertexAttribI1uiv');
  9874. if not Assigned(glVertexAttribI1uiv) then allOK := false;
  9875. glVertexAttribI2uiv := wglGetProcAddress('glVertexAttribI2uiv');
  9876. if not Assigned(glVertexAttribI2uiv) then allOK := false;
  9877. glVertexAttribI3uiv := wglGetProcAddress('glVertexAttribI3uiv');
  9878. if not Assigned(glVertexAttribI3uiv) then allOK := false;
  9879. glVertexAttribI4uiv := wglGetProcAddress('glVertexAttribI4uiv');
  9880. if not Assigned(glVertexAttribI4uiv) then allOK := false;
  9881. glVertexAttribI4bv := wglGetProcAddress('glVertexAttribI4bv');
  9882. if not Assigned(glVertexAttribI4bv) then allOK := false;
  9883. glVertexAttribI4sv := wglGetProcAddress('glVertexAttribI4sv');
  9884. if not Assigned(glVertexAttribI4sv) then allOK := false;
  9885. glVertexAttribI4ubv := wglGetProcAddress('glVertexAttribI4ubv');
  9886. if not Assigned(glVertexAttribI4ubv) then allOK := false;
  9887. glVertexAttribI4usv := wglGetProcAddress('glVertexAttribI4usv');
  9888. if not Assigned(glVertexAttribI4usv) then allOK := false;
  9889. glGetUniformuiv := wglGetProcAddress('glGetUniformuiv');
  9890. if not Assigned(glGetUniformuiv) then allOK := false;
  9891. glBindFragDataLocation := wglGetProcAddress('glBindFragDataLocation');
  9892. if not Assigned(glBindFragDataLocation) then allOK := false;
  9893. glGetFragDataLocation := wglGetProcAddress('glGetFragDataLocation');
  9894. if not Assigned(glGetFragDataLocation) then allOK := false;
  9895. glUniform1ui := wglGetProcAddress('glUniform1ui');
  9896. if not Assigned(glUniform1ui) then allOK := false;
  9897. glUniform2ui := wglGetProcAddress('glUniform2ui');
  9898. if not Assigned(glUniform2ui) then allOK := false;
  9899. glUniform3ui := wglGetProcAddress('glUniform3ui');
  9900. if not Assigned(glUniform3ui) then allOK := false;
  9901. glUniform4ui := wglGetProcAddress('glUniform4ui');
  9902. if not Assigned(glUniform4ui) then allOK := false;
  9903. glUniform1uiv := wglGetProcAddress('glUniform1uiv');
  9904. if not Assigned(glUniform1uiv) then allOK := false;
  9905. glUniform2uiv := wglGetProcAddress('glUniform2uiv');
  9906. if not Assigned(glUniform2uiv) then allOK := false;
  9907. glUniform3uiv := wglGetProcAddress('glUniform3uiv');
  9908. if not Assigned(glUniform3uiv) then allOK := false;
  9909. glUniform4uiv := wglGetProcAddress('glUniform4uiv');
  9910. if not Assigned(glUniform4uiv) then allOK := false;
  9911. glTexParameterIiv := wglGetProcAddress('glTexParameterIiv');
  9912. if not Assigned(glTexParameterIiv) then allOK := false;
  9913. glTexParameterIuiv := wglGetProcAddress('glTexParameterIuiv');
  9914. if not Assigned(glTexParameterIuiv) then allOK := false;
  9915. glGetTexParameterIiv := wglGetProcAddress('glGetTexParameterIiv');
  9916. if not Assigned(glGetTexParameterIiv) then allOK := false;
  9917. glGetTexParameterIuiv := wglGetProcAddress('glGetTexParameterIuiv');
  9918. if not Assigned(glGetTexParameterIuiv) then allOK := false;
  9919. glClearBufferiv := wglGetProcAddress('glClearBufferiv');
  9920. if not Assigned(glClearBufferiv) then allOK := false;
  9921. glClearBufferuiv := wglGetProcAddress('glClearBufferuiv');
  9922. if not Assigned(glClearBufferuiv) then allOK := false;
  9923. glClearBufferfv := wglGetProcAddress('glClearBufferfv');
  9924. if not Assigned(glClearBufferfv) then allOK := false;
  9925. glClearBufferfi := wglGetProcAddress('glClearBufferfi');
  9926. if not Assigned(glClearBufferfi) then allOK := false;
  9927. glGetStringi := wglGetProcAddress('glGetStringi');
  9928. if not Assigned(glGetStringi) then allOK := false;
  9929. if not Load_GL_ARB_framebuffer_object(true) then allOK := false;
  9930. if not Load_GL_ARB_map_buffer_range(true) then allOK := false;
  9931. if not Load_GL_ARB_vertex_array_object(true) then allOK := false;
  9932. Load_GL_VERSION_2_1x(allOK);
  9933. end;
  9934. function Load_GL_version_3_0: boolean;
  9935. var
  9936. dummy: boolean;
  9937. begin
  9938. result := true;
  9939. Load_GL_version_3_0x(result, dummy);
  9940. end;
  9941. function Load_GL_version_3_0_CORE: boolean;
  9942. var
  9943. dummy: boolean;
  9944. begin
  9945. Load_GL_version_3_0x(dummy, result);
  9946. glGetError(); //clear errors for invalid enums
  9947. end;
  9948. function Load_GL_Debug_output: Boolean;
  9949. var
  9950. extstring: AnsiString;
  9951. begin
  9952. Result := False;
  9953. extstring := AnsiString(PAnsiChar(glGetString(GL_EXTENSIONS)));
  9954. if glext_ExtensionSupported('GL_KHR_debug', extstring) then
  9955. begin
  9956. glDebugMessageCallback := wglGetProcAddress('glDebugMessageCallback');
  9957. if not Assigned(glDebugMessageCallback) then Exit;
  9958. glDebugMessageControl := wglGetProcAddress('glDebugMessageControl');
  9959. if not Assigned(glDebugMessageControl) then Exit;
  9960. Result := True;
  9961. end;
  9962. if not Result and glext_ExtensionSupported('GL_ARB_debug_output', extstring) then
  9963. begin
  9964. glDebugMessageCallback := wglGetProcAddress('glDebugMessageCallbackARB');
  9965. if not Assigned(glDebugMessageCallback) then Exit;
  9966. glDebugMessageControl := wglGetProcAddress('glDebugMessageControlARB');
  9967. if not Assigned(glDebugMessageControl) then Exit;
  9968. Result := True;
  9969. end;
  9970. end;
  9971. procedure Load_GL_VERSION_3_1x(var allOK: boolean; out isVersion: Boolean);
  9972. var
  9973. dummy: boolean;
  9974. begin
  9975. glDrawArraysInstanced := wglGetProcAddress('glDrawArraysInstanced');
  9976. isVersion := Assigned(glDrawArraysInstanced);
  9977. if not Assigned(glDrawArraysInstanced) then allOK := false;
  9978. glDrawElementsInstanced := wglGetProcAddress('glDrawElementsInstanced');
  9979. if not Assigned(glDrawElementsInstanced) then allOK := false;
  9980. glTexBuffer := wglGetProcAddress('glTexBuffer');
  9981. if not Assigned(glTexBuffer) then allOK := false;
  9982. glPrimitiveRestartIndex := wglGetProcAddress('glPrimitiveRestartIndex');
  9983. if not Assigned(glPrimitiveRestartIndex) then allOK := false;
  9984. if not Load_GL_ARB_copy_buffer(true) then allOK := false;
  9985. if not Load_GL_ARB_uniform_buffer_object(true) then allOK := false;
  9986. Load_GL_VERSION_3_0x(allOK, dummy);
  9987. end;
  9988. function Load_GL_version_3_1: boolean;
  9989. var
  9990. dummy: boolean;
  9991. begin
  9992. result := true;
  9993. Load_GL_version_3_1x(result, dummy);
  9994. end;
  9995. function Load_GL_version_3_1_CORE: boolean;
  9996. var
  9997. dummy: boolean;
  9998. begin
  9999. Load_GL_version_3_1x(dummy, result);
  10000. glGetError(); //clear errors for invalid enums
  10001. end;
  10002. procedure Load_GL_VERSION_3_2x(var allOK: boolean; out isVersion: Boolean);
  10003. var
  10004. dummy: boolean;
  10005. begin
  10006. glGetInteger64i_v := wglGetProcAddress('glGetInteger64i_v');
  10007. isVersion := Assigned(glGetInteger64i_v);
  10008. if not Assigned(glGetInteger64i_v) then allOK := false;
  10009. glGetBufferParameteri64v := wglGetProcAddress('glGetBufferParameteri64v');
  10010. if not Assigned(glGetBufferParameteri64v) then allOK := false;
  10011. glProgramParameteri := wglGetProcAddress('glProgramParameteri');
  10012. if not Assigned(glProgramParameteri) then allOK := false;
  10013. glFramebufferTexture := wglGetProcAddress('glFramebufferTexture');
  10014. if not Assigned(glFramebufferTexture) then allOK := false;
  10015. glVertexAttribDivisor := wglGetProcAddress('glVertexAttribDivisor');
  10016. if not Assigned(glVertexAttribDivisor) then allOK := false;
  10017. if not Load_GL_ARB_draw_elements_base_vertex(true) then allOK := false;
  10018. if not Load_GL_ARB_provoking_vertex(true) then allOK := false;
  10019. if not Load_GL_ARB_sync(true) then allOK := false;
  10020. if not Load_GL_ARB_texture_multisample(true) then allOK := false;
  10021. Load_GL_VERSION_3_1x(allOK, dummy);
  10022. end;
  10023. function Load_GL_version_3_2: boolean;
  10024. var
  10025. dummy: boolean;
  10026. begin
  10027. result := true;
  10028. Load_GL_version_3_2x(result, dummy);
  10029. end;
  10030. function Load_GL_version_3_2_CORE: boolean;
  10031. var
  10032. dummy: boolean;
  10033. begin
  10034. result := true;
  10035. Load_GL_version_3_2x(dummy, dummy);
  10036. glGetError(); //clear errors for invalid enums
  10037. end;
  10038. procedure Load_GL_VERSION_3_3x(var allOK: boolean; out isVersion: Boolean);
  10039. var
  10040. dummy: boolean;
  10041. begin
  10042. isVersion := Load_GL_ARB_blend_func_extended(true);
  10043. if not isVersion then allOK := false;
  10044. if not Load_GL_ARB_sampler_objects(true) then allOK := false;
  10045. if not Load_GL_ARB_timer_query(true) then allOK := false;
  10046. if not Load_GL_ARB_vertex_type_2_10_10_10_rev(true) then allOK := false;
  10047. Load_GL_VERSION_3_2x(allOK, dummy);
  10048. end;
  10049. function Load_GL_version_3_3: boolean;
  10050. var
  10051. dummy: boolean;
  10052. begin
  10053. result := true;
  10054. Load_GL_version_3_3x(result, dummy);
  10055. end;
  10056. function Load_GL_version_3_3_CORE: boolean;
  10057. var
  10058. dummy: boolean;
  10059. begin
  10060. result := true;
  10061. Load_GL_version_3_3x(dummy, result);
  10062. glGetError(); //clear errors for invalid enums
  10063. end;
  10064. procedure Load_GL_VERSION_4_0x(var allOK: boolean; out isVersion: Boolean);
  10065. var
  10066. dummy: boolean;
  10067. begin
  10068. isVersion := Load_GL_ARB_gpu_shader_fp64(true);
  10069. if not isVersion then allOK := false;
  10070. if not Load_GL_ARB_shader_subroutine(true) then allOK := false;
  10071. if not Load_GL_ARB_tessellation_shader(true) then allOK := false;
  10072. if not Load_GL_ARB_transform_feedback2(true) then allOK := false;
  10073. if not Load_GL_ARB_transform_feedback3(true) then allOK := false;
  10074. Load_GL_VERSION_3_3x(allOK, dummy);
  10075. end;
  10076. function Load_GL_version_4_0: boolean;
  10077. var
  10078. dummy: boolean;
  10079. begin
  10080. result := true;
  10081. Load_GL_version_4_0x(result, dummy);
  10082. end;
  10083. function Load_GL_version_4_0_CORE: boolean;
  10084. var
  10085. dummy: boolean;
  10086. begin
  10087. result := true;
  10088. Load_GL_version_4_0x(dummy, dummy);
  10089. glGetError(); //clear errors for invalid enums
  10090. end;
  10091. function Load_GL_VERSION_4_3(): Boolean;
  10092. var
  10093. dummy: boolean;
  10094. begin
  10095. Result := true;
  10096. if not Load_GL_Debug_output() then result := false;
  10097. Load_GL_VERSION_4_0x(result, dummy);
  10098. end;
  10099. function Load_GL_version_4_3_CORE: boolean;
  10100. var
  10101. dummy, dummy2: boolean;
  10102. begin
  10103. result := Load_GL_Debug_output();
  10104. Load_GL_VERSION_4_0x(dummy, dummy2);
  10105. glGetError(); //clear errors for invalid enums
  10106. end;
  10107. end.