Difference between "webgl" and "experimental-webgl" - Stack ...

文章推薦指數: 80 %
投票人數:10人

TL;DR: "experimental-webgl" = beta, it was used by browsers before WebGL 1.0 shipped to try to indicate this is not final. Home Public Questions Tags Users Collectives ExploreCollectives FindaJob Jobs Companies Teams StackOverflowforTeams –Collaborateandshareknowledgewithaprivategroup. CreateafreeTeam WhatisTeams? Teams CreatefreeTeam CollectivesonStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. Learnmore Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. Learnmore Differencebetween"webgl"and"experimental-webgl" AskQuestion Asked 5years,2monthsago Active 5years,2monthsago Viewed 5ktimes 8 1 Somesitessaythatyoushouldinitializewebglthefollowingway: vargl=c.getContext("webgl")||c.getContext("experimental-webgl"); if(!gl) alert("Thisbrowserdoesn'tsupportWebGL!"); What'sthedifferencebetweenwebglandexperimental-webgl?TheonlydescriptionIcouldfindwasonMDN: getContext(inDOMStringcontextId)RenderingContextReturnsadrawingcontextonthecanvas,ornullifthecontextIDisnotsupported.Adrawingcontextletsyoudrawonthecanvas.CallinggetContextwith"2d"returnsaCanvasRenderingContext2Dobject,whereascallingitwith"experimental-webgl"(or"webgl")returnsaWebGLRenderingContextobject.ThiscontextisonlyavailableonbrowsersthatimplementWebGL. Howeverthismakesthe2seemlikethey'rethesame.Isthereadifference? webgl Share Improvethisquestion Follow askedDec26,2016at0:03 BálintBálint 3,85522goldbadges1414silverbadges2727bronzebadges Addacomment  |  1Answer 1 Sortedby: HighestScore(default) Datemodified(newestfirst) Datecreated(oldestfirst) 17 TL;DR:"experimental-webgl"=beta,itwasusedbybrowsersbeforeWebGL1.0shippedtotrytoindicatethisisnotfinal.WhenWebGL1.0shippedandabrowserpassedalltheconformanceteststhenthatbrowserwouldstartaccepting"webgl"and"experimental-webgl"wouldbejustbeasynonymanddeprecated. Longversion: Browservendorsusedtoprefixthingsthatwerenotstandardizedyetorcomplete.Thehopewasdeveloperswouldtrythingsout.Whenthestandardfinalizedtheprefixwouldberemovedandeveryonewouldusetheunprefixedversiononly.Theprefix"experimental-"isleftoverfromthatera.Browservendorsfiguredoutprefixeswereabadideabecause1000sofwebsiteswouldusetheprefixinproductionsitesandthenthebrowserscouldnotremovetheprefixwithoutbreakingthousandsofwebsites. Browservendorshavegenerallyagreednottodothisanymore.Insteadtheyputnewfeaturesbehindflags,askdeveloperstotest,whenthebrowservendorsandstandardscommitteesarereasonablysureeverythingisgoodandstabletheyallowthenewfeaturetorunwithouttheflag.WebGL2wasdonethisnewwaysothereisno"experimental-webgl2",justbrowserflags. Theonlybrowserthatstillneeds"experimental-webgl"isEdge.ItusesthatonlybecauseEdgestilldoesnotimplementtheentireWebGLspec.Forallotherbrowsers"experimental-webgl"isexactlythesameas"webgl"andit'sjustleftoverfromthatoldera PersonallyInolongeruse"experimental-webgl"atall.Thatmeansmycodewon'tworkinEdgeuntiltheyareactuallystandardscompliant.IMOTheyneedthepressureofwebsitesnotworkingtogetthemtospendresourcesfixingtheirbrokenimplementationasit'sbeenbrokenforyearsnow. Share Improvethisanswer Follow editedDec28,2016at5:24 answeredDec27,2016at13:39 gmangman 90.2k2828goldbadges227227silverbadges336336bronzebadges Addacomment  |  YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedwebgloraskyourownquestion. TheOverflowBlog WelcomingthenewcrewofStackOverflowpodcasthosts FeaturedonMeta StackExchangeQ&AaccesswillnotberestrictedinRussia PlannedmaintenancescheduledforFriday,March18th,00:30-2:00UTC... Improvingthefirst-timeaskerexperience-Whatwasaskingyourfirst... Related 7 Switchcanvascontext 1 Objectselectionwithprocessing.jsin3dscenes 5 DrawingmanyshapesinWebGL 9 EmulatingpalettebasedgraphicsinWebGLv.s.Canvas2D 2 Rats!WebGLhitasnag-howtodebug? 2 VueJS-HowdoIgetWebGLtorenderviaVuewithoutdisappearing? 0 WebGL:Renderingtwoobjectswithseparatetextures 1 Doescanvascontext2d.drawImage(webglCanvas,0,0)blockuntilawebglisfinishedrendering? HotNetworkQuestions Possiblescamforsecuritydeposit-bankoperation CanImakeinfiniteicearrowsusingtheShapeWatercantrip? Howdomigratorydragonsavoidbeingblindedbysun? HowcanIpreventsomeaddedtextfrombecomingpixelatedinMicrosoftPaint? Whatdoestheprogramcounterdo? UnderstandingthisquotebyFeynman BestWaystoAchievethisorganiclook? IsHebrews6:4-6incontradictionwiththeparableontheprodigalson? WhataircraftwastheOlmsteadHighEfficiencyPropellerfor?Whenandhowwasitused? Turningahighlowsignalintoaproperdigitalsignal LWCuseridundefined Workingwithverybadcodebutonadeadline Wherecouldyoustoretheenergyfromatornado? Useoflanguage:"perfectsquare".isthisusefulorahindrance? Howarelightgunsignalshandledatremotelycontrolledairports? NonNobisDomine-Sednominiornomine Shortstoryaboutthestudyofalchemy,withthemesofdiminishingreturnsofacertainkindofacademicprogress WhatisthebasisfortheWesternleaderstobelievethatharsheconomicsanctionswillnotleadtoanuclearwarwithRussiaeventually? Whatistheappropriatespelllevelforthishomebrewspell(DevolvePerson),intendedasamentalcounterparttoHoldPerson? Meaningof'Lastbutnottheleast'inGoogledictionary Isittruethatit'snotillegalforaparenttoselltheir13-year-oldchildtoadrugdealer? Isthisvillageranitwit? Whydon'telectronsfallorcollapsearoundatomwhenanobjectacceleratesrapidly? Macprotectedfromeasyburnstuff morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings  



請為這篇文章評分?