1
0

openvr_api.cs 334 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218
  1. //======= Copyright (c) Valve Corporation, All rights reserved. ===============
  2. //
  3. // Purpose: This file contains C#/managed code bindings for the OpenVR interfaces
  4. // This file is auto-generated, do not edit it.
  5. //
  6. //=============================================================================
  7. #if !OPENVR_XR_API
  8. using System;
  9. using System.Runtime.InteropServices;
  10. using Valve.VR;
  11. #if UNITY_5_3_OR_NEWER
  12. using UnityEngine;
  13. #endif
  14. namespace Valve.VR
  15. {
  16. [StructLayout(LayoutKind.Sequential)]
  17. public struct IVRSystem
  18. {
  19. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  20. internal delegate void _GetRecommendedRenderTargetSize(ref uint pnWidth, ref uint pnHeight);
  21. [MarshalAs(UnmanagedType.FunctionPtr)]
  22. internal _GetRecommendedRenderTargetSize GetRecommendedRenderTargetSize;
  23. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  24. internal delegate HmdMatrix44_t _GetProjectionMatrix(EVREye eEye, float fNearZ, float fFarZ);
  25. [MarshalAs(UnmanagedType.FunctionPtr)]
  26. internal _GetProjectionMatrix GetProjectionMatrix;
  27. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  28. internal delegate void _GetProjectionRaw(EVREye eEye, ref float pfLeft, ref float pfRight, ref float pfTop, ref float pfBottom);
  29. [MarshalAs(UnmanagedType.FunctionPtr)]
  30. internal _GetProjectionRaw GetProjectionRaw;
  31. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  32. internal delegate bool _ComputeDistortion(EVREye eEye, float fU, float fV, ref DistortionCoordinates_t pDistortionCoordinates);
  33. [MarshalAs(UnmanagedType.FunctionPtr)]
  34. internal _ComputeDistortion ComputeDistortion;
  35. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  36. internal delegate HmdMatrix34_t _GetEyeToHeadTransform(EVREye eEye);
  37. [MarshalAs(UnmanagedType.FunctionPtr)]
  38. internal _GetEyeToHeadTransform GetEyeToHeadTransform;
  39. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  40. internal delegate bool _GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync, ref ulong pulFrameCounter);
  41. [MarshalAs(UnmanagedType.FunctionPtr)]
  42. internal _GetTimeSinceLastVsync GetTimeSinceLastVsync;
  43. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  44. internal delegate int _GetD3D9AdapterIndex();
  45. [MarshalAs(UnmanagedType.FunctionPtr)]
  46. internal _GetD3D9AdapterIndex GetD3D9AdapterIndex;
  47. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  48. internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex);
  49. [MarshalAs(UnmanagedType.FunctionPtr)]
  50. internal _GetDXGIOutputInfo GetDXGIOutputInfo;
  51. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  52. internal delegate void _GetOutputDevice(ref ulong pnDevice, ETextureType textureType, IntPtr pInstance);
  53. [MarshalAs(UnmanagedType.FunctionPtr)]
  54. internal _GetOutputDevice GetOutputDevice;
  55. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  56. internal delegate bool _IsDisplayOnDesktop();
  57. [MarshalAs(UnmanagedType.FunctionPtr)]
  58. internal _IsDisplayOnDesktop IsDisplayOnDesktop;
  59. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  60. internal delegate bool _SetDisplayVisibility(bool bIsVisibleOnDesktop);
  61. [MarshalAs(UnmanagedType.FunctionPtr)]
  62. internal _SetDisplayVisibility SetDisplayVisibility;
  63. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  64. internal delegate void _GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin, float fPredictedSecondsToPhotonsFromNow, [In, Out] TrackedDevicePose_t[] pTrackedDevicePoseArray, uint unTrackedDevicePoseArrayCount);
  65. [MarshalAs(UnmanagedType.FunctionPtr)]
  66. internal _GetDeviceToAbsoluteTrackingPose GetDeviceToAbsoluteTrackingPose;
  67. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  68. internal delegate HmdMatrix34_t _GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
  69. [MarshalAs(UnmanagedType.FunctionPtr)]
  70. internal _GetSeatedZeroPoseToStandingAbsoluteTrackingPose GetSeatedZeroPoseToStandingAbsoluteTrackingPose;
  71. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  72. internal delegate HmdMatrix34_t _GetRawZeroPoseToStandingAbsoluteTrackingPose();
  73. [MarshalAs(UnmanagedType.FunctionPtr)]
  74. internal _GetRawZeroPoseToStandingAbsoluteTrackingPose GetRawZeroPoseToStandingAbsoluteTrackingPose;
  75. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  76. internal delegate uint _GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass, [In, Out] uint[] punTrackedDeviceIndexArray, uint unTrackedDeviceIndexArrayCount, uint unRelativeToTrackedDeviceIndex);
  77. [MarshalAs(UnmanagedType.FunctionPtr)]
  78. internal _GetSortedTrackedDeviceIndicesOfClass GetSortedTrackedDeviceIndicesOfClass;
  79. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  80. internal delegate EDeviceActivityLevel _GetTrackedDeviceActivityLevel(uint unDeviceId);
  81. [MarshalAs(UnmanagedType.FunctionPtr)]
  82. internal _GetTrackedDeviceActivityLevel GetTrackedDeviceActivityLevel;
  83. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  84. internal delegate void _ApplyTransform(ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pTrackedDevicePose, ref HmdMatrix34_t pTransform);
  85. [MarshalAs(UnmanagedType.FunctionPtr)]
  86. internal _ApplyTransform ApplyTransform;
  87. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  88. internal delegate uint _GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType);
  89. [MarshalAs(UnmanagedType.FunctionPtr)]
  90. internal _GetTrackedDeviceIndexForControllerRole GetTrackedDeviceIndexForControllerRole;
  91. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  92. internal delegate ETrackedControllerRole _GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex);
  93. [MarshalAs(UnmanagedType.FunctionPtr)]
  94. internal _GetControllerRoleForTrackedDeviceIndex GetControllerRoleForTrackedDeviceIndex;
  95. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  96. internal delegate ETrackedDeviceClass _GetTrackedDeviceClass(uint unDeviceIndex);
  97. [MarshalAs(UnmanagedType.FunctionPtr)]
  98. internal _GetTrackedDeviceClass GetTrackedDeviceClass;
  99. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  100. internal delegate bool _IsTrackedDeviceConnected(uint unDeviceIndex);
  101. [MarshalAs(UnmanagedType.FunctionPtr)]
  102. internal _IsTrackedDeviceConnected IsTrackedDeviceConnected;
  103. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  104. internal delegate bool _GetBoolTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
  105. [MarshalAs(UnmanagedType.FunctionPtr)]
  106. internal _GetBoolTrackedDeviceProperty GetBoolTrackedDeviceProperty;
  107. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  108. internal delegate float _GetFloatTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
  109. [MarshalAs(UnmanagedType.FunctionPtr)]
  110. internal _GetFloatTrackedDeviceProperty GetFloatTrackedDeviceProperty;
  111. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  112. internal delegate int _GetInt32TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
  113. [MarshalAs(UnmanagedType.FunctionPtr)]
  114. internal _GetInt32TrackedDeviceProperty GetInt32TrackedDeviceProperty;
  115. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  116. internal delegate ulong _GetUint64TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
  117. [MarshalAs(UnmanagedType.FunctionPtr)]
  118. internal _GetUint64TrackedDeviceProperty GetUint64TrackedDeviceProperty;
  119. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  120. internal delegate HmdMatrix34_t _GetMatrix34TrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, ref ETrackedPropertyError pError);
  121. [MarshalAs(UnmanagedType.FunctionPtr)]
  122. internal _GetMatrix34TrackedDeviceProperty GetMatrix34TrackedDeviceProperty;
  123. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  124. internal delegate uint _GetArrayTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, uint propType, IntPtr pBuffer, uint unBufferSize, ref ETrackedPropertyError pError);
  125. [MarshalAs(UnmanagedType.FunctionPtr)]
  126. internal _GetArrayTrackedDeviceProperty GetArrayTrackedDeviceProperty;
  127. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  128. internal delegate uint _GetStringTrackedDeviceProperty(uint unDeviceIndex, ETrackedDeviceProperty prop, System.Text.StringBuilder pchValue, uint unBufferSize, ref ETrackedPropertyError pError);
  129. [MarshalAs(UnmanagedType.FunctionPtr)]
  130. internal _GetStringTrackedDeviceProperty GetStringTrackedDeviceProperty;
  131. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  132. internal delegate IntPtr _GetPropErrorNameFromEnum(ETrackedPropertyError error);
  133. [MarshalAs(UnmanagedType.FunctionPtr)]
  134. internal _GetPropErrorNameFromEnum GetPropErrorNameFromEnum;
  135. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  136. internal delegate bool _PollNextEvent(ref VREvent_t pEvent, uint uncbVREvent);
  137. [MarshalAs(UnmanagedType.FunctionPtr)]
  138. internal _PollNextEvent PollNextEvent;
  139. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  140. internal delegate bool _PollNextEventWithPose(ETrackingUniverseOrigin eOrigin, ref VREvent_t pEvent, uint uncbVREvent, ref TrackedDevicePose_t pTrackedDevicePose);
  141. [MarshalAs(UnmanagedType.FunctionPtr)]
  142. internal _PollNextEventWithPose PollNextEventWithPose;
  143. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  144. internal delegate IntPtr _GetEventTypeNameFromEnum(EVREventType eType);
  145. [MarshalAs(UnmanagedType.FunctionPtr)]
  146. internal _GetEventTypeNameFromEnum GetEventTypeNameFromEnum;
  147. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  148. internal delegate HiddenAreaMesh_t _GetHiddenAreaMesh(EVREye eEye, EHiddenAreaMeshType type);
  149. [MarshalAs(UnmanagedType.FunctionPtr)]
  150. internal _GetHiddenAreaMesh GetHiddenAreaMesh;
  151. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  152. internal delegate bool _GetControllerState(uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize);
  153. [MarshalAs(UnmanagedType.FunctionPtr)]
  154. internal _GetControllerState GetControllerState;
  155. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  156. internal delegate bool _GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin, uint unControllerDeviceIndex, ref VRControllerState_t pControllerState, uint unControllerStateSize, ref TrackedDevicePose_t pTrackedDevicePose);
  157. [MarshalAs(UnmanagedType.FunctionPtr)]
  158. internal _GetControllerStateWithPose GetControllerStateWithPose;
  159. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  160. internal delegate void _TriggerHapticPulse(uint unControllerDeviceIndex, uint unAxisId, ushort usDurationMicroSec);
  161. [MarshalAs(UnmanagedType.FunctionPtr)]
  162. internal _TriggerHapticPulse TriggerHapticPulse;
  163. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  164. internal delegate IntPtr _GetButtonIdNameFromEnum(EVRButtonId eButtonId);
  165. [MarshalAs(UnmanagedType.FunctionPtr)]
  166. internal _GetButtonIdNameFromEnum GetButtonIdNameFromEnum;
  167. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  168. internal delegate IntPtr _GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType);
  169. [MarshalAs(UnmanagedType.FunctionPtr)]
  170. internal _GetControllerAxisTypeNameFromEnum GetControllerAxisTypeNameFromEnum;
  171. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  172. internal delegate bool _IsInputAvailable();
  173. [MarshalAs(UnmanagedType.FunctionPtr)]
  174. internal _IsInputAvailable IsInputAvailable;
  175. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  176. internal delegate bool _IsSteamVRDrawingControllers();
  177. [MarshalAs(UnmanagedType.FunctionPtr)]
  178. internal _IsSteamVRDrawingControllers IsSteamVRDrawingControllers;
  179. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  180. internal delegate bool _ShouldApplicationPause();
  181. [MarshalAs(UnmanagedType.FunctionPtr)]
  182. internal _ShouldApplicationPause ShouldApplicationPause;
  183. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  184. internal delegate bool _ShouldApplicationReduceRenderingWork();
  185. [MarshalAs(UnmanagedType.FunctionPtr)]
  186. internal _ShouldApplicationReduceRenderingWork ShouldApplicationReduceRenderingWork;
  187. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  188. internal delegate EVRFirmwareError _PerformFirmwareUpdate(uint unDeviceIndex);
  189. [MarshalAs(UnmanagedType.FunctionPtr)]
  190. internal _PerformFirmwareUpdate PerformFirmwareUpdate;
  191. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  192. internal delegate void _AcknowledgeQuit_Exiting();
  193. [MarshalAs(UnmanagedType.FunctionPtr)]
  194. internal _AcknowledgeQuit_Exiting AcknowledgeQuit_Exiting;
  195. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  196. internal delegate uint _GetAppContainerFilePaths(System.Text.StringBuilder pchBuffer, uint unBufferSize);
  197. [MarshalAs(UnmanagedType.FunctionPtr)]
  198. internal _GetAppContainerFilePaths GetAppContainerFilePaths;
  199. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  200. internal delegate IntPtr _GetRuntimeVersion();
  201. [MarshalAs(UnmanagedType.FunctionPtr)]
  202. internal _GetRuntimeVersion GetRuntimeVersion;
  203. }
  204. [StructLayout(LayoutKind.Sequential)]
  205. public struct IVRExtendedDisplay
  206. {
  207. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  208. internal delegate void _GetWindowBounds(ref int pnX, ref int pnY, ref uint pnWidth, ref uint pnHeight);
  209. [MarshalAs(UnmanagedType.FunctionPtr)]
  210. internal _GetWindowBounds GetWindowBounds;
  211. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  212. internal delegate void _GetEyeOutputViewport(EVREye eEye, ref uint pnX, ref uint pnY, ref uint pnWidth, ref uint pnHeight);
  213. [MarshalAs(UnmanagedType.FunctionPtr)]
  214. internal _GetEyeOutputViewport GetEyeOutputViewport;
  215. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  216. internal delegate void _GetDXGIOutputInfo(ref int pnAdapterIndex, ref int pnAdapterOutputIndex);
  217. [MarshalAs(UnmanagedType.FunctionPtr)]
  218. internal _GetDXGIOutputInfo GetDXGIOutputInfo;
  219. }
  220. [StructLayout(LayoutKind.Sequential)]
  221. public struct IVRTrackedCamera
  222. {
  223. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  224. internal delegate IntPtr _GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError);
  225. [MarshalAs(UnmanagedType.FunctionPtr)]
  226. internal _GetCameraErrorNameFromEnum GetCameraErrorNameFromEnum;
  227. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  228. internal delegate EVRTrackedCameraError _HasCamera(uint nDeviceIndex, ref bool pHasCamera);
  229. [MarshalAs(UnmanagedType.FunctionPtr)]
  230. internal _HasCamera HasCamera;
  231. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  232. internal delegate EVRTrackedCameraError _GetCameraFrameSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref uint pnWidth, ref uint pnHeight, ref uint pnFrameBufferSize);
  233. [MarshalAs(UnmanagedType.FunctionPtr)]
  234. internal _GetCameraFrameSize GetCameraFrameSize;
  235. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  236. internal delegate EVRTrackedCameraError _GetCameraIntrinsics(uint nDeviceIndex, uint nCameraIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter);
  237. [MarshalAs(UnmanagedType.FunctionPtr)]
  238. internal _GetCameraIntrinsics GetCameraIntrinsics;
  239. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  240. internal delegate EVRTrackedCameraError _GetCameraProjection(uint nDeviceIndex, uint nCameraIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection);
  241. [MarshalAs(UnmanagedType.FunctionPtr)]
  242. internal _GetCameraProjection GetCameraProjection;
  243. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  244. internal delegate EVRTrackedCameraError _AcquireVideoStreamingService(uint nDeviceIndex, ref ulong pHandle);
  245. [MarshalAs(UnmanagedType.FunctionPtr)]
  246. internal _AcquireVideoStreamingService AcquireVideoStreamingService;
  247. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  248. internal delegate EVRTrackedCameraError _ReleaseVideoStreamingService(ulong hTrackedCamera);
  249. [MarshalAs(UnmanagedType.FunctionPtr)]
  250. internal _ReleaseVideoStreamingService ReleaseVideoStreamingService;
  251. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  252. internal delegate EVRTrackedCameraError _GetVideoStreamFrameBuffer(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pFrameBuffer, uint nFrameBufferSize, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
  253. [MarshalAs(UnmanagedType.FunctionPtr)]
  254. internal _GetVideoStreamFrameBuffer GetVideoStreamFrameBuffer;
  255. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  256. internal delegate EVRTrackedCameraError _GetVideoStreamTextureSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref VRTextureBounds_t pTextureBounds, ref uint pnWidth, ref uint pnHeight);
  257. [MarshalAs(UnmanagedType.FunctionPtr)]
  258. internal _GetVideoStreamTextureSize GetVideoStreamTextureSize;
  259. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  260. internal delegate EVRTrackedCameraError _GetVideoStreamTextureD3D11(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
  261. [MarshalAs(UnmanagedType.FunctionPtr)]
  262. internal _GetVideoStreamTextureD3D11 GetVideoStreamTextureD3D11;
  263. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  264. internal delegate EVRTrackedCameraError _GetVideoStreamTextureGL(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, ref uint pglTextureId, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize);
  265. [MarshalAs(UnmanagedType.FunctionPtr)]
  266. internal _GetVideoStreamTextureGL GetVideoStreamTextureGL;
  267. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  268. internal delegate EVRTrackedCameraError _ReleaseVideoStreamTextureGL(ulong hTrackedCamera, uint glTextureId);
  269. [MarshalAs(UnmanagedType.FunctionPtr)]
  270. internal _ReleaseVideoStreamTextureGL ReleaseVideoStreamTextureGL;
  271. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  272. internal delegate void _SetCameraTrackingSpace(ETrackingUniverseOrigin eUniverse);
  273. [MarshalAs(UnmanagedType.FunctionPtr)]
  274. internal _SetCameraTrackingSpace SetCameraTrackingSpace;
  275. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  276. internal delegate ETrackingUniverseOrigin _GetCameraTrackingSpace();
  277. [MarshalAs(UnmanagedType.FunctionPtr)]
  278. internal _GetCameraTrackingSpace GetCameraTrackingSpace;
  279. }
  280. [StructLayout(LayoutKind.Sequential)]
  281. public struct IVRApplications
  282. {
  283. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  284. internal delegate EVRApplicationError _AddApplicationManifest(IntPtr pchApplicationManifestFullPath, bool bTemporary);
  285. [MarshalAs(UnmanagedType.FunctionPtr)]
  286. internal _AddApplicationManifest AddApplicationManifest;
  287. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  288. internal delegate EVRApplicationError _RemoveApplicationManifest(IntPtr pchApplicationManifestFullPath);
  289. [MarshalAs(UnmanagedType.FunctionPtr)]
  290. internal _RemoveApplicationManifest RemoveApplicationManifest;
  291. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  292. internal delegate bool _IsApplicationInstalled(IntPtr pchAppKey);
  293. [MarshalAs(UnmanagedType.FunctionPtr)]
  294. internal _IsApplicationInstalled IsApplicationInstalled;
  295. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  296. internal delegate uint _GetApplicationCount();
  297. [MarshalAs(UnmanagedType.FunctionPtr)]
  298. internal _GetApplicationCount GetApplicationCount;
  299. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  300. internal delegate EVRApplicationError _GetApplicationKeyByIndex(uint unApplicationIndex, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
  301. [MarshalAs(UnmanagedType.FunctionPtr)]
  302. internal _GetApplicationKeyByIndex GetApplicationKeyByIndex;
  303. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  304. internal delegate EVRApplicationError _GetApplicationKeyByProcessId(uint unProcessId, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
  305. [MarshalAs(UnmanagedType.FunctionPtr)]
  306. internal _GetApplicationKeyByProcessId GetApplicationKeyByProcessId;
  307. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  308. internal delegate EVRApplicationError _LaunchApplication(IntPtr pchAppKey);
  309. [MarshalAs(UnmanagedType.FunctionPtr)]
  310. internal _LaunchApplication LaunchApplication;
  311. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  312. internal delegate EVRApplicationError _LaunchTemplateApplication(IntPtr pchTemplateAppKey, IntPtr pchNewAppKey, [In, Out] AppOverrideKeys_t[] pKeys, uint unKeys);
  313. [MarshalAs(UnmanagedType.FunctionPtr)]
  314. internal _LaunchTemplateApplication LaunchTemplateApplication;
  315. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  316. internal delegate EVRApplicationError _LaunchApplicationFromMimeType(IntPtr pchMimeType, IntPtr pchArgs);
  317. [MarshalAs(UnmanagedType.FunctionPtr)]
  318. internal _LaunchApplicationFromMimeType LaunchApplicationFromMimeType;
  319. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  320. internal delegate EVRApplicationError _LaunchDashboardOverlay(IntPtr pchAppKey);
  321. [MarshalAs(UnmanagedType.FunctionPtr)]
  322. internal _LaunchDashboardOverlay LaunchDashboardOverlay;
  323. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  324. internal delegate bool _CancelApplicationLaunch(IntPtr pchAppKey);
  325. [MarshalAs(UnmanagedType.FunctionPtr)]
  326. internal _CancelApplicationLaunch CancelApplicationLaunch;
  327. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  328. internal delegate EVRApplicationError _IdentifyApplication(uint unProcessId, IntPtr pchAppKey);
  329. [MarshalAs(UnmanagedType.FunctionPtr)]
  330. internal _IdentifyApplication IdentifyApplication;
  331. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  332. internal delegate uint _GetApplicationProcessId(IntPtr pchAppKey);
  333. [MarshalAs(UnmanagedType.FunctionPtr)]
  334. internal _GetApplicationProcessId GetApplicationProcessId;
  335. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  336. internal delegate IntPtr _GetApplicationsErrorNameFromEnum(EVRApplicationError error);
  337. [MarshalAs(UnmanagedType.FunctionPtr)]
  338. internal _GetApplicationsErrorNameFromEnum GetApplicationsErrorNameFromEnum;
  339. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  340. internal delegate uint _GetApplicationPropertyString(IntPtr pchAppKey, EVRApplicationProperty eProperty, System.Text.StringBuilder pchPropertyValueBuffer, uint unPropertyValueBufferLen, ref EVRApplicationError peError);
  341. [MarshalAs(UnmanagedType.FunctionPtr)]
  342. internal _GetApplicationPropertyString GetApplicationPropertyString;
  343. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  344. internal delegate bool _GetApplicationPropertyBool(IntPtr pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError);
  345. [MarshalAs(UnmanagedType.FunctionPtr)]
  346. internal _GetApplicationPropertyBool GetApplicationPropertyBool;
  347. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  348. internal delegate ulong _GetApplicationPropertyUint64(IntPtr pchAppKey, EVRApplicationProperty eProperty, ref EVRApplicationError peError);
  349. [MarshalAs(UnmanagedType.FunctionPtr)]
  350. internal _GetApplicationPropertyUint64 GetApplicationPropertyUint64;
  351. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  352. internal delegate EVRApplicationError _SetApplicationAutoLaunch(IntPtr pchAppKey, bool bAutoLaunch);
  353. [MarshalAs(UnmanagedType.FunctionPtr)]
  354. internal _SetApplicationAutoLaunch SetApplicationAutoLaunch;
  355. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  356. internal delegate bool _GetApplicationAutoLaunch(IntPtr pchAppKey);
  357. [MarshalAs(UnmanagedType.FunctionPtr)]
  358. internal _GetApplicationAutoLaunch GetApplicationAutoLaunch;
  359. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  360. internal delegate EVRApplicationError _SetDefaultApplicationForMimeType(IntPtr pchAppKey, IntPtr pchMimeType);
  361. [MarshalAs(UnmanagedType.FunctionPtr)]
  362. internal _SetDefaultApplicationForMimeType SetDefaultApplicationForMimeType;
  363. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  364. internal delegate bool _GetDefaultApplicationForMimeType(IntPtr pchMimeType, System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
  365. [MarshalAs(UnmanagedType.FunctionPtr)]
  366. internal _GetDefaultApplicationForMimeType GetDefaultApplicationForMimeType;
  367. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  368. internal delegate bool _GetApplicationSupportedMimeTypes(IntPtr pchAppKey, System.Text.StringBuilder pchMimeTypesBuffer, uint unMimeTypesBuffer);
  369. [MarshalAs(UnmanagedType.FunctionPtr)]
  370. internal _GetApplicationSupportedMimeTypes GetApplicationSupportedMimeTypes;
  371. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  372. internal delegate uint _GetApplicationsThatSupportMimeType(IntPtr pchMimeType, System.Text.StringBuilder pchAppKeysThatSupportBuffer, uint unAppKeysThatSupportBuffer);
  373. [MarshalAs(UnmanagedType.FunctionPtr)]
  374. internal _GetApplicationsThatSupportMimeType GetApplicationsThatSupportMimeType;
  375. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  376. internal delegate uint _GetApplicationLaunchArguments(uint unHandle, System.Text.StringBuilder pchArgs, uint unArgs);
  377. [MarshalAs(UnmanagedType.FunctionPtr)]
  378. internal _GetApplicationLaunchArguments GetApplicationLaunchArguments;
  379. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  380. internal delegate EVRApplicationError _GetStartingApplication(System.Text.StringBuilder pchAppKeyBuffer, uint unAppKeyBufferLen);
  381. [MarshalAs(UnmanagedType.FunctionPtr)]
  382. internal _GetStartingApplication GetStartingApplication;
  383. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  384. internal delegate EVRSceneApplicationState _GetSceneApplicationState();
  385. [MarshalAs(UnmanagedType.FunctionPtr)]
  386. internal _GetSceneApplicationState GetSceneApplicationState;
  387. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  388. internal delegate EVRApplicationError _PerformApplicationPrelaunchCheck(IntPtr pchAppKey);
  389. [MarshalAs(UnmanagedType.FunctionPtr)]
  390. internal _PerformApplicationPrelaunchCheck PerformApplicationPrelaunchCheck;
  391. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  392. internal delegate IntPtr _GetSceneApplicationStateNameFromEnum(EVRSceneApplicationState state);
  393. [MarshalAs(UnmanagedType.FunctionPtr)]
  394. internal _GetSceneApplicationStateNameFromEnum GetSceneApplicationStateNameFromEnum;
  395. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  396. internal delegate EVRApplicationError _LaunchInternalProcess(IntPtr pchBinaryPath, IntPtr pchArguments, IntPtr pchWorkingDirectory);
  397. [MarshalAs(UnmanagedType.FunctionPtr)]
  398. internal _LaunchInternalProcess LaunchInternalProcess;
  399. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  400. internal delegate uint _GetCurrentSceneProcessId();
  401. [MarshalAs(UnmanagedType.FunctionPtr)]
  402. internal _GetCurrentSceneProcessId GetCurrentSceneProcessId;
  403. }
  404. [StructLayout(LayoutKind.Sequential)]
  405. public struct IVRChaperone
  406. {
  407. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  408. internal delegate ChaperoneCalibrationState _GetCalibrationState();
  409. [MarshalAs(UnmanagedType.FunctionPtr)]
  410. internal _GetCalibrationState GetCalibrationState;
  411. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  412. internal delegate bool _GetPlayAreaSize(ref float pSizeX, ref float pSizeZ);
  413. [MarshalAs(UnmanagedType.FunctionPtr)]
  414. internal _GetPlayAreaSize GetPlayAreaSize;
  415. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  416. internal delegate bool _GetPlayAreaRect(ref HmdQuad_t rect);
  417. [MarshalAs(UnmanagedType.FunctionPtr)]
  418. internal _GetPlayAreaRect GetPlayAreaRect;
  419. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  420. internal delegate void _ReloadInfo();
  421. [MarshalAs(UnmanagedType.FunctionPtr)]
  422. internal _ReloadInfo ReloadInfo;
  423. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  424. internal delegate void _SetSceneColor(HmdColor_t color);
  425. [MarshalAs(UnmanagedType.FunctionPtr)]
  426. internal _SetSceneColor SetSceneColor;
  427. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  428. internal delegate void _GetBoundsColor(ref HmdColor_t pOutputColorArray, int nNumOutputColors, float flCollisionBoundsFadeDistance, ref HmdColor_t pOutputCameraColor);
  429. [MarshalAs(UnmanagedType.FunctionPtr)]
  430. internal _GetBoundsColor GetBoundsColor;
  431. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  432. internal delegate bool _AreBoundsVisible();
  433. [MarshalAs(UnmanagedType.FunctionPtr)]
  434. internal _AreBoundsVisible AreBoundsVisible;
  435. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  436. internal delegate void _ForceBoundsVisible(bool bForce);
  437. [MarshalAs(UnmanagedType.FunctionPtr)]
  438. internal _ForceBoundsVisible ForceBoundsVisible;
  439. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  440. internal delegate void _ResetZeroPose(ETrackingUniverseOrigin eTrackingUniverseOrigin);
  441. [MarshalAs(UnmanagedType.FunctionPtr)]
  442. internal _ResetZeroPose ResetZeroPose;
  443. }
  444. [StructLayout(LayoutKind.Sequential)]
  445. public struct IVRChaperoneSetup
  446. {
  447. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  448. internal delegate bool _CommitWorkingCopy(EChaperoneConfigFile configFile);
  449. [MarshalAs(UnmanagedType.FunctionPtr)]
  450. internal _CommitWorkingCopy CommitWorkingCopy;
  451. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  452. internal delegate void _RevertWorkingCopy();
  453. [MarshalAs(UnmanagedType.FunctionPtr)]
  454. internal _RevertWorkingCopy RevertWorkingCopy;
  455. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  456. internal delegate bool _GetWorkingPlayAreaSize(ref float pSizeX, ref float pSizeZ);
  457. [MarshalAs(UnmanagedType.FunctionPtr)]
  458. internal _GetWorkingPlayAreaSize GetWorkingPlayAreaSize;
  459. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  460. internal delegate bool _GetWorkingPlayAreaRect(ref HmdQuad_t rect);
  461. [MarshalAs(UnmanagedType.FunctionPtr)]
  462. internal _GetWorkingPlayAreaRect GetWorkingPlayAreaRect;
  463. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  464. internal delegate bool _GetWorkingCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
  465. [MarshalAs(UnmanagedType.FunctionPtr)]
  466. internal _GetWorkingCollisionBoundsInfo GetWorkingCollisionBoundsInfo;
  467. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  468. internal delegate bool _GetLiveCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, ref uint punQuadsCount);
  469. [MarshalAs(UnmanagedType.FunctionPtr)]
  470. internal _GetLiveCollisionBoundsInfo GetLiveCollisionBoundsInfo;
  471. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  472. internal delegate bool _GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
  473. [MarshalAs(UnmanagedType.FunctionPtr)]
  474. internal _GetWorkingSeatedZeroPoseToRawTrackingPose GetWorkingSeatedZeroPoseToRawTrackingPose;
  475. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  476. internal delegate bool _GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose);
  477. [MarshalAs(UnmanagedType.FunctionPtr)]
  478. internal _GetWorkingStandingZeroPoseToRawTrackingPose GetWorkingStandingZeroPoseToRawTrackingPose;
  479. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  480. internal delegate void _SetWorkingPlayAreaSize(float sizeX, float sizeZ);
  481. [MarshalAs(UnmanagedType.FunctionPtr)]
  482. internal _SetWorkingPlayAreaSize SetWorkingPlayAreaSize;
  483. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  484. internal delegate void _SetWorkingCollisionBoundsInfo([In, Out] HmdQuad_t[] pQuadsBuffer, uint unQuadsCount);
  485. [MarshalAs(UnmanagedType.FunctionPtr)]
  486. internal _SetWorkingCollisionBoundsInfo SetWorkingCollisionBoundsInfo;
  487. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  488. internal delegate void _SetWorkingPerimeter([In, Out] HmdVector2_t[] pPointBuffer, uint unPointCount);
  489. [MarshalAs(UnmanagedType.FunctionPtr)]
  490. internal _SetWorkingPerimeter SetWorkingPerimeter;
  491. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  492. internal delegate void _SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose);
  493. [MarshalAs(UnmanagedType.FunctionPtr)]
  494. internal _SetWorkingSeatedZeroPoseToRawTrackingPose SetWorkingSeatedZeroPoseToRawTrackingPose;
  495. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  496. internal delegate void _SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose);
  497. [MarshalAs(UnmanagedType.FunctionPtr)]
  498. internal _SetWorkingStandingZeroPoseToRawTrackingPose SetWorkingStandingZeroPoseToRawTrackingPose;
  499. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  500. internal delegate void _ReloadFromDisk(EChaperoneConfigFile configFile);
  501. [MarshalAs(UnmanagedType.FunctionPtr)]
  502. internal _ReloadFromDisk ReloadFromDisk;
  503. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  504. internal delegate bool _GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose);
  505. [MarshalAs(UnmanagedType.FunctionPtr)]
  506. internal _GetLiveSeatedZeroPoseToRawTrackingPose GetLiveSeatedZeroPoseToRawTrackingPose;
  507. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  508. internal delegate bool _ExportLiveToBuffer(System.Text.StringBuilder pBuffer, ref uint pnBufferLength);
  509. [MarshalAs(UnmanagedType.FunctionPtr)]
  510. internal _ExportLiveToBuffer ExportLiveToBuffer;
  511. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  512. internal delegate bool _ImportFromBufferToWorking(IntPtr pBuffer, uint nImportFlags);
  513. [MarshalAs(UnmanagedType.FunctionPtr)]
  514. internal _ImportFromBufferToWorking ImportFromBufferToWorking;
  515. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  516. internal delegate void _ShowWorkingSetPreview();
  517. [MarshalAs(UnmanagedType.FunctionPtr)]
  518. internal _ShowWorkingSetPreview ShowWorkingSetPreview;
  519. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  520. internal delegate void _HideWorkingSetPreview();
  521. [MarshalAs(UnmanagedType.FunctionPtr)]
  522. internal _HideWorkingSetPreview HideWorkingSetPreview;
  523. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  524. internal delegate void _RoomSetupStarting();
  525. [MarshalAs(UnmanagedType.FunctionPtr)]
  526. internal _RoomSetupStarting RoomSetupStarting;
  527. }
  528. [StructLayout(LayoutKind.Sequential)]
  529. public struct IVRCompositor
  530. {
  531. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  532. internal delegate void _SetTrackingSpace(ETrackingUniverseOrigin eOrigin);
  533. [MarshalAs(UnmanagedType.FunctionPtr)]
  534. internal _SetTrackingSpace SetTrackingSpace;
  535. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  536. internal delegate ETrackingUniverseOrigin _GetTrackingSpace();
  537. [MarshalAs(UnmanagedType.FunctionPtr)]
  538. internal _GetTrackingSpace GetTrackingSpace;
  539. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  540. internal delegate EVRCompositorError _WaitGetPoses([In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount);
  541. [MarshalAs(UnmanagedType.FunctionPtr)]
  542. internal _WaitGetPoses WaitGetPoses;
  543. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  544. internal delegate EVRCompositorError _GetLastPoses([In, Out] TrackedDevicePose_t[] pRenderPoseArray, uint unRenderPoseArrayCount, [In, Out] TrackedDevicePose_t[] pGamePoseArray, uint unGamePoseArrayCount);
  545. [MarshalAs(UnmanagedType.FunctionPtr)]
  546. internal _GetLastPoses GetLastPoses;
  547. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  548. internal delegate EVRCompositorError _GetLastPoseForTrackedDeviceIndex(uint unDeviceIndex, ref TrackedDevicePose_t pOutputPose, ref TrackedDevicePose_t pOutputGamePose);
  549. [MarshalAs(UnmanagedType.FunctionPtr)]
  550. internal _GetLastPoseForTrackedDeviceIndex GetLastPoseForTrackedDeviceIndex;
  551. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  552. internal delegate EVRCompositorError _Submit(EVREye eEye, ref Texture_t pTexture, ref VRTextureBounds_t pBounds, EVRSubmitFlags nSubmitFlags);
  553. [MarshalAs(UnmanagedType.FunctionPtr)]
  554. internal _Submit Submit;
  555. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  556. internal delegate void _ClearLastSubmittedFrame();
  557. [MarshalAs(UnmanagedType.FunctionPtr)]
  558. internal _ClearLastSubmittedFrame ClearLastSubmittedFrame;
  559. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  560. internal delegate void _PostPresentHandoff();
  561. [MarshalAs(UnmanagedType.FunctionPtr)]
  562. internal _PostPresentHandoff PostPresentHandoff;
  563. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  564. internal delegate bool _GetFrameTiming(ref Compositor_FrameTiming pTiming, uint unFramesAgo);
  565. [MarshalAs(UnmanagedType.FunctionPtr)]
  566. internal _GetFrameTiming GetFrameTiming;
  567. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  568. internal delegate uint _GetFrameTimings([In, Out] Compositor_FrameTiming[] pTiming, uint nFrames);
  569. [MarshalAs(UnmanagedType.FunctionPtr)]
  570. internal _GetFrameTimings GetFrameTimings;
  571. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  572. internal delegate float _GetFrameTimeRemaining();
  573. [MarshalAs(UnmanagedType.FunctionPtr)]
  574. internal _GetFrameTimeRemaining GetFrameTimeRemaining;
  575. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  576. internal delegate void _GetCumulativeStats(ref Compositor_CumulativeStats pStats, uint nStatsSizeInBytes);
  577. [MarshalAs(UnmanagedType.FunctionPtr)]
  578. internal _GetCumulativeStats GetCumulativeStats;
  579. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  580. internal delegate void _FadeToColor(float fSeconds, float fRed, float fGreen, float fBlue, float fAlpha, bool bBackground);
  581. [MarshalAs(UnmanagedType.FunctionPtr)]
  582. internal _FadeToColor FadeToColor;
  583. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  584. internal delegate HmdColor_t _GetCurrentFadeColor(bool bBackground);
  585. [MarshalAs(UnmanagedType.FunctionPtr)]
  586. internal _GetCurrentFadeColor GetCurrentFadeColor;
  587. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  588. internal delegate void _FadeGrid(float fSeconds, bool bFadeGridIn);
  589. [MarshalAs(UnmanagedType.FunctionPtr)]
  590. internal _FadeGrid FadeGrid;
  591. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  592. internal delegate float _GetCurrentGridAlpha();
  593. [MarshalAs(UnmanagedType.FunctionPtr)]
  594. internal _GetCurrentGridAlpha GetCurrentGridAlpha;
  595. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  596. internal delegate EVRCompositorError _SetSkyboxOverride([In, Out] Texture_t[] pTextures, uint unTextureCount);
  597. [MarshalAs(UnmanagedType.FunctionPtr)]
  598. internal _SetSkyboxOverride SetSkyboxOverride;
  599. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  600. internal delegate void _ClearSkyboxOverride();
  601. [MarshalAs(UnmanagedType.FunctionPtr)]
  602. internal _ClearSkyboxOverride ClearSkyboxOverride;
  603. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  604. internal delegate void _CompositorBringToFront();
  605. [MarshalAs(UnmanagedType.FunctionPtr)]
  606. internal _CompositorBringToFront CompositorBringToFront;
  607. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  608. internal delegate void _CompositorGoToBack();
  609. [MarshalAs(UnmanagedType.FunctionPtr)]
  610. internal _CompositorGoToBack CompositorGoToBack;
  611. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  612. internal delegate void _CompositorQuit();
  613. [MarshalAs(UnmanagedType.FunctionPtr)]
  614. internal _CompositorQuit CompositorQuit;
  615. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  616. internal delegate bool _IsFullscreen();
  617. [MarshalAs(UnmanagedType.FunctionPtr)]
  618. internal _IsFullscreen IsFullscreen;
  619. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  620. internal delegate uint _GetCurrentSceneFocusProcess();
  621. [MarshalAs(UnmanagedType.FunctionPtr)]
  622. internal _GetCurrentSceneFocusProcess GetCurrentSceneFocusProcess;
  623. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  624. internal delegate uint _GetLastFrameRenderer();
  625. [MarshalAs(UnmanagedType.FunctionPtr)]
  626. internal _GetLastFrameRenderer GetLastFrameRenderer;
  627. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  628. internal delegate bool _CanRenderScene();
  629. [MarshalAs(UnmanagedType.FunctionPtr)]
  630. internal _CanRenderScene CanRenderScene;
  631. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  632. internal delegate void _ShowMirrorWindow();
  633. [MarshalAs(UnmanagedType.FunctionPtr)]
  634. internal _ShowMirrorWindow ShowMirrorWindow;
  635. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  636. internal delegate void _HideMirrorWindow();
  637. [MarshalAs(UnmanagedType.FunctionPtr)]
  638. internal _HideMirrorWindow HideMirrorWindow;
  639. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  640. internal delegate bool _IsMirrorWindowVisible();
  641. [MarshalAs(UnmanagedType.FunctionPtr)]
  642. internal _IsMirrorWindowVisible IsMirrorWindowVisible;
  643. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  644. internal delegate void _CompositorDumpImages();
  645. [MarshalAs(UnmanagedType.FunctionPtr)]
  646. internal _CompositorDumpImages CompositorDumpImages;
  647. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  648. internal delegate bool _ShouldAppRenderWithLowResources();
  649. [MarshalAs(UnmanagedType.FunctionPtr)]
  650. internal _ShouldAppRenderWithLowResources ShouldAppRenderWithLowResources;
  651. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  652. internal delegate void _ForceInterleavedReprojectionOn(bool bOverride);
  653. [MarshalAs(UnmanagedType.FunctionPtr)]
  654. internal _ForceInterleavedReprojectionOn ForceInterleavedReprojectionOn;
  655. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  656. internal delegate void _ForceReconnectProcess();
  657. [MarshalAs(UnmanagedType.FunctionPtr)]
  658. internal _ForceReconnectProcess ForceReconnectProcess;
  659. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  660. internal delegate void _SuspendRendering(bool bSuspend);
  661. [MarshalAs(UnmanagedType.FunctionPtr)]
  662. internal _SuspendRendering SuspendRendering;
  663. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  664. internal delegate EVRCompositorError _GetMirrorTextureD3D11(EVREye eEye, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView);
  665. [MarshalAs(UnmanagedType.FunctionPtr)]
  666. internal _GetMirrorTextureD3D11 GetMirrorTextureD3D11;
  667. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  668. internal delegate void _ReleaseMirrorTextureD3D11(IntPtr pD3D11ShaderResourceView);
  669. [MarshalAs(UnmanagedType.FunctionPtr)]
  670. internal _ReleaseMirrorTextureD3D11 ReleaseMirrorTextureD3D11;
  671. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  672. internal delegate EVRCompositorError _GetMirrorTextureGL(EVREye eEye, ref uint pglTextureId, IntPtr pglSharedTextureHandle);
  673. [MarshalAs(UnmanagedType.FunctionPtr)]
  674. internal _GetMirrorTextureGL GetMirrorTextureGL;
  675. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  676. internal delegate bool _ReleaseSharedGLTexture(uint glTextureId, IntPtr glSharedTextureHandle);
  677. [MarshalAs(UnmanagedType.FunctionPtr)]
  678. internal _ReleaseSharedGLTexture ReleaseSharedGLTexture;
  679. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  680. internal delegate void _LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle);
  681. [MarshalAs(UnmanagedType.FunctionPtr)]
  682. internal _LockGLSharedTextureForAccess LockGLSharedTextureForAccess;
  683. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  684. internal delegate void _UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle);
  685. [MarshalAs(UnmanagedType.FunctionPtr)]
  686. internal _UnlockGLSharedTextureForAccess UnlockGLSharedTextureForAccess;
  687. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  688. internal delegate uint _GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue, uint unBufferSize);
  689. [MarshalAs(UnmanagedType.FunctionPtr)]
  690. internal _GetVulkanInstanceExtensionsRequired GetVulkanInstanceExtensionsRequired;
  691. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  692. internal delegate uint _GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice, System.Text.StringBuilder pchValue, uint unBufferSize);
  693. [MarshalAs(UnmanagedType.FunctionPtr)]
  694. internal _GetVulkanDeviceExtensionsRequired GetVulkanDeviceExtensionsRequired;
  695. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  696. internal delegate void _SetExplicitTimingMode(EVRCompositorTimingMode eTimingMode);
  697. [MarshalAs(UnmanagedType.FunctionPtr)]
  698. internal _SetExplicitTimingMode SetExplicitTimingMode;
  699. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  700. internal delegate EVRCompositorError _SubmitExplicitTimingData();
  701. [MarshalAs(UnmanagedType.FunctionPtr)]
  702. internal _SubmitExplicitTimingData SubmitExplicitTimingData;
  703. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  704. internal delegate bool _IsMotionSmoothingEnabled();
  705. [MarshalAs(UnmanagedType.FunctionPtr)]
  706. internal _IsMotionSmoothingEnabled IsMotionSmoothingEnabled;
  707. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  708. internal delegate bool _IsMotionSmoothingSupported();
  709. [MarshalAs(UnmanagedType.FunctionPtr)]
  710. internal _IsMotionSmoothingSupported IsMotionSmoothingSupported;
  711. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  712. internal delegate bool _IsCurrentSceneFocusAppLoading();
  713. [MarshalAs(UnmanagedType.FunctionPtr)]
  714. internal _IsCurrentSceneFocusAppLoading IsCurrentSceneFocusAppLoading;
  715. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  716. internal delegate EVRCompositorError _SetStageOverride_Async(IntPtr pchRenderModelPath, ref HmdMatrix34_t pTransform, ref Compositor_StageRenderSettings pRenderSettings, uint nSizeOfRenderSettings);
  717. [MarshalAs(UnmanagedType.FunctionPtr)]
  718. internal _SetStageOverride_Async SetStageOverride_Async;
  719. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  720. internal delegate void _ClearStageOverride();
  721. [MarshalAs(UnmanagedType.FunctionPtr)]
  722. internal _ClearStageOverride ClearStageOverride;
  723. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  724. internal delegate bool _GetCompositorBenchmarkResults(ref Compositor_BenchmarkResults pBenchmarkResults, uint nSizeOfBenchmarkResults);
  725. [MarshalAs(UnmanagedType.FunctionPtr)]
  726. internal _GetCompositorBenchmarkResults GetCompositorBenchmarkResults;
  727. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  728. internal delegate EVRCompositorError _GetLastPosePredictionIDs(ref uint pRenderPosePredictionID, ref uint pGamePosePredictionID);
  729. [MarshalAs(UnmanagedType.FunctionPtr)]
  730. internal _GetLastPosePredictionIDs GetLastPosePredictionIDs;
  731. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  732. internal delegate EVRCompositorError _GetPosesForFrame(uint unPosePredictionID, [In, Out] TrackedDevicePose_t[] pPoseArray, uint unPoseArrayCount);
  733. [MarshalAs(UnmanagedType.FunctionPtr)]
  734. internal _GetPosesForFrame GetPosesForFrame;
  735. }
  736. [StructLayout(LayoutKind.Sequential)]
  737. public struct IVROverlay
  738. {
  739. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  740. internal delegate EVROverlayError _FindOverlay(IntPtr pchOverlayKey, ref ulong pOverlayHandle);
  741. [MarshalAs(UnmanagedType.FunctionPtr)]
  742. internal _FindOverlay FindOverlay;
  743. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  744. internal delegate EVROverlayError _CreateOverlay(IntPtr pchOverlayKey, IntPtr pchOverlayName, ref ulong pOverlayHandle);
  745. [MarshalAs(UnmanagedType.FunctionPtr)]
  746. internal _CreateOverlay CreateOverlay;
  747. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  748. internal delegate EVROverlayError _DestroyOverlay(ulong ulOverlayHandle);
  749. [MarshalAs(UnmanagedType.FunctionPtr)]
  750. internal _DestroyOverlay DestroyOverlay;
  751. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  752. internal delegate uint _GetOverlayKey(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError);
  753. [MarshalAs(UnmanagedType.FunctionPtr)]
  754. internal _GetOverlayKey GetOverlayKey;
  755. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  756. internal delegate uint _GetOverlayName(ulong ulOverlayHandle, System.Text.StringBuilder pchValue, uint unBufferSize, ref EVROverlayError pError);
  757. [MarshalAs(UnmanagedType.FunctionPtr)]
  758. internal _GetOverlayName GetOverlayName;
  759. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  760. internal delegate EVROverlayError _SetOverlayName(ulong ulOverlayHandle, IntPtr pchName);
  761. [MarshalAs(UnmanagedType.FunctionPtr)]
  762. internal _SetOverlayName SetOverlayName;
  763. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  764. internal delegate EVROverlayError _GetOverlayImageData(ulong ulOverlayHandle, IntPtr pvBuffer, uint unBufferSize, ref uint punWidth, ref uint punHeight);
  765. [MarshalAs(UnmanagedType.FunctionPtr)]
  766. internal _GetOverlayImageData GetOverlayImageData;
  767. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  768. internal delegate IntPtr _GetOverlayErrorNameFromEnum(EVROverlayError error);
  769. [MarshalAs(UnmanagedType.FunctionPtr)]
  770. internal _GetOverlayErrorNameFromEnum GetOverlayErrorNameFromEnum;
  771. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  772. internal delegate EVROverlayError _SetOverlayRenderingPid(ulong ulOverlayHandle, uint unPID);
  773. [MarshalAs(UnmanagedType.FunctionPtr)]
  774. internal _SetOverlayRenderingPid SetOverlayRenderingPid;
  775. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  776. internal delegate uint _GetOverlayRenderingPid(ulong ulOverlayHandle);
  777. [MarshalAs(UnmanagedType.FunctionPtr)]
  778. internal _GetOverlayRenderingPid GetOverlayRenderingPid;
  779. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  780. internal delegate EVROverlayError _SetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, bool bEnabled);
  781. [MarshalAs(UnmanagedType.FunctionPtr)]
  782. internal _SetOverlayFlag SetOverlayFlag;
  783. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  784. internal delegate EVROverlayError _GetOverlayFlag(ulong ulOverlayHandle, VROverlayFlags eOverlayFlag, ref bool pbEnabled);
  785. [MarshalAs(UnmanagedType.FunctionPtr)]
  786. internal _GetOverlayFlag GetOverlayFlag;
  787. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  788. internal delegate EVROverlayError _GetOverlayFlags(ulong ulOverlayHandle, ref uint pFlags);
  789. [MarshalAs(UnmanagedType.FunctionPtr)]
  790. internal _GetOverlayFlags GetOverlayFlags;
  791. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  792. internal delegate EVROverlayError _SetOverlayColor(ulong ulOverlayHandle, float fRed, float fGreen, float fBlue);
  793. [MarshalAs(UnmanagedType.FunctionPtr)]
  794. internal _SetOverlayColor SetOverlayColor;
  795. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  796. internal delegate EVROverlayError _GetOverlayColor(ulong ulOverlayHandle, ref float pfRed, ref float pfGreen, ref float pfBlue);
  797. [MarshalAs(UnmanagedType.FunctionPtr)]
  798. internal _GetOverlayColor GetOverlayColor;
  799. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  800. internal delegate EVROverlayError _SetOverlayAlpha(ulong ulOverlayHandle, float fAlpha);
  801. [MarshalAs(UnmanagedType.FunctionPtr)]
  802. internal _SetOverlayAlpha SetOverlayAlpha;
  803. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  804. internal delegate EVROverlayError _GetOverlayAlpha(ulong ulOverlayHandle, ref float pfAlpha);
  805. [MarshalAs(UnmanagedType.FunctionPtr)]
  806. internal _GetOverlayAlpha GetOverlayAlpha;
  807. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  808. internal delegate EVROverlayError _SetOverlayTexelAspect(ulong ulOverlayHandle, float fTexelAspect);
  809. [MarshalAs(UnmanagedType.FunctionPtr)]
  810. internal _SetOverlayTexelAspect SetOverlayTexelAspect;
  811. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  812. internal delegate EVROverlayError _GetOverlayTexelAspect(ulong ulOverlayHandle, ref float pfTexelAspect);
  813. [MarshalAs(UnmanagedType.FunctionPtr)]
  814. internal _GetOverlayTexelAspect GetOverlayTexelAspect;
  815. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  816. internal delegate EVROverlayError _SetOverlaySortOrder(ulong ulOverlayHandle, uint unSortOrder);
  817. [MarshalAs(UnmanagedType.FunctionPtr)]
  818. internal _SetOverlaySortOrder SetOverlaySortOrder;
  819. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  820. internal delegate EVROverlayError _GetOverlaySortOrder(ulong ulOverlayHandle, ref uint punSortOrder);
  821. [MarshalAs(UnmanagedType.FunctionPtr)]
  822. internal _GetOverlaySortOrder GetOverlaySortOrder;
  823. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  824. internal delegate EVROverlayError _SetOverlayWidthInMeters(ulong ulOverlayHandle, float fWidthInMeters);
  825. [MarshalAs(UnmanagedType.FunctionPtr)]
  826. internal _SetOverlayWidthInMeters SetOverlayWidthInMeters;
  827. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  828. internal delegate EVROverlayError _GetOverlayWidthInMeters(ulong ulOverlayHandle, ref float pfWidthInMeters);
  829. [MarshalAs(UnmanagedType.FunctionPtr)]
  830. internal _GetOverlayWidthInMeters GetOverlayWidthInMeters;
  831. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  832. internal delegate EVROverlayError _SetOverlayCurvature(ulong ulOverlayHandle, float fCurvature);
  833. [MarshalAs(UnmanagedType.FunctionPtr)]
  834. internal _SetOverlayCurvature SetOverlayCurvature;
  835. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  836. internal delegate EVROverlayError _GetOverlayCurvature(ulong ulOverlayHandle, ref float pfCurvature);
  837. [MarshalAs(UnmanagedType.FunctionPtr)]
  838. internal _GetOverlayCurvature GetOverlayCurvature;
  839. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  840. internal delegate EVROverlayError _SetOverlayTextureColorSpace(ulong ulOverlayHandle, EColorSpace eTextureColorSpace);
  841. [MarshalAs(UnmanagedType.FunctionPtr)]
  842. internal _SetOverlayTextureColorSpace SetOverlayTextureColorSpace;
  843. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  844. internal delegate EVROverlayError _GetOverlayTextureColorSpace(ulong ulOverlayHandle, ref EColorSpace peTextureColorSpace);
  845. [MarshalAs(UnmanagedType.FunctionPtr)]
  846. internal _GetOverlayTextureColorSpace GetOverlayTextureColorSpace;
  847. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  848. internal delegate EVROverlayError _SetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds);
  849. [MarshalAs(UnmanagedType.FunctionPtr)]
  850. internal _SetOverlayTextureBounds SetOverlayTextureBounds;
  851. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  852. internal delegate EVROverlayError _GetOverlayTextureBounds(ulong ulOverlayHandle, ref VRTextureBounds_t pOverlayTextureBounds);
  853. [MarshalAs(UnmanagedType.FunctionPtr)]
  854. internal _GetOverlayTextureBounds GetOverlayTextureBounds;
  855. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  856. internal delegate EVROverlayError _GetOverlayTransformType(ulong ulOverlayHandle, ref VROverlayTransformType peTransformType);
  857. [MarshalAs(UnmanagedType.FunctionPtr)]
  858. internal _GetOverlayTransformType GetOverlayTransformType;
  859. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  860. internal delegate EVROverlayError _SetOverlayTransformAbsolute(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
  861. [MarshalAs(UnmanagedType.FunctionPtr)]
  862. internal _SetOverlayTransformAbsolute SetOverlayTransformAbsolute;
  863. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  864. internal delegate EVROverlayError _GetOverlayTransformAbsolute(ulong ulOverlayHandle, ref ETrackingUniverseOrigin peTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform);
  865. [MarshalAs(UnmanagedType.FunctionPtr)]
  866. internal _GetOverlayTransformAbsolute GetOverlayTransformAbsolute;
  867. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  868. internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, uint unTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
  869. [MarshalAs(UnmanagedType.FunctionPtr)]
  870. internal _SetOverlayTransformTrackedDeviceRelative SetOverlayTransformTrackedDeviceRelative;
  871. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  872. internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle, ref uint punTrackedDevice, ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform);
  873. [MarshalAs(UnmanagedType.FunctionPtr)]
  874. internal _GetOverlayTransformTrackedDeviceRelative GetOverlayTransformTrackedDeviceRelative;
  875. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  876. internal delegate EVROverlayError _SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, uint unDeviceIndex, IntPtr pchComponentName);
  877. [MarshalAs(UnmanagedType.FunctionPtr)]
  878. internal _SetOverlayTransformTrackedDeviceComponent SetOverlayTransformTrackedDeviceComponent;
  879. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  880. internal delegate EVROverlayError _GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle, ref uint punDeviceIndex, System.Text.StringBuilder pchComponentName, uint unComponentNameSize);
  881. [MarshalAs(UnmanagedType.FunctionPtr)]
  882. internal _GetOverlayTransformTrackedDeviceComponent GetOverlayTransformTrackedDeviceComponent;
  883. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  884. internal delegate EVROverlayError _GetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ref ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform);
  885. [MarshalAs(UnmanagedType.FunctionPtr)]
  886. internal _GetOverlayTransformOverlayRelative GetOverlayTransformOverlayRelative;
  887. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  888. internal delegate EVROverlayError _SetOverlayTransformOverlayRelative(ulong ulOverlayHandle, ulong ulOverlayHandleParent, ref HmdMatrix34_t pmatParentOverlayToOverlayTransform);
  889. [MarshalAs(UnmanagedType.FunctionPtr)]
  890. internal _SetOverlayTransformOverlayRelative SetOverlayTransformOverlayRelative;
  891. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  892. internal delegate EVROverlayError _SetOverlayTransformCursor(ulong ulCursorOverlayHandle, ref HmdVector2_t pvHotspot);
  893. [MarshalAs(UnmanagedType.FunctionPtr)]
  894. internal _SetOverlayTransformCursor SetOverlayTransformCursor;
  895. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  896. internal delegate EVROverlayError _GetOverlayTransformCursor(ulong ulOverlayHandle, ref HmdVector2_t pvHotspot);
  897. [MarshalAs(UnmanagedType.FunctionPtr)]
  898. internal _GetOverlayTransformCursor GetOverlayTransformCursor;
  899. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  900. internal delegate EVROverlayError _SetOverlayTransformProjection(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform, ref VROverlayProjection_t pProjection, EVREye eEye);
  901. [MarshalAs(UnmanagedType.FunctionPtr)]
  902. internal _SetOverlayTransformProjection SetOverlayTransformProjection;
  903. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  904. internal delegate EVROverlayError _ShowOverlay(ulong ulOverlayHandle);
  905. [MarshalAs(UnmanagedType.FunctionPtr)]
  906. internal _ShowOverlay ShowOverlay;
  907. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  908. internal delegate EVROverlayError _HideOverlay(ulong ulOverlayHandle);
  909. [MarshalAs(UnmanagedType.FunctionPtr)]
  910. internal _HideOverlay HideOverlay;
  911. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  912. internal delegate bool _IsOverlayVisible(ulong ulOverlayHandle);
  913. [MarshalAs(UnmanagedType.FunctionPtr)]
  914. internal _IsOverlayVisible IsOverlayVisible;
  915. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  916. internal delegate EVROverlayError _GetTransformForOverlayCoordinates(ulong ulOverlayHandle, ETrackingUniverseOrigin eTrackingOrigin, HmdVector2_t coordinatesInOverlay, ref HmdMatrix34_t pmatTransform);
  917. [MarshalAs(UnmanagedType.FunctionPtr)]
  918. internal _GetTransformForOverlayCoordinates GetTransformForOverlayCoordinates;
  919. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  920. internal delegate bool _PollNextOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pEvent, uint uncbVREvent);
  921. [MarshalAs(UnmanagedType.FunctionPtr)]
  922. internal _PollNextOverlayEvent PollNextOverlayEvent;
  923. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  924. internal delegate EVROverlayError _GetOverlayInputMethod(ulong ulOverlayHandle, ref VROverlayInputMethod peInputMethod);
  925. [MarshalAs(UnmanagedType.FunctionPtr)]
  926. internal _GetOverlayInputMethod GetOverlayInputMethod;
  927. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  928. internal delegate EVROverlayError _SetOverlayInputMethod(ulong ulOverlayHandle, VROverlayInputMethod eInputMethod);
  929. [MarshalAs(UnmanagedType.FunctionPtr)]
  930. internal _SetOverlayInputMethod SetOverlayInputMethod;
  931. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  932. internal delegate EVROverlayError _GetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale);
  933. [MarshalAs(UnmanagedType.FunctionPtr)]
  934. internal _GetOverlayMouseScale GetOverlayMouseScale;
  935. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  936. internal delegate EVROverlayError _SetOverlayMouseScale(ulong ulOverlayHandle, ref HmdVector2_t pvecMouseScale);
  937. [MarshalAs(UnmanagedType.FunctionPtr)]
  938. internal _SetOverlayMouseScale SetOverlayMouseScale;
  939. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  940. internal delegate bool _ComputeOverlayIntersection(ulong ulOverlayHandle, ref VROverlayIntersectionParams_t pParams, ref VROverlayIntersectionResults_t pResults);
  941. [MarshalAs(UnmanagedType.FunctionPtr)]
  942. internal _ComputeOverlayIntersection ComputeOverlayIntersection;
  943. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  944. internal delegate bool _IsHoverTargetOverlay(ulong ulOverlayHandle);
  945. [MarshalAs(UnmanagedType.FunctionPtr)]
  946. internal _IsHoverTargetOverlay IsHoverTargetOverlay;
  947. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  948. internal delegate EVROverlayError _SetOverlayIntersectionMask(ulong ulOverlayHandle, ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives, uint unNumMaskPrimitives, uint unPrimitiveSize);
  949. [MarshalAs(UnmanagedType.FunctionPtr)]
  950. internal _SetOverlayIntersectionMask SetOverlayIntersectionMask;
  951. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  952. internal delegate EVROverlayError _TriggerLaserMouseHapticVibration(ulong ulOverlayHandle, float fDurationSeconds, float fFrequency, float fAmplitude);
  953. [MarshalAs(UnmanagedType.FunctionPtr)]
  954. internal _TriggerLaserMouseHapticVibration TriggerLaserMouseHapticVibration;
  955. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  956. internal delegate EVROverlayError _SetOverlayCursor(ulong ulOverlayHandle, ulong ulCursorHandle);
  957. [MarshalAs(UnmanagedType.FunctionPtr)]
  958. internal _SetOverlayCursor SetOverlayCursor;
  959. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  960. internal delegate EVROverlayError _SetOverlayCursorPositionOverride(ulong ulOverlayHandle, ref HmdVector2_t pvCursor);
  961. [MarshalAs(UnmanagedType.FunctionPtr)]
  962. internal _SetOverlayCursorPositionOverride SetOverlayCursorPositionOverride;
  963. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  964. internal delegate EVROverlayError _ClearOverlayCursorPositionOverride(ulong ulOverlayHandle);
  965. [MarshalAs(UnmanagedType.FunctionPtr)]
  966. internal _ClearOverlayCursorPositionOverride ClearOverlayCursorPositionOverride;
  967. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  968. internal delegate EVROverlayError _SetOverlayTexture(ulong ulOverlayHandle, ref Texture_t pTexture);
  969. [MarshalAs(UnmanagedType.FunctionPtr)]
  970. internal _SetOverlayTexture SetOverlayTexture;
  971. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  972. internal delegate EVROverlayError _ClearOverlayTexture(ulong ulOverlayHandle);
  973. [MarshalAs(UnmanagedType.FunctionPtr)]
  974. internal _ClearOverlayTexture ClearOverlayTexture;
  975. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  976. internal delegate EVROverlayError _SetOverlayRaw(ulong ulOverlayHandle, IntPtr pvBuffer, uint unWidth, uint unHeight, uint unBytesPerPixel);
  977. [MarshalAs(UnmanagedType.FunctionPtr)]
  978. internal _SetOverlayRaw SetOverlayRaw;
  979. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  980. internal delegate EVROverlayError _SetOverlayFromFile(ulong ulOverlayHandle, IntPtr pchFilePath);
  981. [MarshalAs(UnmanagedType.FunctionPtr)]
  982. internal _SetOverlayFromFile SetOverlayFromFile;
  983. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  984. internal delegate EVROverlayError _GetOverlayTexture(ulong ulOverlayHandle, ref IntPtr pNativeTextureHandle, IntPtr pNativeTextureRef, ref uint pWidth, ref uint pHeight, ref uint pNativeFormat, ref ETextureType pAPIType, ref EColorSpace pColorSpace, ref VRTextureBounds_t pTextureBounds);
  985. [MarshalAs(UnmanagedType.FunctionPtr)]
  986. internal _GetOverlayTexture GetOverlayTexture;
  987. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  988. internal delegate EVROverlayError _ReleaseNativeOverlayHandle(ulong ulOverlayHandle, IntPtr pNativeTextureHandle);
  989. [MarshalAs(UnmanagedType.FunctionPtr)]
  990. internal _ReleaseNativeOverlayHandle ReleaseNativeOverlayHandle;
  991. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  992. internal delegate EVROverlayError _GetOverlayTextureSize(ulong ulOverlayHandle, ref uint pWidth, ref uint pHeight);
  993. [MarshalAs(UnmanagedType.FunctionPtr)]
  994. internal _GetOverlayTextureSize GetOverlayTextureSize;
  995. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  996. internal delegate EVROverlayError _CreateDashboardOverlay(IntPtr pchOverlayKey, IntPtr pchOverlayFriendlyName, ref ulong pMainHandle, ref ulong pThumbnailHandle);
  997. [MarshalAs(UnmanagedType.FunctionPtr)]
  998. internal _CreateDashboardOverlay CreateDashboardOverlay;
  999. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1000. internal delegate bool _IsDashboardVisible();
  1001. [MarshalAs(UnmanagedType.FunctionPtr)]
  1002. internal _IsDashboardVisible IsDashboardVisible;
  1003. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1004. internal delegate bool _IsActiveDashboardOverlay(ulong ulOverlayHandle);
  1005. [MarshalAs(UnmanagedType.FunctionPtr)]
  1006. internal _IsActiveDashboardOverlay IsActiveDashboardOverlay;
  1007. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1008. internal delegate EVROverlayError _SetDashboardOverlaySceneProcess(ulong ulOverlayHandle, uint unProcessId);
  1009. [MarshalAs(UnmanagedType.FunctionPtr)]
  1010. internal _SetDashboardOverlaySceneProcess SetDashboardOverlaySceneProcess;
  1011. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1012. internal delegate EVROverlayError _GetDashboardOverlaySceneProcess(ulong ulOverlayHandle, ref uint punProcessId);
  1013. [MarshalAs(UnmanagedType.FunctionPtr)]
  1014. internal _GetDashboardOverlaySceneProcess GetDashboardOverlaySceneProcess;
  1015. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1016. internal delegate void _ShowDashboard(IntPtr pchOverlayToShow);
  1017. [MarshalAs(UnmanagedType.FunctionPtr)]
  1018. internal _ShowDashboard ShowDashboard;
  1019. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1020. internal delegate uint _GetPrimaryDashboardDevice();
  1021. [MarshalAs(UnmanagedType.FunctionPtr)]
  1022. internal _GetPrimaryDashboardDevice GetPrimaryDashboardDevice;
  1023. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1024. internal delegate EVROverlayError _ShowKeyboard(int eInputMode, int eLineInputMode, uint unFlags, IntPtr pchDescription, uint unCharMax, IntPtr pchExistingText, ulong uUserValue);
  1025. [MarshalAs(UnmanagedType.FunctionPtr)]
  1026. internal _ShowKeyboard ShowKeyboard;
  1027. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1028. internal delegate EVROverlayError _ShowKeyboardForOverlay(ulong ulOverlayHandle, int eInputMode, int eLineInputMode, uint unFlags, IntPtr pchDescription, uint unCharMax, IntPtr pchExistingText, ulong uUserValue);
  1029. [MarshalAs(UnmanagedType.FunctionPtr)]
  1030. internal _ShowKeyboardForOverlay ShowKeyboardForOverlay;
  1031. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1032. internal delegate uint _GetKeyboardText(System.Text.StringBuilder pchText, uint cchText);
  1033. [MarshalAs(UnmanagedType.FunctionPtr)]
  1034. internal _GetKeyboardText GetKeyboardText;
  1035. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1036. internal delegate void _HideKeyboard();
  1037. [MarshalAs(UnmanagedType.FunctionPtr)]
  1038. internal _HideKeyboard HideKeyboard;
  1039. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1040. internal delegate void _SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin, ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform);
  1041. [MarshalAs(UnmanagedType.FunctionPtr)]
  1042. internal _SetKeyboardTransformAbsolute SetKeyboardTransformAbsolute;
  1043. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1044. internal delegate void _SetKeyboardPositionForOverlay(ulong ulOverlayHandle, HmdRect2_t avoidRect);
  1045. [MarshalAs(UnmanagedType.FunctionPtr)]
  1046. internal _SetKeyboardPositionForOverlay SetKeyboardPositionForOverlay;
  1047. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1048. internal delegate VRMessageOverlayResponse _ShowMessageOverlay(IntPtr pchText, IntPtr pchCaption, IntPtr pchButton0Text, IntPtr pchButton1Text, IntPtr pchButton2Text, IntPtr pchButton3Text);
  1049. [MarshalAs(UnmanagedType.FunctionPtr)]
  1050. internal _ShowMessageOverlay ShowMessageOverlay;
  1051. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1052. internal delegate void _CloseMessageOverlay();
  1053. [MarshalAs(UnmanagedType.FunctionPtr)]
  1054. internal _CloseMessageOverlay CloseMessageOverlay;
  1055. }
  1056. [StructLayout(LayoutKind.Sequential)]
  1057. public struct IVROverlayView
  1058. {
  1059. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1060. internal delegate EVROverlayError _AcquireOverlayView(ulong ulOverlayHandle, ref VRNativeDevice_t pNativeDevice, ref VROverlayView_t pOverlayView, uint unOverlayViewSize);
  1061. [MarshalAs(UnmanagedType.FunctionPtr)]
  1062. internal _AcquireOverlayView AcquireOverlayView;
  1063. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1064. internal delegate EVROverlayError _ReleaseOverlayView(ref VROverlayView_t pOverlayView);
  1065. [MarshalAs(UnmanagedType.FunctionPtr)]
  1066. internal _ReleaseOverlayView ReleaseOverlayView;
  1067. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1068. internal delegate void _PostOverlayEvent(ulong ulOverlayHandle, ref VREvent_t pvrEvent);
  1069. [MarshalAs(UnmanagedType.FunctionPtr)]
  1070. internal _PostOverlayEvent PostOverlayEvent;
  1071. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1072. internal delegate bool _IsViewingPermitted(ulong ulOverlayHandle);
  1073. [MarshalAs(UnmanagedType.FunctionPtr)]
  1074. internal _IsViewingPermitted IsViewingPermitted;
  1075. }
  1076. [StructLayout(LayoutKind.Sequential)]
  1077. public struct IVRHeadsetView
  1078. {
  1079. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1080. internal delegate void _SetHeadsetViewSize(uint nWidth, uint nHeight);
  1081. [MarshalAs(UnmanagedType.FunctionPtr)]
  1082. internal _SetHeadsetViewSize SetHeadsetViewSize;
  1083. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1084. internal delegate void _GetHeadsetViewSize(ref uint pnWidth, ref uint pnHeight);
  1085. [MarshalAs(UnmanagedType.FunctionPtr)]
  1086. internal _GetHeadsetViewSize GetHeadsetViewSize;
  1087. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1088. internal delegate void _SetHeadsetViewMode(uint eHeadsetViewMode);
  1089. [MarshalAs(UnmanagedType.FunctionPtr)]
  1090. internal _SetHeadsetViewMode SetHeadsetViewMode;
  1091. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1092. internal delegate uint _GetHeadsetViewMode();
  1093. [MarshalAs(UnmanagedType.FunctionPtr)]
  1094. internal _GetHeadsetViewMode GetHeadsetViewMode;
  1095. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1096. internal delegate void _SetHeadsetViewCropped(bool bCropped);
  1097. [MarshalAs(UnmanagedType.FunctionPtr)]
  1098. internal _SetHeadsetViewCropped SetHeadsetViewCropped;
  1099. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1100. internal delegate bool _GetHeadsetViewCropped();
  1101. [MarshalAs(UnmanagedType.FunctionPtr)]
  1102. internal _GetHeadsetViewCropped GetHeadsetViewCropped;
  1103. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1104. internal delegate float _GetHeadsetViewAspectRatio();
  1105. [MarshalAs(UnmanagedType.FunctionPtr)]
  1106. internal _GetHeadsetViewAspectRatio GetHeadsetViewAspectRatio;
  1107. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1108. internal delegate void _SetHeadsetViewBlendRange(float flStartPct, float flEndPct);
  1109. [MarshalAs(UnmanagedType.FunctionPtr)]
  1110. internal _SetHeadsetViewBlendRange SetHeadsetViewBlendRange;
  1111. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1112. internal delegate void _GetHeadsetViewBlendRange(ref float pStartPct, ref float pEndPct);
  1113. [MarshalAs(UnmanagedType.FunctionPtr)]
  1114. internal _GetHeadsetViewBlendRange GetHeadsetViewBlendRange;
  1115. }
  1116. [StructLayout(LayoutKind.Sequential)]
  1117. public struct IVRRenderModels
  1118. {
  1119. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1120. internal delegate EVRRenderModelError _LoadRenderModel_Async(IntPtr pchRenderModelName, ref IntPtr ppRenderModel);
  1121. [MarshalAs(UnmanagedType.FunctionPtr)]
  1122. internal _LoadRenderModel_Async LoadRenderModel_Async;
  1123. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1124. internal delegate void _FreeRenderModel(IntPtr pRenderModel);
  1125. [MarshalAs(UnmanagedType.FunctionPtr)]
  1126. internal _FreeRenderModel FreeRenderModel;
  1127. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1128. internal delegate EVRRenderModelError _LoadTexture_Async(int textureId, ref IntPtr ppTexture);
  1129. [MarshalAs(UnmanagedType.FunctionPtr)]
  1130. internal _LoadTexture_Async LoadTexture_Async;
  1131. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1132. internal delegate void _FreeTexture(IntPtr pTexture);
  1133. [MarshalAs(UnmanagedType.FunctionPtr)]
  1134. internal _FreeTexture FreeTexture;
  1135. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1136. internal delegate EVRRenderModelError _LoadTextureD3D11_Async(int textureId, IntPtr pD3D11Device, ref IntPtr ppD3D11Texture2D);
  1137. [MarshalAs(UnmanagedType.FunctionPtr)]
  1138. internal _LoadTextureD3D11_Async LoadTextureD3D11_Async;
  1139. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1140. internal delegate EVRRenderModelError _LoadIntoTextureD3D11_Async(int textureId, IntPtr pDstTexture);
  1141. [MarshalAs(UnmanagedType.FunctionPtr)]
  1142. internal _LoadIntoTextureD3D11_Async LoadIntoTextureD3D11_Async;
  1143. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1144. internal delegate void _FreeTextureD3D11(IntPtr pD3D11Texture2D);
  1145. [MarshalAs(UnmanagedType.FunctionPtr)]
  1146. internal _FreeTextureD3D11 FreeTextureD3D11;
  1147. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1148. internal delegate uint _GetRenderModelName(uint unRenderModelIndex, System.Text.StringBuilder pchRenderModelName, uint unRenderModelNameLen);
  1149. [MarshalAs(UnmanagedType.FunctionPtr)]
  1150. internal _GetRenderModelName GetRenderModelName;
  1151. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1152. internal delegate uint _GetRenderModelCount();
  1153. [MarshalAs(UnmanagedType.FunctionPtr)]
  1154. internal _GetRenderModelCount GetRenderModelCount;
  1155. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1156. internal delegate uint _GetComponentCount(IntPtr pchRenderModelName);
  1157. [MarshalAs(UnmanagedType.FunctionPtr)]
  1158. internal _GetComponentCount GetComponentCount;
  1159. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1160. internal delegate uint _GetComponentName(IntPtr pchRenderModelName, uint unComponentIndex, System.Text.StringBuilder pchComponentName, uint unComponentNameLen);
  1161. [MarshalAs(UnmanagedType.FunctionPtr)]
  1162. internal _GetComponentName GetComponentName;
  1163. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1164. internal delegate ulong _GetComponentButtonMask(IntPtr pchRenderModelName, IntPtr pchComponentName);
  1165. [MarshalAs(UnmanagedType.FunctionPtr)]
  1166. internal _GetComponentButtonMask GetComponentButtonMask;
  1167. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1168. internal delegate uint _GetComponentRenderModelName(IntPtr pchRenderModelName, IntPtr pchComponentName, System.Text.StringBuilder pchComponentRenderModelName, uint unComponentRenderModelNameLen);
  1169. [MarshalAs(UnmanagedType.FunctionPtr)]
  1170. internal _GetComponentRenderModelName GetComponentRenderModelName;
  1171. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1172. internal delegate bool _GetComponentStateForDevicePath(IntPtr pchRenderModelName, IntPtr pchComponentName, ulong devicePath, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState);
  1173. [MarshalAs(UnmanagedType.FunctionPtr)]
  1174. internal _GetComponentStateForDevicePath GetComponentStateForDevicePath;
  1175. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1176. internal delegate bool _GetComponentState(IntPtr pchRenderModelName, IntPtr pchComponentName, ref VRControllerState_t pControllerState, ref RenderModel_ControllerMode_State_t pState, ref RenderModel_ComponentState_t pComponentState);
  1177. [MarshalAs(UnmanagedType.FunctionPtr)]
  1178. internal _GetComponentState GetComponentState;
  1179. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1180. internal delegate bool _RenderModelHasComponent(IntPtr pchRenderModelName, IntPtr pchComponentName);
  1181. [MarshalAs(UnmanagedType.FunctionPtr)]
  1182. internal _RenderModelHasComponent RenderModelHasComponent;
  1183. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1184. internal delegate uint _GetRenderModelThumbnailURL(IntPtr pchRenderModelName, System.Text.StringBuilder pchThumbnailURL, uint unThumbnailURLLen, ref EVRRenderModelError peError);
  1185. [MarshalAs(UnmanagedType.FunctionPtr)]
  1186. internal _GetRenderModelThumbnailURL GetRenderModelThumbnailURL;
  1187. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1188. internal delegate uint _GetRenderModelOriginalPath(IntPtr pchRenderModelName, System.Text.StringBuilder pchOriginalPath, uint unOriginalPathLen, ref EVRRenderModelError peError);
  1189. [MarshalAs(UnmanagedType.FunctionPtr)]
  1190. internal _GetRenderModelOriginalPath GetRenderModelOriginalPath;
  1191. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1192. internal delegate IntPtr _GetRenderModelErrorNameFromEnum(EVRRenderModelError error);
  1193. [MarshalAs(UnmanagedType.FunctionPtr)]
  1194. internal _GetRenderModelErrorNameFromEnum GetRenderModelErrorNameFromEnum;
  1195. }
  1196. [StructLayout(LayoutKind.Sequential)]
  1197. public struct IVRNotifications
  1198. {
  1199. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1200. internal delegate EVRNotificationError _CreateNotification(ulong ulOverlayHandle, ulong ulUserValue, EVRNotificationType type, IntPtr pchText, EVRNotificationStyle style, ref NotificationBitmap_t pImage, ref uint pNotificationId);
  1201. [MarshalAs(UnmanagedType.FunctionPtr)]
  1202. internal _CreateNotification CreateNotification;
  1203. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1204. internal delegate EVRNotificationError _RemoveNotification(uint notificationId);
  1205. [MarshalAs(UnmanagedType.FunctionPtr)]
  1206. internal _RemoveNotification RemoveNotification;
  1207. }
  1208. [StructLayout(LayoutKind.Sequential)]
  1209. public struct IVRSettings
  1210. {
  1211. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1212. internal delegate IntPtr _GetSettingsErrorNameFromEnum(EVRSettingsError eError);
  1213. [MarshalAs(UnmanagedType.FunctionPtr)]
  1214. internal _GetSettingsErrorNameFromEnum GetSettingsErrorNameFromEnum;
  1215. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1216. internal delegate void _SetBool(IntPtr pchSection, IntPtr pchSettingsKey, bool bValue, ref EVRSettingsError peError);
  1217. [MarshalAs(UnmanagedType.FunctionPtr)]
  1218. internal _SetBool SetBool;
  1219. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1220. internal delegate void _SetInt32(IntPtr pchSection, IntPtr pchSettingsKey, int nValue, ref EVRSettingsError peError);
  1221. [MarshalAs(UnmanagedType.FunctionPtr)]
  1222. internal _SetInt32 SetInt32;
  1223. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1224. internal delegate void _SetFloat(IntPtr pchSection, IntPtr pchSettingsKey, float flValue, ref EVRSettingsError peError);
  1225. [MarshalAs(UnmanagedType.FunctionPtr)]
  1226. internal _SetFloat SetFloat;
  1227. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1228. internal delegate void _SetString(IntPtr pchSection, IntPtr pchSettingsKey, IntPtr pchValue, ref EVRSettingsError peError);
  1229. [MarshalAs(UnmanagedType.FunctionPtr)]
  1230. internal _SetString SetString;
  1231. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1232. internal delegate bool _GetBool(IntPtr pchSection, IntPtr pchSettingsKey, ref EVRSettingsError peError);
  1233. [MarshalAs(UnmanagedType.FunctionPtr)]
  1234. internal _GetBool GetBool;
  1235. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1236. internal delegate int _GetInt32(IntPtr pchSection, IntPtr pchSettingsKey, ref EVRSettingsError peError);
  1237. [MarshalAs(UnmanagedType.FunctionPtr)]
  1238. internal _GetInt32 GetInt32;
  1239. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1240. internal delegate float _GetFloat(IntPtr pchSection, IntPtr pchSettingsKey, ref EVRSettingsError peError);
  1241. [MarshalAs(UnmanagedType.FunctionPtr)]
  1242. internal _GetFloat GetFloat;
  1243. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1244. internal delegate void _GetString(IntPtr pchSection, IntPtr pchSettingsKey, System.Text.StringBuilder pchValue, uint unValueLen, ref EVRSettingsError peError);
  1245. [MarshalAs(UnmanagedType.FunctionPtr)]
  1246. internal _GetString GetString;
  1247. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1248. internal delegate void _RemoveSection(IntPtr pchSection, ref EVRSettingsError peError);
  1249. [MarshalAs(UnmanagedType.FunctionPtr)]
  1250. internal _RemoveSection RemoveSection;
  1251. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1252. internal delegate void _RemoveKeyInSection(IntPtr pchSection, IntPtr pchSettingsKey, ref EVRSettingsError peError);
  1253. [MarshalAs(UnmanagedType.FunctionPtr)]
  1254. internal _RemoveKeyInSection RemoveKeyInSection;
  1255. }
  1256. [StructLayout(LayoutKind.Sequential)]
  1257. public struct IVRScreenshots
  1258. {
  1259. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1260. internal delegate EVRScreenshotError _RequestScreenshot(ref uint pOutScreenshotHandle, EVRScreenshotType type, IntPtr pchPreviewFilename, IntPtr pchVRFilename);
  1261. [MarshalAs(UnmanagedType.FunctionPtr)]
  1262. internal _RequestScreenshot RequestScreenshot;
  1263. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1264. internal delegate EVRScreenshotError _HookScreenshot([In, Out] EVRScreenshotType[] pSupportedTypes, int numTypes);
  1265. [MarshalAs(UnmanagedType.FunctionPtr)]
  1266. internal _HookScreenshot HookScreenshot;
  1267. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1268. internal delegate EVRScreenshotType _GetScreenshotPropertyType(uint screenshotHandle, ref EVRScreenshotError pError);
  1269. [MarshalAs(UnmanagedType.FunctionPtr)]
  1270. internal _GetScreenshotPropertyType GetScreenshotPropertyType;
  1271. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1272. internal delegate uint _GetScreenshotPropertyFilename(uint screenshotHandle, EVRScreenshotPropertyFilenames filenameType, System.Text.StringBuilder pchFilename, uint cchFilename, ref EVRScreenshotError pError);
  1273. [MarshalAs(UnmanagedType.FunctionPtr)]
  1274. internal _GetScreenshotPropertyFilename GetScreenshotPropertyFilename;
  1275. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1276. internal delegate EVRScreenshotError _UpdateScreenshotProgress(uint screenshotHandle, float flProgress);
  1277. [MarshalAs(UnmanagedType.FunctionPtr)]
  1278. internal _UpdateScreenshotProgress UpdateScreenshotProgress;
  1279. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1280. internal delegate EVRScreenshotError _TakeStereoScreenshot(ref uint pOutScreenshotHandle, IntPtr pchPreviewFilename, IntPtr pchVRFilename);
  1281. [MarshalAs(UnmanagedType.FunctionPtr)]
  1282. internal _TakeStereoScreenshot TakeStereoScreenshot;
  1283. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1284. internal delegate EVRScreenshotError _SubmitScreenshot(uint screenshotHandle, EVRScreenshotType type, IntPtr pchSourcePreviewFilename, IntPtr pchSourceVRFilename);
  1285. [MarshalAs(UnmanagedType.FunctionPtr)]
  1286. internal _SubmitScreenshot SubmitScreenshot;
  1287. }
  1288. [StructLayout(LayoutKind.Sequential)]
  1289. public struct IVRResources
  1290. {
  1291. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1292. internal delegate uint _LoadSharedResource(IntPtr pchResourceName, string pchBuffer, uint unBufferLen);
  1293. [MarshalAs(UnmanagedType.FunctionPtr)]
  1294. internal _LoadSharedResource LoadSharedResource;
  1295. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1296. internal delegate uint _GetResourceFullPath(IntPtr pchResourceName, IntPtr pchResourceTypeDirectory, System.Text.StringBuilder pchPathBuffer, uint unBufferLen);
  1297. [MarshalAs(UnmanagedType.FunctionPtr)]
  1298. internal _GetResourceFullPath GetResourceFullPath;
  1299. }
  1300. [StructLayout(LayoutKind.Sequential)]
  1301. public struct IVRDriverManager
  1302. {
  1303. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1304. internal delegate uint _GetDriverCount();
  1305. [MarshalAs(UnmanagedType.FunctionPtr)]
  1306. internal _GetDriverCount GetDriverCount;
  1307. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1308. internal delegate uint _GetDriverName(uint nDriver, System.Text.StringBuilder pchValue, uint unBufferSize);
  1309. [MarshalAs(UnmanagedType.FunctionPtr)]
  1310. internal _GetDriverName GetDriverName;
  1311. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1312. internal delegate ulong _GetDriverHandle(IntPtr pchDriverName);
  1313. [MarshalAs(UnmanagedType.FunctionPtr)]
  1314. internal _GetDriverHandle GetDriverHandle;
  1315. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1316. internal delegate bool _IsEnabled(uint nDriver);
  1317. [MarshalAs(UnmanagedType.FunctionPtr)]
  1318. internal _IsEnabled IsEnabled;
  1319. }
  1320. [StructLayout(LayoutKind.Sequential)]
  1321. public struct IVRInput
  1322. {
  1323. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1324. internal delegate EVRInputError _SetActionManifestPath(IntPtr pchActionManifestPath);
  1325. [MarshalAs(UnmanagedType.FunctionPtr)]
  1326. internal _SetActionManifestPath SetActionManifestPath;
  1327. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1328. internal delegate EVRInputError _GetActionSetHandle(IntPtr pchActionSetName, ref ulong pHandle);
  1329. [MarshalAs(UnmanagedType.FunctionPtr)]
  1330. internal _GetActionSetHandle GetActionSetHandle;
  1331. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1332. internal delegate EVRInputError _GetActionHandle(IntPtr pchActionName, ref ulong pHandle);
  1333. [MarshalAs(UnmanagedType.FunctionPtr)]
  1334. internal _GetActionHandle GetActionHandle;
  1335. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1336. internal delegate EVRInputError _GetInputSourceHandle(IntPtr pchInputSourcePath, ref ulong pHandle);
  1337. [MarshalAs(UnmanagedType.FunctionPtr)]
  1338. internal _GetInputSourceHandle GetInputSourceHandle;
  1339. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1340. internal delegate EVRInputError _UpdateActionState([In, Out] VRActiveActionSet_t[] pSets, uint unSizeOfVRSelectedActionSet_t, uint unSetCount);
  1341. [MarshalAs(UnmanagedType.FunctionPtr)]
  1342. internal _UpdateActionState UpdateActionState;
  1343. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1344. internal delegate EVRInputError _GetDigitalActionData(ulong action, ref InputDigitalActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
  1345. [MarshalAs(UnmanagedType.FunctionPtr)]
  1346. internal _GetDigitalActionData GetDigitalActionData;
  1347. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1348. internal delegate EVRInputError _GetAnalogActionData(ulong action, ref InputAnalogActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
  1349. [MarshalAs(UnmanagedType.FunctionPtr)]
  1350. internal _GetAnalogActionData GetAnalogActionData;
  1351. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1352. internal delegate EVRInputError _GetPoseActionDataRelativeToNow(ulong action, ETrackingUniverseOrigin eOrigin, float fPredictedSecondsFromNow, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
  1353. [MarshalAs(UnmanagedType.FunctionPtr)]
  1354. internal _GetPoseActionDataRelativeToNow GetPoseActionDataRelativeToNow;
  1355. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1356. internal delegate EVRInputError _GetPoseActionDataForNextFrame(ulong action, ETrackingUniverseOrigin eOrigin, ref InputPoseActionData_t pActionData, uint unActionDataSize, ulong ulRestrictToDevice);
  1357. [MarshalAs(UnmanagedType.FunctionPtr)]
  1358. internal _GetPoseActionDataForNextFrame GetPoseActionDataForNextFrame;
  1359. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1360. internal delegate EVRInputError _GetSkeletalActionData(ulong action, ref InputSkeletalActionData_t pActionData, uint unActionDataSize);
  1361. [MarshalAs(UnmanagedType.FunctionPtr)]
  1362. internal _GetSkeletalActionData GetSkeletalActionData;
  1363. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1364. internal delegate EVRInputError _GetDominantHand(ref ETrackedControllerRole peDominantHand);
  1365. [MarshalAs(UnmanagedType.FunctionPtr)]
  1366. internal _GetDominantHand GetDominantHand;
  1367. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1368. internal delegate EVRInputError _SetDominantHand(ETrackedControllerRole eDominantHand);
  1369. [MarshalAs(UnmanagedType.FunctionPtr)]
  1370. internal _SetDominantHand SetDominantHand;
  1371. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1372. internal delegate EVRInputError _GetBoneCount(ulong action, ref uint pBoneCount);
  1373. [MarshalAs(UnmanagedType.FunctionPtr)]
  1374. internal _GetBoneCount GetBoneCount;
  1375. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1376. internal delegate EVRInputError _GetBoneHierarchy(ulong action, [In, Out] int[] pParentIndices, uint unIndexArayCount);
  1377. [MarshalAs(UnmanagedType.FunctionPtr)]
  1378. internal _GetBoneHierarchy GetBoneHierarchy;
  1379. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1380. internal delegate EVRInputError _GetBoneName(ulong action, int nBoneIndex, System.Text.StringBuilder pchBoneName, uint unNameBufferSize);
  1381. [MarshalAs(UnmanagedType.FunctionPtr)]
  1382. internal _GetBoneName GetBoneName;
  1383. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1384. internal delegate EVRInputError _GetSkeletalReferenceTransforms(ulong action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalReferencePose eReferencePose, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount);
  1385. [MarshalAs(UnmanagedType.FunctionPtr)]
  1386. internal _GetSkeletalReferenceTransforms GetSkeletalReferenceTransforms;
  1387. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1388. internal delegate EVRInputError _GetSkeletalTrackingLevel(ulong action, ref EVRSkeletalTrackingLevel pSkeletalTrackingLevel);
  1389. [MarshalAs(UnmanagedType.FunctionPtr)]
  1390. internal _GetSkeletalTrackingLevel GetSkeletalTrackingLevel;
  1391. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1392. internal delegate EVRInputError _GetSkeletalBoneData(ulong action, EVRSkeletalTransformSpace eTransformSpace, EVRSkeletalMotionRange eMotionRange, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount);
  1393. [MarshalAs(UnmanagedType.FunctionPtr)]
  1394. internal _GetSkeletalBoneData GetSkeletalBoneData;
  1395. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1396. internal delegate EVRInputError _GetSkeletalSummaryData(ulong action, EVRSummaryType eSummaryType, ref VRSkeletalSummaryData_t pSkeletalSummaryData);
  1397. [MarshalAs(UnmanagedType.FunctionPtr)]
  1398. internal _GetSkeletalSummaryData GetSkeletalSummaryData;
  1399. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1400. internal delegate EVRInputError _GetSkeletalBoneDataCompressed(ulong action, EVRSkeletalMotionRange eMotionRange, IntPtr pvCompressedData, uint unCompressedSize, ref uint punRequiredCompressedSize);
  1401. [MarshalAs(UnmanagedType.FunctionPtr)]
  1402. internal _GetSkeletalBoneDataCompressed GetSkeletalBoneDataCompressed;
  1403. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1404. internal delegate EVRInputError _DecompressSkeletalBoneData(IntPtr pvCompressedBuffer, uint unCompressedBufferSize, EVRSkeletalTransformSpace eTransformSpace, [In, Out] VRBoneTransform_t[] pTransformArray, uint unTransformArrayCount);
  1405. [MarshalAs(UnmanagedType.FunctionPtr)]
  1406. internal _DecompressSkeletalBoneData DecompressSkeletalBoneData;
  1407. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1408. internal delegate EVRInputError _TriggerHapticVibrationAction(ulong action, float fStartSecondsFromNow, float fDurationSeconds, float fFrequency, float fAmplitude, ulong ulRestrictToDevice);
  1409. [MarshalAs(UnmanagedType.FunctionPtr)]
  1410. internal _TriggerHapticVibrationAction TriggerHapticVibrationAction;
  1411. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1412. internal delegate EVRInputError _GetActionOrigins(ulong actionSetHandle, ulong digitalActionHandle, [In, Out] ulong[] originsOut, uint originOutCount);
  1413. [MarshalAs(UnmanagedType.FunctionPtr)]
  1414. internal _GetActionOrigins GetActionOrigins;
  1415. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1416. internal delegate EVRInputError _GetOriginLocalizedName(ulong origin, System.Text.StringBuilder pchNameArray, uint unNameArraySize, int unStringSectionsToInclude);
  1417. [MarshalAs(UnmanagedType.FunctionPtr)]
  1418. internal _GetOriginLocalizedName GetOriginLocalizedName;
  1419. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1420. internal delegate EVRInputError _GetOriginTrackedDeviceInfo(ulong origin, ref InputOriginInfo_t pOriginInfo, uint unOriginInfoSize);
  1421. [MarshalAs(UnmanagedType.FunctionPtr)]
  1422. internal _GetOriginTrackedDeviceInfo GetOriginTrackedDeviceInfo;
  1423. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1424. internal delegate EVRInputError _GetActionBindingInfo(ulong action, ref InputBindingInfo_t pOriginInfo, uint unBindingInfoSize, uint unBindingInfoCount, ref uint punReturnedBindingInfoCount);
  1425. [MarshalAs(UnmanagedType.FunctionPtr)]
  1426. internal _GetActionBindingInfo GetActionBindingInfo;
  1427. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1428. internal delegate EVRInputError _ShowActionOrigins(ulong actionSetHandle, ulong ulActionHandle);
  1429. [MarshalAs(UnmanagedType.FunctionPtr)]
  1430. internal _ShowActionOrigins ShowActionOrigins;
  1431. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1432. internal delegate EVRInputError _ShowBindingsForActionSet([In, Out] VRActiveActionSet_t[] pSets, uint unSizeOfVRSelectedActionSet_t, uint unSetCount, ulong originToHighlight);
  1433. [MarshalAs(UnmanagedType.FunctionPtr)]
  1434. internal _ShowBindingsForActionSet ShowBindingsForActionSet;
  1435. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1436. internal delegate EVRInputError _GetComponentStateForBinding(IntPtr pchRenderModelName, IntPtr pchComponentName, ref InputBindingInfo_t pOriginInfo, uint unBindingInfoSize, uint unBindingInfoCount, ref RenderModel_ComponentState_t pComponentState);
  1437. [MarshalAs(UnmanagedType.FunctionPtr)]
  1438. internal _GetComponentStateForBinding GetComponentStateForBinding;
  1439. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1440. internal delegate bool _IsUsingLegacyInput();
  1441. [MarshalAs(UnmanagedType.FunctionPtr)]
  1442. internal _IsUsingLegacyInput IsUsingLegacyInput;
  1443. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1444. internal delegate EVRInputError _OpenBindingUI(IntPtr pchAppKey, ulong ulActionSetHandle, ulong ulDeviceHandle, bool bShowOnDesktop);
  1445. [MarshalAs(UnmanagedType.FunctionPtr)]
  1446. internal _OpenBindingUI OpenBindingUI;
  1447. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1448. internal delegate EVRInputError _GetBindingVariant(ulong ulDevicePath, System.Text.StringBuilder pchVariantArray, uint unVariantArraySize);
  1449. [MarshalAs(UnmanagedType.FunctionPtr)]
  1450. internal _GetBindingVariant GetBindingVariant;
  1451. }
  1452. [StructLayout(LayoutKind.Sequential)]
  1453. public struct IVRIOBuffer
  1454. {
  1455. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1456. internal delegate EIOBufferError _Open(IntPtr pchPath, EIOBufferMode mode, uint unElementSize, uint unElements, ref ulong pulBuffer);
  1457. [MarshalAs(UnmanagedType.FunctionPtr)]
  1458. internal _Open Open;
  1459. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1460. internal delegate EIOBufferError _Close(ulong ulBuffer);
  1461. [MarshalAs(UnmanagedType.FunctionPtr)]
  1462. internal _Close Close;
  1463. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1464. internal delegate EIOBufferError _Read(ulong ulBuffer, IntPtr pDst, uint unBytes, ref uint punRead);
  1465. [MarshalAs(UnmanagedType.FunctionPtr)]
  1466. internal _Read Read;
  1467. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1468. internal delegate EIOBufferError _Write(ulong ulBuffer, IntPtr pSrc, uint unBytes);
  1469. [MarshalAs(UnmanagedType.FunctionPtr)]
  1470. internal _Write Write;
  1471. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1472. internal delegate ulong _PropertyContainer(ulong ulBuffer);
  1473. [MarshalAs(UnmanagedType.FunctionPtr)]
  1474. internal _PropertyContainer PropertyContainer;
  1475. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1476. internal delegate bool _HasReaders(ulong ulBuffer);
  1477. [MarshalAs(UnmanagedType.FunctionPtr)]
  1478. internal _HasReaders HasReaders;
  1479. }
  1480. [StructLayout(LayoutKind.Sequential)]
  1481. public struct IVRSpatialAnchors
  1482. {
  1483. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1484. internal delegate EVRSpatialAnchorError _CreateSpatialAnchorFromDescriptor(IntPtr pchDescriptor, ref uint pHandleOut);
  1485. [MarshalAs(UnmanagedType.FunctionPtr)]
  1486. internal _CreateSpatialAnchorFromDescriptor CreateSpatialAnchorFromDescriptor;
  1487. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1488. internal delegate EVRSpatialAnchorError _CreateSpatialAnchorFromPose(uint unDeviceIndex, ETrackingUniverseOrigin eOrigin, ref SpatialAnchorPose_t pPose, ref uint pHandleOut);
  1489. [MarshalAs(UnmanagedType.FunctionPtr)]
  1490. internal _CreateSpatialAnchorFromPose CreateSpatialAnchorFromPose;
  1491. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1492. internal delegate EVRSpatialAnchorError _GetSpatialAnchorPose(uint unHandle, ETrackingUniverseOrigin eOrigin, ref SpatialAnchorPose_t pPoseOut);
  1493. [MarshalAs(UnmanagedType.FunctionPtr)]
  1494. internal _GetSpatialAnchorPose GetSpatialAnchorPose;
  1495. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1496. internal delegate EVRSpatialAnchorError _GetSpatialAnchorDescriptor(uint unHandle, System.Text.StringBuilder pchDescriptorOut, ref uint punDescriptorBufferLenInOut);
  1497. [MarshalAs(UnmanagedType.FunctionPtr)]
  1498. internal _GetSpatialAnchorDescriptor GetSpatialAnchorDescriptor;
  1499. }
  1500. [StructLayout(LayoutKind.Sequential)]
  1501. public struct IVRDebug
  1502. {
  1503. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1504. internal delegate EVRDebugError _EmitVrProfilerEvent(IntPtr pchMessage);
  1505. [MarshalAs(UnmanagedType.FunctionPtr)]
  1506. internal _EmitVrProfilerEvent EmitVrProfilerEvent;
  1507. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1508. internal delegate EVRDebugError _BeginVrProfilerEvent(ref ulong pHandleOut);
  1509. [MarshalAs(UnmanagedType.FunctionPtr)]
  1510. internal _BeginVrProfilerEvent BeginVrProfilerEvent;
  1511. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1512. internal delegate EVRDebugError _FinishVrProfilerEvent(ulong hHandle, IntPtr pchMessage);
  1513. [MarshalAs(UnmanagedType.FunctionPtr)]
  1514. internal _FinishVrProfilerEvent FinishVrProfilerEvent;
  1515. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1516. internal delegate uint _DriverDebugRequest(uint unDeviceIndex, IntPtr pchRequest, System.Text.StringBuilder pchResponseBuffer, uint unResponseBufferSize);
  1517. [MarshalAs(UnmanagedType.FunctionPtr)]
  1518. internal _DriverDebugRequest DriverDebugRequest;
  1519. }
  1520. [StructLayout(LayoutKind.Sequential)]
  1521. public struct IVRProperties
  1522. {
  1523. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1524. internal delegate ETrackedPropertyError _ReadPropertyBatch(ulong ulContainerHandle, ref PropertyRead_t pBatch, uint unBatchEntryCount);
  1525. [MarshalAs(UnmanagedType.FunctionPtr)]
  1526. internal _ReadPropertyBatch ReadPropertyBatch;
  1527. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1528. internal delegate ETrackedPropertyError _WritePropertyBatch(ulong ulContainerHandle, ref PropertyWrite_t pBatch, uint unBatchEntryCount);
  1529. [MarshalAs(UnmanagedType.FunctionPtr)]
  1530. internal _WritePropertyBatch WritePropertyBatch;
  1531. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1532. internal delegate IntPtr _GetPropErrorNameFromEnum(ETrackedPropertyError error);
  1533. [MarshalAs(UnmanagedType.FunctionPtr)]
  1534. internal _GetPropErrorNameFromEnum GetPropErrorNameFromEnum;
  1535. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1536. internal delegate ulong _TrackedDeviceToPropertyContainer(uint nDevice);
  1537. [MarshalAs(UnmanagedType.FunctionPtr)]
  1538. internal _TrackedDeviceToPropertyContainer TrackedDeviceToPropertyContainer;
  1539. }
  1540. [StructLayout(LayoutKind.Sequential)]
  1541. public struct IVRPaths
  1542. {
  1543. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1544. internal delegate ETrackedPropertyError _ReadPathBatch(ulong ulRootHandle, ref PathRead_t pBatch, uint unBatchEntryCount);
  1545. [MarshalAs(UnmanagedType.FunctionPtr)]
  1546. internal _ReadPathBatch ReadPathBatch;
  1547. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1548. internal delegate ETrackedPropertyError _WritePathBatch(ulong ulRootHandle, ref PathWrite_t pBatch, uint unBatchEntryCount);
  1549. [MarshalAs(UnmanagedType.FunctionPtr)]
  1550. internal _WritePathBatch WritePathBatch;
  1551. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1552. internal delegate ETrackedPropertyError _StringToHandle(ref ulong pHandle, IntPtr pchPath);
  1553. [MarshalAs(UnmanagedType.FunctionPtr)]
  1554. internal _StringToHandle StringToHandle;
  1555. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1556. internal delegate ETrackedPropertyError _HandleToString(ulong pHandle, string pchBuffer, uint unBufferSize, ref uint punBufferSizeUsed);
  1557. [MarshalAs(UnmanagedType.FunctionPtr)]
  1558. internal _HandleToString HandleToString;
  1559. }
  1560. [StructLayout(LayoutKind.Sequential)]
  1561. public struct IVRBlockQueue
  1562. {
  1563. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1564. internal delegate EBlockQueueError _Create(ref ulong pulQueueHandle, IntPtr pchPath, uint unBlockDataSize, uint unBlockHeaderSize, uint unBlockCount);
  1565. [MarshalAs(UnmanagedType.FunctionPtr)]
  1566. internal _Create Create;
  1567. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1568. internal delegate EBlockQueueError _Connect(ref ulong pulQueueHandle, IntPtr pchPath);
  1569. [MarshalAs(UnmanagedType.FunctionPtr)]
  1570. internal _Connect Connect;
  1571. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1572. internal delegate EBlockQueueError _Destroy(ulong ulQueueHandle);
  1573. [MarshalAs(UnmanagedType.FunctionPtr)]
  1574. internal _Destroy Destroy;
  1575. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1576. internal delegate EBlockQueueError _AcquireWriteOnlyBlock(ulong ulQueueHandle, ref ulong pulBlockHandle, ref IntPtr ppvBuffer);
  1577. [MarshalAs(UnmanagedType.FunctionPtr)]
  1578. internal _AcquireWriteOnlyBlock AcquireWriteOnlyBlock;
  1579. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1580. internal delegate EBlockQueueError _ReleaseWriteOnlyBlock(ulong ulQueueHandle, ulong ulBlockHandle);
  1581. [MarshalAs(UnmanagedType.FunctionPtr)]
  1582. internal _ReleaseWriteOnlyBlock ReleaseWriteOnlyBlock;
  1583. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1584. internal delegate EBlockQueueError _WaitAndAcquireReadOnlyBlock(ulong ulQueueHandle, ref ulong pulBlockHandle, ref IntPtr ppvBuffer, EBlockQueueReadType eReadType, uint unTimeoutMs);
  1585. [MarshalAs(UnmanagedType.FunctionPtr)]
  1586. internal _WaitAndAcquireReadOnlyBlock WaitAndAcquireReadOnlyBlock;
  1587. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1588. internal delegate EBlockQueueError _AcquireReadOnlyBlock(ulong ulQueueHandle, ref ulong pulBlockHandle, ref IntPtr ppvBuffer, EBlockQueueReadType eReadType);
  1589. [MarshalAs(UnmanagedType.FunctionPtr)]
  1590. internal _AcquireReadOnlyBlock AcquireReadOnlyBlock;
  1591. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1592. internal delegate EBlockQueueError _ReleaseReadOnlyBlock(ulong ulQueueHandle, ulong ulBlockHandle);
  1593. [MarshalAs(UnmanagedType.FunctionPtr)]
  1594. internal _ReleaseReadOnlyBlock ReleaseReadOnlyBlock;
  1595. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1596. internal delegate EBlockQueueError _QueueHasReader(ulong ulQueueHandle, ref bool pbHasReaders);
  1597. [MarshalAs(UnmanagedType.FunctionPtr)]
  1598. internal _QueueHasReader QueueHasReader;
  1599. }
  1600. public class Utils
  1601. {
  1602. public static IntPtr ToUtf8(string managedString)
  1603. {
  1604. if (managedString == null)
  1605. {
  1606. return IntPtr.Zero;
  1607. }
  1608. int size = System.Text.Encoding.UTF8.GetByteCount(managedString) + 1;
  1609. if (buffer.Length < size) buffer = new byte[size];
  1610. int written = System.Text.Encoding.UTF8.GetBytes(managedString, 0, managedString.Length, buffer, 0);
  1611. buffer[written] = 0x00; // null terminate
  1612. IntPtr nativeUtf8 = Marshal.AllocHGlobal(written+1);
  1613. Marshal.Copy(buffer, 0, nativeUtf8, written+1);
  1614. return nativeUtf8;
  1615. }
  1616. private static byte[] buffer = new byte[1024];
  1617. }
  1618. public class CVRSystem
  1619. {
  1620. IVRSystem FnTable;
  1621. internal CVRSystem(IntPtr pInterface)
  1622. {
  1623. FnTable = (IVRSystem)Marshal.PtrToStructure(pInterface, typeof(IVRSystem));
  1624. }
  1625. public void GetRecommendedRenderTargetSize(ref uint pnWidth,ref uint pnHeight)
  1626. {
  1627. pnWidth = 0;
  1628. pnHeight = 0;
  1629. FnTable.GetRecommendedRenderTargetSize(ref pnWidth,ref pnHeight);
  1630. }
  1631. public HmdMatrix44_t GetProjectionMatrix(EVREye eEye,float fNearZ,float fFarZ)
  1632. {
  1633. HmdMatrix44_t result = FnTable.GetProjectionMatrix(eEye,fNearZ,fFarZ);
  1634. return result;
  1635. }
  1636. public void GetProjectionRaw(EVREye eEye,ref float pfLeft,ref float pfRight,ref float pfTop,ref float pfBottom)
  1637. {
  1638. pfLeft = 0;
  1639. pfRight = 0;
  1640. pfTop = 0;
  1641. pfBottom = 0;
  1642. FnTable.GetProjectionRaw(eEye,ref pfLeft,ref pfRight,ref pfTop,ref pfBottom);
  1643. }
  1644. public bool ComputeDistortion(EVREye eEye,float fU,float fV,ref DistortionCoordinates_t pDistortionCoordinates)
  1645. {
  1646. bool result = FnTable.ComputeDistortion(eEye,fU,fV,ref pDistortionCoordinates);
  1647. return result;
  1648. }
  1649. public HmdMatrix34_t GetEyeToHeadTransform(EVREye eEye)
  1650. {
  1651. HmdMatrix34_t result = FnTable.GetEyeToHeadTransform(eEye);
  1652. return result;
  1653. }
  1654. public bool GetTimeSinceLastVsync(ref float pfSecondsSinceLastVsync,ref ulong pulFrameCounter)
  1655. {
  1656. pfSecondsSinceLastVsync = 0;
  1657. pulFrameCounter = 0;
  1658. bool result = FnTable.GetTimeSinceLastVsync(ref pfSecondsSinceLastVsync,ref pulFrameCounter);
  1659. return result;
  1660. }
  1661. public int GetD3D9AdapterIndex()
  1662. {
  1663. int result = FnTable.GetD3D9AdapterIndex();
  1664. return result;
  1665. }
  1666. public void GetDXGIOutputInfo(ref int pnAdapterIndex)
  1667. {
  1668. pnAdapterIndex = 0;
  1669. FnTable.GetDXGIOutputInfo(ref pnAdapterIndex);
  1670. }
  1671. public void GetOutputDevice(ref ulong pnDevice,ETextureType textureType,IntPtr pInstance)
  1672. {
  1673. pnDevice = 0;
  1674. FnTable.GetOutputDevice(ref pnDevice,textureType,pInstance);
  1675. }
  1676. public bool IsDisplayOnDesktop()
  1677. {
  1678. bool result = FnTable.IsDisplayOnDesktop();
  1679. return result;
  1680. }
  1681. public bool SetDisplayVisibility(bool bIsVisibleOnDesktop)
  1682. {
  1683. bool result = FnTable.SetDisplayVisibility(bIsVisibleOnDesktop);
  1684. return result;
  1685. }
  1686. public void GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin eOrigin,float fPredictedSecondsToPhotonsFromNow,TrackedDevicePose_t [] pTrackedDevicePoseArray)
  1687. {
  1688. FnTable.GetDeviceToAbsoluteTrackingPose(eOrigin,fPredictedSecondsToPhotonsFromNow,pTrackedDevicePoseArray,(uint) pTrackedDevicePoseArray.Length);
  1689. }
  1690. public HmdMatrix34_t GetSeatedZeroPoseToStandingAbsoluteTrackingPose()
  1691. {
  1692. HmdMatrix34_t result = FnTable.GetSeatedZeroPoseToStandingAbsoluteTrackingPose();
  1693. return result;
  1694. }
  1695. public HmdMatrix34_t GetRawZeroPoseToStandingAbsoluteTrackingPose()
  1696. {
  1697. HmdMatrix34_t result = FnTable.GetRawZeroPoseToStandingAbsoluteTrackingPose();
  1698. return result;
  1699. }
  1700. public uint GetSortedTrackedDeviceIndicesOfClass(ETrackedDeviceClass eTrackedDeviceClass,uint [] punTrackedDeviceIndexArray,uint unRelativeToTrackedDeviceIndex)
  1701. {
  1702. uint result = FnTable.GetSortedTrackedDeviceIndicesOfClass(eTrackedDeviceClass,punTrackedDeviceIndexArray,(uint) punTrackedDeviceIndexArray.Length,unRelativeToTrackedDeviceIndex);
  1703. return result;
  1704. }
  1705. public EDeviceActivityLevel GetTrackedDeviceActivityLevel(uint unDeviceId)
  1706. {
  1707. EDeviceActivityLevel result = FnTable.GetTrackedDeviceActivityLevel(unDeviceId);
  1708. return result;
  1709. }
  1710. public void ApplyTransform(ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pTrackedDevicePose,ref HmdMatrix34_t pTransform)
  1711. {
  1712. FnTable.ApplyTransform(ref pOutputPose,ref pTrackedDevicePose,ref pTransform);
  1713. }
  1714. public uint GetTrackedDeviceIndexForControllerRole(ETrackedControllerRole unDeviceType)
  1715. {
  1716. uint result = FnTable.GetTrackedDeviceIndexForControllerRole(unDeviceType);
  1717. return result;
  1718. }
  1719. public ETrackedControllerRole GetControllerRoleForTrackedDeviceIndex(uint unDeviceIndex)
  1720. {
  1721. ETrackedControllerRole result = FnTable.GetControllerRoleForTrackedDeviceIndex(unDeviceIndex);
  1722. return result;
  1723. }
  1724. public ETrackedDeviceClass GetTrackedDeviceClass(uint unDeviceIndex)
  1725. {
  1726. ETrackedDeviceClass result = FnTable.GetTrackedDeviceClass(unDeviceIndex);
  1727. return result;
  1728. }
  1729. public bool IsTrackedDeviceConnected(uint unDeviceIndex)
  1730. {
  1731. bool result = FnTable.IsTrackedDeviceConnected(unDeviceIndex);
  1732. return result;
  1733. }
  1734. public bool GetBoolTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
  1735. {
  1736. bool result = FnTable.GetBoolTrackedDeviceProperty(unDeviceIndex,prop,ref pError);
  1737. return result;
  1738. }
  1739. public float GetFloatTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
  1740. {
  1741. float result = FnTable.GetFloatTrackedDeviceProperty(unDeviceIndex,prop,ref pError);
  1742. return result;
  1743. }
  1744. public int GetInt32TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
  1745. {
  1746. int result = FnTable.GetInt32TrackedDeviceProperty(unDeviceIndex,prop,ref pError);
  1747. return result;
  1748. }
  1749. public ulong GetUint64TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
  1750. {
  1751. ulong result = FnTable.GetUint64TrackedDeviceProperty(unDeviceIndex,prop,ref pError);
  1752. return result;
  1753. }
  1754. public HmdMatrix34_t GetMatrix34TrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,ref ETrackedPropertyError pError)
  1755. {
  1756. HmdMatrix34_t result = FnTable.GetMatrix34TrackedDeviceProperty(unDeviceIndex,prop,ref pError);
  1757. return result;
  1758. }
  1759. public uint GetArrayTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,uint propType,IntPtr pBuffer,uint unBufferSize,ref ETrackedPropertyError pError)
  1760. {
  1761. uint result = FnTable.GetArrayTrackedDeviceProperty(unDeviceIndex,prop,propType,pBuffer,unBufferSize,ref pError);
  1762. return result;
  1763. }
  1764. public uint GetStringTrackedDeviceProperty(uint unDeviceIndex,ETrackedDeviceProperty prop,System.Text.StringBuilder pchValue,uint unBufferSize,ref ETrackedPropertyError pError)
  1765. {
  1766. uint result = FnTable.GetStringTrackedDeviceProperty(unDeviceIndex,prop,pchValue,unBufferSize,ref pError);
  1767. return result;
  1768. }
  1769. public string GetPropErrorNameFromEnum(ETrackedPropertyError error)
  1770. {
  1771. IntPtr result = FnTable.GetPropErrorNameFromEnum(error);
  1772. return Marshal.PtrToStringAnsi(result);
  1773. }
  1774. // This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
  1775. // originally mis-compiled with the wrong packing for Linux and OSX.
  1776. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1777. internal delegate bool _PollNextEventPacked(ref VREvent_t_Packed pEvent,uint uncbVREvent);
  1778. [StructLayout(LayoutKind.Explicit)]
  1779. struct PollNextEventUnion
  1780. {
  1781. [FieldOffset(0)]
  1782. public IVRSystem._PollNextEvent pPollNextEvent;
  1783. [FieldOffset(0)]
  1784. public _PollNextEventPacked pPollNextEventPacked;
  1785. }
  1786. public bool PollNextEvent(ref VREvent_t pEvent,uint uncbVREvent)
  1787. {
  1788. #if !UNITY_METRO
  1789. if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
  1790. (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
  1791. {
  1792. PollNextEventUnion u;
  1793. VREvent_t_Packed event_packed = new VREvent_t_Packed();
  1794. u.pPollNextEventPacked = null;
  1795. u.pPollNextEvent = FnTable.PollNextEvent;
  1796. bool packed_result = u.pPollNextEventPacked(ref event_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VREvent_t_Packed)));
  1797. event_packed.Unpack(ref pEvent);
  1798. return packed_result;
  1799. }
  1800. #endif
  1801. bool result = FnTable.PollNextEvent(ref pEvent,uncbVREvent);
  1802. return result;
  1803. }
  1804. public bool PollNextEventWithPose(ETrackingUniverseOrigin eOrigin,ref VREvent_t pEvent,uint uncbVREvent,ref TrackedDevicePose_t pTrackedDevicePose)
  1805. {
  1806. bool result = FnTable.PollNextEventWithPose(eOrigin,ref pEvent,uncbVREvent,ref pTrackedDevicePose);
  1807. return result;
  1808. }
  1809. public string GetEventTypeNameFromEnum(EVREventType eType)
  1810. {
  1811. IntPtr result = FnTable.GetEventTypeNameFromEnum(eType);
  1812. return Marshal.PtrToStringAnsi(result);
  1813. }
  1814. public HiddenAreaMesh_t GetHiddenAreaMesh(EVREye eEye,EHiddenAreaMeshType type)
  1815. {
  1816. HiddenAreaMesh_t result = FnTable.GetHiddenAreaMesh(eEye,type);
  1817. return result;
  1818. }
  1819. // This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
  1820. // originally mis-compiled with the wrong packing for Linux and OSX.
  1821. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1822. internal delegate bool _GetControllerStatePacked(uint unControllerDeviceIndex,ref VRControllerState_t_Packed pControllerState,uint unControllerStateSize);
  1823. [StructLayout(LayoutKind.Explicit)]
  1824. struct GetControllerStateUnion
  1825. {
  1826. [FieldOffset(0)]
  1827. public IVRSystem._GetControllerState pGetControllerState;
  1828. [FieldOffset(0)]
  1829. public _GetControllerStatePacked pGetControllerStatePacked;
  1830. }
  1831. public bool GetControllerState(uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize)
  1832. {
  1833. #if !UNITY_METRO
  1834. if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
  1835. (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
  1836. {
  1837. GetControllerStateUnion u;
  1838. VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
  1839. u.pGetControllerStatePacked = null;
  1840. u.pGetControllerState = FnTable.GetControllerState;
  1841. bool packed_result = u.pGetControllerStatePacked(unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)));
  1842. state_packed.Unpack(ref pControllerState);
  1843. return packed_result;
  1844. }
  1845. #endif
  1846. bool result = FnTable.GetControllerState(unControllerDeviceIndex,ref pControllerState,unControllerStateSize);
  1847. return result;
  1848. }
  1849. // This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
  1850. // originally mis-compiled with the wrong packing for Linux and OSX.
  1851. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  1852. internal delegate bool _GetControllerStateWithPosePacked(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t_Packed pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose);
  1853. [StructLayout(LayoutKind.Explicit)]
  1854. struct GetControllerStateWithPoseUnion
  1855. {
  1856. [FieldOffset(0)]
  1857. public IVRSystem._GetControllerStateWithPose pGetControllerStateWithPose;
  1858. [FieldOffset(0)]
  1859. public _GetControllerStateWithPosePacked pGetControllerStateWithPosePacked;
  1860. }
  1861. public bool GetControllerStateWithPose(ETrackingUniverseOrigin eOrigin,uint unControllerDeviceIndex,ref VRControllerState_t pControllerState,uint unControllerStateSize,ref TrackedDevicePose_t pTrackedDevicePose)
  1862. {
  1863. #if !UNITY_METRO
  1864. if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
  1865. (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
  1866. {
  1867. GetControllerStateWithPoseUnion u;
  1868. VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
  1869. u.pGetControllerStateWithPosePacked = null;
  1870. u.pGetControllerStateWithPose = FnTable.GetControllerStateWithPose;
  1871. bool packed_result = u.pGetControllerStateWithPosePacked(eOrigin,unControllerDeviceIndex,ref state_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VRControllerState_t_Packed)),ref pTrackedDevicePose);
  1872. state_packed.Unpack(ref pControllerState);
  1873. return packed_result;
  1874. }
  1875. #endif
  1876. bool result = FnTable.GetControllerStateWithPose(eOrigin,unControllerDeviceIndex,ref pControllerState,unControllerStateSize,ref pTrackedDevicePose);
  1877. return result;
  1878. }
  1879. public void TriggerHapticPulse(uint unControllerDeviceIndex,uint unAxisId,ushort usDurationMicroSec)
  1880. {
  1881. FnTable.TriggerHapticPulse(unControllerDeviceIndex,unAxisId,usDurationMicroSec);
  1882. }
  1883. public string GetButtonIdNameFromEnum(EVRButtonId eButtonId)
  1884. {
  1885. IntPtr result = FnTable.GetButtonIdNameFromEnum(eButtonId);
  1886. return Marshal.PtrToStringAnsi(result);
  1887. }
  1888. public string GetControllerAxisTypeNameFromEnum(EVRControllerAxisType eAxisType)
  1889. {
  1890. IntPtr result = FnTable.GetControllerAxisTypeNameFromEnum(eAxisType);
  1891. return Marshal.PtrToStringAnsi(result);
  1892. }
  1893. public bool IsInputAvailable()
  1894. {
  1895. bool result = FnTable.IsInputAvailable();
  1896. return result;
  1897. }
  1898. public bool IsSteamVRDrawingControllers()
  1899. {
  1900. bool result = FnTable.IsSteamVRDrawingControllers();
  1901. return result;
  1902. }
  1903. public bool ShouldApplicationPause()
  1904. {
  1905. bool result = FnTable.ShouldApplicationPause();
  1906. return result;
  1907. }
  1908. public bool ShouldApplicationReduceRenderingWork()
  1909. {
  1910. bool result = FnTable.ShouldApplicationReduceRenderingWork();
  1911. return result;
  1912. }
  1913. public EVRFirmwareError PerformFirmwareUpdate(uint unDeviceIndex)
  1914. {
  1915. EVRFirmwareError result = FnTable.PerformFirmwareUpdate(unDeviceIndex);
  1916. return result;
  1917. }
  1918. public void AcknowledgeQuit_Exiting()
  1919. {
  1920. FnTable.AcknowledgeQuit_Exiting();
  1921. }
  1922. public uint GetAppContainerFilePaths(System.Text.StringBuilder pchBuffer,uint unBufferSize)
  1923. {
  1924. uint result = FnTable.GetAppContainerFilePaths(pchBuffer,unBufferSize);
  1925. return result;
  1926. }
  1927. public string GetRuntimeVersion()
  1928. {
  1929. IntPtr result = FnTable.GetRuntimeVersion();
  1930. return Marshal.PtrToStringAnsi(result);
  1931. }
  1932. }
  1933. public class CVRExtendedDisplay
  1934. {
  1935. IVRExtendedDisplay FnTable;
  1936. internal CVRExtendedDisplay(IntPtr pInterface)
  1937. {
  1938. FnTable = (IVRExtendedDisplay)Marshal.PtrToStructure(pInterface, typeof(IVRExtendedDisplay));
  1939. }
  1940. public void GetWindowBounds(ref int pnX,ref int pnY,ref uint pnWidth,ref uint pnHeight)
  1941. {
  1942. pnX = 0;
  1943. pnY = 0;
  1944. pnWidth = 0;
  1945. pnHeight = 0;
  1946. FnTable.GetWindowBounds(ref pnX,ref pnY,ref pnWidth,ref pnHeight);
  1947. }
  1948. public void GetEyeOutputViewport(EVREye eEye,ref uint pnX,ref uint pnY,ref uint pnWidth,ref uint pnHeight)
  1949. {
  1950. pnX = 0;
  1951. pnY = 0;
  1952. pnWidth = 0;
  1953. pnHeight = 0;
  1954. FnTable.GetEyeOutputViewport(eEye,ref pnX,ref pnY,ref pnWidth,ref pnHeight);
  1955. }
  1956. public void GetDXGIOutputInfo(ref int pnAdapterIndex,ref int pnAdapterOutputIndex)
  1957. {
  1958. pnAdapterIndex = 0;
  1959. pnAdapterOutputIndex = 0;
  1960. FnTable.GetDXGIOutputInfo(ref pnAdapterIndex,ref pnAdapterOutputIndex);
  1961. }
  1962. }
  1963. public class CVRTrackedCamera
  1964. {
  1965. IVRTrackedCamera FnTable;
  1966. internal CVRTrackedCamera(IntPtr pInterface)
  1967. {
  1968. FnTable = (IVRTrackedCamera)Marshal.PtrToStructure(pInterface, typeof(IVRTrackedCamera));
  1969. }
  1970. public string GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError)
  1971. {
  1972. IntPtr result = FnTable.GetCameraErrorNameFromEnum(eCameraError);
  1973. return Marshal.PtrToStringAnsi(result);
  1974. }
  1975. public EVRTrackedCameraError HasCamera(uint nDeviceIndex,ref bool pHasCamera)
  1976. {
  1977. pHasCamera = false;
  1978. EVRTrackedCameraError result = FnTable.HasCamera(nDeviceIndex,ref pHasCamera);
  1979. return result;
  1980. }
  1981. public EVRTrackedCameraError GetCameraFrameSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref uint pnWidth,ref uint pnHeight,ref uint pnFrameBufferSize)
  1982. {
  1983. pnWidth = 0;
  1984. pnHeight = 0;
  1985. pnFrameBufferSize = 0;
  1986. EVRTrackedCameraError result = FnTable.GetCameraFrameSize(nDeviceIndex,eFrameType,ref pnWidth,ref pnHeight,ref pnFrameBufferSize);
  1987. return result;
  1988. }
  1989. public EVRTrackedCameraError GetCameraIntrinsics(uint nDeviceIndex,uint nCameraIndex,EVRTrackedCameraFrameType eFrameType,ref HmdVector2_t pFocalLength,ref HmdVector2_t pCenter)
  1990. {
  1991. EVRTrackedCameraError result = FnTable.GetCameraIntrinsics(nDeviceIndex,nCameraIndex,eFrameType,ref pFocalLength,ref pCenter);
  1992. return result;
  1993. }
  1994. public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex,uint nCameraIndex,EVRTrackedCameraFrameType eFrameType,float flZNear,float flZFar,ref HmdMatrix44_t pProjection)
  1995. {
  1996. EVRTrackedCameraError result = FnTable.GetCameraProjection(nDeviceIndex,nCameraIndex,eFrameType,flZNear,flZFar,ref pProjection);
  1997. return result;
  1998. }
  1999. public EVRTrackedCameraError AcquireVideoStreamingService(uint nDeviceIndex,ref ulong pHandle)
  2000. {
  2001. pHandle = 0;
  2002. EVRTrackedCameraError result = FnTable.AcquireVideoStreamingService(nDeviceIndex,ref pHandle);
  2003. return result;
  2004. }
  2005. public EVRTrackedCameraError ReleaseVideoStreamingService(ulong hTrackedCamera)
  2006. {
  2007. EVRTrackedCameraError result = FnTable.ReleaseVideoStreamingService(hTrackedCamera);
  2008. return result;
  2009. }
  2010. public EVRTrackedCameraError GetVideoStreamFrameBuffer(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pFrameBuffer,uint nFrameBufferSize,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
  2011. {
  2012. EVRTrackedCameraError result = FnTable.GetVideoStreamFrameBuffer(hTrackedCamera,eFrameType,pFrameBuffer,nFrameBufferSize,ref pFrameHeader,nFrameHeaderSize);
  2013. return result;
  2014. }
  2015. public EVRTrackedCameraError GetVideoStreamTextureSize(uint nDeviceIndex,EVRTrackedCameraFrameType eFrameType,ref VRTextureBounds_t pTextureBounds,ref uint pnWidth,ref uint pnHeight)
  2016. {
  2017. pnWidth = 0;
  2018. pnHeight = 0;
  2019. EVRTrackedCameraError result = FnTable.GetVideoStreamTextureSize(nDeviceIndex,eFrameType,ref pTextureBounds,ref pnWidth,ref pnHeight);
  2020. return result;
  2021. }
  2022. public EVRTrackedCameraError GetVideoStreamTextureD3D11(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,IntPtr pD3D11DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
  2023. {
  2024. EVRTrackedCameraError result = FnTable.GetVideoStreamTextureD3D11(hTrackedCamera,eFrameType,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView,ref pFrameHeader,nFrameHeaderSize);
  2025. return result;
  2026. }
  2027. public EVRTrackedCameraError GetVideoStreamTextureGL(ulong hTrackedCamera,EVRTrackedCameraFrameType eFrameType,ref uint pglTextureId,ref CameraVideoStreamFrameHeader_t pFrameHeader,uint nFrameHeaderSize)
  2028. {
  2029. pglTextureId = 0;
  2030. EVRTrackedCameraError result = FnTable.GetVideoStreamTextureGL(hTrackedCamera,eFrameType,ref pglTextureId,ref pFrameHeader,nFrameHeaderSize);
  2031. return result;
  2032. }
  2033. public EVRTrackedCameraError ReleaseVideoStreamTextureGL(ulong hTrackedCamera,uint glTextureId)
  2034. {
  2035. EVRTrackedCameraError result = FnTable.ReleaseVideoStreamTextureGL(hTrackedCamera,glTextureId);
  2036. return result;
  2037. }
  2038. public void SetCameraTrackingSpace(ETrackingUniverseOrigin eUniverse)
  2039. {
  2040. FnTable.SetCameraTrackingSpace(eUniverse);
  2041. }
  2042. public ETrackingUniverseOrigin GetCameraTrackingSpace()
  2043. {
  2044. ETrackingUniverseOrigin result = FnTable.GetCameraTrackingSpace();
  2045. return result;
  2046. }
  2047. }
  2048. public class CVRApplications
  2049. {
  2050. IVRApplications FnTable;
  2051. internal CVRApplications(IntPtr pInterface)
  2052. {
  2053. FnTable = (IVRApplications)Marshal.PtrToStructure(pInterface, typeof(IVRApplications));
  2054. }
  2055. public EVRApplicationError AddApplicationManifest(string pchApplicationManifestFullPath,bool bTemporary)
  2056. {
  2057. IntPtr pchApplicationManifestFullPathUtf8 = Utils.ToUtf8(pchApplicationManifestFullPath);
  2058. EVRApplicationError result = FnTable.AddApplicationManifest(pchApplicationManifestFullPathUtf8,bTemporary);
  2059. Marshal.FreeHGlobal(pchApplicationManifestFullPathUtf8);
  2060. return result;
  2061. }
  2062. public EVRApplicationError RemoveApplicationManifest(string pchApplicationManifestFullPath)
  2063. {
  2064. IntPtr pchApplicationManifestFullPathUtf8 = Utils.ToUtf8(pchApplicationManifestFullPath);
  2065. EVRApplicationError result = FnTable.RemoveApplicationManifest(pchApplicationManifestFullPathUtf8);
  2066. Marshal.FreeHGlobal(pchApplicationManifestFullPathUtf8);
  2067. return result;
  2068. }
  2069. public bool IsApplicationInstalled(string pchAppKey)
  2070. {
  2071. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2072. bool result = FnTable.IsApplicationInstalled(pchAppKeyUtf8);
  2073. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2074. return result;
  2075. }
  2076. public uint GetApplicationCount()
  2077. {
  2078. uint result = FnTable.GetApplicationCount();
  2079. return result;
  2080. }
  2081. public EVRApplicationError GetApplicationKeyByIndex(uint unApplicationIndex,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
  2082. {
  2083. EVRApplicationError result = FnTable.GetApplicationKeyByIndex(unApplicationIndex,pchAppKeyBuffer,unAppKeyBufferLen);
  2084. return result;
  2085. }
  2086. public EVRApplicationError GetApplicationKeyByProcessId(uint unProcessId,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
  2087. {
  2088. EVRApplicationError result = FnTable.GetApplicationKeyByProcessId(unProcessId,pchAppKeyBuffer,unAppKeyBufferLen);
  2089. return result;
  2090. }
  2091. public EVRApplicationError LaunchApplication(string pchAppKey)
  2092. {
  2093. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2094. EVRApplicationError result = FnTable.LaunchApplication(pchAppKeyUtf8);
  2095. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2096. return result;
  2097. }
  2098. public EVRApplicationError LaunchTemplateApplication(string pchTemplateAppKey,string pchNewAppKey,AppOverrideKeys_t [] pKeys)
  2099. {
  2100. IntPtr pchTemplateAppKeyUtf8 = Utils.ToUtf8(pchTemplateAppKey);
  2101. IntPtr pchNewAppKeyUtf8 = Utils.ToUtf8(pchNewAppKey);
  2102. EVRApplicationError result = FnTable.LaunchTemplateApplication(pchTemplateAppKeyUtf8,pchNewAppKeyUtf8,pKeys,(uint) pKeys.Length);
  2103. Marshal.FreeHGlobal(pchTemplateAppKeyUtf8);
  2104. Marshal.FreeHGlobal(pchNewAppKeyUtf8);
  2105. return result;
  2106. }
  2107. public EVRApplicationError LaunchApplicationFromMimeType(string pchMimeType,string pchArgs)
  2108. {
  2109. IntPtr pchMimeTypeUtf8 = Utils.ToUtf8(pchMimeType);
  2110. IntPtr pchArgsUtf8 = Utils.ToUtf8(pchArgs);
  2111. EVRApplicationError result = FnTable.LaunchApplicationFromMimeType(pchMimeTypeUtf8,pchArgsUtf8);
  2112. Marshal.FreeHGlobal(pchMimeTypeUtf8);
  2113. Marshal.FreeHGlobal(pchArgsUtf8);
  2114. return result;
  2115. }
  2116. public EVRApplicationError LaunchDashboardOverlay(string pchAppKey)
  2117. {
  2118. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2119. EVRApplicationError result = FnTable.LaunchDashboardOverlay(pchAppKeyUtf8);
  2120. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2121. return result;
  2122. }
  2123. public bool CancelApplicationLaunch(string pchAppKey)
  2124. {
  2125. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2126. bool result = FnTable.CancelApplicationLaunch(pchAppKeyUtf8);
  2127. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2128. return result;
  2129. }
  2130. public EVRApplicationError IdentifyApplication(uint unProcessId,string pchAppKey)
  2131. {
  2132. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2133. EVRApplicationError result = FnTable.IdentifyApplication(unProcessId,pchAppKeyUtf8);
  2134. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2135. return result;
  2136. }
  2137. public uint GetApplicationProcessId(string pchAppKey)
  2138. {
  2139. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2140. uint result = FnTable.GetApplicationProcessId(pchAppKeyUtf8);
  2141. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2142. return result;
  2143. }
  2144. public string GetApplicationsErrorNameFromEnum(EVRApplicationError error)
  2145. {
  2146. IntPtr result = FnTable.GetApplicationsErrorNameFromEnum(error);
  2147. return Marshal.PtrToStringAnsi(result);
  2148. }
  2149. public uint GetApplicationPropertyString(string pchAppKey,EVRApplicationProperty eProperty,System.Text.StringBuilder pchPropertyValueBuffer,uint unPropertyValueBufferLen,ref EVRApplicationError peError)
  2150. {
  2151. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2152. uint result = FnTable.GetApplicationPropertyString(pchAppKeyUtf8,eProperty,pchPropertyValueBuffer,unPropertyValueBufferLen,ref peError);
  2153. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2154. return result;
  2155. }
  2156. public bool GetApplicationPropertyBool(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError)
  2157. {
  2158. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2159. bool result = FnTable.GetApplicationPropertyBool(pchAppKeyUtf8,eProperty,ref peError);
  2160. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2161. return result;
  2162. }
  2163. public ulong GetApplicationPropertyUint64(string pchAppKey,EVRApplicationProperty eProperty,ref EVRApplicationError peError)
  2164. {
  2165. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2166. ulong result = FnTable.GetApplicationPropertyUint64(pchAppKeyUtf8,eProperty,ref peError);
  2167. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2168. return result;
  2169. }
  2170. public EVRApplicationError SetApplicationAutoLaunch(string pchAppKey,bool bAutoLaunch)
  2171. {
  2172. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2173. EVRApplicationError result = FnTable.SetApplicationAutoLaunch(pchAppKeyUtf8,bAutoLaunch);
  2174. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2175. return result;
  2176. }
  2177. public bool GetApplicationAutoLaunch(string pchAppKey)
  2178. {
  2179. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2180. bool result = FnTable.GetApplicationAutoLaunch(pchAppKeyUtf8);
  2181. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2182. return result;
  2183. }
  2184. public EVRApplicationError SetDefaultApplicationForMimeType(string pchAppKey,string pchMimeType)
  2185. {
  2186. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2187. IntPtr pchMimeTypeUtf8 = Utils.ToUtf8(pchMimeType);
  2188. EVRApplicationError result = FnTable.SetDefaultApplicationForMimeType(pchAppKeyUtf8,pchMimeTypeUtf8);
  2189. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2190. Marshal.FreeHGlobal(pchMimeTypeUtf8);
  2191. return result;
  2192. }
  2193. public bool GetDefaultApplicationForMimeType(string pchMimeType,System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
  2194. {
  2195. IntPtr pchMimeTypeUtf8 = Utils.ToUtf8(pchMimeType);
  2196. bool result = FnTable.GetDefaultApplicationForMimeType(pchMimeTypeUtf8,pchAppKeyBuffer,unAppKeyBufferLen);
  2197. Marshal.FreeHGlobal(pchMimeTypeUtf8);
  2198. return result;
  2199. }
  2200. public bool GetApplicationSupportedMimeTypes(string pchAppKey,System.Text.StringBuilder pchMimeTypesBuffer,uint unMimeTypesBuffer)
  2201. {
  2202. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2203. bool result = FnTable.GetApplicationSupportedMimeTypes(pchAppKeyUtf8,pchMimeTypesBuffer,unMimeTypesBuffer);
  2204. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2205. return result;
  2206. }
  2207. public uint GetApplicationsThatSupportMimeType(string pchMimeType,System.Text.StringBuilder pchAppKeysThatSupportBuffer,uint unAppKeysThatSupportBuffer)
  2208. {
  2209. IntPtr pchMimeTypeUtf8 = Utils.ToUtf8(pchMimeType);
  2210. uint result = FnTable.GetApplicationsThatSupportMimeType(pchMimeTypeUtf8,pchAppKeysThatSupportBuffer,unAppKeysThatSupportBuffer);
  2211. Marshal.FreeHGlobal(pchMimeTypeUtf8);
  2212. return result;
  2213. }
  2214. public uint GetApplicationLaunchArguments(uint unHandle,System.Text.StringBuilder pchArgs,uint unArgs)
  2215. {
  2216. uint result = FnTable.GetApplicationLaunchArguments(unHandle,pchArgs,unArgs);
  2217. return result;
  2218. }
  2219. public EVRApplicationError GetStartingApplication(System.Text.StringBuilder pchAppKeyBuffer,uint unAppKeyBufferLen)
  2220. {
  2221. EVRApplicationError result = FnTable.GetStartingApplication(pchAppKeyBuffer,unAppKeyBufferLen);
  2222. return result;
  2223. }
  2224. public EVRSceneApplicationState GetSceneApplicationState()
  2225. {
  2226. EVRSceneApplicationState result = FnTable.GetSceneApplicationState();
  2227. return result;
  2228. }
  2229. public EVRApplicationError PerformApplicationPrelaunchCheck(string pchAppKey)
  2230. {
  2231. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  2232. EVRApplicationError result = FnTable.PerformApplicationPrelaunchCheck(pchAppKeyUtf8);
  2233. Marshal.FreeHGlobal(pchAppKeyUtf8);
  2234. return result;
  2235. }
  2236. public string GetSceneApplicationStateNameFromEnum(EVRSceneApplicationState state)
  2237. {
  2238. IntPtr result = FnTable.GetSceneApplicationStateNameFromEnum(state);
  2239. return Marshal.PtrToStringAnsi(result);
  2240. }
  2241. public EVRApplicationError LaunchInternalProcess(string pchBinaryPath,string pchArguments,string pchWorkingDirectory)
  2242. {
  2243. IntPtr pchBinaryPathUtf8 = Utils.ToUtf8(pchBinaryPath);
  2244. IntPtr pchArgumentsUtf8 = Utils.ToUtf8(pchArguments);
  2245. IntPtr pchWorkingDirectoryUtf8 = Utils.ToUtf8(pchWorkingDirectory);
  2246. EVRApplicationError result = FnTable.LaunchInternalProcess(pchBinaryPathUtf8,pchArgumentsUtf8,pchWorkingDirectoryUtf8);
  2247. Marshal.FreeHGlobal(pchBinaryPathUtf8);
  2248. Marshal.FreeHGlobal(pchArgumentsUtf8);
  2249. Marshal.FreeHGlobal(pchWorkingDirectoryUtf8);
  2250. return result;
  2251. }
  2252. public uint GetCurrentSceneProcessId()
  2253. {
  2254. uint result = FnTable.GetCurrentSceneProcessId();
  2255. return result;
  2256. }
  2257. }
  2258. public class CVRChaperone
  2259. {
  2260. IVRChaperone FnTable;
  2261. internal CVRChaperone(IntPtr pInterface)
  2262. {
  2263. FnTable = (IVRChaperone)Marshal.PtrToStructure(pInterface, typeof(IVRChaperone));
  2264. }
  2265. public ChaperoneCalibrationState GetCalibrationState()
  2266. {
  2267. ChaperoneCalibrationState result = FnTable.GetCalibrationState();
  2268. return result;
  2269. }
  2270. public bool GetPlayAreaSize(ref float pSizeX,ref float pSizeZ)
  2271. {
  2272. pSizeX = 0;
  2273. pSizeZ = 0;
  2274. bool result = FnTable.GetPlayAreaSize(ref pSizeX,ref pSizeZ);
  2275. return result;
  2276. }
  2277. public bool GetPlayAreaRect(ref HmdQuad_t rect)
  2278. {
  2279. bool result = FnTable.GetPlayAreaRect(ref rect);
  2280. return result;
  2281. }
  2282. public void ReloadInfo()
  2283. {
  2284. FnTable.ReloadInfo();
  2285. }
  2286. public void SetSceneColor(HmdColor_t color)
  2287. {
  2288. FnTable.SetSceneColor(color);
  2289. }
  2290. public void GetBoundsColor(ref HmdColor_t pOutputColorArray,int nNumOutputColors,float flCollisionBoundsFadeDistance,ref HmdColor_t pOutputCameraColor)
  2291. {
  2292. FnTable.GetBoundsColor(ref pOutputColorArray,nNumOutputColors,flCollisionBoundsFadeDistance,ref pOutputCameraColor);
  2293. }
  2294. public bool AreBoundsVisible()
  2295. {
  2296. bool result = FnTable.AreBoundsVisible();
  2297. return result;
  2298. }
  2299. public void ForceBoundsVisible(bool bForce)
  2300. {
  2301. FnTable.ForceBoundsVisible(bForce);
  2302. }
  2303. public void ResetZeroPose(ETrackingUniverseOrigin eTrackingUniverseOrigin)
  2304. {
  2305. FnTable.ResetZeroPose(eTrackingUniverseOrigin);
  2306. }
  2307. }
  2308. public class CVRChaperoneSetup
  2309. {
  2310. IVRChaperoneSetup FnTable;
  2311. internal CVRChaperoneSetup(IntPtr pInterface)
  2312. {
  2313. FnTable = (IVRChaperoneSetup)Marshal.PtrToStructure(pInterface, typeof(IVRChaperoneSetup));
  2314. }
  2315. public bool CommitWorkingCopy(EChaperoneConfigFile configFile)
  2316. {
  2317. bool result = FnTable.CommitWorkingCopy(configFile);
  2318. return result;
  2319. }
  2320. public void RevertWorkingCopy()
  2321. {
  2322. FnTable.RevertWorkingCopy();
  2323. }
  2324. public bool GetWorkingPlayAreaSize(ref float pSizeX,ref float pSizeZ)
  2325. {
  2326. pSizeX = 0;
  2327. pSizeZ = 0;
  2328. bool result = FnTable.GetWorkingPlayAreaSize(ref pSizeX,ref pSizeZ);
  2329. return result;
  2330. }
  2331. public bool GetWorkingPlayAreaRect(ref HmdQuad_t rect)
  2332. {
  2333. bool result = FnTable.GetWorkingPlayAreaRect(ref rect);
  2334. return result;
  2335. }
  2336. public bool GetWorkingCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer)
  2337. {
  2338. uint punQuadsCount = 0;
  2339. bool result = FnTable.GetWorkingCollisionBoundsInfo(null,ref punQuadsCount);
  2340. pQuadsBuffer= new HmdQuad_t[punQuadsCount];
  2341. result = FnTable.GetWorkingCollisionBoundsInfo(pQuadsBuffer,ref punQuadsCount);
  2342. return result;
  2343. }
  2344. public bool GetLiveCollisionBoundsInfo(out HmdQuad_t [] pQuadsBuffer)
  2345. {
  2346. uint punQuadsCount = 0;
  2347. bool result = FnTable.GetLiveCollisionBoundsInfo(null,ref punQuadsCount);
  2348. pQuadsBuffer= new HmdQuad_t[punQuadsCount];
  2349. result = FnTable.GetLiveCollisionBoundsInfo(pQuadsBuffer,ref punQuadsCount);
  2350. return result;
  2351. }
  2352. public bool GetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose)
  2353. {
  2354. bool result = FnTable.GetWorkingSeatedZeroPoseToRawTrackingPose(ref pmatSeatedZeroPoseToRawTrackingPose);
  2355. return result;
  2356. }
  2357. public bool GetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatStandingZeroPoseToRawTrackingPose)
  2358. {
  2359. bool result = FnTable.GetWorkingStandingZeroPoseToRawTrackingPose(ref pmatStandingZeroPoseToRawTrackingPose);
  2360. return result;
  2361. }
  2362. public void SetWorkingPlayAreaSize(float sizeX,float sizeZ)
  2363. {
  2364. FnTable.SetWorkingPlayAreaSize(sizeX,sizeZ);
  2365. }
  2366. public void SetWorkingCollisionBoundsInfo(HmdQuad_t [] pQuadsBuffer)
  2367. {
  2368. FnTable.SetWorkingCollisionBoundsInfo(pQuadsBuffer,(uint) pQuadsBuffer.Length);
  2369. }
  2370. public void SetWorkingPerimeter(HmdVector2_t [] pPointBuffer)
  2371. {
  2372. FnTable.SetWorkingPerimeter(pPointBuffer,(uint) pPointBuffer.Length);
  2373. }
  2374. public void SetWorkingSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatSeatedZeroPoseToRawTrackingPose)
  2375. {
  2376. FnTable.SetWorkingSeatedZeroPoseToRawTrackingPose(ref pMatSeatedZeroPoseToRawTrackingPose);
  2377. }
  2378. public void SetWorkingStandingZeroPoseToRawTrackingPose(ref HmdMatrix34_t pMatStandingZeroPoseToRawTrackingPose)
  2379. {
  2380. FnTable.SetWorkingStandingZeroPoseToRawTrackingPose(ref pMatStandingZeroPoseToRawTrackingPose);
  2381. }
  2382. public void ReloadFromDisk(EChaperoneConfigFile configFile)
  2383. {
  2384. FnTable.ReloadFromDisk(configFile);
  2385. }
  2386. public bool GetLiveSeatedZeroPoseToRawTrackingPose(ref HmdMatrix34_t pmatSeatedZeroPoseToRawTrackingPose)
  2387. {
  2388. bool result = FnTable.GetLiveSeatedZeroPoseToRawTrackingPose(ref pmatSeatedZeroPoseToRawTrackingPose);
  2389. return result;
  2390. }
  2391. public bool ExportLiveToBuffer(System.Text.StringBuilder pBuffer,ref uint pnBufferLength)
  2392. {
  2393. pnBufferLength = 0;
  2394. bool result = FnTable.ExportLiveToBuffer(pBuffer,ref pnBufferLength);
  2395. return result;
  2396. }
  2397. public bool ImportFromBufferToWorking(string pBuffer,uint nImportFlags)
  2398. {
  2399. IntPtr pBufferUtf8 = Utils.ToUtf8(pBuffer);
  2400. bool result = FnTable.ImportFromBufferToWorking(pBufferUtf8,nImportFlags);
  2401. Marshal.FreeHGlobal(pBufferUtf8);
  2402. return result;
  2403. }
  2404. public void ShowWorkingSetPreview()
  2405. {
  2406. FnTable.ShowWorkingSetPreview();
  2407. }
  2408. public void HideWorkingSetPreview()
  2409. {
  2410. FnTable.HideWorkingSetPreview();
  2411. }
  2412. public void RoomSetupStarting()
  2413. {
  2414. FnTable.RoomSetupStarting();
  2415. }
  2416. }
  2417. public class CVRCompositor
  2418. {
  2419. IVRCompositor FnTable;
  2420. internal CVRCompositor(IntPtr pInterface)
  2421. {
  2422. FnTable = (IVRCompositor)Marshal.PtrToStructure(pInterface, typeof(IVRCompositor));
  2423. }
  2424. public void SetTrackingSpace(ETrackingUniverseOrigin eOrigin)
  2425. {
  2426. FnTable.SetTrackingSpace(eOrigin);
  2427. }
  2428. public ETrackingUniverseOrigin GetTrackingSpace()
  2429. {
  2430. ETrackingUniverseOrigin result = FnTable.GetTrackingSpace();
  2431. return result;
  2432. }
  2433. public EVRCompositorError WaitGetPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray)
  2434. {
  2435. EVRCompositorError result = FnTable.WaitGetPoses(pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length);
  2436. return result;
  2437. }
  2438. public EVRCompositorError GetLastPoses(TrackedDevicePose_t [] pRenderPoseArray,TrackedDevicePose_t [] pGamePoseArray)
  2439. {
  2440. EVRCompositorError result = FnTable.GetLastPoses(pRenderPoseArray,(uint) pRenderPoseArray.Length,pGamePoseArray,(uint) pGamePoseArray.Length);
  2441. return result;
  2442. }
  2443. public EVRCompositorError GetLastPoseForTrackedDeviceIndex(uint unDeviceIndex,ref TrackedDevicePose_t pOutputPose,ref TrackedDevicePose_t pOutputGamePose)
  2444. {
  2445. EVRCompositorError result = FnTable.GetLastPoseForTrackedDeviceIndex(unDeviceIndex,ref pOutputPose,ref pOutputGamePose);
  2446. return result;
  2447. }
  2448. public EVRCompositorError Submit(EVREye eEye,ref Texture_t pTexture,ref VRTextureBounds_t pBounds,EVRSubmitFlags nSubmitFlags)
  2449. {
  2450. EVRCompositorError result = FnTable.Submit(eEye,ref pTexture,ref pBounds,nSubmitFlags);
  2451. return result;
  2452. }
  2453. public void ClearLastSubmittedFrame()
  2454. {
  2455. FnTable.ClearLastSubmittedFrame();
  2456. }
  2457. public void PostPresentHandoff()
  2458. {
  2459. FnTable.PostPresentHandoff();
  2460. }
  2461. public bool GetFrameTiming(ref Compositor_FrameTiming pTiming,uint unFramesAgo)
  2462. {
  2463. bool result = FnTable.GetFrameTiming(ref pTiming,unFramesAgo);
  2464. return result;
  2465. }
  2466. public uint GetFrameTimings(Compositor_FrameTiming [] pTiming)
  2467. {
  2468. uint result = FnTable.GetFrameTimings(pTiming,(uint) pTiming.Length);
  2469. return result;
  2470. }
  2471. public float GetFrameTimeRemaining()
  2472. {
  2473. float result = FnTable.GetFrameTimeRemaining();
  2474. return result;
  2475. }
  2476. public void GetCumulativeStats(ref Compositor_CumulativeStats pStats,uint nStatsSizeInBytes)
  2477. {
  2478. FnTable.GetCumulativeStats(ref pStats,nStatsSizeInBytes);
  2479. }
  2480. public void FadeToColor(float fSeconds,float fRed,float fGreen,float fBlue,float fAlpha,bool bBackground)
  2481. {
  2482. FnTable.FadeToColor(fSeconds,fRed,fGreen,fBlue,fAlpha,bBackground);
  2483. }
  2484. public HmdColor_t GetCurrentFadeColor(bool bBackground)
  2485. {
  2486. HmdColor_t result = FnTable.GetCurrentFadeColor(bBackground);
  2487. return result;
  2488. }
  2489. public void FadeGrid(float fSeconds,bool bFadeGridIn)
  2490. {
  2491. FnTable.FadeGrid(fSeconds,bFadeGridIn);
  2492. }
  2493. public float GetCurrentGridAlpha()
  2494. {
  2495. float result = FnTable.GetCurrentGridAlpha();
  2496. return result;
  2497. }
  2498. public EVRCompositorError SetSkyboxOverride(Texture_t [] pTextures)
  2499. {
  2500. EVRCompositorError result = FnTable.SetSkyboxOverride(pTextures,(uint) pTextures.Length);
  2501. return result;
  2502. }
  2503. public void ClearSkyboxOverride()
  2504. {
  2505. FnTable.ClearSkyboxOverride();
  2506. }
  2507. public void CompositorBringToFront()
  2508. {
  2509. FnTable.CompositorBringToFront();
  2510. }
  2511. public void CompositorGoToBack()
  2512. {
  2513. FnTable.CompositorGoToBack();
  2514. }
  2515. public void CompositorQuit()
  2516. {
  2517. FnTable.CompositorQuit();
  2518. }
  2519. public bool IsFullscreen()
  2520. {
  2521. bool result = FnTable.IsFullscreen();
  2522. return result;
  2523. }
  2524. public uint GetCurrentSceneFocusProcess()
  2525. {
  2526. uint result = FnTable.GetCurrentSceneFocusProcess();
  2527. return result;
  2528. }
  2529. public uint GetLastFrameRenderer()
  2530. {
  2531. uint result = FnTable.GetLastFrameRenderer();
  2532. return result;
  2533. }
  2534. public bool CanRenderScene()
  2535. {
  2536. bool result = FnTable.CanRenderScene();
  2537. return result;
  2538. }
  2539. public void ShowMirrorWindow()
  2540. {
  2541. FnTable.ShowMirrorWindow();
  2542. }
  2543. public void HideMirrorWindow()
  2544. {
  2545. FnTable.HideMirrorWindow();
  2546. }
  2547. public bool IsMirrorWindowVisible()
  2548. {
  2549. bool result = FnTable.IsMirrorWindowVisible();
  2550. return result;
  2551. }
  2552. public void CompositorDumpImages()
  2553. {
  2554. FnTable.CompositorDumpImages();
  2555. }
  2556. public bool ShouldAppRenderWithLowResources()
  2557. {
  2558. bool result = FnTable.ShouldAppRenderWithLowResources();
  2559. return result;
  2560. }
  2561. public void ForceInterleavedReprojectionOn(bool bOverride)
  2562. {
  2563. FnTable.ForceInterleavedReprojectionOn(bOverride);
  2564. }
  2565. public void ForceReconnectProcess()
  2566. {
  2567. FnTable.ForceReconnectProcess();
  2568. }
  2569. public void SuspendRendering(bool bSuspend)
  2570. {
  2571. FnTable.SuspendRendering(bSuspend);
  2572. }
  2573. public EVRCompositorError GetMirrorTextureD3D11(EVREye eEye,IntPtr pD3D11DeviceOrResource,ref IntPtr ppD3D11ShaderResourceView)
  2574. {
  2575. EVRCompositorError result = FnTable.GetMirrorTextureD3D11(eEye,pD3D11DeviceOrResource,ref ppD3D11ShaderResourceView);
  2576. return result;
  2577. }
  2578. public void ReleaseMirrorTextureD3D11(IntPtr pD3D11ShaderResourceView)
  2579. {
  2580. FnTable.ReleaseMirrorTextureD3D11(pD3D11ShaderResourceView);
  2581. }
  2582. public EVRCompositorError GetMirrorTextureGL(EVREye eEye,ref uint pglTextureId,IntPtr pglSharedTextureHandle)
  2583. {
  2584. pglTextureId = 0;
  2585. EVRCompositorError result = FnTable.GetMirrorTextureGL(eEye,ref pglTextureId,pglSharedTextureHandle);
  2586. return result;
  2587. }
  2588. public bool ReleaseSharedGLTexture(uint glTextureId,IntPtr glSharedTextureHandle)
  2589. {
  2590. bool result = FnTable.ReleaseSharedGLTexture(glTextureId,glSharedTextureHandle);
  2591. return result;
  2592. }
  2593. public void LockGLSharedTextureForAccess(IntPtr glSharedTextureHandle)
  2594. {
  2595. FnTable.LockGLSharedTextureForAccess(glSharedTextureHandle);
  2596. }
  2597. public void UnlockGLSharedTextureForAccess(IntPtr glSharedTextureHandle)
  2598. {
  2599. FnTable.UnlockGLSharedTextureForAccess(glSharedTextureHandle);
  2600. }
  2601. public uint GetVulkanInstanceExtensionsRequired(System.Text.StringBuilder pchValue,uint unBufferSize)
  2602. {
  2603. uint result = FnTable.GetVulkanInstanceExtensionsRequired(pchValue,unBufferSize);
  2604. return result;
  2605. }
  2606. public uint GetVulkanDeviceExtensionsRequired(IntPtr pPhysicalDevice,System.Text.StringBuilder pchValue,uint unBufferSize)
  2607. {
  2608. uint result = FnTable.GetVulkanDeviceExtensionsRequired(pPhysicalDevice,pchValue,unBufferSize);
  2609. return result;
  2610. }
  2611. public void SetExplicitTimingMode(EVRCompositorTimingMode eTimingMode)
  2612. {
  2613. FnTable.SetExplicitTimingMode(eTimingMode);
  2614. }
  2615. public EVRCompositorError SubmitExplicitTimingData()
  2616. {
  2617. EVRCompositorError result = FnTable.SubmitExplicitTimingData();
  2618. return result;
  2619. }
  2620. public bool IsMotionSmoothingEnabled()
  2621. {
  2622. bool result = FnTable.IsMotionSmoothingEnabled();
  2623. return result;
  2624. }
  2625. public bool IsMotionSmoothingSupported()
  2626. {
  2627. bool result = FnTable.IsMotionSmoothingSupported();
  2628. return result;
  2629. }
  2630. public bool IsCurrentSceneFocusAppLoading()
  2631. {
  2632. bool result = FnTable.IsCurrentSceneFocusAppLoading();
  2633. return result;
  2634. }
  2635. public EVRCompositorError SetStageOverride_Async(string pchRenderModelPath,ref HmdMatrix34_t pTransform,ref Compositor_StageRenderSettings pRenderSettings,uint nSizeOfRenderSettings)
  2636. {
  2637. IntPtr pchRenderModelPathUtf8 = Utils.ToUtf8(pchRenderModelPath);
  2638. EVRCompositorError result = FnTable.SetStageOverride_Async(pchRenderModelPathUtf8,ref pTransform,ref pRenderSettings,nSizeOfRenderSettings);
  2639. Marshal.FreeHGlobal(pchRenderModelPathUtf8);
  2640. return result;
  2641. }
  2642. public void ClearStageOverride()
  2643. {
  2644. FnTable.ClearStageOverride();
  2645. }
  2646. public bool GetCompositorBenchmarkResults(ref Compositor_BenchmarkResults pBenchmarkResults,uint nSizeOfBenchmarkResults)
  2647. {
  2648. bool result = FnTable.GetCompositorBenchmarkResults(ref pBenchmarkResults,nSizeOfBenchmarkResults);
  2649. return result;
  2650. }
  2651. public EVRCompositorError GetLastPosePredictionIDs(ref uint pRenderPosePredictionID,ref uint pGamePosePredictionID)
  2652. {
  2653. pRenderPosePredictionID = 0;
  2654. pGamePosePredictionID = 0;
  2655. EVRCompositorError result = FnTable.GetLastPosePredictionIDs(ref pRenderPosePredictionID,ref pGamePosePredictionID);
  2656. return result;
  2657. }
  2658. public EVRCompositorError GetPosesForFrame(uint unPosePredictionID,TrackedDevicePose_t [] pPoseArray)
  2659. {
  2660. EVRCompositorError result = FnTable.GetPosesForFrame(unPosePredictionID,pPoseArray,(uint) pPoseArray.Length);
  2661. return result;
  2662. }
  2663. }
  2664. public class CVROverlay
  2665. {
  2666. IVROverlay FnTable;
  2667. internal CVROverlay(IntPtr pInterface)
  2668. {
  2669. FnTable = (IVROverlay)Marshal.PtrToStructure(pInterface, typeof(IVROverlay));
  2670. }
  2671. public EVROverlayError FindOverlay(string pchOverlayKey,ref ulong pOverlayHandle)
  2672. {
  2673. IntPtr pchOverlayKeyUtf8 = Utils.ToUtf8(pchOverlayKey);
  2674. pOverlayHandle = 0;
  2675. EVROverlayError result = FnTable.FindOverlay(pchOverlayKeyUtf8,ref pOverlayHandle);
  2676. Marshal.FreeHGlobal(pchOverlayKeyUtf8);
  2677. return result;
  2678. }
  2679. public EVROverlayError CreateOverlay(string pchOverlayKey,string pchOverlayName,ref ulong pOverlayHandle)
  2680. {
  2681. IntPtr pchOverlayKeyUtf8 = Utils.ToUtf8(pchOverlayKey);
  2682. IntPtr pchOverlayNameUtf8 = Utils.ToUtf8(pchOverlayName);
  2683. pOverlayHandle = 0;
  2684. EVROverlayError result = FnTable.CreateOverlay(pchOverlayKeyUtf8,pchOverlayNameUtf8,ref pOverlayHandle);
  2685. Marshal.FreeHGlobal(pchOverlayKeyUtf8);
  2686. Marshal.FreeHGlobal(pchOverlayNameUtf8);
  2687. return result;
  2688. }
  2689. public EVROverlayError DestroyOverlay(ulong ulOverlayHandle)
  2690. {
  2691. EVROverlayError result = FnTable.DestroyOverlay(ulOverlayHandle);
  2692. return result;
  2693. }
  2694. public uint GetOverlayKey(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError)
  2695. {
  2696. uint result = FnTable.GetOverlayKey(ulOverlayHandle,pchValue,unBufferSize,ref pError);
  2697. return result;
  2698. }
  2699. public uint GetOverlayName(ulong ulOverlayHandle,System.Text.StringBuilder pchValue,uint unBufferSize,ref EVROverlayError pError)
  2700. {
  2701. uint result = FnTable.GetOverlayName(ulOverlayHandle,pchValue,unBufferSize,ref pError);
  2702. return result;
  2703. }
  2704. public EVROverlayError SetOverlayName(ulong ulOverlayHandle,string pchName)
  2705. {
  2706. IntPtr pchNameUtf8 = Utils.ToUtf8(pchName);
  2707. EVROverlayError result = FnTable.SetOverlayName(ulOverlayHandle,pchNameUtf8);
  2708. Marshal.FreeHGlobal(pchNameUtf8);
  2709. return result;
  2710. }
  2711. public EVROverlayError GetOverlayImageData(ulong ulOverlayHandle,IntPtr pvBuffer,uint unBufferSize,ref uint punWidth,ref uint punHeight)
  2712. {
  2713. punWidth = 0;
  2714. punHeight = 0;
  2715. EVROverlayError result = FnTable.GetOverlayImageData(ulOverlayHandle,pvBuffer,unBufferSize,ref punWidth,ref punHeight);
  2716. return result;
  2717. }
  2718. public string GetOverlayErrorNameFromEnum(EVROverlayError error)
  2719. {
  2720. IntPtr result = FnTable.GetOverlayErrorNameFromEnum(error);
  2721. return Marshal.PtrToStringAnsi(result);
  2722. }
  2723. public EVROverlayError SetOverlayRenderingPid(ulong ulOverlayHandle,uint unPID)
  2724. {
  2725. EVROverlayError result = FnTable.SetOverlayRenderingPid(ulOverlayHandle,unPID);
  2726. return result;
  2727. }
  2728. public uint GetOverlayRenderingPid(ulong ulOverlayHandle)
  2729. {
  2730. uint result = FnTable.GetOverlayRenderingPid(ulOverlayHandle);
  2731. return result;
  2732. }
  2733. public EVROverlayError SetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,bool bEnabled)
  2734. {
  2735. EVROverlayError result = FnTable.SetOverlayFlag(ulOverlayHandle,eOverlayFlag,bEnabled);
  2736. return result;
  2737. }
  2738. public EVROverlayError GetOverlayFlag(ulong ulOverlayHandle,VROverlayFlags eOverlayFlag,ref bool pbEnabled)
  2739. {
  2740. pbEnabled = false;
  2741. EVROverlayError result = FnTable.GetOverlayFlag(ulOverlayHandle,eOverlayFlag,ref pbEnabled);
  2742. return result;
  2743. }
  2744. public EVROverlayError GetOverlayFlags(ulong ulOverlayHandle,ref uint pFlags)
  2745. {
  2746. pFlags = 0;
  2747. EVROverlayError result = FnTable.GetOverlayFlags(ulOverlayHandle,ref pFlags);
  2748. return result;
  2749. }
  2750. public EVROverlayError SetOverlayColor(ulong ulOverlayHandle,float fRed,float fGreen,float fBlue)
  2751. {
  2752. EVROverlayError result = FnTable.SetOverlayColor(ulOverlayHandle,fRed,fGreen,fBlue);
  2753. return result;
  2754. }
  2755. public EVROverlayError GetOverlayColor(ulong ulOverlayHandle,ref float pfRed,ref float pfGreen,ref float pfBlue)
  2756. {
  2757. pfRed = 0;
  2758. pfGreen = 0;
  2759. pfBlue = 0;
  2760. EVROverlayError result = FnTable.GetOverlayColor(ulOverlayHandle,ref pfRed,ref pfGreen,ref pfBlue);
  2761. return result;
  2762. }
  2763. public EVROverlayError SetOverlayAlpha(ulong ulOverlayHandle,float fAlpha)
  2764. {
  2765. EVROverlayError result = FnTable.SetOverlayAlpha(ulOverlayHandle,fAlpha);
  2766. return result;
  2767. }
  2768. public EVROverlayError GetOverlayAlpha(ulong ulOverlayHandle,ref float pfAlpha)
  2769. {
  2770. pfAlpha = 0;
  2771. EVROverlayError result = FnTable.GetOverlayAlpha(ulOverlayHandle,ref pfAlpha);
  2772. return result;
  2773. }
  2774. public EVROverlayError SetOverlayTexelAspect(ulong ulOverlayHandle,float fTexelAspect)
  2775. {
  2776. EVROverlayError result = FnTable.SetOverlayTexelAspect(ulOverlayHandle,fTexelAspect);
  2777. return result;
  2778. }
  2779. public EVROverlayError GetOverlayTexelAspect(ulong ulOverlayHandle,ref float pfTexelAspect)
  2780. {
  2781. pfTexelAspect = 0;
  2782. EVROverlayError result = FnTable.GetOverlayTexelAspect(ulOverlayHandle,ref pfTexelAspect);
  2783. return result;
  2784. }
  2785. public EVROverlayError SetOverlaySortOrder(ulong ulOverlayHandle,uint unSortOrder)
  2786. {
  2787. EVROverlayError result = FnTable.SetOverlaySortOrder(ulOverlayHandle,unSortOrder);
  2788. return result;
  2789. }
  2790. public EVROverlayError GetOverlaySortOrder(ulong ulOverlayHandle,ref uint punSortOrder)
  2791. {
  2792. punSortOrder = 0;
  2793. EVROverlayError result = FnTable.GetOverlaySortOrder(ulOverlayHandle,ref punSortOrder);
  2794. return result;
  2795. }
  2796. public EVROverlayError SetOverlayWidthInMeters(ulong ulOverlayHandle,float fWidthInMeters)
  2797. {
  2798. EVROverlayError result = FnTable.SetOverlayWidthInMeters(ulOverlayHandle,fWidthInMeters);
  2799. return result;
  2800. }
  2801. public EVROverlayError GetOverlayWidthInMeters(ulong ulOverlayHandle,ref float pfWidthInMeters)
  2802. {
  2803. pfWidthInMeters = 0;
  2804. EVROverlayError result = FnTable.GetOverlayWidthInMeters(ulOverlayHandle,ref pfWidthInMeters);
  2805. return result;
  2806. }
  2807. public EVROverlayError SetOverlayCurvature(ulong ulOverlayHandle,float fCurvature)
  2808. {
  2809. EVROverlayError result = FnTable.SetOverlayCurvature(ulOverlayHandle,fCurvature);
  2810. return result;
  2811. }
  2812. public EVROverlayError GetOverlayCurvature(ulong ulOverlayHandle,ref float pfCurvature)
  2813. {
  2814. pfCurvature = 0;
  2815. EVROverlayError result = FnTable.GetOverlayCurvature(ulOverlayHandle,ref pfCurvature);
  2816. return result;
  2817. }
  2818. public EVROverlayError SetOverlayTextureColorSpace(ulong ulOverlayHandle,EColorSpace eTextureColorSpace)
  2819. {
  2820. EVROverlayError result = FnTable.SetOverlayTextureColorSpace(ulOverlayHandle,eTextureColorSpace);
  2821. return result;
  2822. }
  2823. public EVROverlayError GetOverlayTextureColorSpace(ulong ulOverlayHandle,ref EColorSpace peTextureColorSpace)
  2824. {
  2825. EVROverlayError result = FnTable.GetOverlayTextureColorSpace(ulOverlayHandle,ref peTextureColorSpace);
  2826. return result;
  2827. }
  2828. public EVROverlayError SetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds)
  2829. {
  2830. EVROverlayError result = FnTable.SetOverlayTextureBounds(ulOverlayHandle,ref pOverlayTextureBounds);
  2831. return result;
  2832. }
  2833. public EVROverlayError GetOverlayTextureBounds(ulong ulOverlayHandle,ref VRTextureBounds_t pOverlayTextureBounds)
  2834. {
  2835. EVROverlayError result = FnTable.GetOverlayTextureBounds(ulOverlayHandle,ref pOverlayTextureBounds);
  2836. return result;
  2837. }
  2838. public EVROverlayError GetOverlayTransformType(ulong ulOverlayHandle,ref VROverlayTransformType peTransformType)
  2839. {
  2840. EVROverlayError result = FnTable.GetOverlayTransformType(ulOverlayHandle,ref peTransformType);
  2841. return result;
  2842. }
  2843. public EVROverlayError SetOverlayTransformAbsolute(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform)
  2844. {
  2845. EVROverlayError result = FnTable.SetOverlayTransformAbsolute(ulOverlayHandle,eTrackingOrigin,ref pmatTrackingOriginToOverlayTransform);
  2846. return result;
  2847. }
  2848. public EVROverlayError GetOverlayTransformAbsolute(ulong ulOverlayHandle,ref ETrackingUniverseOrigin peTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform)
  2849. {
  2850. EVROverlayError result = FnTable.GetOverlayTransformAbsolute(ulOverlayHandle,ref peTrackingOrigin,ref pmatTrackingOriginToOverlayTransform);
  2851. return result;
  2852. }
  2853. public EVROverlayError SetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,uint unTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform)
  2854. {
  2855. EVROverlayError result = FnTable.SetOverlayTransformTrackedDeviceRelative(ulOverlayHandle,unTrackedDevice,ref pmatTrackedDeviceToOverlayTransform);
  2856. return result;
  2857. }
  2858. public EVROverlayError GetOverlayTransformTrackedDeviceRelative(ulong ulOverlayHandle,ref uint punTrackedDevice,ref HmdMatrix34_t pmatTrackedDeviceToOverlayTransform)
  2859. {
  2860. punTrackedDevice = 0;
  2861. EVROverlayError result = FnTable.GetOverlayTransformTrackedDeviceRelative(ulOverlayHandle,ref punTrackedDevice,ref pmatTrackedDeviceToOverlayTransform);
  2862. return result;
  2863. }
  2864. public EVROverlayError SetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,uint unDeviceIndex,string pchComponentName)
  2865. {
  2866. IntPtr pchComponentNameUtf8 = Utils.ToUtf8(pchComponentName);
  2867. EVROverlayError result = FnTable.SetOverlayTransformTrackedDeviceComponent(ulOverlayHandle,unDeviceIndex,pchComponentNameUtf8);
  2868. Marshal.FreeHGlobal(pchComponentNameUtf8);
  2869. return result;
  2870. }
  2871. public EVROverlayError GetOverlayTransformTrackedDeviceComponent(ulong ulOverlayHandle,ref uint punDeviceIndex,System.Text.StringBuilder pchComponentName,uint unComponentNameSize)
  2872. {
  2873. punDeviceIndex = 0;
  2874. EVROverlayError result = FnTable.GetOverlayTransformTrackedDeviceComponent(ulOverlayHandle,ref punDeviceIndex,pchComponentName,unComponentNameSize);
  2875. return result;
  2876. }
  2877. public EVROverlayError GetOverlayTransformOverlayRelative(ulong ulOverlayHandle,ref ulong ulOverlayHandleParent,ref HmdMatrix34_t pmatParentOverlayToOverlayTransform)
  2878. {
  2879. ulOverlayHandleParent = 0;
  2880. EVROverlayError result = FnTable.GetOverlayTransformOverlayRelative(ulOverlayHandle,ref ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform);
  2881. return result;
  2882. }
  2883. public EVROverlayError SetOverlayTransformOverlayRelative(ulong ulOverlayHandle,ulong ulOverlayHandleParent,ref HmdMatrix34_t pmatParentOverlayToOverlayTransform)
  2884. {
  2885. EVROverlayError result = FnTable.SetOverlayTransformOverlayRelative(ulOverlayHandle,ulOverlayHandleParent,ref pmatParentOverlayToOverlayTransform);
  2886. return result;
  2887. }
  2888. public EVROverlayError SetOverlayTransformCursor(ulong ulCursorOverlayHandle,ref HmdVector2_t pvHotspot)
  2889. {
  2890. EVROverlayError result = FnTable.SetOverlayTransformCursor(ulCursorOverlayHandle,ref pvHotspot);
  2891. return result;
  2892. }
  2893. public EVROverlayError GetOverlayTransformCursor(ulong ulOverlayHandle,ref HmdVector2_t pvHotspot)
  2894. {
  2895. EVROverlayError result = FnTable.GetOverlayTransformCursor(ulOverlayHandle,ref pvHotspot);
  2896. return result;
  2897. }
  2898. public EVROverlayError SetOverlayTransformProjection(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToOverlayTransform,ref VROverlayProjection_t pProjection,EVREye eEye)
  2899. {
  2900. EVROverlayError result = FnTable.SetOverlayTransformProjection(ulOverlayHandle,eTrackingOrigin,ref pmatTrackingOriginToOverlayTransform,ref pProjection,eEye);
  2901. return result;
  2902. }
  2903. public EVROverlayError ShowOverlay(ulong ulOverlayHandle)
  2904. {
  2905. EVROverlayError result = FnTable.ShowOverlay(ulOverlayHandle);
  2906. return result;
  2907. }
  2908. public EVROverlayError HideOverlay(ulong ulOverlayHandle)
  2909. {
  2910. EVROverlayError result = FnTable.HideOverlay(ulOverlayHandle);
  2911. return result;
  2912. }
  2913. public bool IsOverlayVisible(ulong ulOverlayHandle)
  2914. {
  2915. bool result = FnTable.IsOverlayVisible(ulOverlayHandle);
  2916. return result;
  2917. }
  2918. public EVROverlayError GetTransformForOverlayCoordinates(ulong ulOverlayHandle,ETrackingUniverseOrigin eTrackingOrigin,HmdVector2_t coordinatesInOverlay,ref HmdMatrix34_t pmatTransform)
  2919. {
  2920. EVROverlayError result = FnTable.GetTransformForOverlayCoordinates(ulOverlayHandle,eTrackingOrigin,coordinatesInOverlay,ref pmatTransform);
  2921. return result;
  2922. }
  2923. // This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
  2924. // originally mis-compiled with the wrong packing for Linux and OSX.
  2925. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  2926. internal delegate bool _PollNextOverlayEventPacked(ulong ulOverlayHandle,ref VREvent_t_Packed pEvent,uint uncbVREvent);
  2927. [StructLayout(LayoutKind.Explicit)]
  2928. struct PollNextOverlayEventUnion
  2929. {
  2930. [FieldOffset(0)]
  2931. public IVROverlay._PollNextOverlayEvent pPollNextOverlayEvent;
  2932. [FieldOffset(0)]
  2933. public _PollNextOverlayEventPacked pPollNextOverlayEventPacked;
  2934. }
  2935. public bool PollNextOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pEvent,uint uncbVREvent)
  2936. {
  2937. #if !UNITY_METRO
  2938. if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
  2939. (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
  2940. {
  2941. PollNextOverlayEventUnion u;
  2942. VREvent_t_Packed event_packed = new VREvent_t_Packed();
  2943. u.pPollNextOverlayEventPacked = null;
  2944. u.pPollNextOverlayEvent = FnTable.PollNextOverlayEvent;
  2945. bool packed_result = u.pPollNextOverlayEventPacked(ulOverlayHandle,ref event_packed,(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(VREvent_t_Packed)));
  2946. event_packed.Unpack(ref pEvent);
  2947. return packed_result;
  2948. }
  2949. #endif
  2950. bool result = FnTable.PollNextOverlayEvent(ulOverlayHandle,ref pEvent,uncbVREvent);
  2951. return result;
  2952. }
  2953. public EVROverlayError GetOverlayInputMethod(ulong ulOverlayHandle,ref VROverlayInputMethod peInputMethod)
  2954. {
  2955. EVROverlayError result = FnTable.GetOverlayInputMethod(ulOverlayHandle,ref peInputMethod);
  2956. return result;
  2957. }
  2958. public EVROverlayError SetOverlayInputMethod(ulong ulOverlayHandle,VROverlayInputMethod eInputMethod)
  2959. {
  2960. EVROverlayError result = FnTable.SetOverlayInputMethod(ulOverlayHandle,eInputMethod);
  2961. return result;
  2962. }
  2963. public EVROverlayError GetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale)
  2964. {
  2965. EVROverlayError result = FnTable.GetOverlayMouseScale(ulOverlayHandle,ref pvecMouseScale);
  2966. return result;
  2967. }
  2968. public EVROverlayError SetOverlayMouseScale(ulong ulOverlayHandle,ref HmdVector2_t pvecMouseScale)
  2969. {
  2970. EVROverlayError result = FnTable.SetOverlayMouseScale(ulOverlayHandle,ref pvecMouseScale);
  2971. return result;
  2972. }
  2973. public bool ComputeOverlayIntersection(ulong ulOverlayHandle,ref VROverlayIntersectionParams_t pParams,ref VROverlayIntersectionResults_t pResults)
  2974. {
  2975. bool result = FnTable.ComputeOverlayIntersection(ulOverlayHandle,ref pParams,ref pResults);
  2976. return result;
  2977. }
  2978. public bool IsHoverTargetOverlay(ulong ulOverlayHandle)
  2979. {
  2980. bool result = FnTable.IsHoverTargetOverlay(ulOverlayHandle);
  2981. return result;
  2982. }
  2983. public EVROverlayError SetOverlayIntersectionMask(ulong ulOverlayHandle,ref VROverlayIntersectionMaskPrimitive_t pMaskPrimitives,uint unNumMaskPrimitives,uint unPrimitiveSize)
  2984. {
  2985. EVROverlayError result = FnTable.SetOverlayIntersectionMask(ulOverlayHandle,ref pMaskPrimitives,unNumMaskPrimitives,unPrimitiveSize);
  2986. return result;
  2987. }
  2988. public EVROverlayError TriggerLaserMouseHapticVibration(ulong ulOverlayHandle,float fDurationSeconds,float fFrequency,float fAmplitude)
  2989. {
  2990. EVROverlayError result = FnTable.TriggerLaserMouseHapticVibration(ulOverlayHandle,fDurationSeconds,fFrequency,fAmplitude);
  2991. return result;
  2992. }
  2993. public EVROverlayError SetOverlayCursor(ulong ulOverlayHandle,ulong ulCursorHandle)
  2994. {
  2995. EVROverlayError result = FnTable.SetOverlayCursor(ulOverlayHandle,ulCursorHandle);
  2996. return result;
  2997. }
  2998. public EVROverlayError SetOverlayCursorPositionOverride(ulong ulOverlayHandle,ref HmdVector2_t pvCursor)
  2999. {
  3000. EVROverlayError result = FnTable.SetOverlayCursorPositionOverride(ulOverlayHandle,ref pvCursor);
  3001. return result;
  3002. }
  3003. public EVROverlayError ClearOverlayCursorPositionOverride(ulong ulOverlayHandle)
  3004. {
  3005. EVROverlayError result = FnTable.ClearOverlayCursorPositionOverride(ulOverlayHandle);
  3006. return result;
  3007. }
  3008. public EVROverlayError SetOverlayTexture(ulong ulOverlayHandle,ref Texture_t pTexture)
  3009. {
  3010. EVROverlayError result = FnTable.SetOverlayTexture(ulOverlayHandle,ref pTexture);
  3011. return result;
  3012. }
  3013. public EVROverlayError ClearOverlayTexture(ulong ulOverlayHandle)
  3014. {
  3015. EVROverlayError result = FnTable.ClearOverlayTexture(ulOverlayHandle);
  3016. return result;
  3017. }
  3018. public EVROverlayError SetOverlayRaw(ulong ulOverlayHandle,IntPtr pvBuffer,uint unWidth,uint unHeight,uint unBytesPerPixel)
  3019. {
  3020. EVROverlayError result = FnTable.SetOverlayRaw(ulOverlayHandle,pvBuffer,unWidth,unHeight,unBytesPerPixel);
  3021. return result;
  3022. }
  3023. public EVROverlayError SetOverlayFromFile(ulong ulOverlayHandle,string pchFilePath)
  3024. {
  3025. IntPtr pchFilePathUtf8 = Utils.ToUtf8(pchFilePath);
  3026. EVROverlayError result = FnTable.SetOverlayFromFile(ulOverlayHandle,pchFilePathUtf8);
  3027. Marshal.FreeHGlobal(pchFilePathUtf8);
  3028. return result;
  3029. }
  3030. public EVROverlayError GetOverlayTexture(ulong ulOverlayHandle,ref IntPtr pNativeTextureHandle,IntPtr pNativeTextureRef,ref uint pWidth,ref uint pHeight,ref uint pNativeFormat,ref ETextureType pAPIType,ref EColorSpace pColorSpace,ref VRTextureBounds_t pTextureBounds)
  3031. {
  3032. pWidth = 0;
  3033. pHeight = 0;
  3034. pNativeFormat = 0;
  3035. EVROverlayError result = FnTable.GetOverlayTexture(ulOverlayHandle,ref pNativeTextureHandle,pNativeTextureRef,ref pWidth,ref pHeight,ref pNativeFormat,ref pAPIType,ref pColorSpace,ref pTextureBounds);
  3036. return result;
  3037. }
  3038. public EVROverlayError ReleaseNativeOverlayHandle(ulong ulOverlayHandle,IntPtr pNativeTextureHandle)
  3039. {
  3040. EVROverlayError result = FnTable.ReleaseNativeOverlayHandle(ulOverlayHandle,pNativeTextureHandle);
  3041. return result;
  3042. }
  3043. public EVROverlayError GetOverlayTextureSize(ulong ulOverlayHandle,ref uint pWidth,ref uint pHeight)
  3044. {
  3045. pWidth = 0;
  3046. pHeight = 0;
  3047. EVROverlayError result = FnTable.GetOverlayTextureSize(ulOverlayHandle,ref pWidth,ref pHeight);
  3048. return result;
  3049. }
  3050. public EVROverlayError CreateDashboardOverlay(string pchOverlayKey,string pchOverlayFriendlyName,ref ulong pMainHandle,ref ulong pThumbnailHandle)
  3051. {
  3052. IntPtr pchOverlayKeyUtf8 = Utils.ToUtf8(pchOverlayKey);
  3053. IntPtr pchOverlayFriendlyNameUtf8 = Utils.ToUtf8(pchOverlayFriendlyName);
  3054. pMainHandle = 0;
  3055. pThumbnailHandle = 0;
  3056. EVROverlayError result = FnTable.CreateDashboardOverlay(pchOverlayKeyUtf8,pchOverlayFriendlyNameUtf8,ref pMainHandle,ref pThumbnailHandle);
  3057. Marshal.FreeHGlobal(pchOverlayKeyUtf8);
  3058. Marshal.FreeHGlobal(pchOverlayFriendlyNameUtf8);
  3059. return result;
  3060. }
  3061. public bool IsDashboardVisible()
  3062. {
  3063. bool result = FnTable.IsDashboardVisible();
  3064. return result;
  3065. }
  3066. public bool IsActiveDashboardOverlay(ulong ulOverlayHandle)
  3067. {
  3068. bool result = FnTable.IsActiveDashboardOverlay(ulOverlayHandle);
  3069. return result;
  3070. }
  3071. public EVROverlayError SetDashboardOverlaySceneProcess(ulong ulOverlayHandle,uint unProcessId)
  3072. {
  3073. EVROverlayError result = FnTable.SetDashboardOverlaySceneProcess(ulOverlayHandle,unProcessId);
  3074. return result;
  3075. }
  3076. public EVROverlayError GetDashboardOverlaySceneProcess(ulong ulOverlayHandle,ref uint punProcessId)
  3077. {
  3078. punProcessId = 0;
  3079. EVROverlayError result = FnTable.GetDashboardOverlaySceneProcess(ulOverlayHandle,ref punProcessId);
  3080. return result;
  3081. }
  3082. public void ShowDashboard(string pchOverlayToShow)
  3083. {
  3084. IntPtr pchOverlayToShowUtf8 = Utils.ToUtf8(pchOverlayToShow);
  3085. FnTable.ShowDashboard(pchOverlayToShowUtf8);
  3086. Marshal.FreeHGlobal(pchOverlayToShowUtf8);
  3087. }
  3088. public uint GetPrimaryDashboardDevice()
  3089. {
  3090. uint result = FnTable.GetPrimaryDashboardDevice();
  3091. return result;
  3092. }
  3093. public EVROverlayError ShowKeyboard(int eInputMode,int eLineInputMode,uint unFlags,string pchDescription,uint unCharMax,string pchExistingText,ulong uUserValue)
  3094. {
  3095. IntPtr pchDescriptionUtf8 = Utils.ToUtf8(pchDescription);
  3096. IntPtr pchExistingTextUtf8 = Utils.ToUtf8(pchExistingText);
  3097. EVROverlayError result = FnTable.ShowKeyboard(eInputMode,eLineInputMode,unFlags,pchDescriptionUtf8,unCharMax,pchExistingTextUtf8,uUserValue);
  3098. Marshal.FreeHGlobal(pchDescriptionUtf8);
  3099. Marshal.FreeHGlobal(pchExistingTextUtf8);
  3100. return result;
  3101. }
  3102. public EVROverlayError ShowKeyboardForOverlay(ulong ulOverlayHandle,int eInputMode,int eLineInputMode,uint unFlags,string pchDescription,uint unCharMax,string pchExistingText,ulong uUserValue)
  3103. {
  3104. IntPtr pchDescriptionUtf8 = Utils.ToUtf8(pchDescription);
  3105. IntPtr pchExistingTextUtf8 = Utils.ToUtf8(pchExistingText);
  3106. EVROverlayError result = FnTable.ShowKeyboardForOverlay(ulOverlayHandle,eInputMode,eLineInputMode,unFlags,pchDescriptionUtf8,unCharMax,pchExistingTextUtf8,uUserValue);
  3107. Marshal.FreeHGlobal(pchDescriptionUtf8);
  3108. Marshal.FreeHGlobal(pchExistingTextUtf8);
  3109. return result;
  3110. }
  3111. public uint GetKeyboardText(System.Text.StringBuilder pchText,uint cchText)
  3112. {
  3113. uint result = FnTable.GetKeyboardText(pchText,cchText);
  3114. return result;
  3115. }
  3116. public void HideKeyboard()
  3117. {
  3118. FnTable.HideKeyboard();
  3119. }
  3120. public void SetKeyboardTransformAbsolute(ETrackingUniverseOrigin eTrackingOrigin,ref HmdMatrix34_t pmatTrackingOriginToKeyboardTransform)
  3121. {
  3122. FnTable.SetKeyboardTransformAbsolute(eTrackingOrigin,ref pmatTrackingOriginToKeyboardTransform);
  3123. }
  3124. public void SetKeyboardPositionForOverlay(ulong ulOverlayHandle,HmdRect2_t avoidRect)
  3125. {
  3126. FnTable.SetKeyboardPositionForOverlay(ulOverlayHandle,avoidRect);
  3127. }
  3128. public VRMessageOverlayResponse ShowMessageOverlay(string pchText,string pchCaption,string pchButton0Text,string pchButton1Text,string pchButton2Text,string pchButton3Text)
  3129. {
  3130. IntPtr pchTextUtf8 = Utils.ToUtf8(pchText);
  3131. IntPtr pchCaptionUtf8 = Utils.ToUtf8(pchCaption);
  3132. IntPtr pchButton0TextUtf8 = Utils.ToUtf8(pchButton0Text);
  3133. IntPtr pchButton1TextUtf8 = Utils.ToUtf8(pchButton1Text);
  3134. IntPtr pchButton2TextUtf8 = Utils.ToUtf8(pchButton2Text);
  3135. IntPtr pchButton3TextUtf8 = Utils.ToUtf8(pchButton3Text);
  3136. VRMessageOverlayResponse result = FnTable.ShowMessageOverlay(pchTextUtf8,pchCaptionUtf8,pchButton0TextUtf8,pchButton1TextUtf8,pchButton2TextUtf8,pchButton3TextUtf8);
  3137. Marshal.FreeHGlobal(pchTextUtf8);
  3138. Marshal.FreeHGlobal(pchCaptionUtf8);
  3139. Marshal.FreeHGlobal(pchButton0TextUtf8);
  3140. Marshal.FreeHGlobal(pchButton1TextUtf8);
  3141. Marshal.FreeHGlobal(pchButton2TextUtf8);
  3142. Marshal.FreeHGlobal(pchButton3TextUtf8);
  3143. return result;
  3144. }
  3145. public void CloseMessageOverlay()
  3146. {
  3147. FnTable.CloseMessageOverlay();
  3148. }
  3149. }
  3150. public class CVROverlayView
  3151. {
  3152. IVROverlayView FnTable;
  3153. internal CVROverlayView(IntPtr pInterface)
  3154. {
  3155. FnTable = (IVROverlayView)Marshal.PtrToStructure(pInterface, typeof(IVROverlayView));
  3156. }
  3157. public EVROverlayError AcquireOverlayView(ulong ulOverlayHandle,ref VRNativeDevice_t pNativeDevice,ref VROverlayView_t pOverlayView,uint unOverlayViewSize)
  3158. {
  3159. EVROverlayError result = FnTable.AcquireOverlayView(ulOverlayHandle,ref pNativeDevice,ref pOverlayView,unOverlayViewSize);
  3160. return result;
  3161. }
  3162. public EVROverlayError ReleaseOverlayView(ref VROverlayView_t pOverlayView)
  3163. {
  3164. EVROverlayError result = FnTable.ReleaseOverlayView(ref pOverlayView);
  3165. return result;
  3166. }
  3167. public void PostOverlayEvent(ulong ulOverlayHandle,ref VREvent_t pvrEvent)
  3168. {
  3169. FnTable.PostOverlayEvent(ulOverlayHandle,ref pvrEvent);
  3170. }
  3171. public bool IsViewingPermitted(ulong ulOverlayHandle)
  3172. {
  3173. bool result = FnTable.IsViewingPermitted(ulOverlayHandle);
  3174. return result;
  3175. }
  3176. }
  3177. public class CVRHeadsetView
  3178. {
  3179. IVRHeadsetView FnTable;
  3180. internal CVRHeadsetView(IntPtr pInterface)
  3181. {
  3182. FnTable = (IVRHeadsetView)Marshal.PtrToStructure(pInterface, typeof(IVRHeadsetView));
  3183. }
  3184. public void SetHeadsetViewSize(uint nWidth,uint nHeight)
  3185. {
  3186. FnTable.SetHeadsetViewSize(nWidth,nHeight);
  3187. }
  3188. public void GetHeadsetViewSize(ref uint pnWidth,ref uint pnHeight)
  3189. {
  3190. pnWidth = 0;
  3191. pnHeight = 0;
  3192. FnTable.GetHeadsetViewSize(ref pnWidth,ref pnHeight);
  3193. }
  3194. public void SetHeadsetViewMode(uint eHeadsetViewMode)
  3195. {
  3196. FnTable.SetHeadsetViewMode(eHeadsetViewMode);
  3197. }
  3198. public uint GetHeadsetViewMode()
  3199. {
  3200. uint result = FnTable.GetHeadsetViewMode();
  3201. return result;
  3202. }
  3203. public void SetHeadsetViewCropped(bool bCropped)
  3204. {
  3205. FnTable.SetHeadsetViewCropped(bCropped);
  3206. }
  3207. public bool GetHeadsetViewCropped()
  3208. {
  3209. bool result = FnTable.GetHeadsetViewCropped();
  3210. return result;
  3211. }
  3212. public float GetHeadsetViewAspectRatio()
  3213. {
  3214. float result = FnTable.GetHeadsetViewAspectRatio();
  3215. return result;
  3216. }
  3217. public void SetHeadsetViewBlendRange(float flStartPct,float flEndPct)
  3218. {
  3219. FnTable.SetHeadsetViewBlendRange(flStartPct,flEndPct);
  3220. }
  3221. public void GetHeadsetViewBlendRange(ref float pStartPct,ref float pEndPct)
  3222. {
  3223. pStartPct = 0;
  3224. pEndPct = 0;
  3225. FnTable.GetHeadsetViewBlendRange(ref pStartPct,ref pEndPct);
  3226. }
  3227. }
  3228. public class CVRRenderModels
  3229. {
  3230. IVRRenderModels FnTable;
  3231. internal CVRRenderModels(IntPtr pInterface)
  3232. {
  3233. FnTable = (IVRRenderModels)Marshal.PtrToStructure(pInterface, typeof(IVRRenderModels));
  3234. }
  3235. public EVRRenderModelError LoadRenderModel_Async(string pchRenderModelName,ref IntPtr ppRenderModel)
  3236. {
  3237. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3238. EVRRenderModelError result = FnTable.LoadRenderModel_Async(pchRenderModelNameUtf8,ref ppRenderModel);
  3239. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3240. return result;
  3241. }
  3242. public void FreeRenderModel(IntPtr pRenderModel)
  3243. {
  3244. FnTable.FreeRenderModel(pRenderModel);
  3245. }
  3246. public EVRRenderModelError LoadTexture_Async(int textureId,ref IntPtr ppTexture)
  3247. {
  3248. EVRRenderModelError result = FnTable.LoadTexture_Async(textureId,ref ppTexture);
  3249. return result;
  3250. }
  3251. public void FreeTexture(IntPtr pTexture)
  3252. {
  3253. FnTable.FreeTexture(pTexture);
  3254. }
  3255. public EVRRenderModelError LoadTextureD3D11_Async(int textureId,IntPtr pD3D11Device,ref IntPtr ppD3D11Texture2D)
  3256. {
  3257. EVRRenderModelError result = FnTable.LoadTextureD3D11_Async(textureId,pD3D11Device,ref ppD3D11Texture2D);
  3258. return result;
  3259. }
  3260. public EVRRenderModelError LoadIntoTextureD3D11_Async(int textureId,IntPtr pDstTexture)
  3261. {
  3262. EVRRenderModelError result = FnTable.LoadIntoTextureD3D11_Async(textureId,pDstTexture);
  3263. return result;
  3264. }
  3265. public void FreeTextureD3D11(IntPtr pD3D11Texture2D)
  3266. {
  3267. FnTable.FreeTextureD3D11(pD3D11Texture2D);
  3268. }
  3269. public uint GetRenderModelName(uint unRenderModelIndex,System.Text.StringBuilder pchRenderModelName,uint unRenderModelNameLen)
  3270. {
  3271. uint result = FnTable.GetRenderModelName(unRenderModelIndex,pchRenderModelName,unRenderModelNameLen);
  3272. return result;
  3273. }
  3274. public uint GetRenderModelCount()
  3275. {
  3276. uint result = FnTable.GetRenderModelCount();
  3277. return result;
  3278. }
  3279. public uint GetComponentCount(string pchRenderModelName)
  3280. {
  3281. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3282. uint result = FnTable.GetComponentCount(pchRenderModelNameUtf8);
  3283. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3284. return result;
  3285. }
  3286. public uint GetComponentName(string pchRenderModelName,uint unComponentIndex,System.Text.StringBuilder pchComponentName,uint unComponentNameLen)
  3287. {
  3288. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3289. uint result = FnTable.GetComponentName(pchRenderModelNameUtf8,unComponentIndex,pchComponentName,unComponentNameLen);
  3290. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3291. return result;
  3292. }
  3293. public ulong GetComponentButtonMask(string pchRenderModelName,string pchComponentName)
  3294. {
  3295. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3296. IntPtr pchComponentNameUtf8 = Utils.ToUtf8(pchComponentName);
  3297. ulong result = FnTable.GetComponentButtonMask(pchRenderModelNameUtf8,pchComponentNameUtf8);
  3298. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3299. Marshal.FreeHGlobal(pchComponentNameUtf8);
  3300. return result;
  3301. }
  3302. public uint GetComponentRenderModelName(string pchRenderModelName,string pchComponentName,System.Text.StringBuilder pchComponentRenderModelName,uint unComponentRenderModelNameLen)
  3303. {
  3304. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3305. IntPtr pchComponentNameUtf8 = Utils.ToUtf8(pchComponentName);
  3306. uint result = FnTable.GetComponentRenderModelName(pchRenderModelNameUtf8,pchComponentNameUtf8,pchComponentRenderModelName,unComponentRenderModelNameLen);
  3307. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3308. Marshal.FreeHGlobal(pchComponentNameUtf8);
  3309. return result;
  3310. }
  3311. public bool GetComponentStateForDevicePath(string pchRenderModelName,string pchComponentName,ulong devicePath,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState)
  3312. {
  3313. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3314. IntPtr pchComponentNameUtf8 = Utils.ToUtf8(pchComponentName);
  3315. bool result = FnTable.GetComponentStateForDevicePath(pchRenderModelNameUtf8,pchComponentNameUtf8,devicePath,ref pState,ref pComponentState);
  3316. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3317. Marshal.FreeHGlobal(pchComponentNameUtf8);
  3318. return result;
  3319. }
  3320. // This is a terrible hack to workaround the fact that VRControllerState_t and VREvent_t were
  3321. // originally mis-compiled with the wrong packing for Linux and OSX.
  3322. [UnmanagedFunctionPointer(CallingConvention.StdCall)]
  3323. internal delegate bool _GetComponentStatePacked(IntPtr pchRenderModelName,IntPtr pchComponentName,ref VRControllerState_t_Packed pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState);
  3324. [StructLayout(LayoutKind.Explicit)]
  3325. struct GetComponentStateUnion
  3326. {
  3327. [FieldOffset(0)]
  3328. public IVRRenderModels._GetComponentState pGetComponentState;
  3329. [FieldOffset(0)]
  3330. public _GetComponentStatePacked pGetComponentStatePacked;
  3331. }
  3332. public bool GetComponentState(string pchRenderModelName,string pchComponentName,ref VRControllerState_t pControllerState,ref RenderModel_ControllerMode_State_t pState,ref RenderModel_ComponentState_t pComponentState)
  3333. {
  3334. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3335. IntPtr pchComponentNameUtf8 = Utils.ToUtf8(pchComponentName);
  3336. #if !UNITY_METRO
  3337. if ((System.Environment.OSVersion.Platform == System.PlatformID.MacOSX) ||
  3338. (System.Environment.OSVersion.Platform == System.PlatformID.Unix))
  3339. {
  3340. GetComponentStateUnion u;
  3341. VRControllerState_t_Packed state_packed = new VRControllerState_t_Packed(pControllerState);
  3342. u.pGetComponentStatePacked = null;
  3343. u.pGetComponentState = FnTable.GetComponentState;
  3344. bool packed_result = u.pGetComponentStatePacked(pchRenderModelNameUtf8,pchComponentNameUtf8,ref state_packed,ref pState,ref pComponentState);
  3345. state_packed.Unpack(ref pControllerState);
  3346. return packed_result;
  3347. }
  3348. #endif
  3349. bool result = FnTable.GetComponentState(pchRenderModelNameUtf8,pchComponentNameUtf8,ref pControllerState,ref pState,ref pComponentState);
  3350. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3351. Marshal.FreeHGlobal(pchComponentNameUtf8);
  3352. return result;
  3353. }
  3354. public bool RenderModelHasComponent(string pchRenderModelName,string pchComponentName)
  3355. {
  3356. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3357. IntPtr pchComponentNameUtf8 = Utils.ToUtf8(pchComponentName);
  3358. bool result = FnTable.RenderModelHasComponent(pchRenderModelNameUtf8,pchComponentNameUtf8);
  3359. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3360. Marshal.FreeHGlobal(pchComponentNameUtf8);
  3361. return result;
  3362. }
  3363. public uint GetRenderModelThumbnailURL(string pchRenderModelName,System.Text.StringBuilder pchThumbnailURL,uint unThumbnailURLLen,ref EVRRenderModelError peError)
  3364. {
  3365. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3366. uint result = FnTable.GetRenderModelThumbnailURL(pchRenderModelNameUtf8,pchThumbnailURL,unThumbnailURLLen,ref peError);
  3367. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3368. return result;
  3369. }
  3370. public uint GetRenderModelOriginalPath(string pchRenderModelName,System.Text.StringBuilder pchOriginalPath,uint unOriginalPathLen,ref EVRRenderModelError peError)
  3371. {
  3372. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3373. uint result = FnTable.GetRenderModelOriginalPath(pchRenderModelNameUtf8,pchOriginalPath,unOriginalPathLen,ref peError);
  3374. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3375. return result;
  3376. }
  3377. public string GetRenderModelErrorNameFromEnum(EVRRenderModelError error)
  3378. {
  3379. IntPtr result = FnTable.GetRenderModelErrorNameFromEnum(error);
  3380. return Marshal.PtrToStringAnsi(result);
  3381. }
  3382. }
  3383. public class CVRNotifications
  3384. {
  3385. IVRNotifications FnTable;
  3386. internal CVRNotifications(IntPtr pInterface)
  3387. {
  3388. FnTable = (IVRNotifications)Marshal.PtrToStructure(pInterface, typeof(IVRNotifications));
  3389. }
  3390. public EVRNotificationError CreateNotification(ulong ulOverlayHandle,ulong ulUserValue,EVRNotificationType type,string pchText,EVRNotificationStyle style,ref NotificationBitmap_t pImage,ref uint pNotificationId)
  3391. {
  3392. IntPtr pchTextUtf8 = Utils.ToUtf8(pchText);
  3393. pNotificationId = 0;
  3394. EVRNotificationError result = FnTable.CreateNotification(ulOverlayHandle,ulUserValue,type,pchTextUtf8,style,ref pImage,ref pNotificationId);
  3395. Marshal.FreeHGlobal(pchTextUtf8);
  3396. return result;
  3397. }
  3398. public EVRNotificationError RemoveNotification(uint notificationId)
  3399. {
  3400. EVRNotificationError result = FnTable.RemoveNotification(notificationId);
  3401. return result;
  3402. }
  3403. }
  3404. public class CVRSettings
  3405. {
  3406. IVRSettings FnTable;
  3407. internal CVRSettings(IntPtr pInterface)
  3408. {
  3409. FnTable = (IVRSettings)Marshal.PtrToStructure(pInterface, typeof(IVRSettings));
  3410. }
  3411. public string GetSettingsErrorNameFromEnum(EVRSettingsError eError)
  3412. {
  3413. IntPtr result = FnTable.GetSettingsErrorNameFromEnum(eError);
  3414. return Marshal.PtrToStringAnsi(result);
  3415. }
  3416. public void SetBool(string pchSection,string pchSettingsKey,bool bValue,ref EVRSettingsError peError)
  3417. {
  3418. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3419. IntPtr pchSettingsKeyUtf8 = Utils.ToUtf8(pchSettingsKey);
  3420. FnTable.SetBool(pchSectionUtf8,pchSettingsKeyUtf8,bValue,ref peError);
  3421. Marshal.FreeHGlobal(pchSectionUtf8);
  3422. Marshal.FreeHGlobal(pchSettingsKeyUtf8);
  3423. }
  3424. public void SetInt32(string pchSection,string pchSettingsKey,int nValue,ref EVRSettingsError peError)
  3425. {
  3426. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3427. IntPtr pchSettingsKeyUtf8 = Utils.ToUtf8(pchSettingsKey);
  3428. FnTable.SetInt32(pchSectionUtf8,pchSettingsKeyUtf8,nValue,ref peError);
  3429. Marshal.FreeHGlobal(pchSectionUtf8);
  3430. Marshal.FreeHGlobal(pchSettingsKeyUtf8);
  3431. }
  3432. public void SetFloat(string pchSection,string pchSettingsKey,float flValue,ref EVRSettingsError peError)
  3433. {
  3434. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3435. IntPtr pchSettingsKeyUtf8 = Utils.ToUtf8(pchSettingsKey);
  3436. FnTable.SetFloat(pchSectionUtf8,pchSettingsKeyUtf8,flValue,ref peError);
  3437. Marshal.FreeHGlobal(pchSectionUtf8);
  3438. Marshal.FreeHGlobal(pchSettingsKeyUtf8);
  3439. }
  3440. public void SetString(string pchSection,string pchSettingsKey,string pchValue,ref EVRSettingsError peError)
  3441. {
  3442. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3443. IntPtr pchSettingsKeyUtf8 = Utils.ToUtf8(pchSettingsKey);
  3444. IntPtr pchValueUtf8 = Utils.ToUtf8(pchValue);
  3445. FnTable.SetString(pchSectionUtf8,pchSettingsKeyUtf8,pchValueUtf8,ref peError);
  3446. Marshal.FreeHGlobal(pchSectionUtf8);
  3447. Marshal.FreeHGlobal(pchSettingsKeyUtf8);
  3448. Marshal.FreeHGlobal(pchValueUtf8);
  3449. }
  3450. public bool GetBool(string pchSection,string pchSettingsKey,ref EVRSettingsError peError)
  3451. {
  3452. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3453. IntPtr pchSettingsKeyUtf8 = Utils.ToUtf8(pchSettingsKey);
  3454. bool result = FnTable.GetBool(pchSectionUtf8,pchSettingsKeyUtf8,ref peError);
  3455. Marshal.FreeHGlobal(pchSectionUtf8);
  3456. Marshal.FreeHGlobal(pchSettingsKeyUtf8);
  3457. return result;
  3458. }
  3459. public int GetInt32(string pchSection,string pchSettingsKey,ref EVRSettingsError peError)
  3460. {
  3461. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3462. IntPtr pchSettingsKeyUtf8 = Utils.ToUtf8(pchSettingsKey);
  3463. int result = FnTable.GetInt32(pchSectionUtf8,pchSettingsKeyUtf8,ref peError);
  3464. Marshal.FreeHGlobal(pchSectionUtf8);
  3465. Marshal.FreeHGlobal(pchSettingsKeyUtf8);
  3466. return result;
  3467. }
  3468. public float GetFloat(string pchSection,string pchSettingsKey,ref EVRSettingsError peError)
  3469. {
  3470. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3471. IntPtr pchSettingsKeyUtf8 = Utils.ToUtf8(pchSettingsKey);
  3472. float result = FnTable.GetFloat(pchSectionUtf8,pchSettingsKeyUtf8,ref peError);
  3473. Marshal.FreeHGlobal(pchSectionUtf8);
  3474. Marshal.FreeHGlobal(pchSettingsKeyUtf8);
  3475. return result;
  3476. }
  3477. public void GetString(string pchSection,string pchSettingsKey,System.Text.StringBuilder pchValue,uint unValueLen,ref EVRSettingsError peError)
  3478. {
  3479. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3480. IntPtr pchSettingsKeyUtf8 = Utils.ToUtf8(pchSettingsKey);
  3481. FnTable.GetString(pchSectionUtf8,pchSettingsKeyUtf8,pchValue,unValueLen,ref peError);
  3482. Marshal.FreeHGlobal(pchSectionUtf8);
  3483. Marshal.FreeHGlobal(pchSettingsKeyUtf8);
  3484. }
  3485. public void RemoveSection(string pchSection,ref EVRSettingsError peError)
  3486. {
  3487. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3488. FnTable.RemoveSection(pchSectionUtf8,ref peError);
  3489. Marshal.FreeHGlobal(pchSectionUtf8);
  3490. }
  3491. public void RemoveKeyInSection(string pchSection,string pchSettingsKey,ref EVRSettingsError peError)
  3492. {
  3493. IntPtr pchSectionUtf8 = Utils.ToUtf8(pchSection);
  3494. IntPtr pchSettingsKeyUtf8 = Utils.ToUtf8(pchSettingsKey);
  3495. FnTable.RemoveKeyInSection(pchSectionUtf8,pchSettingsKeyUtf8,ref peError);
  3496. Marshal.FreeHGlobal(pchSectionUtf8);
  3497. Marshal.FreeHGlobal(pchSettingsKeyUtf8);
  3498. }
  3499. }
  3500. public class CVRScreenshots
  3501. {
  3502. IVRScreenshots FnTable;
  3503. internal CVRScreenshots(IntPtr pInterface)
  3504. {
  3505. FnTable = (IVRScreenshots)Marshal.PtrToStructure(pInterface, typeof(IVRScreenshots));
  3506. }
  3507. public EVRScreenshotError RequestScreenshot(ref uint pOutScreenshotHandle,EVRScreenshotType type,string pchPreviewFilename,string pchVRFilename)
  3508. {
  3509. pOutScreenshotHandle = 0;
  3510. IntPtr pchPreviewFilenameUtf8 = Utils.ToUtf8(pchPreviewFilename);
  3511. IntPtr pchVRFilenameUtf8 = Utils.ToUtf8(pchVRFilename);
  3512. EVRScreenshotError result = FnTable.RequestScreenshot(ref pOutScreenshotHandle,type,pchPreviewFilenameUtf8,pchVRFilenameUtf8);
  3513. Marshal.FreeHGlobal(pchPreviewFilenameUtf8);
  3514. Marshal.FreeHGlobal(pchVRFilenameUtf8);
  3515. return result;
  3516. }
  3517. public EVRScreenshotError HookScreenshot(EVRScreenshotType [] pSupportedTypes)
  3518. {
  3519. EVRScreenshotError result = FnTable.HookScreenshot(pSupportedTypes,(int) pSupportedTypes.Length);
  3520. return result;
  3521. }
  3522. public EVRScreenshotType GetScreenshotPropertyType(uint screenshotHandle,ref EVRScreenshotError pError)
  3523. {
  3524. EVRScreenshotType result = FnTable.GetScreenshotPropertyType(screenshotHandle,ref pError);
  3525. return result;
  3526. }
  3527. public uint GetScreenshotPropertyFilename(uint screenshotHandle,EVRScreenshotPropertyFilenames filenameType,System.Text.StringBuilder pchFilename,uint cchFilename,ref EVRScreenshotError pError)
  3528. {
  3529. uint result = FnTable.GetScreenshotPropertyFilename(screenshotHandle,filenameType,pchFilename,cchFilename,ref pError);
  3530. return result;
  3531. }
  3532. public EVRScreenshotError UpdateScreenshotProgress(uint screenshotHandle,float flProgress)
  3533. {
  3534. EVRScreenshotError result = FnTable.UpdateScreenshotProgress(screenshotHandle,flProgress);
  3535. return result;
  3536. }
  3537. public EVRScreenshotError TakeStereoScreenshot(ref uint pOutScreenshotHandle,string pchPreviewFilename,string pchVRFilename)
  3538. {
  3539. pOutScreenshotHandle = 0;
  3540. IntPtr pchPreviewFilenameUtf8 = Utils.ToUtf8(pchPreviewFilename);
  3541. IntPtr pchVRFilenameUtf8 = Utils.ToUtf8(pchVRFilename);
  3542. EVRScreenshotError result = FnTable.TakeStereoScreenshot(ref pOutScreenshotHandle,pchPreviewFilenameUtf8,pchVRFilenameUtf8);
  3543. Marshal.FreeHGlobal(pchPreviewFilenameUtf8);
  3544. Marshal.FreeHGlobal(pchVRFilenameUtf8);
  3545. return result;
  3546. }
  3547. public EVRScreenshotError SubmitScreenshot(uint screenshotHandle,EVRScreenshotType type,string pchSourcePreviewFilename,string pchSourceVRFilename)
  3548. {
  3549. IntPtr pchSourcePreviewFilenameUtf8 = Utils.ToUtf8(pchSourcePreviewFilename);
  3550. IntPtr pchSourceVRFilenameUtf8 = Utils.ToUtf8(pchSourceVRFilename);
  3551. EVRScreenshotError result = FnTable.SubmitScreenshot(screenshotHandle,type,pchSourcePreviewFilenameUtf8,pchSourceVRFilenameUtf8);
  3552. Marshal.FreeHGlobal(pchSourcePreviewFilenameUtf8);
  3553. Marshal.FreeHGlobal(pchSourceVRFilenameUtf8);
  3554. return result;
  3555. }
  3556. }
  3557. public class CVRResources
  3558. {
  3559. IVRResources FnTable;
  3560. internal CVRResources(IntPtr pInterface)
  3561. {
  3562. FnTable = (IVRResources)Marshal.PtrToStructure(pInterface, typeof(IVRResources));
  3563. }
  3564. public uint LoadSharedResource(string pchResourceName,string pchBuffer,uint unBufferLen)
  3565. {
  3566. IntPtr pchResourceNameUtf8 = Utils.ToUtf8(pchResourceName);
  3567. uint result = FnTable.LoadSharedResource(pchResourceNameUtf8,pchBuffer,unBufferLen);
  3568. Marshal.FreeHGlobal(pchResourceNameUtf8);
  3569. return result;
  3570. }
  3571. public uint GetResourceFullPath(string pchResourceName,string pchResourceTypeDirectory,System.Text.StringBuilder pchPathBuffer,uint unBufferLen)
  3572. {
  3573. IntPtr pchResourceNameUtf8 = Utils.ToUtf8(pchResourceName);
  3574. IntPtr pchResourceTypeDirectoryUtf8 = Utils.ToUtf8(pchResourceTypeDirectory);
  3575. uint result = FnTable.GetResourceFullPath(pchResourceNameUtf8,pchResourceTypeDirectoryUtf8,pchPathBuffer,unBufferLen);
  3576. Marshal.FreeHGlobal(pchResourceNameUtf8);
  3577. Marshal.FreeHGlobal(pchResourceTypeDirectoryUtf8);
  3578. return result;
  3579. }
  3580. }
  3581. public class CVRDriverManager
  3582. {
  3583. IVRDriverManager FnTable;
  3584. internal CVRDriverManager(IntPtr pInterface)
  3585. {
  3586. FnTable = (IVRDriverManager)Marshal.PtrToStructure(pInterface, typeof(IVRDriverManager));
  3587. }
  3588. public uint GetDriverCount()
  3589. {
  3590. uint result = FnTable.GetDriverCount();
  3591. return result;
  3592. }
  3593. public uint GetDriverName(uint nDriver,System.Text.StringBuilder pchValue,uint unBufferSize)
  3594. {
  3595. uint result = FnTable.GetDriverName(nDriver,pchValue,unBufferSize);
  3596. return result;
  3597. }
  3598. public ulong GetDriverHandle(string pchDriverName)
  3599. {
  3600. IntPtr pchDriverNameUtf8 = Utils.ToUtf8(pchDriverName);
  3601. ulong result = FnTable.GetDriverHandle(pchDriverNameUtf8);
  3602. Marshal.FreeHGlobal(pchDriverNameUtf8);
  3603. return result;
  3604. }
  3605. public bool IsEnabled(uint nDriver)
  3606. {
  3607. bool result = FnTable.IsEnabled(nDriver);
  3608. return result;
  3609. }
  3610. }
  3611. public class CVRInput
  3612. {
  3613. IVRInput FnTable;
  3614. internal CVRInput(IntPtr pInterface)
  3615. {
  3616. FnTable = (IVRInput)Marshal.PtrToStructure(pInterface, typeof(IVRInput));
  3617. }
  3618. public EVRInputError SetActionManifestPath(string pchActionManifestPath)
  3619. {
  3620. IntPtr pchActionManifestPathUtf8 = Utils.ToUtf8(pchActionManifestPath);
  3621. EVRInputError result = FnTable.SetActionManifestPath(pchActionManifestPathUtf8);
  3622. Marshal.FreeHGlobal(pchActionManifestPathUtf8);
  3623. return result;
  3624. }
  3625. public EVRInputError GetActionSetHandle(string pchActionSetName,ref ulong pHandle)
  3626. {
  3627. IntPtr pchActionSetNameUtf8 = Utils.ToUtf8(pchActionSetName);
  3628. pHandle = 0;
  3629. EVRInputError result = FnTable.GetActionSetHandle(pchActionSetNameUtf8,ref pHandle);
  3630. Marshal.FreeHGlobal(pchActionSetNameUtf8);
  3631. return result;
  3632. }
  3633. public EVRInputError GetActionHandle(string pchActionName,ref ulong pHandle)
  3634. {
  3635. IntPtr pchActionNameUtf8 = Utils.ToUtf8(pchActionName);
  3636. pHandle = 0;
  3637. EVRInputError result = FnTable.GetActionHandle(pchActionNameUtf8,ref pHandle);
  3638. Marshal.FreeHGlobal(pchActionNameUtf8);
  3639. return result;
  3640. }
  3641. public EVRInputError GetInputSourceHandle(string pchInputSourcePath,ref ulong pHandle)
  3642. {
  3643. IntPtr pchInputSourcePathUtf8 = Utils.ToUtf8(pchInputSourcePath);
  3644. pHandle = 0;
  3645. EVRInputError result = FnTable.GetInputSourceHandle(pchInputSourcePathUtf8,ref pHandle);
  3646. Marshal.FreeHGlobal(pchInputSourcePathUtf8);
  3647. return result;
  3648. }
  3649. public EVRInputError UpdateActionState(VRActiveActionSet_t [] pSets,uint unSizeOfVRSelectedActionSet_t)
  3650. {
  3651. EVRInputError result = FnTable.UpdateActionState(pSets,unSizeOfVRSelectedActionSet_t,(uint) pSets.Length);
  3652. return result;
  3653. }
  3654. public EVRInputError GetDigitalActionData(ulong action,ref InputDigitalActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
  3655. {
  3656. EVRInputError result = FnTable.GetDigitalActionData(action,ref pActionData,unActionDataSize,ulRestrictToDevice);
  3657. return result;
  3658. }
  3659. public EVRInputError GetAnalogActionData(ulong action,ref InputAnalogActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
  3660. {
  3661. EVRInputError result = FnTable.GetAnalogActionData(action,ref pActionData,unActionDataSize,ulRestrictToDevice);
  3662. return result;
  3663. }
  3664. public EVRInputError GetPoseActionDataRelativeToNow(ulong action,ETrackingUniverseOrigin eOrigin,float fPredictedSecondsFromNow,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
  3665. {
  3666. EVRInputError result = FnTable.GetPoseActionDataRelativeToNow(action,eOrigin,fPredictedSecondsFromNow,ref pActionData,unActionDataSize,ulRestrictToDevice);
  3667. return result;
  3668. }
  3669. public EVRInputError GetPoseActionDataForNextFrame(ulong action,ETrackingUniverseOrigin eOrigin,ref InputPoseActionData_t pActionData,uint unActionDataSize,ulong ulRestrictToDevice)
  3670. {
  3671. EVRInputError result = FnTable.GetPoseActionDataForNextFrame(action,eOrigin,ref pActionData,unActionDataSize,ulRestrictToDevice);
  3672. return result;
  3673. }
  3674. public EVRInputError GetSkeletalActionData(ulong action,ref InputSkeletalActionData_t pActionData,uint unActionDataSize)
  3675. {
  3676. EVRInputError result = FnTable.GetSkeletalActionData(action,ref pActionData,unActionDataSize);
  3677. return result;
  3678. }
  3679. public EVRInputError GetDominantHand(ref ETrackedControllerRole peDominantHand)
  3680. {
  3681. EVRInputError result = FnTable.GetDominantHand(ref peDominantHand);
  3682. return result;
  3683. }
  3684. public EVRInputError SetDominantHand(ETrackedControllerRole eDominantHand)
  3685. {
  3686. EVRInputError result = FnTable.SetDominantHand(eDominantHand);
  3687. return result;
  3688. }
  3689. public EVRInputError GetBoneCount(ulong action,ref uint pBoneCount)
  3690. {
  3691. pBoneCount = 0;
  3692. EVRInputError result = FnTable.GetBoneCount(action,ref pBoneCount);
  3693. return result;
  3694. }
  3695. public EVRInputError GetBoneHierarchy(ulong action,int [] pParentIndices)
  3696. {
  3697. EVRInputError result = FnTable.GetBoneHierarchy(action,pParentIndices,(uint) pParentIndices.Length);
  3698. return result;
  3699. }
  3700. public EVRInputError GetBoneName(ulong action,int nBoneIndex,System.Text.StringBuilder pchBoneName,uint unNameBufferSize)
  3701. {
  3702. EVRInputError result = FnTable.GetBoneName(action,nBoneIndex,pchBoneName,unNameBufferSize);
  3703. return result;
  3704. }
  3705. public EVRInputError GetSkeletalReferenceTransforms(ulong action,EVRSkeletalTransformSpace eTransformSpace,EVRSkeletalReferencePose eReferencePose,VRBoneTransform_t [] pTransformArray)
  3706. {
  3707. EVRInputError result = FnTable.GetSkeletalReferenceTransforms(action,eTransformSpace,eReferencePose,pTransformArray,(uint) pTransformArray.Length);
  3708. return result;
  3709. }
  3710. public EVRInputError GetSkeletalTrackingLevel(ulong action,ref EVRSkeletalTrackingLevel pSkeletalTrackingLevel)
  3711. {
  3712. EVRInputError result = FnTable.GetSkeletalTrackingLevel(action,ref pSkeletalTrackingLevel);
  3713. return result;
  3714. }
  3715. public EVRInputError GetSkeletalBoneData(ulong action,EVRSkeletalTransformSpace eTransformSpace,EVRSkeletalMotionRange eMotionRange,VRBoneTransform_t [] pTransformArray)
  3716. {
  3717. EVRInputError result = FnTable.GetSkeletalBoneData(action,eTransformSpace,eMotionRange,pTransformArray,(uint) pTransformArray.Length);
  3718. return result;
  3719. }
  3720. public EVRInputError GetSkeletalSummaryData(ulong action,EVRSummaryType eSummaryType,ref VRSkeletalSummaryData_t pSkeletalSummaryData)
  3721. {
  3722. EVRInputError result = FnTable.GetSkeletalSummaryData(action,eSummaryType,ref pSkeletalSummaryData);
  3723. return result;
  3724. }
  3725. public EVRInputError GetSkeletalBoneDataCompressed(ulong action,EVRSkeletalMotionRange eMotionRange,IntPtr pvCompressedData,uint unCompressedSize,ref uint punRequiredCompressedSize)
  3726. {
  3727. punRequiredCompressedSize = 0;
  3728. EVRInputError result = FnTable.GetSkeletalBoneDataCompressed(action,eMotionRange,pvCompressedData,unCompressedSize,ref punRequiredCompressedSize);
  3729. return result;
  3730. }
  3731. public EVRInputError DecompressSkeletalBoneData(IntPtr pvCompressedBuffer,uint unCompressedBufferSize,EVRSkeletalTransformSpace eTransformSpace,VRBoneTransform_t [] pTransformArray)
  3732. {
  3733. EVRInputError result = FnTable.DecompressSkeletalBoneData(pvCompressedBuffer,unCompressedBufferSize,eTransformSpace,pTransformArray,(uint) pTransformArray.Length);
  3734. return result;
  3735. }
  3736. public EVRInputError TriggerHapticVibrationAction(ulong action,float fStartSecondsFromNow,float fDurationSeconds,float fFrequency,float fAmplitude,ulong ulRestrictToDevice)
  3737. {
  3738. EVRInputError result = FnTable.TriggerHapticVibrationAction(action,fStartSecondsFromNow,fDurationSeconds,fFrequency,fAmplitude,ulRestrictToDevice);
  3739. return result;
  3740. }
  3741. public EVRInputError GetActionOrigins(ulong actionSetHandle,ulong digitalActionHandle,ulong [] originsOut)
  3742. {
  3743. EVRInputError result = FnTable.GetActionOrigins(actionSetHandle,digitalActionHandle,originsOut,(uint) originsOut.Length);
  3744. return result;
  3745. }
  3746. public EVRInputError GetOriginLocalizedName(ulong origin,System.Text.StringBuilder pchNameArray,uint unNameArraySize,int unStringSectionsToInclude)
  3747. {
  3748. EVRInputError result = FnTable.GetOriginLocalizedName(origin,pchNameArray,unNameArraySize,unStringSectionsToInclude);
  3749. return result;
  3750. }
  3751. public EVRInputError GetOriginTrackedDeviceInfo(ulong origin,ref InputOriginInfo_t pOriginInfo,uint unOriginInfoSize)
  3752. {
  3753. EVRInputError result = FnTable.GetOriginTrackedDeviceInfo(origin,ref pOriginInfo,unOriginInfoSize);
  3754. return result;
  3755. }
  3756. public EVRInputError GetActionBindingInfo(ulong action,ref InputBindingInfo_t pOriginInfo,uint unBindingInfoSize,uint unBindingInfoCount,ref uint punReturnedBindingInfoCount)
  3757. {
  3758. punReturnedBindingInfoCount = 0;
  3759. EVRInputError result = FnTable.GetActionBindingInfo(action,ref pOriginInfo,unBindingInfoSize,unBindingInfoCount,ref punReturnedBindingInfoCount);
  3760. return result;
  3761. }
  3762. public EVRInputError ShowActionOrigins(ulong actionSetHandle,ulong ulActionHandle)
  3763. {
  3764. EVRInputError result = FnTable.ShowActionOrigins(actionSetHandle,ulActionHandle);
  3765. return result;
  3766. }
  3767. public EVRInputError ShowBindingsForActionSet(VRActiveActionSet_t [] pSets,uint unSizeOfVRSelectedActionSet_t,ulong originToHighlight)
  3768. {
  3769. EVRInputError result = FnTable.ShowBindingsForActionSet(pSets,unSizeOfVRSelectedActionSet_t,(uint) pSets.Length,originToHighlight);
  3770. return result;
  3771. }
  3772. public EVRInputError GetComponentStateForBinding(string pchRenderModelName,string pchComponentName,ref InputBindingInfo_t pOriginInfo,uint unBindingInfoSize,uint unBindingInfoCount,ref RenderModel_ComponentState_t pComponentState)
  3773. {
  3774. IntPtr pchRenderModelNameUtf8 = Utils.ToUtf8(pchRenderModelName);
  3775. IntPtr pchComponentNameUtf8 = Utils.ToUtf8(pchComponentName);
  3776. EVRInputError result = FnTable.GetComponentStateForBinding(pchRenderModelNameUtf8,pchComponentNameUtf8,ref pOriginInfo,unBindingInfoSize,unBindingInfoCount,ref pComponentState);
  3777. Marshal.FreeHGlobal(pchRenderModelNameUtf8);
  3778. Marshal.FreeHGlobal(pchComponentNameUtf8);
  3779. return result;
  3780. }
  3781. public bool IsUsingLegacyInput()
  3782. {
  3783. bool result = FnTable.IsUsingLegacyInput();
  3784. return result;
  3785. }
  3786. public EVRInputError OpenBindingUI(string pchAppKey,ulong ulActionSetHandle,ulong ulDeviceHandle,bool bShowOnDesktop)
  3787. {
  3788. IntPtr pchAppKeyUtf8 = Utils.ToUtf8(pchAppKey);
  3789. EVRInputError result = FnTable.OpenBindingUI(pchAppKeyUtf8,ulActionSetHandle,ulDeviceHandle,bShowOnDesktop);
  3790. Marshal.FreeHGlobal(pchAppKeyUtf8);
  3791. return result;
  3792. }
  3793. public EVRInputError GetBindingVariant(ulong ulDevicePath,System.Text.StringBuilder pchVariantArray,uint unVariantArraySize)
  3794. {
  3795. EVRInputError result = FnTable.GetBindingVariant(ulDevicePath,pchVariantArray,unVariantArraySize);
  3796. return result;
  3797. }
  3798. }
  3799. public class CVRIOBuffer
  3800. {
  3801. IVRIOBuffer FnTable;
  3802. internal CVRIOBuffer(IntPtr pInterface)
  3803. {
  3804. FnTable = (IVRIOBuffer)Marshal.PtrToStructure(pInterface, typeof(IVRIOBuffer));
  3805. }
  3806. public EIOBufferError Open(string pchPath,EIOBufferMode mode,uint unElementSize,uint unElements,ref ulong pulBuffer)
  3807. {
  3808. IntPtr pchPathUtf8 = Utils.ToUtf8(pchPath);
  3809. pulBuffer = 0;
  3810. EIOBufferError result = FnTable.Open(pchPathUtf8,mode,unElementSize,unElements,ref pulBuffer);
  3811. Marshal.FreeHGlobal(pchPathUtf8);
  3812. return result;
  3813. }
  3814. public EIOBufferError Close(ulong ulBuffer)
  3815. {
  3816. EIOBufferError result = FnTable.Close(ulBuffer);
  3817. return result;
  3818. }
  3819. public EIOBufferError Read(ulong ulBuffer,IntPtr pDst,uint unBytes,ref uint punRead)
  3820. {
  3821. punRead = 0;
  3822. EIOBufferError result = FnTable.Read(ulBuffer,pDst,unBytes,ref punRead);
  3823. return result;
  3824. }
  3825. public EIOBufferError Write(ulong ulBuffer,IntPtr pSrc,uint unBytes)
  3826. {
  3827. EIOBufferError result = FnTable.Write(ulBuffer,pSrc,unBytes);
  3828. return result;
  3829. }
  3830. public ulong PropertyContainer(ulong ulBuffer)
  3831. {
  3832. ulong result = FnTable.PropertyContainer(ulBuffer);
  3833. return result;
  3834. }
  3835. public bool HasReaders(ulong ulBuffer)
  3836. {
  3837. bool result = FnTable.HasReaders(ulBuffer);
  3838. return result;
  3839. }
  3840. }
  3841. public class CVRSpatialAnchors
  3842. {
  3843. IVRSpatialAnchors FnTable;
  3844. internal CVRSpatialAnchors(IntPtr pInterface)
  3845. {
  3846. FnTable = (IVRSpatialAnchors)Marshal.PtrToStructure(pInterface, typeof(IVRSpatialAnchors));
  3847. }
  3848. public EVRSpatialAnchorError CreateSpatialAnchorFromDescriptor(string pchDescriptor,ref uint pHandleOut)
  3849. {
  3850. IntPtr pchDescriptorUtf8 = Utils.ToUtf8(pchDescriptor);
  3851. pHandleOut = 0;
  3852. EVRSpatialAnchorError result = FnTable.CreateSpatialAnchorFromDescriptor(pchDescriptorUtf8,ref pHandleOut);
  3853. Marshal.FreeHGlobal(pchDescriptorUtf8);
  3854. return result;
  3855. }
  3856. public EVRSpatialAnchorError CreateSpatialAnchorFromPose(uint unDeviceIndex,ETrackingUniverseOrigin eOrigin,ref SpatialAnchorPose_t pPose,ref uint pHandleOut)
  3857. {
  3858. pHandleOut = 0;
  3859. EVRSpatialAnchorError result = FnTable.CreateSpatialAnchorFromPose(unDeviceIndex,eOrigin,ref pPose,ref pHandleOut);
  3860. return result;
  3861. }
  3862. public EVRSpatialAnchorError GetSpatialAnchorPose(uint unHandle,ETrackingUniverseOrigin eOrigin,ref SpatialAnchorPose_t pPoseOut)
  3863. {
  3864. EVRSpatialAnchorError result = FnTable.GetSpatialAnchorPose(unHandle,eOrigin,ref pPoseOut);
  3865. return result;
  3866. }
  3867. public EVRSpatialAnchorError GetSpatialAnchorDescriptor(uint unHandle,System.Text.StringBuilder pchDescriptorOut,ref uint punDescriptorBufferLenInOut)
  3868. {
  3869. punDescriptorBufferLenInOut = 0;
  3870. EVRSpatialAnchorError result = FnTable.GetSpatialAnchorDescriptor(unHandle,pchDescriptorOut,ref punDescriptorBufferLenInOut);
  3871. return result;
  3872. }
  3873. }
  3874. public class CVRDebug
  3875. {
  3876. IVRDebug FnTable;
  3877. internal CVRDebug(IntPtr pInterface)
  3878. {
  3879. FnTable = (IVRDebug)Marshal.PtrToStructure(pInterface, typeof(IVRDebug));
  3880. }
  3881. public EVRDebugError EmitVrProfilerEvent(string pchMessage)
  3882. {
  3883. IntPtr pchMessageUtf8 = Utils.ToUtf8(pchMessage);
  3884. EVRDebugError result = FnTable.EmitVrProfilerEvent(pchMessageUtf8);
  3885. Marshal.FreeHGlobal(pchMessageUtf8);
  3886. return result;
  3887. }
  3888. public EVRDebugError BeginVrProfilerEvent(ref ulong pHandleOut)
  3889. {
  3890. pHandleOut = 0;
  3891. EVRDebugError result = FnTable.BeginVrProfilerEvent(ref pHandleOut);
  3892. return result;
  3893. }
  3894. public EVRDebugError FinishVrProfilerEvent(ulong hHandle,string pchMessage)
  3895. {
  3896. IntPtr pchMessageUtf8 = Utils.ToUtf8(pchMessage);
  3897. EVRDebugError result = FnTable.FinishVrProfilerEvent(hHandle,pchMessageUtf8);
  3898. Marshal.FreeHGlobal(pchMessageUtf8);
  3899. return result;
  3900. }
  3901. public uint DriverDebugRequest(uint unDeviceIndex,string pchRequest,System.Text.StringBuilder pchResponseBuffer,uint unResponseBufferSize)
  3902. {
  3903. IntPtr pchRequestUtf8 = Utils.ToUtf8(pchRequest);
  3904. uint result = FnTable.DriverDebugRequest(unDeviceIndex,pchRequestUtf8,pchResponseBuffer,unResponseBufferSize);
  3905. Marshal.FreeHGlobal(pchRequestUtf8);
  3906. return result;
  3907. }
  3908. }
  3909. public class CVRProperties
  3910. {
  3911. IVRProperties FnTable;
  3912. internal CVRProperties(IntPtr pInterface)
  3913. {
  3914. FnTable = (IVRProperties)Marshal.PtrToStructure(pInterface, typeof(IVRProperties));
  3915. }
  3916. public ETrackedPropertyError ReadPropertyBatch(ulong ulContainerHandle,ref PropertyRead_t pBatch,uint unBatchEntryCount)
  3917. {
  3918. ETrackedPropertyError result = FnTable.ReadPropertyBatch(ulContainerHandle,ref pBatch,unBatchEntryCount);
  3919. return result;
  3920. }
  3921. public ETrackedPropertyError WritePropertyBatch(ulong ulContainerHandle,ref PropertyWrite_t pBatch,uint unBatchEntryCount)
  3922. {
  3923. ETrackedPropertyError result = FnTable.WritePropertyBatch(ulContainerHandle,ref pBatch,unBatchEntryCount);
  3924. return result;
  3925. }
  3926. public string GetPropErrorNameFromEnum(ETrackedPropertyError error)
  3927. {
  3928. IntPtr result = FnTable.GetPropErrorNameFromEnum(error);
  3929. return Marshal.PtrToStringAnsi(result);
  3930. }
  3931. public ulong TrackedDeviceToPropertyContainer(uint nDevice)
  3932. {
  3933. ulong result = FnTable.TrackedDeviceToPropertyContainer(nDevice);
  3934. return result;
  3935. }
  3936. }
  3937. public class CVRPaths
  3938. {
  3939. IVRPaths FnTable;
  3940. internal CVRPaths(IntPtr pInterface)
  3941. {
  3942. FnTable = (IVRPaths)Marshal.PtrToStructure(pInterface, typeof(IVRPaths));
  3943. }
  3944. public ETrackedPropertyError ReadPathBatch(ulong ulRootHandle,ref PathRead_t pBatch,uint unBatchEntryCount)
  3945. {
  3946. ETrackedPropertyError result = FnTable.ReadPathBatch(ulRootHandle,ref pBatch,unBatchEntryCount);
  3947. return result;
  3948. }
  3949. public ETrackedPropertyError WritePathBatch(ulong ulRootHandle,ref PathWrite_t pBatch,uint unBatchEntryCount)
  3950. {
  3951. ETrackedPropertyError result = FnTable.WritePathBatch(ulRootHandle,ref pBatch,unBatchEntryCount);
  3952. return result;
  3953. }
  3954. public ETrackedPropertyError StringToHandle(ref ulong pHandle,string pchPath)
  3955. {
  3956. pHandle = 0;
  3957. IntPtr pchPathUtf8 = Utils.ToUtf8(pchPath);
  3958. ETrackedPropertyError result = FnTable.StringToHandle(ref pHandle,pchPathUtf8);
  3959. Marshal.FreeHGlobal(pchPathUtf8);
  3960. return result;
  3961. }
  3962. public ETrackedPropertyError HandleToString(ulong pHandle,string pchBuffer,uint unBufferSize,ref uint punBufferSizeUsed)
  3963. {
  3964. punBufferSizeUsed = 0;
  3965. ETrackedPropertyError result = FnTable.HandleToString(pHandle,pchBuffer,unBufferSize,ref punBufferSizeUsed);
  3966. return result;
  3967. }
  3968. }
  3969. public class CVRBlockQueue
  3970. {
  3971. IVRBlockQueue FnTable;
  3972. internal CVRBlockQueue(IntPtr pInterface)
  3973. {
  3974. FnTable = (IVRBlockQueue)Marshal.PtrToStructure(pInterface, typeof(IVRBlockQueue));
  3975. }
  3976. public EBlockQueueError Create(ref ulong pulQueueHandle,string pchPath,uint unBlockDataSize,uint unBlockHeaderSize,uint unBlockCount)
  3977. {
  3978. pulQueueHandle = 0;
  3979. IntPtr pchPathUtf8 = Utils.ToUtf8(pchPath);
  3980. EBlockQueueError result = FnTable.Create(ref pulQueueHandle,pchPathUtf8,unBlockDataSize,unBlockHeaderSize,unBlockCount);
  3981. Marshal.FreeHGlobal(pchPathUtf8);
  3982. return result;
  3983. }
  3984. public EBlockQueueError Connect(ref ulong pulQueueHandle,string pchPath)
  3985. {
  3986. pulQueueHandle = 0;
  3987. IntPtr pchPathUtf8 = Utils.ToUtf8(pchPath);
  3988. EBlockQueueError result = FnTable.Connect(ref pulQueueHandle,pchPathUtf8);
  3989. Marshal.FreeHGlobal(pchPathUtf8);
  3990. return result;
  3991. }
  3992. public EBlockQueueError Destroy(ulong ulQueueHandle)
  3993. {
  3994. EBlockQueueError result = FnTable.Destroy(ulQueueHandle);
  3995. return result;
  3996. }
  3997. public EBlockQueueError AcquireWriteOnlyBlock(ulong ulQueueHandle,ref ulong pulBlockHandle,ref IntPtr ppvBuffer)
  3998. {
  3999. pulBlockHandle = 0;
  4000. EBlockQueueError result = FnTable.AcquireWriteOnlyBlock(ulQueueHandle,ref pulBlockHandle,ref ppvBuffer);
  4001. return result;
  4002. }
  4003. public EBlockQueueError ReleaseWriteOnlyBlock(ulong ulQueueHandle,ulong ulBlockHandle)
  4004. {
  4005. EBlockQueueError result = FnTable.ReleaseWriteOnlyBlock(ulQueueHandle,ulBlockHandle);
  4006. return result;
  4007. }
  4008. public EBlockQueueError WaitAndAcquireReadOnlyBlock(ulong ulQueueHandle,ref ulong pulBlockHandle,ref IntPtr ppvBuffer,EBlockQueueReadType eReadType,uint unTimeoutMs)
  4009. {
  4010. pulBlockHandle = 0;
  4011. EBlockQueueError result = FnTable.WaitAndAcquireReadOnlyBlock(ulQueueHandle,ref pulBlockHandle,ref ppvBuffer,eReadType,unTimeoutMs);
  4012. return result;
  4013. }
  4014. public EBlockQueueError AcquireReadOnlyBlock(ulong ulQueueHandle,ref ulong pulBlockHandle,ref IntPtr ppvBuffer,EBlockQueueReadType eReadType)
  4015. {
  4016. pulBlockHandle = 0;
  4017. EBlockQueueError result = FnTable.AcquireReadOnlyBlock(ulQueueHandle,ref pulBlockHandle,ref ppvBuffer,eReadType);
  4018. return result;
  4019. }
  4020. public EBlockQueueError ReleaseReadOnlyBlock(ulong ulQueueHandle,ulong ulBlockHandle)
  4021. {
  4022. EBlockQueueError result = FnTable.ReleaseReadOnlyBlock(ulQueueHandle,ulBlockHandle);
  4023. return result;
  4024. }
  4025. public EBlockQueueError QueueHasReader(ulong ulQueueHandle,ref bool pbHasReaders)
  4026. {
  4027. pbHasReaders = false;
  4028. EBlockQueueError result = FnTable.QueueHasReader(ulQueueHandle,ref pbHasReaders);
  4029. return result;
  4030. }
  4031. }
  4032. public class OpenVRInterop
  4033. {
  4034. [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal", CallingConvention = CallingConvention.Cdecl)]
  4035. internal static extern uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType);
  4036. [DllImportAttribute("openvr_api", EntryPoint = "VR_InitInternal2", CallingConvention = CallingConvention.Cdecl)]
  4037. internal static extern uint InitInternal2(ref EVRInitError peError, EVRApplicationType eApplicationType,[In, MarshalAs(UnmanagedType.LPStr)] string pStartupInfo);
  4038. [DllImportAttribute("openvr_api", EntryPoint = "VR_ShutdownInternal", CallingConvention = CallingConvention.Cdecl)]
  4039. internal static extern void ShutdownInternal();
  4040. [DllImportAttribute("openvr_api", EntryPoint = "VR_IsHmdPresent", CallingConvention = CallingConvention.Cdecl)]
  4041. internal static extern bool IsHmdPresent();
  4042. [DllImportAttribute("openvr_api", EntryPoint = "VR_IsRuntimeInstalled", CallingConvention = CallingConvention.Cdecl)]
  4043. internal static extern bool IsRuntimeInstalled();
  4044. [DllImportAttribute("openvr_api", EntryPoint = "VR_RuntimePath", CallingConvention = CallingConvention.Cdecl)]
  4045. internal static extern string RuntimePath();
  4046. [DllImportAttribute("openvr_api", EntryPoint = "VR_GetRuntimePath", CallingConvention = CallingConvention.Cdecl)]
  4047. internal static extern bool GetRuntimePath(System.Text.StringBuilder pchPathBuffer, uint unBufferSize, ref uint punRequiredBufferSize);
  4048. [DllImportAttribute("openvr_api", EntryPoint = "VR_GetStringForHmdError", CallingConvention = CallingConvention.Cdecl)]
  4049. internal static extern IntPtr GetStringForHmdError(EVRInitError error);
  4050. [DllImportAttribute("openvr_api", EntryPoint = "VR_GetGenericInterface", CallingConvention = CallingConvention.Cdecl)]
  4051. internal static extern IntPtr GetGenericInterface([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion, ref EVRInitError peError);
  4052. [DllImportAttribute("openvr_api", EntryPoint = "VR_IsInterfaceVersionValid", CallingConvention = CallingConvention.Cdecl)]
  4053. internal static extern bool IsInterfaceVersionValid([In, MarshalAs(UnmanagedType.LPStr)] string pchInterfaceVersion);
  4054. [DllImportAttribute("openvr_api", EntryPoint = "VR_GetInitToken", CallingConvention = CallingConvention.Cdecl)]
  4055. internal static extern uint GetInitToken();
  4056. }
  4057. public enum EVREye
  4058. {
  4059. Eye_Left = 0,
  4060. Eye_Right = 1,
  4061. }
  4062. public enum ETextureType
  4063. {
  4064. Invalid = -1,
  4065. DirectX = 0,
  4066. OpenGL = 1,
  4067. Vulkan = 2,
  4068. IOSurface = 3,
  4069. DirectX12 = 4,
  4070. DXGISharedHandle = 5,
  4071. Metal = 6,
  4072. }
  4073. public enum EColorSpace
  4074. {
  4075. Auto = 0,
  4076. Gamma = 1,
  4077. Linear = 2,
  4078. }
  4079. public enum ETrackingResult
  4080. {
  4081. Uninitialized = 1,
  4082. Calibrating_InProgress = 100,
  4083. Calibrating_OutOfRange = 101,
  4084. Running_OK = 200,
  4085. Running_OutOfRange = 201,
  4086. Fallback_RotationOnly = 300,
  4087. }
  4088. public enum ETrackedDeviceClass
  4089. {
  4090. Invalid = 0,
  4091. HMD = 1,
  4092. Controller = 2,
  4093. GenericTracker = 3,
  4094. TrackingReference = 4,
  4095. DisplayRedirect = 5,
  4096. Max = 6,
  4097. }
  4098. public enum ETrackedControllerRole
  4099. {
  4100. Invalid = 0,
  4101. LeftHand = 1,
  4102. RightHand = 2,
  4103. OptOut = 3,
  4104. Treadmill = 4,
  4105. Stylus = 5,
  4106. Max = 5,
  4107. }
  4108. public enum ETrackingUniverseOrigin
  4109. {
  4110. TrackingUniverseSeated = 0,
  4111. TrackingUniverseStanding = 1,
  4112. TrackingUniverseRawAndUncalibrated = 2,
  4113. }
  4114. public enum EAdditionalRadioFeatures
  4115. {
  4116. None = 0,
  4117. HTCLinkBox = 1,
  4118. InternalDongle = 2,
  4119. ExternalDongle = 4,
  4120. }
  4121. public enum ETrackedDeviceProperty
  4122. {
  4123. Prop_Invalid = 0,
  4124. Prop_TrackingSystemName_String = 1000,
  4125. Prop_ModelNumber_String = 1001,
  4126. Prop_SerialNumber_String = 1002,
  4127. Prop_RenderModelName_String = 1003,
  4128. Prop_WillDriftInYaw_Bool = 1004,
  4129. Prop_ManufacturerName_String = 1005,
  4130. Prop_TrackingFirmwareVersion_String = 1006,
  4131. Prop_HardwareRevision_String = 1007,
  4132. Prop_AllWirelessDongleDescriptions_String = 1008,
  4133. Prop_ConnectedWirelessDongle_String = 1009,
  4134. Prop_DeviceIsWireless_Bool = 1010,
  4135. Prop_DeviceIsCharging_Bool = 1011,
  4136. Prop_DeviceBatteryPercentage_Float = 1012,
  4137. Prop_StatusDisplayTransform_Matrix34 = 1013,
  4138. Prop_Firmware_UpdateAvailable_Bool = 1014,
  4139. Prop_Firmware_ManualUpdate_Bool = 1015,
  4140. Prop_Firmware_ManualUpdateURL_String = 1016,
  4141. Prop_HardwareRevision_Uint64 = 1017,
  4142. Prop_FirmwareVersion_Uint64 = 1018,
  4143. Prop_FPGAVersion_Uint64 = 1019,
  4144. Prop_VRCVersion_Uint64 = 1020,
  4145. Prop_RadioVersion_Uint64 = 1021,
  4146. Prop_DongleVersion_Uint64 = 1022,
  4147. Prop_BlockServerShutdown_Bool = 1023,
  4148. Prop_CanUnifyCoordinateSystemWithHmd_Bool = 1024,
  4149. Prop_ContainsProximitySensor_Bool = 1025,
  4150. Prop_DeviceProvidesBatteryStatus_Bool = 1026,
  4151. Prop_DeviceCanPowerOff_Bool = 1027,
  4152. Prop_Firmware_ProgrammingTarget_String = 1028,
  4153. Prop_DeviceClass_Int32 = 1029,
  4154. Prop_HasCamera_Bool = 1030,
  4155. Prop_DriverVersion_String = 1031,
  4156. Prop_Firmware_ForceUpdateRequired_Bool = 1032,
  4157. Prop_ViveSystemButtonFixRequired_Bool = 1033,
  4158. Prop_ParentDriver_Uint64 = 1034,
  4159. Prop_ResourceRoot_String = 1035,
  4160. Prop_RegisteredDeviceType_String = 1036,
  4161. Prop_InputProfilePath_String = 1037,
  4162. Prop_NeverTracked_Bool = 1038,
  4163. Prop_NumCameras_Int32 = 1039,
  4164. Prop_CameraFrameLayout_Int32 = 1040,
  4165. Prop_CameraStreamFormat_Int32 = 1041,
  4166. Prop_AdditionalDeviceSettingsPath_String = 1042,
  4167. Prop_Identifiable_Bool = 1043,
  4168. Prop_BootloaderVersion_Uint64 = 1044,
  4169. Prop_AdditionalSystemReportData_String = 1045,
  4170. Prop_CompositeFirmwareVersion_String = 1046,
  4171. Prop_Firmware_RemindUpdate_Bool = 1047,
  4172. Prop_PeripheralApplicationVersion_Uint64 = 1048,
  4173. Prop_ManufacturerSerialNumber_String = 1049,
  4174. Prop_ComputedSerialNumber_String = 1050,
  4175. Prop_EstimatedDeviceFirstUseTime_Int32 = 1051,
  4176. Prop_ReportsTimeSinceVSync_Bool = 2000,
  4177. Prop_SecondsFromVsyncToPhotons_Float = 2001,
  4178. Prop_DisplayFrequency_Float = 2002,
  4179. Prop_UserIpdMeters_Float = 2003,
  4180. Prop_CurrentUniverseId_Uint64 = 2004,
  4181. Prop_PreviousUniverseId_Uint64 = 2005,
  4182. Prop_DisplayFirmwareVersion_Uint64 = 2006,
  4183. Prop_IsOnDesktop_Bool = 2007,
  4184. Prop_DisplayMCType_Int32 = 2008,
  4185. Prop_DisplayMCOffset_Float = 2009,
  4186. Prop_DisplayMCScale_Float = 2010,
  4187. Prop_EdidVendorID_Int32 = 2011,
  4188. Prop_DisplayMCImageLeft_String = 2012,
  4189. Prop_DisplayMCImageRight_String = 2013,
  4190. Prop_DisplayGCBlackClamp_Float = 2014,
  4191. Prop_EdidProductID_Int32 = 2015,
  4192. Prop_CameraToHeadTransform_Matrix34 = 2016,
  4193. Prop_DisplayGCType_Int32 = 2017,
  4194. Prop_DisplayGCOffset_Float = 2018,
  4195. Prop_DisplayGCScale_Float = 2019,
  4196. Prop_DisplayGCPrescale_Float = 2020,
  4197. Prop_DisplayGCImage_String = 2021,
  4198. Prop_LensCenterLeftU_Float = 2022,
  4199. Prop_LensCenterLeftV_Float = 2023,
  4200. Prop_LensCenterRightU_Float = 2024,
  4201. Prop_LensCenterRightV_Float = 2025,
  4202. Prop_UserHeadToEyeDepthMeters_Float = 2026,
  4203. Prop_CameraFirmwareVersion_Uint64 = 2027,
  4204. Prop_CameraFirmwareDescription_String = 2028,
  4205. Prop_DisplayFPGAVersion_Uint64 = 2029,
  4206. Prop_DisplayBootloaderVersion_Uint64 = 2030,
  4207. Prop_DisplayHardwareVersion_Uint64 = 2031,
  4208. Prop_AudioFirmwareVersion_Uint64 = 2032,
  4209. Prop_CameraCompatibilityMode_Int32 = 2033,
  4210. Prop_ScreenshotHorizontalFieldOfViewDegrees_Float = 2034,
  4211. Prop_ScreenshotVerticalFieldOfViewDegrees_Float = 2035,
  4212. Prop_DisplaySuppressed_Bool = 2036,
  4213. Prop_DisplayAllowNightMode_Bool = 2037,
  4214. Prop_DisplayMCImageWidth_Int32 = 2038,
  4215. Prop_DisplayMCImageHeight_Int32 = 2039,
  4216. Prop_DisplayMCImageNumChannels_Int32 = 2040,
  4217. Prop_DisplayMCImageData_Binary = 2041,
  4218. Prop_SecondsFromPhotonsToVblank_Float = 2042,
  4219. Prop_DriverDirectModeSendsVsyncEvents_Bool = 2043,
  4220. Prop_DisplayDebugMode_Bool = 2044,
  4221. Prop_GraphicsAdapterLuid_Uint64 = 2045,
  4222. Prop_DriverProvidedChaperonePath_String = 2048,
  4223. Prop_ExpectedTrackingReferenceCount_Int32 = 2049,
  4224. Prop_ExpectedControllerCount_Int32 = 2050,
  4225. Prop_NamedIconPathControllerLeftDeviceOff_String = 2051,
  4226. Prop_NamedIconPathControllerRightDeviceOff_String = 2052,
  4227. Prop_NamedIconPathTrackingReferenceDeviceOff_String = 2053,
  4228. Prop_DoNotApplyPrediction_Bool = 2054,
  4229. Prop_CameraToHeadTransforms_Matrix34_Array = 2055,
  4230. Prop_DistortionMeshResolution_Int32 = 2056,
  4231. Prop_DriverIsDrawingControllers_Bool = 2057,
  4232. Prop_DriverRequestsApplicationPause_Bool = 2058,
  4233. Prop_DriverRequestsReducedRendering_Bool = 2059,
  4234. Prop_MinimumIpdStepMeters_Float = 2060,
  4235. Prop_AudioBridgeFirmwareVersion_Uint64 = 2061,
  4236. Prop_ImageBridgeFirmwareVersion_Uint64 = 2062,
  4237. Prop_ImuToHeadTransform_Matrix34 = 2063,
  4238. Prop_ImuFactoryGyroBias_Vector3 = 2064,
  4239. Prop_ImuFactoryGyroScale_Vector3 = 2065,
  4240. Prop_ImuFactoryAccelerometerBias_Vector3 = 2066,
  4241. Prop_ImuFactoryAccelerometerScale_Vector3 = 2067,
  4242. Prop_ConfigurationIncludesLighthouse20Features_Bool = 2069,
  4243. Prop_AdditionalRadioFeatures_Uint64 = 2070,
  4244. Prop_CameraWhiteBalance_Vector4_Array = 2071,
  4245. Prop_CameraDistortionFunction_Int32_Array = 2072,
  4246. Prop_CameraDistortionCoefficients_Float_Array = 2073,
  4247. Prop_ExpectedControllerType_String = 2074,
  4248. Prop_HmdTrackingStyle_Int32 = 2075,
  4249. Prop_DriverProvidedChaperoneVisibility_Bool = 2076,
  4250. Prop_HmdColumnCorrectionSettingPrefix_String = 2077,
  4251. Prop_CameraSupportsCompatibilityModes_Bool = 2078,
  4252. Prop_SupportsRoomViewDepthProjection_Bool = 2079,
  4253. Prop_DisplayAvailableFrameRates_Float_Array = 2080,
  4254. Prop_DisplaySupportsMultipleFramerates_Bool = 2081,
  4255. Prop_DisplayColorMultLeft_Vector3 = 2082,
  4256. Prop_DisplayColorMultRight_Vector3 = 2083,
  4257. Prop_DisplaySupportsRuntimeFramerateChange_Bool = 2084,
  4258. Prop_DisplaySupportsAnalogGain_Bool = 2085,
  4259. Prop_DisplayMinAnalogGain_Float = 2086,
  4260. Prop_DisplayMaxAnalogGain_Float = 2087,
  4261. Prop_CameraExposureTime_Float = 2088,
  4262. Prop_CameraGlobalGain_Float = 2089,
  4263. Prop_DashboardScale_Float = 2091,
  4264. Prop_IpdUIRangeMinMeters_Float = 2100,
  4265. Prop_IpdUIRangeMaxMeters_Float = 2101,
  4266. Prop_Hmd_SupportsHDCP14LegacyCompat_Bool = 2102,
  4267. Prop_Hmd_SupportsMicMonitoring_Bool = 2103,
  4268. Prop_DriverRequestedMuraCorrectionMode_Int32 = 2200,
  4269. Prop_DriverRequestedMuraFeather_InnerLeft_Int32 = 2201,
  4270. Prop_DriverRequestedMuraFeather_InnerRight_Int32 = 2202,
  4271. Prop_DriverRequestedMuraFeather_InnerTop_Int32 = 2203,
  4272. Prop_DriverRequestedMuraFeather_InnerBottom_Int32 = 2204,
  4273. Prop_DriverRequestedMuraFeather_OuterLeft_Int32 = 2205,
  4274. Prop_DriverRequestedMuraFeather_OuterRight_Int32 = 2206,
  4275. Prop_DriverRequestedMuraFeather_OuterTop_Int32 = 2207,
  4276. Prop_DriverRequestedMuraFeather_OuterBottom_Int32 = 2208,
  4277. Prop_Audio_DefaultPlaybackDeviceId_String = 2300,
  4278. Prop_Audio_DefaultRecordingDeviceId_String = 2301,
  4279. Prop_Audio_DefaultPlaybackDeviceVolume_Float = 2302,
  4280. Prop_Audio_SupportsDualSpeakerAndJackOutput_Bool = 2303,
  4281. Prop_AttachedDeviceId_String = 3000,
  4282. Prop_SupportedButtons_Uint64 = 3001,
  4283. Prop_Axis0Type_Int32 = 3002,
  4284. Prop_Axis1Type_Int32 = 3003,
  4285. Prop_Axis2Type_Int32 = 3004,
  4286. Prop_Axis3Type_Int32 = 3005,
  4287. Prop_Axis4Type_Int32 = 3006,
  4288. Prop_ControllerRoleHint_Int32 = 3007,
  4289. Prop_FieldOfViewLeftDegrees_Float = 4000,
  4290. Prop_FieldOfViewRightDegrees_Float = 4001,
  4291. Prop_FieldOfViewTopDegrees_Float = 4002,
  4292. Prop_FieldOfViewBottomDegrees_Float = 4003,
  4293. Prop_TrackingRangeMinimumMeters_Float = 4004,
  4294. Prop_TrackingRangeMaximumMeters_Float = 4005,
  4295. Prop_ModeLabel_String = 4006,
  4296. Prop_CanWirelessIdentify_Bool = 4007,
  4297. Prop_Nonce_Int32 = 4008,
  4298. Prop_IconPathName_String = 5000,
  4299. Prop_NamedIconPathDeviceOff_String = 5001,
  4300. Prop_NamedIconPathDeviceSearching_String = 5002,
  4301. Prop_NamedIconPathDeviceSearchingAlert_String = 5003,
  4302. Prop_NamedIconPathDeviceReady_String = 5004,
  4303. Prop_NamedIconPathDeviceReadyAlert_String = 5005,
  4304. Prop_NamedIconPathDeviceNotReady_String = 5006,
  4305. Prop_NamedIconPathDeviceStandby_String = 5007,
  4306. Prop_NamedIconPathDeviceAlertLow_String = 5008,
  4307. Prop_NamedIconPathDeviceStandbyAlert_String = 5009,
  4308. Prop_DisplayHiddenArea_Binary_Start = 5100,
  4309. Prop_DisplayHiddenArea_Binary_End = 5150,
  4310. Prop_ParentContainer = 5151,
  4311. Prop_OverrideContainer_Uint64 = 5152,
  4312. Prop_UserConfigPath_String = 6000,
  4313. Prop_InstallPath_String = 6001,
  4314. Prop_HasDisplayComponent_Bool = 6002,
  4315. Prop_HasControllerComponent_Bool = 6003,
  4316. Prop_HasCameraComponent_Bool = 6004,
  4317. Prop_HasDriverDirectModeComponent_Bool = 6005,
  4318. Prop_HasVirtualDisplayComponent_Bool = 6006,
  4319. Prop_HasSpatialAnchorsSupport_Bool = 6007,
  4320. Prop_ControllerType_String = 7000,
  4321. Prop_ControllerHandSelectionPriority_Int32 = 7002,
  4322. Prop_VendorSpecific_Reserved_Start = 10000,
  4323. Prop_VendorSpecific_Reserved_End = 10999,
  4324. Prop_TrackedDeviceProperty_Max = 1000000,
  4325. }
  4326. public enum ETrackedPropertyError
  4327. {
  4328. TrackedProp_Success = 0,
  4329. TrackedProp_WrongDataType = 1,
  4330. TrackedProp_WrongDeviceClass = 2,
  4331. TrackedProp_BufferTooSmall = 3,
  4332. TrackedProp_UnknownProperty = 4,
  4333. TrackedProp_InvalidDevice = 5,
  4334. TrackedProp_CouldNotContactServer = 6,
  4335. TrackedProp_ValueNotProvidedByDevice = 7,
  4336. TrackedProp_StringExceedsMaximumLength = 8,
  4337. TrackedProp_NotYetAvailable = 9,
  4338. TrackedProp_PermissionDenied = 10,
  4339. TrackedProp_InvalidOperation = 11,
  4340. TrackedProp_CannotWriteToWildcards = 12,
  4341. TrackedProp_IPCReadFailure = 13,
  4342. TrackedProp_OutOfMemory = 14,
  4343. TrackedProp_InvalidContainer = 15,
  4344. }
  4345. public enum EHmdTrackingStyle
  4346. {
  4347. Unknown = 0,
  4348. Lighthouse = 1,
  4349. OutsideInCameras = 2,
  4350. InsideOutCameras = 3,
  4351. }
  4352. public enum EVRSubmitFlags
  4353. {
  4354. Submit_Default = 0,
  4355. Submit_LensDistortionAlreadyApplied = 1,
  4356. Submit_GlRenderBuffer = 2,
  4357. Submit_Reserved = 4,
  4358. Submit_TextureWithPose = 8,
  4359. Submit_TextureWithDepth = 16,
  4360. Submit_FrameDiscontinuty = 32,
  4361. Submit_VulkanTextureWithArrayData = 64,
  4362. Submit_GlArrayTexture = 128,
  4363. Submit_Reserved2 = 32768,
  4364. }
  4365. public enum EVRState
  4366. {
  4367. Undefined = -1,
  4368. Off = 0,
  4369. Searching = 1,
  4370. Searching_Alert = 2,
  4371. Ready = 3,
  4372. Ready_Alert = 4,
  4373. NotReady = 5,
  4374. Standby = 6,
  4375. Ready_Alert_Low = 7,
  4376. }
  4377. public enum EVREventType
  4378. {
  4379. VREvent_None = 0,
  4380. VREvent_TrackedDeviceActivated = 100,
  4381. VREvent_TrackedDeviceDeactivated = 101,
  4382. VREvent_TrackedDeviceUpdated = 102,
  4383. VREvent_TrackedDeviceUserInteractionStarted = 103,
  4384. VREvent_TrackedDeviceUserInteractionEnded = 104,
  4385. VREvent_IpdChanged = 105,
  4386. VREvent_EnterStandbyMode = 106,
  4387. VREvent_LeaveStandbyMode = 107,
  4388. VREvent_TrackedDeviceRoleChanged = 108,
  4389. VREvent_WatchdogWakeUpRequested = 109,
  4390. VREvent_LensDistortionChanged = 110,
  4391. VREvent_PropertyChanged = 111,
  4392. VREvent_WirelessDisconnect = 112,
  4393. VREvent_WirelessReconnect = 113,
  4394. VREvent_ButtonPress = 200,
  4395. VREvent_ButtonUnpress = 201,
  4396. VREvent_ButtonTouch = 202,
  4397. VREvent_ButtonUntouch = 203,
  4398. VREvent_Modal_Cancel = 257,
  4399. VREvent_MouseMove = 300,
  4400. VREvent_MouseButtonDown = 301,
  4401. VREvent_MouseButtonUp = 302,
  4402. VREvent_FocusEnter = 303,
  4403. VREvent_FocusLeave = 304,
  4404. VREvent_ScrollDiscrete = 305,
  4405. VREvent_TouchPadMove = 306,
  4406. VREvent_OverlayFocusChanged = 307,
  4407. VREvent_ReloadOverlays = 308,
  4408. VREvent_ScrollSmooth = 309,
  4409. VREvent_LockMousePosition = 310,
  4410. VREvent_UnlockMousePosition = 311,
  4411. VREvent_InputFocusCaptured = 400,
  4412. VREvent_InputFocusReleased = 401,
  4413. VREvent_SceneApplicationChanged = 404,
  4414. VREvent_SceneFocusChanged = 405,
  4415. VREvent_InputFocusChanged = 406,
  4416. VREvent_SceneApplicationUsingWrongGraphicsAdapter = 408,
  4417. VREvent_ActionBindingReloaded = 409,
  4418. VREvent_HideRenderModels = 410,
  4419. VREvent_ShowRenderModels = 411,
  4420. VREvent_SceneApplicationStateChanged = 412,
  4421. VREvent_ConsoleOpened = 420,
  4422. VREvent_ConsoleClosed = 421,
  4423. VREvent_OverlayShown = 500,
  4424. VREvent_OverlayHidden = 501,
  4425. VREvent_DashboardActivated = 502,
  4426. VREvent_DashboardDeactivated = 503,
  4427. VREvent_DashboardRequested = 505,
  4428. VREvent_ResetDashboard = 506,
  4429. VREvent_ImageLoaded = 508,
  4430. VREvent_ShowKeyboard = 509,
  4431. VREvent_HideKeyboard = 510,
  4432. VREvent_OverlayGamepadFocusGained = 511,
  4433. VREvent_OverlayGamepadFocusLost = 512,
  4434. VREvent_OverlaySharedTextureChanged = 513,
  4435. VREvent_ScreenshotTriggered = 516,
  4436. VREvent_ImageFailed = 517,
  4437. VREvent_DashboardOverlayCreated = 518,
  4438. VREvent_SwitchGamepadFocus = 519,
  4439. VREvent_RequestScreenshot = 520,
  4440. VREvent_ScreenshotTaken = 521,
  4441. VREvent_ScreenshotFailed = 522,
  4442. VREvent_SubmitScreenshotToDashboard = 523,
  4443. VREvent_ScreenshotProgressToDashboard = 524,
  4444. VREvent_PrimaryDashboardDeviceChanged = 525,
  4445. VREvent_RoomViewShown = 526,
  4446. VREvent_RoomViewHidden = 527,
  4447. VREvent_ShowUI = 528,
  4448. VREvent_ShowDevTools = 529,
  4449. VREvent_DesktopViewUpdating = 530,
  4450. VREvent_DesktopViewReady = 531,
  4451. VREvent_Notification_Shown = 600,
  4452. VREvent_Notification_Hidden = 601,
  4453. VREvent_Notification_BeginInteraction = 602,
  4454. VREvent_Notification_Destroyed = 603,
  4455. VREvent_Quit = 700,
  4456. VREvent_ProcessQuit = 701,
  4457. VREvent_QuitAcknowledged = 703,
  4458. VREvent_DriverRequestedQuit = 704,
  4459. VREvent_RestartRequested = 705,
  4460. VREvent_ChaperoneDataHasChanged = 800,
  4461. VREvent_ChaperoneUniverseHasChanged = 801,
  4462. VREvent_ChaperoneTempDataHasChanged = 802,
  4463. VREvent_ChaperoneSettingsHaveChanged = 803,
  4464. VREvent_SeatedZeroPoseReset = 804,
  4465. VREvent_ChaperoneFlushCache = 805,
  4466. VREvent_ChaperoneRoomSetupStarting = 806,
  4467. VREvent_ChaperoneRoomSetupFinished = 807,
  4468. VREvent_StandingZeroPoseReset = 808,
  4469. VREvent_AudioSettingsHaveChanged = 820,
  4470. VREvent_BackgroundSettingHasChanged = 850,
  4471. VREvent_CameraSettingsHaveChanged = 851,
  4472. VREvent_ReprojectionSettingHasChanged = 852,
  4473. VREvent_ModelSkinSettingsHaveChanged = 853,
  4474. VREvent_EnvironmentSettingsHaveChanged = 854,
  4475. VREvent_PowerSettingsHaveChanged = 855,
  4476. VREvent_EnableHomeAppSettingsHaveChanged = 856,
  4477. VREvent_SteamVRSectionSettingChanged = 857,
  4478. VREvent_LighthouseSectionSettingChanged = 858,
  4479. VREvent_NullSectionSettingChanged = 859,
  4480. VREvent_UserInterfaceSectionSettingChanged = 860,
  4481. VREvent_NotificationsSectionSettingChanged = 861,
  4482. VREvent_KeyboardSectionSettingChanged = 862,
  4483. VREvent_PerfSectionSettingChanged = 863,
  4484. VREvent_DashboardSectionSettingChanged = 864,
  4485. VREvent_WebInterfaceSectionSettingChanged = 865,
  4486. VREvent_TrackersSectionSettingChanged = 866,
  4487. VREvent_LastKnownSectionSettingChanged = 867,
  4488. VREvent_DismissedWarningsSectionSettingChanged = 868,
  4489. VREvent_GpuSpeedSectionSettingChanged = 869,
  4490. VREvent_WindowsMRSectionSettingChanged = 870,
  4491. VREvent_OtherSectionSettingChanged = 871,
  4492. VREvent_StatusUpdate = 900,
  4493. VREvent_WebInterface_InstallDriverCompleted = 950,
  4494. VREvent_MCImageUpdated = 1000,
  4495. VREvent_FirmwareUpdateStarted = 1100,
  4496. VREvent_FirmwareUpdateFinished = 1101,
  4497. VREvent_KeyboardClosed = 1200,
  4498. VREvent_KeyboardCharInput = 1201,
  4499. VREvent_KeyboardDone = 1202,
  4500. VREvent_ApplicationListUpdated = 1303,
  4501. VREvent_ApplicationMimeTypeLoad = 1304,
  4502. VREvent_ProcessConnected = 1306,
  4503. VREvent_ProcessDisconnected = 1307,
  4504. VREvent_Compositor_ChaperoneBoundsShown = 1410,
  4505. VREvent_Compositor_ChaperoneBoundsHidden = 1411,
  4506. VREvent_Compositor_DisplayDisconnected = 1412,
  4507. VREvent_Compositor_DisplayReconnected = 1413,
  4508. VREvent_Compositor_HDCPError = 1414,
  4509. VREvent_Compositor_ApplicationNotResponding = 1415,
  4510. VREvent_Compositor_ApplicationResumed = 1416,
  4511. VREvent_Compositor_OutOfVideoMemory = 1417,
  4512. VREvent_Compositor_DisplayModeNotSupported = 1418,
  4513. VREvent_Compositor_StageOverrideReady = 1419,
  4514. VREvent_TrackedCamera_StartVideoStream = 1500,
  4515. VREvent_TrackedCamera_StopVideoStream = 1501,
  4516. VREvent_TrackedCamera_PauseVideoStream = 1502,
  4517. VREvent_TrackedCamera_ResumeVideoStream = 1503,
  4518. VREvent_TrackedCamera_EditingSurface = 1550,
  4519. VREvent_PerformanceTest_EnableCapture = 1600,
  4520. VREvent_PerformanceTest_DisableCapture = 1601,
  4521. VREvent_PerformanceTest_FidelityLevel = 1602,
  4522. VREvent_MessageOverlay_Closed = 1650,
  4523. VREvent_MessageOverlayCloseRequested = 1651,
  4524. VREvent_Input_HapticVibration = 1700,
  4525. VREvent_Input_BindingLoadFailed = 1701,
  4526. VREvent_Input_BindingLoadSuccessful = 1702,
  4527. VREvent_Input_ActionManifestReloaded = 1703,
  4528. VREvent_Input_ActionManifestLoadFailed = 1704,
  4529. VREvent_Input_ProgressUpdate = 1705,
  4530. VREvent_Input_TrackerActivated = 1706,
  4531. VREvent_Input_BindingsUpdated = 1707,
  4532. VREvent_Input_BindingSubscriptionChanged = 1708,
  4533. VREvent_SpatialAnchors_PoseUpdated = 1800,
  4534. VREvent_SpatialAnchors_DescriptorUpdated = 1801,
  4535. VREvent_SpatialAnchors_RequestPoseUpdate = 1802,
  4536. VREvent_SpatialAnchors_RequestDescriptorUpdate = 1803,
  4537. VREvent_SystemReport_Started = 1900,
  4538. VREvent_Monitor_ShowHeadsetView = 2000,
  4539. VREvent_Monitor_HideHeadsetView = 2001,
  4540. VREvent_VendorSpecific_Reserved_Start = 10000,
  4541. VREvent_VendorSpecific_Reserved_End = 19999,
  4542. }
  4543. public enum EDeviceActivityLevel
  4544. {
  4545. k_EDeviceActivityLevel_Unknown = -1,
  4546. k_EDeviceActivityLevel_Idle = 0,
  4547. k_EDeviceActivityLevel_UserInteraction = 1,
  4548. k_EDeviceActivityLevel_UserInteraction_Timeout = 2,
  4549. k_EDeviceActivityLevel_Standby = 3,
  4550. k_EDeviceActivityLevel_Idle_Timeout = 4,
  4551. }
  4552. public enum EVRButtonId
  4553. {
  4554. k_EButton_System = 0,
  4555. k_EButton_ApplicationMenu = 1,
  4556. k_EButton_Grip = 2,
  4557. k_EButton_DPad_Left = 3,
  4558. k_EButton_DPad_Up = 4,
  4559. k_EButton_DPad_Right = 5,
  4560. k_EButton_DPad_Down = 6,
  4561. k_EButton_A = 7,
  4562. k_EButton_ProximitySensor = 31,
  4563. k_EButton_Axis0 = 32,
  4564. k_EButton_Axis1 = 33,
  4565. k_EButton_Axis2 = 34,
  4566. k_EButton_Axis3 = 35,
  4567. k_EButton_Axis4 = 36,
  4568. k_EButton_SteamVR_Touchpad = 32,
  4569. k_EButton_SteamVR_Trigger = 33,
  4570. k_EButton_Dashboard_Back = 2,
  4571. k_EButton_IndexController_A = 2,
  4572. k_EButton_IndexController_B = 1,
  4573. k_EButton_IndexController_JoyStick = 35,
  4574. k_EButton_Max = 64,
  4575. }
  4576. public enum EVRMouseButton
  4577. {
  4578. Left = 1,
  4579. Right = 2,
  4580. Middle = 4,
  4581. }
  4582. public enum EShowUIType
  4583. {
  4584. ShowUI_ControllerBinding = 0,
  4585. ShowUI_ManageTrackers = 1,
  4586. ShowUI_Pairing = 3,
  4587. ShowUI_Settings = 4,
  4588. ShowUI_DebugCommands = 5,
  4589. ShowUI_FullControllerBinding = 6,
  4590. ShowUI_ManageDrivers = 7,
  4591. }
  4592. public enum EHDCPError
  4593. {
  4594. None = 0,
  4595. LinkLost = 1,
  4596. Tampered = 2,
  4597. DeviceRevoked = 3,
  4598. Unknown = 4,
  4599. }
  4600. public enum EVRComponentProperty
  4601. {
  4602. IsStatic = 1,
  4603. IsVisible = 2,
  4604. IsTouched = 4,
  4605. IsPressed = 8,
  4606. IsScrolled = 16,
  4607. IsHighlighted = 32,
  4608. }
  4609. public enum EVRInputError
  4610. {
  4611. None = 0,
  4612. NameNotFound = 1,
  4613. WrongType = 2,
  4614. InvalidHandle = 3,
  4615. InvalidParam = 4,
  4616. NoSteam = 5,
  4617. MaxCapacityReached = 6,
  4618. IPCError = 7,
  4619. NoActiveActionSet = 8,
  4620. InvalidDevice = 9,
  4621. InvalidSkeleton = 10,
  4622. InvalidBoneCount = 11,
  4623. InvalidCompressedData = 12,
  4624. NoData = 13,
  4625. BufferTooSmall = 14,
  4626. MismatchedActionManifest = 15,
  4627. MissingSkeletonData = 16,
  4628. InvalidBoneIndex = 17,
  4629. InvalidPriority = 18,
  4630. PermissionDenied = 19,
  4631. InvalidRenderModel = 20,
  4632. }
  4633. public enum EVRSpatialAnchorError
  4634. {
  4635. Success = 0,
  4636. Internal = 1,
  4637. UnknownHandle = 2,
  4638. ArrayTooSmall = 3,
  4639. InvalidDescriptorChar = 4,
  4640. NotYetAvailable = 5,
  4641. NotAvailableInThisUniverse = 6,
  4642. PermanentlyUnavailable = 7,
  4643. WrongDriver = 8,
  4644. DescriptorTooLong = 9,
  4645. Unknown = 10,
  4646. NoRoomCalibration = 11,
  4647. InvalidArgument = 12,
  4648. UnknownDriver = 13,
  4649. }
  4650. public enum EHiddenAreaMeshType
  4651. {
  4652. k_eHiddenAreaMesh_Standard = 0,
  4653. k_eHiddenAreaMesh_Inverse = 1,
  4654. k_eHiddenAreaMesh_LineLoop = 2,
  4655. k_eHiddenAreaMesh_Max = 3,
  4656. }
  4657. public enum EVRControllerAxisType
  4658. {
  4659. k_eControllerAxis_None = 0,
  4660. k_eControllerAxis_TrackPad = 1,
  4661. k_eControllerAxis_Joystick = 2,
  4662. k_eControllerAxis_Trigger = 3,
  4663. }
  4664. public enum EVRControllerEventOutputType
  4665. {
  4666. ControllerEventOutput_OSEvents = 0,
  4667. ControllerEventOutput_VREvents = 1,
  4668. }
  4669. public enum ECollisionBoundsStyle
  4670. {
  4671. COLLISION_BOUNDS_STYLE_BEGINNER = 0,
  4672. COLLISION_BOUNDS_STYLE_INTERMEDIATE = 1,
  4673. COLLISION_BOUNDS_STYLE_SQUARES = 2,
  4674. COLLISION_BOUNDS_STYLE_ADVANCED = 3,
  4675. COLLISION_BOUNDS_STYLE_NONE = 4,
  4676. COLLISION_BOUNDS_STYLE_COUNT = 5,
  4677. }
  4678. public enum EVROverlayError
  4679. {
  4680. None = 0,
  4681. UnknownOverlay = 10,
  4682. InvalidHandle = 11,
  4683. PermissionDenied = 12,
  4684. OverlayLimitExceeded = 13,
  4685. WrongVisibilityType = 14,
  4686. KeyTooLong = 15,
  4687. NameTooLong = 16,
  4688. KeyInUse = 17,
  4689. WrongTransformType = 18,
  4690. InvalidTrackedDevice = 19,
  4691. InvalidParameter = 20,
  4692. ThumbnailCantBeDestroyed = 21,
  4693. ArrayTooSmall = 22,
  4694. RequestFailed = 23,
  4695. InvalidTexture = 24,
  4696. UnableToLoadFile = 25,
  4697. KeyboardAlreadyInUse = 26,
  4698. NoNeighbor = 27,
  4699. TooManyMaskPrimitives = 29,
  4700. BadMaskPrimitive = 30,
  4701. TextureAlreadyLocked = 31,
  4702. TextureLockCapacityReached = 32,
  4703. TextureNotLocked = 33,
  4704. }
  4705. public enum EVRApplicationType
  4706. {
  4707. VRApplication_Other = 0,
  4708. VRApplication_Scene = 1,
  4709. VRApplication_Overlay = 2,
  4710. VRApplication_Background = 3,
  4711. VRApplication_Utility = 4,
  4712. VRApplication_VRMonitor = 5,
  4713. VRApplication_SteamWatchdog = 6,
  4714. VRApplication_Bootstrapper = 7,
  4715. VRApplication_WebHelper = 8,
  4716. VRApplication_OpenXRInstance = 9,
  4717. VRApplication_OpenXRScene = 10,
  4718. VRApplication_OpenXROverlay = 11,
  4719. VRApplication_Prism = 12,
  4720. VRApplication_Max = 13,
  4721. }
  4722. public enum EVRFirmwareError
  4723. {
  4724. None = 0,
  4725. Success = 1,
  4726. Fail = 2,
  4727. }
  4728. public enum EVRNotificationError
  4729. {
  4730. OK = 0,
  4731. InvalidNotificationId = 100,
  4732. NotificationQueueFull = 101,
  4733. InvalidOverlayHandle = 102,
  4734. SystemWithUserValueAlreadyExists = 103,
  4735. }
  4736. public enum EVRSkeletalMotionRange
  4737. {
  4738. WithController = 0,
  4739. WithoutController = 1,
  4740. }
  4741. public enum EVRSkeletalTrackingLevel
  4742. {
  4743. VRSkeletalTracking_Estimated = 0,
  4744. VRSkeletalTracking_Partial = 1,
  4745. VRSkeletalTracking_Full = 2,
  4746. Count = 3,
  4747. Max = 2,
  4748. }
  4749. public enum EVRInitError
  4750. {
  4751. None = 0,
  4752. Unknown = 1,
  4753. Init_InstallationNotFound = 100,
  4754. Init_InstallationCorrupt = 101,
  4755. Init_VRClientDLLNotFound = 102,
  4756. Init_FileNotFound = 103,
  4757. Init_FactoryNotFound = 104,
  4758. Init_InterfaceNotFound = 105,
  4759. Init_InvalidInterface = 106,
  4760. Init_UserConfigDirectoryInvalid = 107,
  4761. Init_HmdNotFound = 108,
  4762. Init_NotInitialized = 109,
  4763. Init_PathRegistryNotFound = 110,
  4764. Init_NoConfigPath = 111,
  4765. Init_NoLogPath = 112,
  4766. Init_PathRegistryNotWritable = 113,
  4767. Init_AppInfoInitFailed = 114,
  4768. Init_Retry = 115,
  4769. Init_InitCanceledByUser = 116,
  4770. Init_AnotherAppLaunching = 117,
  4771. Init_SettingsInitFailed = 118,
  4772. Init_ShuttingDown = 119,
  4773. Init_TooManyObjects = 120,
  4774. Init_NoServerForBackgroundApp = 121,
  4775. Init_NotSupportedWithCompositor = 122,
  4776. Init_NotAvailableToUtilityApps = 123,
  4777. Init_Internal = 124,
  4778. Init_HmdDriverIdIsNone = 125,
  4779. Init_HmdNotFoundPresenceFailed = 126,
  4780. Init_VRMonitorNotFound = 127,
  4781. Init_VRMonitorStartupFailed = 128,
  4782. Init_LowPowerWatchdogNotSupported = 129,
  4783. Init_InvalidApplicationType = 130,
  4784. Init_NotAvailableToWatchdogApps = 131,
  4785. Init_WatchdogDisabledInSettings = 132,
  4786. Init_VRDashboardNotFound = 133,
  4787. Init_VRDashboardStartupFailed = 134,
  4788. Init_VRHomeNotFound = 135,
  4789. Init_VRHomeStartupFailed = 136,
  4790. Init_RebootingBusy = 137,
  4791. Init_FirmwareUpdateBusy = 138,
  4792. Init_FirmwareRecoveryBusy = 139,
  4793. Init_USBServiceBusy = 140,
  4794. Init_VRWebHelperStartupFailed = 141,
  4795. Init_TrackerManagerInitFailed = 142,
  4796. Init_AlreadyRunning = 143,
  4797. Init_FailedForVrMonitor = 144,
  4798. Init_PropertyManagerInitFailed = 145,
  4799. Init_WebServerFailed = 146,
  4800. Init_IllegalTypeTransition = 147,
  4801. Init_MismatchedRuntimes = 148,
  4802. Init_InvalidProcessId = 149,
  4803. Init_VRServiceStartupFailed = 150,
  4804. Init_PrismNeedsNewDrivers = 151,
  4805. Init_PrismStartupTimedOut = 152,
  4806. Init_CouldNotStartPrism = 153,
  4807. Init_CreateDriverDirectDeviceFailed = 154,
  4808. Init_PrismExitedUnexpectedly = 155,
  4809. Driver_Failed = 200,
  4810. Driver_Unknown = 201,
  4811. Driver_HmdUnknown = 202,
  4812. Driver_NotLoaded = 203,
  4813. Driver_RuntimeOutOfDate = 204,
  4814. Driver_HmdInUse = 205,
  4815. Driver_NotCalibrated = 206,
  4816. Driver_CalibrationInvalid = 207,
  4817. Driver_HmdDisplayNotFound = 208,
  4818. Driver_TrackedDeviceInterfaceUnknown = 209,
  4819. Driver_HmdDriverIdOutOfBounds = 211,
  4820. Driver_HmdDisplayMirrored = 212,
  4821. Driver_HmdDisplayNotFoundLaptop = 213,
  4822. IPC_ServerInitFailed = 300,
  4823. IPC_ConnectFailed = 301,
  4824. IPC_SharedStateInitFailed = 302,
  4825. IPC_CompositorInitFailed = 303,
  4826. IPC_MutexInitFailed = 304,
  4827. IPC_Failed = 305,
  4828. IPC_CompositorConnectFailed = 306,
  4829. IPC_CompositorInvalidConnectResponse = 307,
  4830. IPC_ConnectFailedAfterMultipleAttempts = 308,
  4831. IPC_ConnectFailedAfterTargetExited = 309,
  4832. IPC_NamespaceUnavailable = 310,
  4833. Compositor_Failed = 400,
  4834. Compositor_D3D11HardwareRequired = 401,
  4835. Compositor_FirmwareRequiresUpdate = 402,
  4836. Compositor_OverlayInitFailed = 403,
  4837. Compositor_ScreenshotsInitFailed = 404,
  4838. Compositor_UnableToCreateDevice = 405,
  4839. Compositor_SharedStateIsNull = 406,
  4840. Compositor_NotificationManagerIsNull = 407,
  4841. Compositor_ResourceManagerClientIsNull = 408,
  4842. Compositor_MessageOverlaySharedStateInitFailure = 409,
  4843. Compositor_PropertiesInterfaceIsNull = 410,
  4844. Compositor_CreateFullscreenWindowFailed = 411,
  4845. Compositor_SettingsInterfaceIsNull = 412,
  4846. Compositor_FailedToShowWindow = 413,
  4847. Compositor_DistortInterfaceIsNull = 414,
  4848. Compositor_DisplayFrequencyFailure = 415,
  4849. Compositor_RendererInitializationFailed = 416,
  4850. Compositor_DXGIFactoryInterfaceIsNull = 417,
  4851. Compositor_DXGIFactoryCreateFailed = 418,
  4852. Compositor_DXGIFactoryQueryFailed = 419,
  4853. Compositor_InvalidAdapterDesktop = 420,
  4854. Compositor_InvalidHmdAttachment = 421,
  4855. Compositor_InvalidOutputDesktop = 422,
  4856. Compositor_InvalidDeviceProvided = 423,
  4857. Compositor_D3D11RendererInitializationFailed = 424,
  4858. Compositor_FailedToFindDisplayMode = 425,
  4859. Compositor_FailedToCreateSwapChain = 426,
  4860. Compositor_FailedToGetBackBuffer = 427,
  4861. Compositor_FailedToCreateRenderTarget = 428,
  4862. Compositor_FailedToCreateDXGI2SwapChain = 429,
  4863. Compositor_FailedtoGetDXGI2BackBuffer = 430,
  4864. Compositor_FailedToCreateDXGI2RenderTarget = 431,
  4865. Compositor_FailedToGetDXGIDeviceInterface = 432,
  4866. Compositor_SelectDisplayMode = 433,
  4867. Compositor_FailedToCreateNvAPIRenderTargets = 434,
  4868. Compositor_NvAPISetDisplayMode = 435,
  4869. Compositor_FailedToCreateDirectModeDisplay = 436,
  4870. Compositor_InvalidHmdPropertyContainer = 437,
  4871. Compositor_UpdateDisplayFrequency = 438,
  4872. Compositor_CreateRasterizerState = 439,
  4873. Compositor_CreateWireframeRasterizerState = 440,
  4874. Compositor_CreateSamplerState = 441,
  4875. Compositor_CreateClampToBorderSamplerState = 442,
  4876. Compositor_CreateAnisoSamplerState = 443,
  4877. Compositor_CreateOverlaySamplerState = 444,
  4878. Compositor_CreatePanoramaSamplerState = 445,
  4879. Compositor_CreateFontSamplerState = 446,
  4880. Compositor_CreateNoBlendState = 447,
  4881. Compositor_CreateBlendState = 448,
  4882. Compositor_CreateAlphaBlendState = 449,
  4883. Compositor_CreateBlendStateMaskR = 450,
  4884. Compositor_CreateBlendStateMaskG = 451,
  4885. Compositor_CreateBlendStateMaskB = 452,
  4886. Compositor_CreateDepthStencilState = 453,
  4887. Compositor_CreateDepthStencilStateNoWrite = 454,
  4888. Compositor_CreateDepthStencilStateNoDepth = 455,
  4889. Compositor_CreateFlushTexture = 456,
  4890. Compositor_CreateDistortionSurfaces = 457,
  4891. Compositor_CreateConstantBuffer = 458,
  4892. Compositor_CreateHmdPoseConstantBuffer = 459,
  4893. Compositor_CreateHmdPoseStagingConstantBuffer = 460,
  4894. Compositor_CreateSharedFrameInfoConstantBuffer = 461,
  4895. Compositor_CreateOverlayConstantBuffer = 462,
  4896. Compositor_CreateSceneTextureIndexConstantBuffer = 463,
  4897. Compositor_CreateReadableSceneTextureIndexConstantBuffer = 464,
  4898. Compositor_CreateLayerGraphicsTextureIndexConstantBuffer = 465,
  4899. Compositor_CreateLayerComputeTextureIndexConstantBuffer = 466,
  4900. Compositor_CreateLayerComputeSceneTextureIndexConstantBuffer = 467,
  4901. Compositor_CreateComputeHmdPoseConstantBuffer = 468,
  4902. Compositor_CreateGeomConstantBuffer = 469,
  4903. Compositor_CreatePanelMaskConstantBuffer = 470,
  4904. Compositor_CreatePixelSimUBO = 471,
  4905. Compositor_CreateMSAARenderTextures = 472,
  4906. Compositor_CreateResolveRenderTextures = 473,
  4907. Compositor_CreateComputeResolveRenderTextures = 474,
  4908. Compositor_CreateDriverDirectModeResolveTextures = 475,
  4909. Compositor_OpenDriverDirectModeResolveTextures = 476,
  4910. Compositor_CreateFallbackSyncTexture = 477,
  4911. Compositor_ShareFallbackSyncTexture = 478,
  4912. Compositor_CreateOverlayIndexBuffer = 479,
  4913. Compositor_CreateOverlayVertexBuffer = 480,
  4914. Compositor_CreateTextVertexBuffer = 481,
  4915. Compositor_CreateTextIndexBuffer = 482,
  4916. Compositor_CreateMirrorTextures = 483,
  4917. Compositor_CreateLastFrameRenderTexture = 484,
  4918. Compositor_CreateMirrorOverlay = 485,
  4919. Compositor_FailedToCreateVirtualDisplayBackbuffer = 486,
  4920. Compositor_DisplayModeNotSupported = 487,
  4921. Compositor_CreateOverlayInvalidCall = 488,
  4922. Compositor_CreateOverlayAlreadyInitialized = 489,
  4923. Compositor_FailedToCreateMailbox = 490,
  4924. Compositor_WindowInterfaceIsNull = 491,
  4925. Compositor_SystemLayerCreateInstance = 492,
  4926. Compositor_SystemLayerCreateSession = 493,
  4927. VendorSpecific_UnableToConnectToOculusRuntime = 1000,
  4928. VendorSpecific_WindowsNotInDevMode = 1001,
  4929. VendorSpecific_HmdFound_CantOpenDevice = 1101,
  4930. VendorSpecific_HmdFound_UnableToRequestConfigStart = 1102,
  4931. VendorSpecific_HmdFound_NoStoredConfig = 1103,
  4932. VendorSpecific_HmdFound_ConfigTooBig = 1104,
  4933. VendorSpecific_HmdFound_ConfigTooSmall = 1105,
  4934. VendorSpecific_HmdFound_UnableToInitZLib = 1106,
  4935. VendorSpecific_HmdFound_CantReadFirmwareVersion = 1107,
  4936. VendorSpecific_HmdFound_UnableToSendUserDataStart = 1108,
  4937. VendorSpecific_HmdFound_UnableToGetUserDataStart = 1109,
  4938. VendorSpecific_HmdFound_UnableToGetUserDataNext = 1110,
  4939. VendorSpecific_HmdFound_UserDataAddressRange = 1111,
  4940. VendorSpecific_HmdFound_UserDataError = 1112,
  4941. VendorSpecific_HmdFound_ConfigFailedSanityCheck = 1113,
  4942. VendorSpecific_OculusRuntimeBadInstall = 1114,
  4943. Steam_SteamInstallationNotFound = 2000,
  4944. LastError = 2001,
  4945. }
  4946. public enum EVRScreenshotType
  4947. {
  4948. None = 0,
  4949. Mono = 1,
  4950. Stereo = 2,
  4951. Cubemap = 3,
  4952. MonoPanorama = 4,
  4953. StereoPanorama = 5,
  4954. }
  4955. public enum EVRScreenshotPropertyFilenames
  4956. {
  4957. Preview = 0,
  4958. VR = 1,
  4959. }
  4960. public enum EVRTrackedCameraError
  4961. {
  4962. None = 0,
  4963. OperationFailed = 100,
  4964. InvalidHandle = 101,
  4965. InvalidFrameHeaderVersion = 102,
  4966. OutOfHandles = 103,
  4967. IPCFailure = 104,
  4968. NotSupportedForThisDevice = 105,
  4969. SharedMemoryFailure = 106,
  4970. FrameBufferingFailure = 107,
  4971. StreamSetupFailure = 108,
  4972. InvalidGLTextureId = 109,
  4973. InvalidSharedTextureHandle = 110,
  4974. FailedToGetGLTextureId = 111,
  4975. SharedTextureFailure = 112,
  4976. NoFrameAvailable = 113,
  4977. InvalidArgument = 114,
  4978. InvalidFrameBufferSize = 115,
  4979. }
  4980. public enum EVRTrackedCameraFrameLayout
  4981. {
  4982. Mono = 1,
  4983. Stereo = 2,
  4984. VerticalLayout = 16,
  4985. HorizontalLayout = 32,
  4986. }
  4987. public enum EVRTrackedCameraFrameType
  4988. {
  4989. Distorted = 0,
  4990. Undistorted = 1,
  4991. MaximumUndistorted = 2,
  4992. MAX_CAMERA_FRAME_TYPES = 3,
  4993. }
  4994. public enum EVRDistortionFunctionType
  4995. {
  4996. None = 0,
  4997. FTheta = 1,
  4998. Extended_FTheta = 2,
  4999. MAX_DISTORTION_FUNCTION_TYPES = 3,
  5000. }
  5001. public enum EVSync
  5002. {
  5003. None = 0,
  5004. WaitRender = 1,
  5005. NoWaitRender = 2,
  5006. }
  5007. public enum EVRMuraCorrectionMode
  5008. {
  5009. Default = 0,
  5010. NoCorrection = 1,
  5011. }
  5012. public enum Imu_OffScaleFlags
  5013. {
  5014. OffScale_AccelX = 1,
  5015. OffScale_AccelY = 2,
  5016. OffScale_AccelZ = 4,
  5017. OffScale_GyroX = 8,
  5018. OffScale_GyroY = 16,
  5019. OffScale_GyroZ = 32,
  5020. }
  5021. public enum EVRApplicationError
  5022. {
  5023. None = 0,
  5024. AppKeyAlreadyExists = 100,
  5025. NoManifest = 101,
  5026. NoApplication = 102,
  5027. InvalidIndex = 103,
  5028. UnknownApplication = 104,
  5029. IPCFailed = 105,
  5030. ApplicationAlreadyRunning = 106,
  5031. InvalidManifest = 107,
  5032. InvalidApplication = 108,
  5033. LaunchFailed = 109,
  5034. ApplicationAlreadyStarting = 110,
  5035. LaunchInProgress = 111,
  5036. OldApplicationQuitting = 112,
  5037. TransitionAborted = 113,
  5038. IsTemplate = 114,
  5039. SteamVRIsExiting = 115,
  5040. BufferTooSmall = 200,
  5041. PropertyNotSet = 201,
  5042. UnknownProperty = 202,
  5043. InvalidParameter = 203,
  5044. NotImplemented = 300,
  5045. }
  5046. public enum EVRApplicationProperty
  5047. {
  5048. Name_String = 0,
  5049. LaunchType_String = 11,
  5050. WorkingDirectory_String = 12,
  5051. BinaryPath_String = 13,
  5052. Arguments_String = 14,
  5053. URL_String = 15,
  5054. Description_String = 50,
  5055. NewsURL_String = 51,
  5056. ImagePath_String = 52,
  5057. Source_String = 53,
  5058. ActionManifestURL_String = 54,
  5059. IsDashboardOverlay_Bool = 60,
  5060. IsTemplate_Bool = 61,
  5061. IsInstanced_Bool = 62,
  5062. IsInternal_Bool = 63,
  5063. WantsCompositorPauseInStandby_Bool = 64,
  5064. IsHidden_Bool = 65,
  5065. LastLaunchTime_Uint64 = 70,
  5066. }
  5067. public enum EVRSceneApplicationState
  5068. {
  5069. None = 0,
  5070. Starting = 1,
  5071. Quitting = 2,
  5072. Running = 3,
  5073. Waiting = 4,
  5074. }
  5075. public enum ChaperoneCalibrationState
  5076. {
  5077. OK = 1,
  5078. Warning = 100,
  5079. Warning_BaseStationMayHaveMoved = 101,
  5080. Warning_BaseStationRemoved = 102,
  5081. Warning_SeatedBoundsInvalid = 103,
  5082. Error = 200,
  5083. Error_BaseStationUninitialized = 201,
  5084. Error_BaseStationConflict = 202,
  5085. Error_PlayAreaInvalid = 203,
  5086. Error_CollisionBoundsInvalid = 204,
  5087. }
  5088. public enum EChaperoneConfigFile
  5089. {
  5090. Live = 1,
  5091. Temp = 2,
  5092. }
  5093. public enum EChaperoneImportFlags
  5094. {
  5095. EChaperoneImport_BoundsOnly = 1,
  5096. }
  5097. public enum EVRCompositorError
  5098. {
  5099. None = 0,
  5100. RequestFailed = 1,
  5101. IncompatibleVersion = 100,
  5102. DoNotHaveFocus = 101,
  5103. InvalidTexture = 102,
  5104. IsNotSceneApplication = 103,
  5105. TextureIsOnWrongDevice = 104,
  5106. TextureUsesUnsupportedFormat = 105,
  5107. SharedTexturesNotSupported = 106,
  5108. IndexOutOfRange = 107,
  5109. AlreadySubmitted = 108,
  5110. InvalidBounds = 109,
  5111. AlreadySet = 110,
  5112. }
  5113. public enum EVRCompositorTimingMode
  5114. {
  5115. Implicit = 0,
  5116. Explicit_RuntimePerformsPostPresentHandoff = 1,
  5117. Explicit_ApplicationPerformsPostPresentHandoff = 2,
  5118. }
  5119. public enum VROverlayInputMethod
  5120. {
  5121. None = 0,
  5122. Mouse = 1,
  5123. }
  5124. public enum VROverlayTransformType
  5125. {
  5126. VROverlayTransform_Invalid = -1,
  5127. VROverlayTransform_Absolute = 0,
  5128. VROverlayTransform_TrackedDeviceRelative = 1,
  5129. VROverlayTransform_SystemOverlay = 2,
  5130. VROverlayTransform_TrackedComponent = 3,
  5131. VROverlayTransform_Cursor = 4,
  5132. VROverlayTransform_DashboardTab = 5,
  5133. VROverlayTransform_DashboardThumb = 6,
  5134. VROverlayTransform_Mountable = 7,
  5135. VROverlayTransform_Projection = 8,
  5136. }
  5137. public enum VROverlayFlags
  5138. {
  5139. NoDashboardTab = 8,
  5140. SendVRDiscreteScrollEvents = 64,
  5141. SendVRTouchpadEvents = 128,
  5142. ShowTouchPadScrollWheel = 256,
  5143. TransferOwnershipToInternalProcess = 512,
  5144. SideBySide_Parallel = 1024,
  5145. SideBySide_Crossed = 2048,
  5146. Panorama = 4096,
  5147. StereoPanorama = 8192,
  5148. SortWithNonSceneOverlays = 16384,
  5149. VisibleInDashboard = 32768,
  5150. MakeOverlaysInteractiveIfVisible = 65536,
  5151. SendVRSmoothScrollEvents = 131072,
  5152. ProtectedContent = 262144,
  5153. HideLaserIntersection = 524288,
  5154. WantsModalBehavior = 1048576,
  5155. IsPremultiplied = 2097152,
  5156. }
  5157. public enum VRMessageOverlayResponse
  5158. {
  5159. ButtonPress_0 = 0,
  5160. ButtonPress_1 = 1,
  5161. ButtonPress_2 = 2,
  5162. ButtonPress_3 = 3,
  5163. CouldntFindSystemOverlay = 4,
  5164. CouldntFindOrCreateClientOverlay = 5,
  5165. ApplicationQuit = 6,
  5166. }
  5167. public enum EGamepadTextInputMode
  5168. {
  5169. k_EGamepadTextInputModeNormal = 0,
  5170. k_EGamepadTextInputModePassword = 1,
  5171. k_EGamepadTextInputModeSubmit = 2,
  5172. }
  5173. public enum EGamepadTextInputLineMode
  5174. {
  5175. k_EGamepadTextInputLineModeSingleLine = 0,
  5176. k_EGamepadTextInputLineModeMultipleLines = 1,
  5177. }
  5178. public enum EVROverlayIntersectionMaskPrimitiveType
  5179. {
  5180. OverlayIntersectionPrimitiveType_Rectangle = 0,
  5181. OverlayIntersectionPrimitiveType_Circle = 1,
  5182. }
  5183. public enum EKeyboardFlags
  5184. {
  5185. KeyboardFlag_Minimal = 1,
  5186. KeyboardFlag_Modal = 2,
  5187. }
  5188. public enum EDeviceType
  5189. {
  5190. Invalid = -1,
  5191. DirectX11 = 0,
  5192. Vulkan = 1,
  5193. }
  5194. public enum HeadsetViewMode_t
  5195. {
  5196. HeadsetViewMode_Left = 0,
  5197. HeadsetViewMode_Right = 1,
  5198. HeadsetViewMode_Both = 2,
  5199. }
  5200. public enum EVRRenderModelError
  5201. {
  5202. None = 0,
  5203. Loading = 100,
  5204. NotSupported = 200,
  5205. InvalidArg = 300,
  5206. InvalidModel = 301,
  5207. NoShapes = 302,
  5208. MultipleShapes = 303,
  5209. TooManyVertices = 304,
  5210. MultipleTextures = 305,
  5211. BufferTooSmall = 306,
  5212. NotEnoughNormals = 307,
  5213. NotEnoughTexCoords = 308,
  5214. InvalidTexture = 400,
  5215. }
  5216. public enum EVRRenderModelTextureFormat
  5217. {
  5218. RGBA8_SRGB = 0,
  5219. BC2 = 1,
  5220. BC4 = 2,
  5221. BC7 = 3,
  5222. BC7_SRGB = 4,
  5223. }
  5224. public enum EVRNotificationType
  5225. {
  5226. Transient = 0,
  5227. Persistent = 1,
  5228. Transient_SystemWithUserValue = 2,
  5229. }
  5230. public enum EVRNotificationStyle
  5231. {
  5232. None = 0,
  5233. Application = 100,
  5234. Contact_Disabled = 200,
  5235. Contact_Enabled = 201,
  5236. Contact_Active = 202,
  5237. }
  5238. public enum EVRSettingsError
  5239. {
  5240. None = 0,
  5241. IPCFailed = 1,
  5242. WriteFailed = 2,
  5243. ReadFailed = 3,
  5244. JsonParseFailed = 4,
  5245. UnsetSettingHasNoDefault = 5,
  5246. }
  5247. public enum EVRScreenshotError
  5248. {
  5249. None = 0,
  5250. RequestFailed = 1,
  5251. IncompatibleVersion = 100,
  5252. NotFound = 101,
  5253. BufferTooSmall = 102,
  5254. ScreenshotAlreadyInProgress = 108,
  5255. }
  5256. public enum EVRSkeletalTransformSpace
  5257. {
  5258. Model = 0,
  5259. Parent = 1,
  5260. }
  5261. public enum EVRSkeletalReferencePose
  5262. {
  5263. BindPose = 0,
  5264. OpenHand = 1,
  5265. Fist = 2,
  5266. GripLimit = 3,
  5267. }
  5268. public enum EVRFinger
  5269. {
  5270. Thumb = 0,
  5271. Index = 1,
  5272. Middle = 2,
  5273. Ring = 3,
  5274. Pinky = 4,
  5275. Count = 5,
  5276. }
  5277. public enum EVRFingerSplay
  5278. {
  5279. Thumb_Index = 0,
  5280. Index_Middle = 1,
  5281. Middle_Ring = 2,
  5282. Ring_Pinky = 3,
  5283. Count = 4,
  5284. }
  5285. public enum EVRSummaryType
  5286. {
  5287. FromAnimation = 0,
  5288. FromDevice = 1,
  5289. }
  5290. public enum EVRInputFilterCancelType
  5291. {
  5292. VRInputFilterCancel_Timers = 0,
  5293. VRInputFilterCancel_Momentum = 1,
  5294. }
  5295. public enum EVRInputStringBits
  5296. {
  5297. VRInputString_Hand = 1,
  5298. VRInputString_ControllerType = 2,
  5299. VRInputString_InputSource = 4,
  5300. VRInputString_All = -1,
  5301. }
  5302. public enum EIOBufferError
  5303. {
  5304. IOBuffer_Success = 0,
  5305. IOBuffer_OperationFailed = 100,
  5306. IOBuffer_InvalidHandle = 101,
  5307. IOBuffer_InvalidArgument = 102,
  5308. IOBuffer_PathExists = 103,
  5309. IOBuffer_PathDoesNotExist = 104,
  5310. IOBuffer_Permission = 105,
  5311. }
  5312. public enum EIOBufferMode
  5313. {
  5314. Read = 1,
  5315. Write = 2,
  5316. Create = 512,
  5317. }
  5318. public enum EVRDebugError
  5319. {
  5320. Success = 0,
  5321. BadParameter = 1,
  5322. }
  5323. public enum EPropertyWriteType
  5324. {
  5325. PropertyWrite_Set = 0,
  5326. PropertyWrite_Erase = 1,
  5327. PropertyWrite_SetError = 2,
  5328. }
  5329. public enum EBlockQueueError
  5330. {
  5331. None = 0,
  5332. QueueAlreadyExists = 1,
  5333. QueueNotFound = 2,
  5334. BlockNotAvailable = 3,
  5335. InvalidHandle = 4,
  5336. InvalidParam = 5,
  5337. ParamMismatch = 6,
  5338. InternalError = 7,
  5339. AlreadyInitialized = 8,
  5340. OperationIsServerOnly = 9,
  5341. TooManyConnections = 10,
  5342. }
  5343. public enum EBlockQueueReadType
  5344. {
  5345. BlockQueueRead_Latest = 0,
  5346. BlockQueueRead_New = 1,
  5347. BlockQueueRead_Next = 2,
  5348. }
  5349. [StructLayout(LayoutKind.Explicit)] public struct VREvent_Data_t
  5350. {
  5351. [FieldOffset(0)] public VREvent_Reserved_t reserved;
  5352. [FieldOffset(0)] public VREvent_Controller_t controller;
  5353. [FieldOffset(0)] public VREvent_Mouse_t mouse;
  5354. [FieldOffset(0)] public VREvent_Scroll_t scroll;
  5355. [FieldOffset(0)] public VREvent_Process_t process;
  5356. [FieldOffset(0)] public VREvent_Notification_t notification;
  5357. [FieldOffset(0)] public VREvent_Overlay_t overlay;
  5358. [FieldOffset(0)] public VREvent_Status_t status;
  5359. [FieldOffset(0)] public VREvent_Ipd_t ipd;
  5360. [FieldOffset(0)] public VREvent_Chaperone_t chaperone;
  5361. [FieldOffset(0)] public VREvent_PerformanceTest_t performanceTest;
  5362. [FieldOffset(0)] public VREvent_TouchPadMove_t touchPadMove;
  5363. [FieldOffset(0)] public VREvent_SeatedZeroPoseReset_t seatedZeroPoseReset;
  5364. [FieldOffset(0)] public VREvent_Screenshot_t screenshot;
  5365. [FieldOffset(0)] public VREvent_ScreenshotProgress_t screenshotProgress;
  5366. [FieldOffset(0)] public VREvent_ApplicationLaunch_t applicationLaunch;
  5367. [FieldOffset(0)] public VREvent_EditingCameraSurface_t cameraSurface;
  5368. [FieldOffset(0)] public VREvent_MessageOverlay_t messageOverlay;
  5369. [FieldOffset(0)] public VREvent_Property_t property;
  5370. [FieldOffset(0)] public VREvent_HapticVibration_t hapticVibration;
  5371. [FieldOffset(0)] public VREvent_WebConsole_t webConsole;
  5372. [FieldOffset(0)] public VREvent_InputBindingLoad_t inputBinding;
  5373. [FieldOffset(0)] public VREvent_SpatialAnchor_t spatialAnchor;
  5374. [FieldOffset(0)] public VREvent_InputActionManifestLoad_t actionManifest;
  5375. [FieldOffset(0)] public VREvent_ProgressUpdate_t progressUpdate;
  5376. [FieldOffset(0)] public VREvent_ShowUI_t showUi;
  5377. [FieldOffset(0)] public VREvent_ShowDevTools_t showDevTools;
  5378. [FieldOffset(0)] public VREvent_HDCPError_t hdcpError;
  5379. [FieldOffset(0)] public VREvent_Keyboard_t keyboard; // This has to be at the end due to a mono bug
  5380. }
  5381. [StructLayout(LayoutKind.Explicit)] public struct VROverlayIntersectionMaskPrimitive_Data_t
  5382. {
  5383. [FieldOffset(0)] public IntersectionMaskRectangle_t m_Rectangle;
  5384. [FieldOffset(0)] public IntersectionMaskCircle_t m_Circle;
  5385. }
  5386. [StructLayout(LayoutKind.Sequential)] public struct HmdMatrix34_t
  5387. {
  5388. public float m0; //float[3][4]
  5389. public float m1;
  5390. public float m2;
  5391. public float m3;
  5392. public float m4;
  5393. public float m5;
  5394. public float m6;
  5395. public float m7;
  5396. public float m8;
  5397. public float m9;
  5398. public float m10;
  5399. public float m11;
  5400. #if UNITY_5_3_OR_NEWER
  5401. public Vector3 GetPosition()
  5402. {
  5403. return new Vector3(m3, m7, -m11);
  5404. }
  5405. public bool IsRotationValid()
  5406. {
  5407. return ((m2 != 0 || m6 != 0 || m10 != 0) && (m1 != 0 || m5 != 0 || m9 != 0));
  5408. }
  5409. public Quaternion GetRotation()
  5410. {
  5411. if (IsRotationValid())
  5412. {
  5413. float w = Mathf.Sqrt(Mathf.Max(0, 1 + m0 + m5 + m10)) / 2;
  5414. float x = Mathf.Sqrt(Mathf.Max(0, 1 + m0 - m5 - m10)) / 2;
  5415. float y = Mathf.Sqrt(Mathf.Max(0, 1 - m0 + m5 - m10)) / 2;
  5416. float z = Mathf.Sqrt(Mathf.Max(0, 1 - m0 - m5 + m10)) / 2;
  5417. _copysign(ref x, -m9 - -m6);
  5418. _copysign(ref y, -m2 - -m8);
  5419. _copysign(ref z, m4 - m1);
  5420. return new Quaternion(x, y, z, w);
  5421. }
  5422. return Quaternion.identity;
  5423. }
  5424. private static void _copysign(ref float sizeval, float signval)
  5425. {
  5426. if (signval > 0 != sizeval > 0)
  5427. sizeval = -sizeval;
  5428. }
  5429. #endif
  5430. }
  5431. [StructLayout(LayoutKind.Sequential)] public struct HmdMatrix33_t
  5432. {
  5433. public float m0; //float[3][3]
  5434. public float m1;
  5435. public float m2;
  5436. public float m3;
  5437. public float m4;
  5438. public float m5;
  5439. public float m6;
  5440. public float m7;
  5441. public float m8;
  5442. }
  5443. [StructLayout(LayoutKind.Sequential)] public struct HmdMatrix44_t
  5444. {
  5445. public float m0; //float[4][4]
  5446. public float m1;
  5447. public float m2;
  5448. public float m3;
  5449. public float m4;
  5450. public float m5;
  5451. public float m6;
  5452. public float m7;
  5453. public float m8;
  5454. public float m9;
  5455. public float m10;
  5456. public float m11;
  5457. public float m12;
  5458. public float m13;
  5459. public float m14;
  5460. public float m15;
  5461. }
  5462. [StructLayout(LayoutKind.Sequential)] public struct HmdVector3_t
  5463. {
  5464. public float v0; //float[3]
  5465. public float v1;
  5466. public float v2;
  5467. }
  5468. [StructLayout(LayoutKind.Sequential)] public struct HmdVector4_t
  5469. {
  5470. public float v0; //float[4]
  5471. public float v1;
  5472. public float v2;
  5473. public float v3;
  5474. }
  5475. [StructLayout(LayoutKind.Sequential)] public struct HmdVector3d_t
  5476. {
  5477. public double v0; //double[3]
  5478. public double v1;
  5479. public double v2;
  5480. }
  5481. [StructLayout(LayoutKind.Sequential)] public struct HmdVector2_t
  5482. {
  5483. public float v0; //float[2]
  5484. public float v1;
  5485. }
  5486. [StructLayout(LayoutKind.Sequential)] public struct HmdQuaternion_t
  5487. {
  5488. public double w;
  5489. public double x;
  5490. public double y;
  5491. public double z;
  5492. }
  5493. [StructLayout(LayoutKind.Sequential)] public struct HmdQuaternionf_t
  5494. {
  5495. public float w;
  5496. public float x;
  5497. public float y;
  5498. public float z;
  5499. }
  5500. [StructLayout(LayoutKind.Sequential)] public struct HmdColor_t
  5501. {
  5502. public float r;
  5503. public float g;
  5504. public float b;
  5505. public float a;
  5506. }
  5507. [StructLayout(LayoutKind.Sequential)] public struct HmdQuad_t
  5508. {
  5509. public HmdVector3_t vCorners0; //HmdVector3_t[4]
  5510. public HmdVector3_t vCorners1;
  5511. public HmdVector3_t vCorners2;
  5512. public HmdVector3_t vCorners3;
  5513. }
  5514. [StructLayout(LayoutKind.Sequential)] public struct HmdRect2_t
  5515. {
  5516. public HmdVector2_t vTopLeft;
  5517. public HmdVector2_t vBottomRight;
  5518. }
  5519. [StructLayout(LayoutKind.Sequential)] public struct VRBoneTransform_t
  5520. {
  5521. public HmdVector4_t position;
  5522. public HmdQuaternionf_t orientation;
  5523. }
  5524. [StructLayout(LayoutKind.Sequential)] public struct DistortionCoordinates_t
  5525. {
  5526. public float rfRed0; //float[2]
  5527. public float rfRed1;
  5528. public float rfGreen0; //float[2]
  5529. public float rfGreen1;
  5530. public float rfBlue0; //float[2]
  5531. public float rfBlue1;
  5532. }
  5533. [StructLayout(LayoutKind.Sequential)] public struct Texture_t
  5534. {
  5535. public IntPtr handle; // void *
  5536. public ETextureType eType;
  5537. public EColorSpace eColorSpace;
  5538. }
  5539. [StructLayout(LayoutKind.Sequential)] public struct TrackedDevicePose_t
  5540. {
  5541. public HmdMatrix34_t mDeviceToAbsoluteTracking;
  5542. public HmdVector3_t vVelocity;
  5543. public HmdVector3_t vAngularVelocity;
  5544. public ETrackingResult eTrackingResult;
  5545. [MarshalAs(UnmanagedType.I1)]
  5546. public bool bPoseIsValid;
  5547. [MarshalAs(UnmanagedType.I1)]
  5548. public bool bDeviceIsConnected;
  5549. }
  5550. [StructLayout(LayoutKind.Sequential)] public struct VRTextureBounds_t
  5551. {
  5552. public float uMin;
  5553. public float vMin;
  5554. public float uMax;
  5555. public float vMax;
  5556. }
  5557. [StructLayout(LayoutKind.Sequential)] public struct VRTextureWithPose_t
  5558. {
  5559. public IntPtr handle; // void *
  5560. public ETextureType eType;
  5561. public EColorSpace eColorSpace;
  5562. public HmdMatrix34_t mDeviceToAbsoluteTracking;
  5563. }
  5564. [StructLayout(LayoutKind.Sequential)] public struct VRTextureDepthInfo_t
  5565. {
  5566. public IntPtr handle; // void *
  5567. public HmdMatrix44_t mProjection;
  5568. public HmdVector2_t vRange;
  5569. }
  5570. [StructLayout(LayoutKind.Sequential)] public struct VRTextureWithDepth_t
  5571. {
  5572. public IntPtr handle; // void *
  5573. public ETextureType eType;
  5574. public EColorSpace eColorSpace;
  5575. public VRTextureDepthInfo_t depth;
  5576. }
  5577. [StructLayout(LayoutKind.Sequential)] public struct VRTextureWithPoseAndDepth_t
  5578. {
  5579. public IntPtr handle; // void *
  5580. public ETextureType eType;
  5581. public EColorSpace eColorSpace;
  5582. public HmdMatrix34_t mDeviceToAbsoluteTracking;
  5583. public VRTextureDepthInfo_t depth;
  5584. }
  5585. [StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureData_t
  5586. {
  5587. public ulong m_nImage;
  5588. public IntPtr m_pDevice; // struct VkDevice_T *
  5589. public IntPtr m_pPhysicalDevice; // struct VkPhysicalDevice_T *
  5590. public IntPtr m_pInstance; // struct VkInstance_T *
  5591. public IntPtr m_pQueue; // struct VkQueue_T *
  5592. public uint m_nQueueFamilyIndex;
  5593. public uint m_nWidth;
  5594. public uint m_nHeight;
  5595. public uint m_nFormat;
  5596. public uint m_nSampleCount;
  5597. }
  5598. [StructLayout(LayoutKind.Sequential)] public struct VRVulkanTextureArrayData_t
  5599. {
  5600. public uint m_unArrayIndex;
  5601. public uint m_unArraySize;
  5602. }
  5603. [StructLayout(LayoutKind.Sequential)] public struct D3D12TextureData_t
  5604. {
  5605. public IntPtr m_pResource; // struct ID3D12Resource *
  5606. public IntPtr m_pCommandQueue; // struct ID3D12CommandQueue *
  5607. public uint m_nNodeMask;
  5608. }
  5609. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Controller_t
  5610. {
  5611. public uint button;
  5612. }
  5613. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Mouse_t
  5614. {
  5615. public float x;
  5616. public float y;
  5617. public uint button;
  5618. }
  5619. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Scroll_t
  5620. {
  5621. public float xdelta;
  5622. public float ydelta;
  5623. public uint unused;
  5624. public float viewportscale;
  5625. }
  5626. [StructLayout(LayoutKind.Sequential)] public struct VREvent_TouchPadMove_t
  5627. {
  5628. [MarshalAs(UnmanagedType.I1)]
  5629. public bool bFingerDown;
  5630. public float flSecondsFingerDown;
  5631. public float fValueXFirst;
  5632. public float fValueYFirst;
  5633. public float fValueXRaw;
  5634. public float fValueYRaw;
  5635. }
  5636. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Notification_t
  5637. {
  5638. public ulong ulUserValue;
  5639. public uint notificationId;
  5640. }
  5641. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Process_t
  5642. {
  5643. public uint pid;
  5644. public uint oldPid;
  5645. [MarshalAs(UnmanagedType.I1)]
  5646. public bool bForced;
  5647. [MarshalAs(UnmanagedType.I1)]
  5648. public bool bConnectionLost;
  5649. }
  5650. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Overlay_t
  5651. {
  5652. public ulong overlayHandle;
  5653. public ulong devicePath;
  5654. public ulong memoryBlockId;
  5655. }
  5656. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Status_t
  5657. {
  5658. public uint statusState;
  5659. }
  5660. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Keyboard_t
  5661. {
  5662. public byte cNewInput0,cNewInput1,cNewInput2,cNewInput3,cNewInput4,cNewInput5,cNewInput6,cNewInput7;
  5663. public string cNewInput
  5664. {
  5665. get
  5666. {
  5667. return new string(new char[] {
  5668. (char)cNewInput0,
  5669. (char)cNewInput1,
  5670. (char)cNewInput2,
  5671. (char)cNewInput3,
  5672. (char)cNewInput4,
  5673. (char)cNewInput5,
  5674. (char)cNewInput6,
  5675. (char)cNewInput7
  5676. }).TrimEnd('\0');
  5677. }
  5678. }
  5679. public ulong uUserValue;
  5680. }
  5681. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Ipd_t
  5682. {
  5683. public float ipdMeters;
  5684. }
  5685. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Chaperone_t
  5686. {
  5687. public ulong m_nPreviousUniverse;
  5688. public ulong m_nCurrentUniverse;
  5689. }
  5690. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Reserved_t
  5691. {
  5692. public ulong reserved0;
  5693. public ulong reserved1;
  5694. public ulong reserved2;
  5695. public ulong reserved3;
  5696. public ulong reserved4;
  5697. public ulong reserved5;
  5698. }
  5699. [StructLayout(LayoutKind.Sequential)] public struct VREvent_PerformanceTest_t
  5700. {
  5701. public uint m_nFidelityLevel;
  5702. }
  5703. [StructLayout(LayoutKind.Sequential)] public struct VREvent_SeatedZeroPoseReset_t
  5704. {
  5705. [MarshalAs(UnmanagedType.I1)]
  5706. public bool bResetBySystemMenu;
  5707. }
  5708. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Screenshot_t
  5709. {
  5710. public uint handle;
  5711. public uint type;
  5712. }
  5713. [StructLayout(LayoutKind.Sequential)] public struct VREvent_ScreenshotProgress_t
  5714. {
  5715. public float progress;
  5716. }
  5717. [StructLayout(LayoutKind.Sequential)] public struct VREvent_ApplicationLaunch_t
  5718. {
  5719. public uint pid;
  5720. public uint unArgsHandle;
  5721. }
  5722. [StructLayout(LayoutKind.Sequential)] public struct VREvent_EditingCameraSurface_t
  5723. {
  5724. public ulong overlayHandle;
  5725. public uint nVisualMode;
  5726. }
  5727. [StructLayout(LayoutKind.Sequential)] public struct VREvent_MessageOverlay_t
  5728. {
  5729. public uint unVRMessageOverlayResponse;
  5730. }
  5731. [StructLayout(LayoutKind.Sequential)] public struct VREvent_Property_t
  5732. {
  5733. public ulong container;
  5734. public ETrackedDeviceProperty prop;
  5735. }
  5736. [StructLayout(LayoutKind.Sequential)] public struct VREvent_HapticVibration_t
  5737. {
  5738. public ulong containerHandle;
  5739. public ulong componentHandle;
  5740. public float fDurationSeconds;
  5741. public float fFrequency;
  5742. public float fAmplitude;
  5743. }
  5744. [StructLayout(LayoutKind.Sequential)] public struct VREvent_WebConsole_t
  5745. {
  5746. public ulong webConsoleHandle;
  5747. }
  5748. [StructLayout(LayoutKind.Sequential)] public struct VREvent_InputBindingLoad_t
  5749. {
  5750. public ulong ulAppContainer;
  5751. public ulong pathMessage;
  5752. public ulong pathUrl;
  5753. public ulong pathControllerType;
  5754. }
  5755. [StructLayout(LayoutKind.Sequential)] public struct VREvent_InputActionManifestLoad_t
  5756. {
  5757. public ulong pathAppKey;
  5758. public ulong pathMessage;
  5759. public ulong pathMessageParam;
  5760. public ulong pathManifestPath;
  5761. }
  5762. [StructLayout(LayoutKind.Sequential)] public struct VREvent_SpatialAnchor_t
  5763. {
  5764. public uint unHandle;
  5765. }
  5766. [StructLayout(LayoutKind.Sequential)] public struct VREvent_ProgressUpdate_t
  5767. {
  5768. public ulong ulApplicationPropertyContainer;
  5769. public ulong pathDevice;
  5770. public ulong pathInputSource;
  5771. public ulong pathProgressAction;
  5772. public ulong pathIcon;
  5773. public float fProgress;
  5774. }
  5775. [StructLayout(LayoutKind.Sequential)] public struct VREvent_ShowUI_t
  5776. {
  5777. public EShowUIType eType;
  5778. }
  5779. [StructLayout(LayoutKind.Sequential)] public struct VREvent_ShowDevTools_t
  5780. {
  5781. public int nBrowserIdentifier;
  5782. }
  5783. [StructLayout(LayoutKind.Sequential)] public struct VREvent_HDCPError_t
  5784. {
  5785. public EHDCPError eCode;
  5786. }
  5787. [StructLayout(LayoutKind.Sequential)] public struct VREvent_t
  5788. {
  5789. public uint eventType;
  5790. public uint trackedDeviceIndex;
  5791. public float eventAgeSeconds;
  5792. public VREvent_Data_t data;
  5793. }
  5794. // This structure is for backwards binary compatibility on Linux and OSX only
  5795. [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct VREvent_t_Packed
  5796. {
  5797. public uint eventType;
  5798. public uint trackedDeviceIndex;
  5799. public float eventAgeSeconds;
  5800. public VREvent_Data_t data;
  5801. public VREvent_t_Packed(VREvent_t unpacked)
  5802. {
  5803. this.eventType = unpacked.eventType;
  5804. this.trackedDeviceIndex = unpacked.trackedDeviceIndex;
  5805. this.eventAgeSeconds = unpacked.eventAgeSeconds;
  5806. this.data = unpacked.data;
  5807. }
  5808. public void Unpack(ref VREvent_t unpacked)
  5809. {
  5810. unpacked.eventType = this.eventType;
  5811. unpacked.trackedDeviceIndex = this.trackedDeviceIndex;
  5812. unpacked.eventAgeSeconds = this.eventAgeSeconds;
  5813. unpacked.data = this.data;
  5814. }
  5815. }
  5816. [StructLayout(LayoutKind.Sequential)] public struct RenderModel_ComponentState_t
  5817. {
  5818. public HmdMatrix34_t mTrackingToComponentRenderModel;
  5819. public HmdMatrix34_t mTrackingToComponentLocal;
  5820. public uint uProperties;
  5821. }
  5822. [StructLayout(LayoutKind.Sequential)] public struct HiddenAreaMesh_t
  5823. {
  5824. public IntPtr pVertexData; // const struct vr::HmdVector2_t *
  5825. public uint unTriangleCount;
  5826. }
  5827. [StructLayout(LayoutKind.Sequential)] public struct VRControllerAxis_t
  5828. {
  5829. public float x;
  5830. public float y;
  5831. }
  5832. [StructLayout(LayoutKind.Sequential)] public struct VRControllerState_t
  5833. {
  5834. public uint unPacketNum;
  5835. public ulong ulButtonPressed;
  5836. public ulong ulButtonTouched;
  5837. public VRControllerAxis_t rAxis0; //VRControllerAxis_t[5]
  5838. public VRControllerAxis_t rAxis1;
  5839. public VRControllerAxis_t rAxis2;
  5840. public VRControllerAxis_t rAxis3;
  5841. public VRControllerAxis_t rAxis4;
  5842. }
  5843. // This structure is for backwards binary compatibility on Linux and OSX only
  5844. [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct VRControllerState_t_Packed
  5845. {
  5846. public uint unPacketNum;
  5847. public ulong ulButtonPressed;
  5848. public ulong ulButtonTouched;
  5849. public VRControllerAxis_t rAxis0; //VRControllerAxis_t[5]
  5850. public VRControllerAxis_t rAxis1;
  5851. public VRControllerAxis_t rAxis2;
  5852. public VRControllerAxis_t rAxis3;
  5853. public VRControllerAxis_t rAxis4;
  5854. public VRControllerState_t_Packed(VRControllerState_t unpacked)
  5855. {
  5856. this.unPacketNum = unpacked.unPacketNum;
  5857. this.ulButtonPressed = unpacked.ulButtonPressed;
  5858. this.ulButtonTouched = unpacked.ulButtonTouched;
  5859. this.rAxis0 = unpacked.rAxis0;
  5860. this.rAxis1 = unpacked.rAxis1;
  5861. this.rAxis2 = unpacked.rAxis2;
  5862. this.rAxis3 = unpacked.rAxis3;
  5863. this.rAxis4 = unpacked.rAxis4;
  5864. }
  5865. public void Unpack(ref VRControllerState_t unpacked)
  5866. {
  5867. unpacked.unPacketNum = this.unPacketNum;
  5868. unpacked.ulButtonPressed = this.ulButtonPressed;
  5869. unpacked.ulButtonTouched = this.ulButtonTouched;
  5870. unpacked.rAxis0 = this.rAxis0;
  5871. unpacked.rAxis1 = this.rAxis1;
  5872. unpacked.rAxis2 = this.rAxis2;
  5873. unpacked.rAxis3 = this.rAxis3;
  5874. unpacked.rAxis4 = this.rAxis4;
  5875. }
  5876. }
  5877. [StructLayout(LayoutKind.Sequential)] public struct CameraVideoStreamFrameHeader_t
  5878. {
  5879. public EVRTrackedCameraFrameType eFrameType;
  5880. public uint nWidth;
  5881. public uint nHeight;
  5882. public uint nBytesPerPixel;
  5883. public uint nFrameSequence;
  5884. public TrackedDevicePose_t trackedDevicePose;
  5885. public ulong ulFrameExposureTime;
  5886. }
  5887. [StructLayout(LayoutKind.Sequential)] public struct Compositor_FrameTiming
  5888. {
  5889. public uint m_nSize;
  5890. public uint m_nFrameIndex;
  5891. public uint m_nNumFramePresents;
  5892. public uint m_nNumMisPresented;
  5893. public uint m_nNumDroppedFrames;
  5894. public uint m_nReprojectionFlags;
  5895. public double m_flSystemTimeInSeconds;
  5896. public float m_flPreSubmitGpuMs;
  5897. public float m_flPostSubmitGpuMs;
  5898. public float m_flTotalRenderGpuMs;
  5899. public float m_flCompositorRenderGpuMs;
  5900. public float m_flCompositorRenderCpuMs;
  5901. public float m_flCompositorIdleCpuMs;
  5902. public float m_flClientFrameIntervalMs;
  5903. public float m_flPresentCallCpuMs;
  5904. public float m_flWaitForPresentCpuMs;
  5905. public float m_flSubmitFrameMs;
  5906. public float m_flWaitGetPosesCalledMs;
  5907. public float m_flNewPosesReadyMs;
  5908. public float m_flNewFrameReadyMs;
  5909. public float m_flCompositorUpdateStartMs;
  5910. public float m_flCompositorUpdateEndMs;
  5911. public float m_flCompositorRenderStartMs;
  5912. public TrackedDevicePose_t m_HmdPose;
  5913. public uint m_nNumVSyncsReadyForUse;
  5914. public uint m_nNumVSyncsToFirstView;
  5915. }
  5916. [StructLayout(LayoutKind.Sequential)] public struct Compositor_BenchmarkResults
  5917. {
  5918. public float m_flMegaPixelsPerSecond;
  5919. public float m_flHmdRecommendedMegaPixelsPerSecond;
  5920. }
  5921. [StructLayout(LayoutKind.Sequential)] public struct DriverDirectMode_FrameTiming
  5922. {
  5923. public uint m_nSize;
  5924. public uint m_nNumFramePresents;
  5925. public uint m_nNumMisPresented;
  5926. public uint m_nNumDroppedFrames;
  5927. public uint m_nReprojectionFlags;
  5928. }
  5929. [StructLayout(LayoutKind.Sequential)] public struct ImuSample_t
  5930. {
  5931. public double fSampleTime;
  5932. public HmdVector3d_t vAccel;
  5933. public HmdVector3d_t vGyro;
  5934. public uint unOffScaleFlags;
  5935. }
  5936. [StructLayout(LayoutKind.Sequential)] public struct AppOverrideKeys_t
  5937. {
  5938. public IntPtr pchKey; // const char *
  5939. public IntPtr pchValue; // const char *
  5940. }
  5941. [StructLayout(LayoutKind.Sequential)] public struct Compositor_CumulativeStats
  5942. {
  5943. public uint m_nPid;
  5944. public uint m_nNumFramePresents;
  5945. public uint m_nNumDroppedFrames;
  5946. public uint m_nNumReprojectedFrames;
  5947. public uint m_nNumFramePresentsOnStartup;
  5948. public uint m_nNumDroppedFramesOnStartup;
  5949. public uint m_nNumReprojectedFramesOnStartup;
  5950. public uint m_nNumLoading;
  5951. public uint m_nNumFramePresentsLoading;
  5952. public uint m_nNumDroppedFramesLoading;
  5953. public uint m_nNumReprojectedFramesLoading;
  5954. public uint m_nNumTimedOut;
  5955. public uint m_nNumFramePresentsTimedOut;
  5956. public uint m_nNumDroppedFramesTimedOut;
  5957. public uint m_nNumReprojectedFramesTimedOut;
  5958. }
  5959. [StructLayout(LayoutKind.Sequential)] public struct Compositor_StageRenderSettings
  5960. {
  5961. public HmdColor_t m_PrimaryColor;
  5962. public HmdColor_t m_SecondaryColor;
  5963. public float m_flVignetteInnerRadius;
  5964. public float m_flVignetteOuterRadius;
  5965. public float m_flFresnelStrength;
  5966. [MarshalAs(UnmanagedType.I1)]
  5967. public bool m_bBackfaceCulling;
  5968. [MarshalAs(UnmanagedType.I1)]
  5969. public bool m_bGreyscale;
  5970. [MarshalAs(UnmanagedType.I1)]
  5971. public bool m_bWireframe;
  5972. }
  5973. [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionParams_t
  5974. {
  5975. public HmdVector3_t vSource;
  5976. public HmdVector3_t vDirection;
  5977. public ETrackingUniverseOrigin eOrigin;
  5978. }
  5979. [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionResults_t
  5980. {
  5981. public HmdVector3_t vPoint;
  5982. public HmdVector3_t vNormal;
  5983. public HmdVector2_t vUVs;
  5984. public float fDistance;
  5985. }
  5986. [StructLayout(LayoutKind.Sequential)] public struct IntersectionMaskRectangle_t
  5987. {
  5988. public float m_flTopLeftX;
  5989. public float m_flTopLeftY;
  5990. public float m_flWidth;
  5991. public float m_flHeight;
  5992. }
  5993. [StructLayout(LayoutKind.Sequential)] public struct IntersectionMaskCircle_t
  5994. {
  5995. public float m_flCenterX;
  5996. public float m_flCenterY;
  5997. public float m_flRadius;
  5998. }
  5999. [StructLayout(LayoutKind.Sequential)] public struct VROverlayIntersectionMaskPrimitive_t
  6000. {
  6001. public EVROverlayIntersectionMaskPrimitiveType m_nPrimitiveType;
  6002. public VROverlayIntersectionMaskPrimitive_Data_t m_Primitive;
  6003. }
  6004. [StructLayout(LayoutKind.Sequential)] public struct VROverlayProjection_t
  6005. {
  6006. public float fLeft;
  6007. public float fRight;
  6008. public float fTop;
  6009. public float fBottom;
  6010. }
  6011. [StructLayout(LayoutKind.Sequential)] public struct VROverlayView_t
  6012. {
  6013. public ulong overlayHandle;
  6014. public Texture_t texture;
  6015. public VRTextureBounds_t textureBounds;
  6016. }
  6017. [StructLayout(LayoutKind.Sequential)] public struct VRVulkanDevice_t
  6018. {
  6019. public IntPtr m_pInstance; // struct VkInstance_T *
  6020. public IntPtr m_pDevice; // struct VkDevice_T *
  6021. public IntPtr m_pPhysicalDevice; // struct VkPhysicalDevice_T *
  6022. public IntPtr m_pQueue; // struct VkQueue_T *
  6023. public uint m_uQueueFamilyIndex;
  6024. }
  6025. [StructLayout(LayoutKind.Sequential)] public struct VRNativeDevice_t
  6026. {
  6027. public IntPtr handle; // void *
  6028. public EDeviceType eType;
  6029. }
  6030. [StructLayout(LayoutKind.Sequential)] public struct RenderModel_Vertex_t
  6031. {
  6032. public HmdVector3_t vPosition;
  6033. public HmdVector3_t vNormal;
  6034. public float rfTextureCoord0; //float[2]
  6035. public float rfTextureCoord1;
  6036. }
  6037. [StructLayout(LayoutKind.Sequential)] public struct RenderModel_TextureMap_t
  6038. {
  6039. public ushort unWidth;
  6040. public ushort unHeight;
  6041. public IntPtr rubTextureMapData; // const uint8_t *
  6042. public EVRRenderModelTextureFormat format;
  6043. }
  6044. // This structure is for backwards binary compatibility on Linux and OSX only
  6045. [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct RenderModel_TextureMap_t_Packed
  6046. {
  6047. public ushort unWidth;
  6048. public ushort unHeight;
  6049. public IntPtr rubTextureMapData; // const uint8_t *
  6050. public EVRRenderModelTextureFormat format;
  6051. public RenderModel_TextureMap_t_Packed(RenderModel_TextureMap_t unpacked)
  6052. {
  6053. this.unWidth = unpacked.unWidth;
  6054. this.unHeight = unpacked.unHeight;
  6055. this.rubTextureMapData = unpacked.rubTextureMapData;
  6056. this.format = unpacked.format;
  6057. }
  6058. public void Unpack(ref RenderModel_TextureMap_t unpacked)
  6059. {
  6060. unpacked.unWidth = this.unWidth;
  6061. unpacked.unHeight = this.unHeight;
  6062. unpacked.rubTextureMapData = this.rubTextureMapData;
  6063. unpacked.format = this.format;
  6064. }
  6065. }
  6066. [StructLayout(LayoutKind.Sequential)] public struct RenderModel_t
  6067. {
  6068. public IntPtr rVertexData; // const struct vr::RenderModel_Vertex_t *
  6069. public uint unVertexCount;
  6070. public IntPtr rIndexData; // const uint16_t *
  6071. public uint unTriangleCount;
  6072. public int diffuseTextureId;
  6073. }
  6074. // This structure is for backwards binary compatibility on Linux and OSX only
  6075. [StructLayout(LayoutKind.Sequential, Pack = 4)] public struct RenderModel_t_Packed
  6076. {
  6077. public IntPtr rVertexData; // const struct vr::RenderModel_Vertex_t *
  6078. public uint unVertexCount;
  6079. public IntPtr rIndexData; // const uint16_t *
  6080. public uint unTriangleCount;
  6081. public int diffuseTextureId;
  6082. public RenderModel_t_Packed(RenderModel_t unpacked)
  6083. {
  6084. this.rVertexData = unpacked.rVertexData;
  6085. this.unVertexCount = unpacked.unVertexCount;
  6086. this.rIndexData = unpacked.rIndexData;
  6087. this.unTriangleCount = unpacked.unTriangleCount;
  6088. this.diffuseTextureId = unpacked.diffuseTextureId;
  6089. }
  6090. public void Unpack(ref RenderModel_t unpacked)
  6091. {
  6092. unpacked.rVertexData = this.rVertexData;
  6093. unpacked.unVertexCount = this.unVertexCount;
  6094. unpacked.rIndexData = this.rIndexData;
  6095. unpacked.unTriangleCount = this.unTriangleCount;
  6096. unpacked.diffuseTextureId = this.diffuseTextureId;
  6097. }
  6098. }
  6099. [StructLayout(LayoutKind.Sequential)] public struct RenderModel_ControllerMode_State_t
  6100. {
  6101. [MarshalAs(UnmanagedType.I1)]
  6102. public bool bScrollWheelVisible;
  6103. }
  6104. [StructLayout(LayoutKind.Sequential)] public struct NotificationBitmap_t
  6105. {
  6106. public IntPtr m_pImageData; // void *
  6107. public int m_nWidth;
  6108. public int m_nHeight;
  6109. public int m_nBytesPerPixel;
  6110. }
  6111. [StructLayout(LayoutKind.Sequential)] public struct CVRSettingHelper
  6112. {
  6113. public IntPtr m_pSettings; // class vr::IVRSettings *
  6114. }
  6115. [StructLayout(LayoutKind.Sequential)] public struct InputAnalogActionData_t
  6116. {
  6117. [MarshalAs(UnmanagedType.I1)]
  6118. public bool bActive;
  6119. public ulong activeOrigin;
  6120. public float x;
  6121. public float y;
  6122. public float z;
  6123. public float deltaX;
  6124. public float deltaY;
  6125. public float deltaZ;
  6126. public float fUpdateTime;
  6127. }
  6128. [StructLayout(LayoutKind.Sequential)] public struct InputDigitalActionData_t
  6129. {
  6130. [MarshalAs(UnmanagedType.I1)]
  6131. public bool bActive;
  6132. public ulong activeOrigin;
  6133. [MarshalAs(UnmanagedType.I1)]
  6134. public bool bState;
  6135. [MarshalAs(UnmanagedType.I1)]
  6136. public bool bChanged;
  6137. public float fUpdateTime;
  6138. }
  6139. [StructLayout(LayoutKind.Sequential)] public struct InputPoseActionData_t
  6140. {
  6141. [MarshalAs(UnmanagedType.I1)]
  6142. public bool bActive;
  6143. public ulong activeOrigin;
  6144. public TrackedDevicePose_t pose;
  6145. }
  6146. [StructLayout(LayoutKind.Sequential)] public struct InputSkeletalActionData_t
  6147. {
  6148. [MarshalAs(UnmanagedType.I1)]
  6149. public bool bActive;
  6150. public ulong activeOrigin;
  6151. }
  6152. [StructLayout(LayoutKind.Sequential)] public struct InputOriginInfo_t
  6153. {
  6154. public ulong devicePath;
  6155. public uint trackedDeviceIndex;
  6156. public byte rchRenderModelComponentName0,rchRenderModelComponentName1,rchRenderModelComponentName2,rchRenderModelComponentName3,rchRenderModelComponentName4,rchRenderModelComponentName5,rchRenderModelComponentName6,rchRenderModelComponentName7,rchRenderModelComponentName8,rchRenderModelComponentName9,rchRenderModelComponentName10,rchRenderModelComponentName11,rchRenderModelComponentName12,rchRenderModelComponentName13,rchRenderModelComponentName14,rchRenderModelComponentName15,rchRenderModelComponentName16,rchRenderModelComponentName17,rchRenderModelComponentName18,rchRenderModelComponentName19,rchRenderModelComponentName20,rchRenderModelComponentName21,rchRenderModelComponentName22,rchRenderModelComponentName23,rchRenderModelComponentName24,rchRenderModelComponentName25,rchRenderModelComponentName26,rchRenderModelComponentName27,rchRenderModelComponentName28,rchRenderModelComponentName29,rchRenderModelComponentName30,rchRenderModelComponentName31,rchRenderModelComponentName32,rchRenderModelComponentName33,rchRenderModelComponentName34,rchRenderModelComponentName35,rchRenderModelComponentName36,rchRenderModelComponentName37,rchRenderModelComponentName38,rchRenderModelComponentName39,rchRenderModelComponentName40,rchRenderModelComponentName41,rchRenderModelComponentName42,rchRenderModelComponentName43,rchRenderModelComponentName44,rchRenderModelComponentName45,rchRenderModelComponentName46,rchRenderModelComponentName47,rchRenderModelComponentName48,rchRenderModelComponentName49,rchRenderModelComponentName50,rchRenderModelComponentName51,rchRenderModelComponentName52,rchRenderModelComponentName53,rchRenderModelComponentName54,rchRenderModelComponentName55,rchRenderModelComponentName56,rchRenderModelComponentName57,rchRenderModelComponentName58,rchRenderModelComponentName59,rchRenderModelComponentName60,rchRenderModelComponentName61,rchRenderModelComponentName62,rchRenderModelComponentName63,rchRenderModelComponentName64,rchRenderModelComponentName65,rchRenderModelComponentName66,rchRenderModelComponentName67,rchRenderModelComponentName68,rchRenderModelComponentName69,rchRenderModelComponentName70,rchRenderModelComponentName71,rchRenderModelComponentName72,rchRenderModelComponentName73,rchRenderModelComponentName74,rchRenderModelComponentName75,rchRenderModelComponentName76,rchRenderModelComponentName77,rchRenderModelComponentName78,rchRenderModelComponentName79,rchRenderModelComponentName80,rchRenderModelComponentName81,rchRenderModelComponentName82,rchRenderModelComponentName83,rchRenderModelComponentName84,rchRenderModelComponentName85,rchRenderModelComponentName86,rchRenderModelComponentName87,rchRenderModelComponentName88,rchRenderModelComponentName89,rchRenderModelComponentName90,rchRenderModelComponentName91,rchRenderModelComponentName92,rchRenderModelComponentName93,rchRenderModelComponentName94,rchRenderModelComponentName95,rchRenderModelComponentName96,rchRenderModelComponentName97,rchRenderModelComponentName98,rchRenderModelComponentName99,rchRenderModelComponentName100,rchRenderModelComponentName101,rchRenderModelComponentName102,rchRenderModelComponentName103,rchRenderModelComponentName104,rchRenderModelComponentName105,rchRenderModelComponentName106,rchRenderModelComponentName107,rchRenderModelComponentName108,rchRenderModelComponentName109,rchRenderModelComponentName110,rchRenderModelComponentName111,rchRenderModelComponentName112,rchRenderModelComponentName113,rchRenderModelComponentName114,rchRenderModelComponentName115,rchRenderModelComponentName116,rchRenderModelComponentName117,rchRenderModelComponentName118,rchRenderModelComponentName119,rchRenderModelComponentName120,rchRenderModelComponentName121,rchRenderModelComponentName122,rchRenderModelComponentName123,rchRenderModelComponentName124,rchRenderModelComponentName125,rchRenderModelComponentName126,rchRenderModelComponentName127;
  6157. public string rchRenderModelComponentName
  6158. {
  6159. get
  6160. {
  6161. return new string(new char[] {
  6162. (char)rchRenderModelComponentName0,
  6163. (char)rchRenderModelComponentName1,
  6164. (char)rchRenderModelComponentName2,
  6165. (char)rchRenderModelComponentName3,
  6166. (char)rchRenderModelComponentName4,
  6167. (char)rchRenderModelComponentName5,
  6168. (char)rchRenderModelComponentName6,
  6169. (char)rchRenderModelComponentName7,
  6170. (char)rchRenderModelComponentName8,
  6171. (char)rchRenderModelComponentName9,
  6172. (char)rchRenderModelComponentName10,
  6173. (char)rchRenderModelComponentName11,
  6174. (char)rchRenderModelComponentName12,
  6175. (char)rchRenderModelComponentName13,
  6176. (char)rchRenderModelComponentName14,
  6177. (char)rchRenderModelComponentName15,
  6178. (char)rchRenderModelComponentName16,
  6179. (char)rchRenderModelComponentName17,
  6180. (char)rchRenderModelComponentName18,
  6181. (char)rchRenderModelComponentName19,
  6182. (char)rchRenderModelComponentName20,
  6183. (char)rchRenderModelComponentName21,
  6184. (char)rchRenderModelComponentName22,
  6185. (char)rchRenderModelComponentName23,
  6186. (char)rchRenderModelComponentName24,
  6187. (char)rchRenderModelComponentName25,
  6188. (char)rchRenderModelComponentName26,
  6189. (char)rchRenderModelComponentName27,
  6190. (char)rchRenderModelComponentName28,
  6191. (char)rchRenderModelComponentName29,
  6192. (char)rchRenderModelComponentName30,
  6193. (char)rchRenderModelComponentName31,
  6194. (char)rchRenderModelComponentName32,
  6195. (char)rchRenderModelComponentName33,
  6196. (char)rchRenderModelComponentName34,
  6197. (char)rchRenderModelComponentName35,
  6198. (char)rchRenderModelComponentName36,
  6199. (char)rchRenderModelComponentName37,
  6200. (char)rchRenderModelComponentName38,
  6201. (char)rchRenderModelComponentName39,
  6202. (char)rchRenderModelComponentName40,
  6203. (char)rchRenderModelComponentName41,
  6204. (char)rchRenderModelComponentName42,
  6205. (char)rchRenderModelComponentName43,
  6206. (char)rchRenderModelComponentName44,
  6207. (char)rchRenderModelComponentName45,
  6208. (char)rchRenderModelComponentName46,
  6209. (char)rchRenderModelComponentName47,
  6210. (char)rchRenderModelComponentName48,
  6211. (char)rchRenderModelComponentName49,
  6212. (char)rchRenderModelComponentName50,
  6213. (char)rchRenderModelComponentName51,
  6214. (char)rchRenderModelComponentName52,
  6215. (char)rchRenderModelComponentName53,
  6216. (char)rchRenderModelComponentName54,
  6217. (char)rchRenderModelComponentName55,
  6218. (char)rchRenderModelComponentName56,
  6219. (char)rchRenderModelComponentName57,
  6220. (char)rchRenderModelComponentName58,
  6221. (char)rchRenderModelComponentName59,
  6222. (char)rchRenderModelComponentName60,
  6223. (char)rchRenderModelComponentName61,
  6224. (char)rchRenderModelComponentName62,
  6225. (char)rchRenderModelComponentName63,
  6226. (char)rchRenderModelComponentName64,
  6227. (char)rchRenderModelComponentName65,
  6228. (char)rchRenderModelComponentName66,
  6229. (char)rchRenderModelComponentName67,
  6230. (char)rchRenderModelComponentName68,
  6231. (char)rchRenderModelComponentName69,
  6232. (char)rchRenderModelComponentName70,
  6233. (char)rchRenderModelComponentName71,
  6234. (char)rchRenderModelComponentName72,
  6235. (char)rchRenderModelComponentName73,
  6236. (char)rchRenderModelComponentName74,
  6237. (char)rchRenderModelComponentName75,
  6238. (char)rchRenderModelComponentName76,
  6239. (char)rchRenderModelComponentName77,
  6240. (char)rchRenderModelComponentName78,
  6241. (char)rchRenderModelComponentName79,
  6242. (char)rchRenderModelComponentName80,
  6243. (char)rchRenderModelComponentName81,
  6244. (char)rchRenderModelComponentName82,
  6245. (char)rchRenderModelComponentName83,
  6246. (char)rchRenderModelComponentName84,
  6247. (char)rchRenderModelComponentName85,
  6248. (char)rchRenderModelComponentName86,
  6249. (char)rchRenderModelComponentName87,
  6250. (char)rchRenderModelComponentName88,
  6251. (char)rchRenderModelComponentName89,
  6252. (char)rchRenderModelComponentName90,
  6253. (char)rchRenderModelComponentName91,
  6254. (char)rchRenderModelComponentName92,
  6255. (char)rchRenderModelComponentName93,
  6256. (char)rchRenderModelComponentName94,
  6257. (char)rchRenderModelComponentName95,
  6258. (char)rchRenderModelComponentName96,
  6259. (char)rchRenderModelComponentName97,
  6260. (char)rchRenderModelComponentName98,
  6261. (char)rchRenderModelComponentName99,
  6262. (char)rchRenderModelComponentName100,
  6263. (char)rchRenderModelComponentName101,
  6264. (char)rchRenderModelComponentName102,
  6265. (char)rchRenderModelComponentName103,
  6266. (char)rchRenderModelComponentName104,
  6267. (char)rchRenderModelComponentName105,
  6268. (char)rchRenderModelComponentName106,
  6269. (char)rchRenderModelComponentName107,
  6270. (char)rchRenderModelComponentName108,
  6271. (char)rchRenderModelComponentName109,
  6272. (char)rchRenderModelComponentName110,
  6273. (char)rchRenderModelComponentName111,
  6274. (char)rchRenderModelComponentName112,
  6275. (char)rchRenderModelComponentName113,
  6276. (char)rchRenderModelComponentName114,
  6277. (char)rchRenderModelComponentName115,
  6278. (char)rchRenderModelComponentName116,
  6279. (char)rchRenderModelComponentName117,
  6280. (char)rchRenderModelComponentName118,
  6281. (char)rchRenderModelComponentName119,
  6282. (char)rchRenderModelComponentName120,
  6283. (char)rchRenderModelComponentName121,
  6284. (char)rchRenderModelComponentName122,
  6285. (char)rchRenderModelComponentName123,
  6286. (char)rchRenderModelComponentName124,
  6287. (char)rchRenderModelComponentName125,
  6288. (char)rchRenderModelComponentName126,
  6289. (char)rchRenderModelComponentName127
  6290. }).TrimEnd('\0');
  6291. }
  6292. }
  6293. }
  6294. [StructLayout(LayoutKind.Sequential)] public struct InputBindingInfo_t
  6295. {
  6296. public byte rchDevicePathName0,rchDevicePathName1,rchDevicePathName2,rchDevicePathName3,rchDevicePathName4,rchDevicePathName5,rchDevicePathName6,rchDevicePathName7,rchDevicePathName8,rchDevicePathName9,rchDevicePathName10,rchDevicePathName11,rchDevicePathName12,rchDevicePathName13,rchDevicePathName14,rchDevicePathName15,rchDevicePathName16,rchDevicePathName17,rchDevicePathName18,rchDevicePathName19,rchDevicePathName20,rchDevicePathName21,rchDevicePathName22,rchDevicePathName23,rchDevicePathName24,rchDevicePathName25,rchDevicePathName26,rchDevicePathName27,rchDevicePathName28,rchDevicePathName29,rchDevicePathName30,rchDevicePathName31,rchDevicePathName32,rchDevicePathName33,rchDevicePathName34,rchDevicePathName35,rchDevicePathName36,rchDevicePathName37,rchDevicePathName38,rchDevicePathName39,rchDevicePathName40,rchDevicePathName41,rchDevicePathName42,rchDevicePathName43,rchDevicePathName44,rchDevicePathName45,rchDevicePathName46,rchDevicePathName47,rchDevicePathName48,rchDevicePathName49,rchDevicePathName50,rchDevicePathName51,rchDevicePathName52,rchDevicePathName53,rchDevicePathName54,rchDevicePathName55,rchDevicePathName56,rchDevicePathName57,rchDevicePathName58,rchDevicePathName59,rchDevicePathName60,rchDevicePathName61,rchDevicePathName62,rchDevicePathName63,rchDevicePathName64,rchDevicePathName65,rchDevicePathName66,rchDevicePathName67,rchDevicePathName68,rchDevicePathName69,rchDevicePathName70,rchDevicePathName71,rchDevicePathName72,rchDevicePathName73,rchDevicePathName74,rchDevicePathName75,rchDevicePathName76,rchDevicePathName77,rchDevicePathName78,rchDevicePathName79,rchDevicePathName80,rchDevicePathName81,rchDevicePathName82,rchDevicePathName83,rchDevicePathName84,rchDevicePathName85,rchDevicePathName86,rchDevicePathName87,rchDevicePathName88,rchDevicePathName89,rchDevicePathName90,rchDevicePathName91,rchDevicePathName92,rchDevicePathName93,rchDevicePathName94,rchDevicePathName95,rchDevicePathName96,rchDevicePathName97,rchDevicePathName98,rchDevicePathName99,rchDevicePathName100,rchDevicePathName101,rchDevicePathName102,rchDevicePathName103,rchDevicePathName104,rchDevicePathName105,rchDevicePathName106,rchDevicePathName107,rchDevicePathName108,rchDevicePathName109,rchDevicePathName110,rchDevicePathName111,rchDevicePathName112,rchDevicePathName113,rchDevicePathName114,rchDevicePathName115,rchDevicePathName116,rchDevicePathName117,rchDevicePathName118,rchDevicePathName119,rchDevicePathName120,rchDevicePathName121,rchDevicePathName122,rchDevicePathName123,rchDevicePathName124,rchDevicePathName125,rchDevicePathName126,rchDevicePathName127;
  6297. public string rchDevicePathName
  6298. {
  6299. get
  6300. {
  6301. return new string(new char[] {
  6302. (char)rchDevicePathName0,
  6303. (char)rchDevicePathName1,
  6304. (char)rchDevicePathName2,
  6305. (char)rchDevicePathName3,
  6306. (char)rchDevicePathName4,
  6307. (char)rchDevicePathName5,
  6308. (char)rchDevicePathName6,
  6309. (char)rchDevicePathName7,
  6310. (char)rchDevicePathName8,
  6311. (char)rchDevicePathName9,
  6312. (char)rchDevicePathName10,
  6313. (char)rchDevicePathName11,
  6314. (char)rchDevicePathName12,
  6315. (char)rchDevicePathName13,
  6316. (char)rchDevicePathName14,
  6317. (char)rchDevicePathName15,
  6318. (char)rchDevicePathName16,
  6319. (char)rchDevicePathName17,
  6320. (char)rchDevicePathName18,
  6321. (char)rchDevicePathName19,
  6322. (char)rchDevicePathName20,
  6323. (char)rchDevicePathName21,
  6324. (char)rchDevicePathName22,
  6325. (char)rchDevicePathName23,
  6326. (char)rchDevicePathName24,
  6327. (char)rchDevicePathName25,
  6328. (char)rchDevicePathName26,
  6329. (char)rchDevicePathName27,
  6330. (char)rchDevicePathName28,
  6331. (char)rchDevicePathName29,
  6332. (char)rchDevicePathName30,
  6333. (char)rchDevicePathName31,
  6334. (char)rchDevicePathName32,
  6335. (char)rchDevicePathName33,
  6336. (char)rchDevicePathName34,
  6337. (char)rchDevicePathName35,
  6338. (char)rchDevicePathName36,
  6339. (char)rchDevicePathName37,
  6340. (char)rchDevicePathName38,
  6341. (char)rchDevicePathName39,
  6342. (char)rchDevicePathName40,
  6343. (char)rchDevicePathName41,
  6344. (char)rchDevicePathName42,
  6345. (char)rchDevicePathName43,
  6346. (char)rchDevicePathName44,
  6347. (char)rchDevicePathName45,
  6348. (char)rchDevicePathName46,
  6349. (char)rchDevicePathName47,
  6350. (char)rchDevicePathName48,
  6351. (char)rchDevicePathName49,
  6352. (char)rchDevicePathName50,
  6353. (char)rchDevicePathName51,
  6354. (char)rchDevicePathName52,
  6355. (char)rchDevicePathName53,
  6356. (char)rchDevicePathName54,
  6357. (char)rchDevicePathName55,
  6358. (char)rchDevicePathName56,
  6359. (char)rchDevicePathName57,
  6360. (char)rchDevicePathName58,
  6361. (char)rchDevicePathName59,
  6362. (char)rchDevicePathName60,
  6363. (char)rchDevicePathName61,
  6364. (char)rchDevicePathName62,
  6365. (char)rchDevicePathName63,
  6366. (char)rchDevicePathName64,
  6367. (char)rchDevicePathName65,
  6368. (char)rchDevicePathName66,
  6369. (char)rchDevicePathName67,
  6370. (char)rchDevicePathName68,
  6371. (char)rchDevicePathName69,
  6372. (char)rchDevicePathName70,
  6373. (char)rchDevicePathName71,
  6374. (char)rchDevicePathName72,
  6375. (char)rchDevicePathName73,
  6376. (char)rchDevicePathName74,
  6377. (char)rchDevicePathName75,
  6378. (char)rchDevicePathName76,
  6379. (char)rchDevicePathName77,
  6380. (char)rchDevicePathName78,
  6381. (char)rchDevicePathName79,
  6382. (char)rchDevicePathName80,
  6383. (char)rchDevicePathName81,
  6384. (char)rchDevicePathName82,
  6385. (char)rchDevicePathName83,
  6386. (char)rchDevicePathName84,
  6387. (char)rchDevicePathName85,
  6388. (char)rchDevicePathName86,
  6389. (char)rchDevicePathName87,
  6390. (char)rchDevicePathName88,
  6391. (char)rchDevicePathName89,
  6392. (char)rchDevicePathName90,
  6393. (char)rchDevicePathName91,
  6394. (char)rchDevicePathName92,
  6395. (char)rchDevicePathName93,
  6396. (char)rchDevicePathName94,
  6397. (char)rchDevicePathName95,
  6398. (char)rchDevicePathName96,
  6399. (char)rchDevicePathName97,
  6400. (char)rchDevicePathName98,
  6401. (char)rchDevicePathName99,
  6402. (char)rchDevicePathName100,
  6403. (char)rchDevicePathName101,
  6404. (char)rchDevicePathName102,
  6405. (char)rchDevicePathName103,
  6406. (char)rchDevicePathName104,
  6407. (char)rchDevicePathName105,
  6408. (char)rchDevicePathName106,
  6409. (char)rchDevicePathName107,
  6410. (char)rchDevicePathName108,
  6411. (char)rchDevicePathName109,
  6412. (char)rchDevicePathName110,
  6413. (char)rchDevicePathName111,
  6414. (char)rchDevicePathName112,
  6415. (char)rchDevicePathName113,
  6416. (char)rchDevicePathName114,
  6417. (char)rchDevicePathName115,
  6418. (char)rchDevicePathName116,
  6419. (char)rchDevicePathName117,
  6420. (char)rchDevicePathName118,
  6421. (char)rchDevicePathName119,
  6422. (char)rchDevicePathName120,
  6423. (char)rchDevicePathName121,
  6424. (char)rchDevicePathName122,
  6425. (char)rchDevicePathName123,
  6426. (char)rchDevicePathName124,
  6427. (char)rchDevicePathName125,
  6428. (char)rchDevicePathName126,
  6429. (char)rchDevicePathName127
  6430. }).TrimEnd('\0');
  6431. }
  6432. }
  6433. public byte rchInputPathName0,rchInputPathName1,rchInputPathName2,rchInputPathName3,rchInputPathName4,rchInputPathName5,rchInputPathName6,rchInputPathName7,rchInputPathName8,rchInputPathName9,rchInputPathName10,rchInputPathName11,rchInputPathName12,rchInputPathName13,rchInputPathName14,rchInputPathName15,rchInputPathName16,rchInputPathName17,rchInputPathName18,rchInputPathName19,rchInputPathName20,rchInputPathName21,rchInputPathName22,rchInputPathName23,rchInputPathName24,rchInputPathName25,rchInputPathName26,rchInputPathName27,rchInputPathName28,rchInputPathName29,rchInputPathName30,rchInputPathName31,rchInputPathName32,rchInputPathName33,rchInputPathName34,rchInputPathName35,rchInputPathName36,rchInputPathName37,rchInputPathName38,rchInputPathName39,rchInputPathName40,rchInputPathName41,rchInputPathName42,rchInputPathName43,rchInputPathName44,rchInputPathName45,rchInputPathName46,rchInputPathName47,rchInputPathName48,rchInputPathName49,rchInputPathName50,rchInputPathName51,rchInputPathName52,rchInputPathName53,rchInputPathName54,rchInputPathName55,rchInputPathName56,rchInputPathName57,rchInputPathName58,rchInputPathName59,rchInputPathName60,rchInputPathName61,rchInputPathName62,rchInputPathName63,rchInputPathName64,rchInputPathName65,rchInputPathName66,rchInputPathName67,rchInputPathName68,rchInputPathName69,rchInputPathName70,rchInputPathName71,rchInputPathName72,rchInputPathName73,rchInputPathName74,rchInputPathName75,rchInputPathName76,rchInputPathName77,rchInputPathName78,rchInputPathName79,rchInputPathName80,rchInputPathName81,rchInputPathName82,rchInputPathName83,rchInputPathName84,rchInputPathName85,rchInputPathName86,rchInputPathName87,rchInputPathName88,rchInputPathName89,rchInputPathName90,rchInputPathName91,rchInputPathName92,rchInputPathName93,rchInputPathName94,rchInputPathName95,rchInputPathName96,rchInputPathName97,rchInputPathName98,rchInputPathName99,rchInputPathName100,rchInputPathName101,rchInputPathName102,rchInputPathName103,rchInputPathName104,rchInputPathName105,rchInputPathName106,rchInputPathName107,rchInputPathName108,rchInputPathName109,rchInputPathName110,rchInputPathName111,rchInputPathName112,rchInputPathName113,rchInputPathName114,rchInputPathName115,rchInputPathName116,rchInputPathName117,rchInputPathName118,rchInputPathName119,rchInputPathName120,rchInputPathName121,rchInputPathName122,rchInputPathName123,rchInputPathName124,rchInputPathName125,rchInputPathName126,rchInputPathName127;
  6434. public string rchInputPathName
  6435. {
  6436. get
  6437. {
  6438. return new string(new char[] {
  6439. (char)rchInputPathName0,
  6440. (char)rchInputPathName1,
  6441. (char)rchInputPathName2,
  6442. (char)rchInputPathName3,
  6443. (char)rchInputPathName4,
  6444. (char)rchInputPathName5,
  6445. (char)rchInputPathName6,
  6446. (char)rchInputPathName7,
  6447. (char)rchInputPathName8,
  6448. (char)rchInputPathName9,
  6449. (char)rchInputPathName10,
  6450. (char)rchInputPathName11,
  6451. (char)rchInputPathName12,
  6452. (char)rchInputPathName13,
  6453. (char)rchInputPathName14,
  6454. (char)rchInputPathName15,
  6455. (char)rchInputPathName16,
  6456. (char)rchInputPathName17,
  6457. (char)rchInputPathName18,
  6458. (char)rchInputPathName19,
  6459. (char)rchInputPathName20,
  6460. (char)rchInputPathName21,
  6461. (char)rchInputPathName22,
  6462. (char)rchInputPathName23,
  6463. (char)rchInputPathName24,
  6464. (char)rchInputPathName25,
  6465. (char)rchInputPathName26,
  6466. (char)rchInputPathName27,
  6467. (char)rchInputPathName28,
  6468. (char)rchInputPathName29,
  6469. (char)rchInputPathName30,
  6470. (char)rchInputPathName31,
  6471. (char)rchInputPathName32,
  6472. (char)rchInputPathName33,
  6473. (char)rchInputPathName34,
  6474. (char)rchInputPathName35,
  6475. (char)rchInputPathName36,
  6476. (char)rchInputPathName37,
  6477. (char)rchInputPathName38,
  6478. (char)rchInputPathName39,
  6479. (char)rchInputPathName40,
  6480. (char)rchInputPathName41,
  6481. (char)rchInputPathName42,
  6482. (char)rchInputPathName43,
  6483. (char)rchInputPathName44,
  6484. (char)rchInputPathName45,
  6485. (char)rchInputPathName46,
  6486. (char)rchInputPathName47,
  6487. (char)rchInputPathName48,
  6488. (char)rchInputPathName49,
  6489. (char)rchInputPathName50,
  6490. (char)rchInputPathName51,
  6491. (char)rchInputPathName52,
  6492. (char)rchInputPathName53,
  6493. (char)rchInputPathName54,
  6494. (char)rchInputPathName55,
  6495. (char)rchInputPathName56,
  6496. (char)rchInputPathName57,
  6497. (char)rchInputPathName58,
  6498. (char)rchInputPathName59,
  6499. (char)rchInputPathName60,
  6500. (char)rchInputPathName61,
  6501. (char)rchInputPathName62,
  6502. (char)rchInputPathName63,
  6503. (char)rchInputPathName64,
  6504. (char)rchInputPathName65,
  6505. (char)rchInputPathName66,
  6506. (char)rchInputPathName67,
  6507. (char)rchInputPathName68,
  6508. (char)rchInputPathName69,
  6509. (char)rchInputPathName70,
  6510. (char)rchInputPathName71,
  6511. (char)rchInputPathName72,
  6512. (char)rchInputPathName73,
  6513. (char)rchInputPathName74,
  6514. (char)rchInputPathName75,
  6515. (char)rchInputPathName76,
  6516. (char)rchInputPathName77,
  6517. (char)rchInputPathName78,
  6518. (char)rchInputPathName79,
  6519. (char)rchInputPathName80,
  6520. (char)rchInputPathName81,
  6521. (char)rchInputPathName82,
  6522. (char)rchInputPathName83,
  6523. (char)rchInputPathName84,
  6524. (char)rchInputPathName85,
  6525. (char)rchInputPathName86,
  6526. (char)rchInputPathName87,
  6527. (char)rchInputPathName88,
  6528. (char)rchInputPathName89,
  6529. (char)rchInputPathName90,
  6530. (char)rchInputPathName91,
  6531. (char)rchInputPathName92,
  6532. (char)rchInputPathName93,
  6533. (char)rchInputPathName94,
  6534. (char)rchInputPathName95,
  6535. (char)rchInputPathName96,
  6536. (char)rchInputPathName97,
  6537. (char)rchInputPathName98,
  6538. (char)rchInputPathName99,
  6539. (char)rchInputPathName100,
  6540. (char)rchInputPathName101,
  6541. (char)rchInputPathName102,
  6542. (char)rchInputPathName103,
  6543. (char)rchInputPathName104,
  6544. (char)rchInputPathName105,
  6545. (char)rchInputPathName106,
  6546. (char)rchInputPathName107,
  6547. (char)rchInputPathName108,
  6548. (char)rchInputPathName109,
  6549. (char)rchInputPathName110,
  6550. (char)rchInputPathName111,
  6551. (char)rchInputPathName112,
  6552. (char)rchInputPathName113,
  6553. (char)rchInputPathName114,
  6554. (char)rchInputPathName115,
  6555. (char)rchInputPathName116,
  6556. (char)rchInputPathName117,
  6557. (char)rchInputPathName118,
  6558. (char)rchInputPathName119,
  6559. (char)rchInputPathName120,
  6560. (char)rchInputPathName121,
  6561. (char)rchInputPathName122,
  6562. (char)rchInputPathName123,
  6563. (char)rchInputPathName124,
  6564. (char)rchInputPathName125,
  6565. (char)rchInputPathName126,
  6566. (char)rchInputPathName127
  6567. }).TrimEnd('\0');
  6568. }
  6569. }
  6570. public byte rchModeName0,rchModeName1,rchModeName2,rchModeName3,rchModeName4,rchModeName5,rchModeName6,rchModeName7,rchModeName8,rchModeName9,rchModeName10,rchModeName11,rchModeName12,rchModeName13,rchModeName14,rchModeName15,rchModeName16,rchModeName17,rchModeName18,rchModeName19,rchModeName20,rchModeName21,rchModeName22,rchModeName23,rchModeName24,rchModeName25,rchModeName26,rchModeName27,rchModeName28,rchModeName29,rchModeName30,rchModeName31,rchModeName32,rchModeName33,rchModeName34,rchModeName35,rchModeName36,rchModeName37,rchModeName38,rchModeName39,rchModeName40,rchModeName41,rchModeName42,rchModeName43,rchModeName44,rchModeName45,rchModeName46,rchModeName47,rchModeName48,rchModeName49,rchModeName50,rchModeName51,rchModeName52,rchModeName53,rchModeName54,rchModeName55,rchModeName56,rchModeName57,rchModeName58,rchModeName59,rchModeName60,rchModeName61,rchModeName62,rchModeName63,rchModeName64,rchModeName65,rchModeName66,rchModeName67,rchModeName68,rchModeName69,rchModeName70,rchModeName71,rchModeName72,rchModeName73,rchModeName74,rchModeName75,rchModeName76,rchModeName77,rchModeName78,rchModeName79,rchModeName80,rchModeName81,rchModeName82,rchModeName83,rchModeName84,rchModeName85,rchModeName86,rchModeName87,rchModeName88,rchModeName89,rchModeName90,rchModeName91,rchModeName92,rchModeName93,rchModeName94,rchModeName95,rchModeName96,rchModeName97,rchModeName98,rchModeName99,rchModeName100,rchModeName101,rchModeName102,rchModeName103,rchModeName104,rchModeName105,rchModeName106,rchModeName107,rchModeName108,rchModeName109,rchModeName110,rchModeName111,rchModeName112,rchModeName113,rchModeName114,rchModeName115,rchModeName116,rchModeName117,rchModeName118,rchModeName119,rchModeName120,rchModeName121,rchModeName122,rchModeName123,rchModeName124,rchModeName125,rchModeName126,rchModeName127;
  6571. public string rchModeName
  6572. {
  6573. get
  6574. {
  6575. return new string(new char[] {
  6576. (char)rchModeName0,
  6577. (char)rchModeName1,
  6578. (char)rchModeName2,
  6579. (char)rchModeName3,
  6580. (char)rchModeName4,
  6581. (char)rchModeName5,
  6582. (char)rchModeName6,
  6583. (char)rchModeName7,
  6584. (char)rchModeName8,
  6585. (char)rchModeName9,
  6586. (char)rchModeName10,
  6587. (char)rchModeName11,
  6588. (char)rchModeName12,
  6589. (char)rchModeName13,
  6590. (char)rchModeName14,
  6591. (char)rchModeName15,
  6592. (char)rchModeName16,
  6593. (char)rchModeName17,
  6594. (char)rchModeName18,
  6595. (char)rchModeName19,
  6596. (char)rchModeName20,
  6597. (char)rchModeName21,
  6598. (char)rchModeName22,
  6599. (char)rchModeName23,
  6600. (char)rchModeName24,
  6601. (char)rchModeName25,
  6602. (char)rchModeName26,
  6603. (char)rchModeName27,
  6604. (char)rchModeName28,
  6605. (char)rchModeName29,
  6606. (char)rchModeName30,
  6607. (char)rchModeName31,
  6608. (char)rchModeName32,
  6609. (char)rchModeName33,
  6610. (char)rchModeName34,
  6611. (char)rchModeName35,
  6612. (char)rchModeName36,
  6613. (char)rchModeName37,
  6614. (char)rchModeName38,
  6615. (char)rchModeName39,
  6616. (char)rchModeName40,
  6617. (char)rchModeName41,
  6618. (char)rchModeName42,
  6619. (char)rchModeName43,
  6620. (char)rchModeName44,
  6621. (char)rchModeName45,
  6622. (char)rchModeName46,
  6623. (char)rchModeName47,
  6624. (char)rchModeName48,
  6625. (char)rchModeName49,
  6626. (char)rchModeName50,
  6627. (char)rchModeName51,
  6628. (char)rchModeName52,
  6629. (char)rchModeName53,
  6630. (char)rchModeName54,
  6631. (char)rchModeName55,
  6632. (char)rchModeName56,
  6633. (char)rchModeName57,
  6634. (char)rchModeName58,
  6635. (char)rchModeName59,
  6636. (char)rchModeName60,
  6637. (char)rchModeName61,
  6638. (char)rchModeName62,
  6639. (char)rchModeName63,
  6640. (char)rchModeName64,
  6641. (char)rchModeName65,
  6642. (char)rchModeName66,
  6643. (char)rchModeName67,
  6644. (char)rchModeName68,
  6645. (char)rchModeName69,
  6646. (char)rchModeName70,
  6647. (char)rchModeName71,
  6648. (char)rchModeName72,
  6649. (char)rchModeName73,
  6650. (char)rchModeName74,
  6651. (char)rchModeName75,
  6652. (char)rchModeName76,
  6653. (char)rchModeName77,
  6654. (char)rchModeName78,
  6655. (char)rchModeName79,
  6656. (char)rchModeName80,
  6657. (char)rchModeName81,
  6658. (char)rchModeName82,
  6659. (char)rchModeName83,
  6660. (char)rchModeName84,
  6661. (char)rchModeName85,
  6662. (char)rchModeName86,
  6663. (char)rchModeName87,
  6664. (char)rchModeName88,
  6665. (char)rchModeName89,
  6666. (char)rchModeName90,
  6667. (char)rchModeName91,
  6668. (char)rchModeName92,
  6669. (char)rchModeName93,
  6670. (char)rchModeName94,
  6671. (char)rchModeName95,
  6672. (char)rchModeName96,
  6673. (char)rchModeName97,
  6674. (char)rchModeName98,
  6675. (char)rchModeName99,
  6676. (char)rchModeName100,
  6677. (char)rchModeName101,
  6678. (char)rchModeName102,
  6679. (char)rchModeName103,
  6680. (char)rchModeName104,
  6681. (char)rchModeName105,
  6682. (char)rchModeName106,
  6683. (char)rchModeName107,
  6684. (char)rchModeName108,
  6685. (char)rchModeName109,
  6686. (char)rchModeName110,
  6687. (char)rchModeName111,
  6688. (char)rchModeName112,
  6689. (char)rchModeName113,
  6690. (char)rchModeName114,
  6691. (char)rchModeName115,
  6692. (char)rchModeName116,
  6693. (char)rchModeName117,
  6694. (char)rchModeName118,
  6695. (char)rchModeName119,
  6696. (char)rchModeName120,
  6697. (char)rchModeName121,
  6698. (char)rchModeName122,
  6699. (char)rchModeName123,
  6700. (char)rchModeName124,
  6701. (char)rchModeName125,
  6702. (char)rchModeName126,
  6703. (char)rchModeName127
  6704. }).TrimEnd('\0');
  6705. }
  6706. }
  6707. public byte rchSlotName0,rchSlotName1,rchSlotName2,rchSlotName3,rchSlotName4,rchSlotName5,rchSlotName6,rchSlotName7,rchSlotName8,rchSlotName9,rchSlotName10,rchSlotName11,rchSlotName12,rchSlotName13,rchSlotName14,rchSlotName15,rchSlotName16,rchSlotName17,rchSlotName18,rchSlotName19,rchSlotName20,rchSlotName21,rchSlotName22,rchSlotName23,rchSlotName24,rchSlotName25,rchSlotName26,rchSlotName27,rchSlotName28,rchSlotName29,rchSlotName30,rchSlotName31,rchSlotName32,rchSlotName33,rchSlotName34,rchSlotName35,rchSlotName36,rchSlotName37,rchSlotName38,rchSlotName39,rchSlotName40,rchSlotName41,rchSlotName42,rchSlotName43,rchSlotName44,rchSlotName45,rchSlotName46,rchSlotName47,rchSlotName48,rchSlotName49,rchSlotName50,rchSlotName51,rchSlotName52,rchSlotName53,rchSlotName54,rchSlotName55,rchSlotName56,rchSlotName57,rchSlotName58,rchSlotName59,rchSlotName60,rchSlotName61,rchSlotName62,rchSlotName63,rchSlotName64,rchSlotName65,rchSlotName66,rchSlotName67,rchSlotName68,rchSlotName69,rchSlotName70,rchSlotName71,rchSlotName72,rchSlotName73,rchSlotName74,rchSlotName75,rchSlotName76,rchSlotName77,rchSlotName78,rchSlotName79,rchSlotName80,rchSlotName81,rchSlotName82,rchSlotName83,rchSlotName84,rchSlotName85,rchSlotName86,rchSlotName87,rchSlotName88,rchSlotName89,rchSlotName90,rchSlotName91,rchSlotName92,rchSlotName93,rchSlotName94,rchSlotName95,rchSlotName96,rchSlotName97,rchSlotName98,rchSlotName99,rchSlotName100,rchSlotName101,rchSlotName102,rchSlotName103,rchSlotName104,rchSlotName105,rchSlotName106,rchSlotName107,rchSlotName108,rchSlotName109,rchSlotName110,rchSlotName111,rchSlotName112,rchSlotName113,rchSlotName114,rchSlotName115,rchSlotName116,rchSlotName117,rchSlotName118,rchSlotName119,rchSlotName120,rchSlotName121,rchSlotName122,rchSlotName123,rchSlotName124,rchSlotName125,rchSlotName126,rchSlotName127;
  6708. public string rchSlotName
  6709. {
  6710. get
  6711. {
  6712. return new string(new char[] {
  6713. (char)rchSlotName0,
  6714. (char)rchSlotName1,
  6715. (char)rchSlotName2,
  6716. (char)rchSlotName3,
  6717. (char)rchSlotName4,
  6718. (char)rchSlotName5,
  6719. (char)rchSlotName6,
  6720. (char)rchSlotName7,
  6721. (char)rchSlotName8,
  6722. (char)rchSlotName9,
  6723. (char)rchSlotName10,
  6724. (char)rchSlotName11,
  6725. (char)rchSlotName12,
  6726. (char)rchSlotName13,
  6727. (char)rchSlotName14,
  6728. (char)rchSlotName15,
  6729. (char)rchSlotName16,
  6730. (char)rchSlotName17,
  6731. (char)rchSlotName18,
  6732. (char)rchSlotName19,
  6733. (char)rchSlotName20,
  6734. (char)rchSlotName21,
  6735. (char)rchSlotName22,
  6736. (char)rchSlotName23,
  6737. (char)rchSlotName24,
  6738. (char)rchSlotName25,
  6739. (char)rchSlotName26,
  6740. (char)rchSlotName27,
  6741. (char)rchSlotName28,
  6742. (char)rchSlotName29,
  6743. (char)rchSlotName30,
  6744. (char)rchSlotName31,
  6745. (char)rchSlotName32,
  6746. (char)rchSlotName33,
  6747. (char)rchSlotName34,
  6748. (char)rchSlotName35,
  6749. (char)rchSlotName36,
  6750. (char)rchSlotName37,
  6751. (char)rchSlotName38,
  6752. (char)rchSlotName39,
  6753. (char)rchSlotName40,
  6754. (char)rchSlotName41,
  6755. (char)rchSlotName42,
  6756. (char)rchSlotName43,
  6757. (char)rchSlotName44,
  6758. (char)rchSlotName45,
  6759. (char)rchSlotName46,
  6760. (char)rchSlotName47,
  6761. (char)rchSlotName48,
  6762. (char)rchSlotName49,
  6763. (char)rchSlotName50,
  6764. (char)rchSlotName51,
  6765. (char)rchSlotName52,
  6766. (char)rchSlotName53,
  6767. (char)rchSlotName54,
  6768. (char)rchSlotName55,
  6769. (char)rchSlotName56,
  6770. (char)rchSlotName57,
  6771. (char)rchSlotName58,
  6772. (char)rchSlotName59,
  6773. (char)rchSlotName60,
  6774. (char)rchSlotName61,
  6775. (char)rchSlotName62,
  6776. (char)rchSlotName63,
  6777. (char)rchSlotName64,
  6778. (char)rchSlotName65,
  6779. (char)rchSlotName66,
  6780. (char)rchSlotName67,
  6781. (char)rchSlotName68,
  6782. (char)rchSlotName69,
  6783. (char)rchSlotName70,
  6784. (char)rchSlotName71,
  6785. (char)rchSlotName72,
  6786. (char)rchSlotName73,
  6787. (char)rchSlotName74,
  6788. (char)rchSlotName75,
  6789. (char)rchSlotName76,
  6790. (char)rchSlotName77,
  6791. (char)rchSlotName78,
  6792. (char)rchSlotName79,
  6793. (char)rchSlotName80,
  6794. (char)rchSlotName81,
  6795. (char)rchSlotName82,
  6796. (char)rchSlotName83,
  6797. (char)rchSlotName84,
  6798. (char)rchSlotName85,
  6799. (char)rchSlotName86,
  6800. (char)rchSlotName87,
  6801. (char)rchSlotName88,
  6802. (char)rchSlotName89,
  6803. (char)rchSlotName90,
  6804. (char)rchSlotName91,
  6805. (char)rchSlotName92,
  6806. (char)rchSlotName93,
  6807. (char)rchSlotName94,
  6808. (char)rchSlotName95,
  6809. (char)rchSlotName96,
  6810. (char)rchSlotName97,
  6811. (char)rchSlotName98,
  6812. (char)rchSlotName99,
  6813. (char)rchSlotName100,
  6814. (char)rchSlotName101,
  6815. (char)rchSlotName102,
  6816. (char)rchSlotName103,
  6817. (char)rchSlotName104,
  6818. (char)rchSlotName105,
  6819. (char)rchSlotName106,
  6820. (char)rchSlotName107,
  6821. (char)rchSlotName108,
  6822. (char)rchSlotName109,
  6823. (char)rchSlotName110,
  6824. (char)rchSlotName111,
  6825. (char)rchSlotName112,
  6826. (char)rchSlotName113,
  6827. (char)rchSlotName114,
  6828. (char)rchSlotName115,
  6829. (char)rchSlotName116,
  6830. (char)rchSlotName117,
  6831. (char)rchSlotName118,
  6832. (char)rchSlotName119,
  6833. (char)rchSlotName120,
  6834. (char)rchSlotName121,
  6835. (char)rchSlotName122,
  6836. (char)rchSlotName123,
  6837. (char)rchSlotName124,
  6838. (char)rchSlotName125,
  6839. (char)rchSlotName126,
  6840. (char)rchSlotName127
  6841. }).TrimEnd('\0');
  6842. }
  6843. }
  6844. public byte rchInputSourceType0,rchInputSourceType1,rchInputSourceType2,rchInputSourceType3,rchInputSourceType4,rchInputSourceType5,rchInputSourceType6,rchInputSourceType7,rchInputSourceType8,rchInputSourceType9,rchInputSourceType10,rchInputSourceType11,rchInputSourceType12,rchInputSourceType13,rchInputSourceType14,rchInputSourceType15,rchInputSourceType16,rchInputSourceType17,rchInputSourceType18,rchInputSourceType19,rchInputSourceType20,rchInputSourceType21,rchInputSourceType22,rchInputSourceType23,rchInputSourceType24,rchInputSourceType25,rchInputSourceType26,rchInputSourceType27,rchInputSourceType28,rchInputSourceType29,rchInputSourceType30,rchInputSourceType31;
  6845. public string rchInputSourceType
  6846. {
  6847. get
  6848. {
  6849. return new string(new char[] {
  6850. (char)rchInputSourceType0,
  6851. (char)rchInputSourceType1,
  6852. (char)rchInputSourceType2,
  6853. (char)rchInputSourceType3,
  6854. (char)rchInputSourceType4,
  6855. (char)rchInputSourceType5,
  6856. (char)rchInputSourceType6,
  6857. (char)rchInputSourceType7,
  6858. (char)rchInputSourceType8,
  6859. (char)rchInputSourceType9,
  6860. (char)rchInputSourceType10,
  6861. (char)rchInputSourceType11,
  6862. (char)rchInputSourceType12,
  6863. (char)rchInputSourceType13,
  6864. (char)rchInputSourceType14,
  6865. (char)rchInputSourceType15,
  6866. (char)rchInputSourceType16,
  6867. (char)rchInputSourceType17,
  6868. (char)rchInputSourceType18,
  6869. (char)rchInputSourceType19,
  6870. (char)rchInputSourceType20,
  6871. (char)rchInputSourceType21,
  6872. (char)rchInputSourceType22,
  6873. (char)rchInputSourceType23,
  6874. (char)rchInputSourceType24,
  6875. (char)rchInputSourceType25,
  6876. (char)rchInputSourceType26,
  6877. (char)rchInputSourceType27,
  6878. (char)rchInputSourceType28,
  6879. (char)rchInputSourceType29,
  6880. (char)rchInputSourceType30,
  6881. (char)rchInputSourceType31
  6882. }).TrimEnd('\0');
  6883. }
  6884. }
  6885. }
  6886. [StructLayout(LayoutKind.Sequential)] public struct VRActiveActionSet_t
  6887. {
  6888. public ulong ulActionSet;
  6889. public ulong ulRestrictedToDevice;
  6890. public ulong ulSecondaryActionSet;
  6891. public uint unPadding;
  6892. public int nPriority;
  6893. }
  6894. [StructLayout(LayoutKind.Sequential)] public struct VRSkeletalSummaryData_t
  6895. {
  6896. public float flFingerCurl0; //float[5]
  6897. public float flFingerCurl1;
  6898. public float flFingerCurl2;
  6899. public float flFingerCurl3;
  6900. public float flFingerCurl4;
  6901. public float flFingerSplay0; //float[4]
  6902. public float flFingerSplay1;
  6903. public float flFingerSplay2;
  6904. public float flFingerSplay3;
  6905. }
  6906. [StructLayout(LayoutKind.Sequential)] public struct SpatialAnchorPose_t
  6907. {
  6908. public HmdMatrix34_t mAnchorToAbsoluteTracking;
  6909. }
  6910. [StructLayout(LayoutKind.Sequential)] public struct COpenVRContext
  6911. {
  6912. public IntPtr m_pVRSystem; // class vr::IVRSystem *
  6913. public IntPtr m_pVRChaperone; // class vr::IVRChaperone *
  6914. public IntPtr m_pVRChaperoneSetup; // class vr::IVRChaperoneSetup *
  6915. public IntPtr m_pVRCompositor; // class vr::IVRCompositor *
  6916. public IntPtr m_pVRHeadsetView; // class vr::IVRHeadsetView *
  6917. public IntPtr m_pVROverlay; // class vr::IVROverlay *
  6918. public IntPtr m_pVROverlayView; // class vr::IVROverlayView *
  6919. public IntPtr m_pVRResources; // class vr::IVRResources *
  6920. public IntPtr m_pVRRenderModels; // class vr::IVRRenderModels *
  6921. public IntPtr m_pVRExtendedDisplay; // class vr::IVRExtendedDisplay *
  6922. public IntPtr m_pVRSettings; // class vr::IVRSettings *
  6923. public IntPtr m_pVRApplications; // class vr::IVRApplications *
  6924. public IntPtr m_pVRTrackedCamera; // class vr::IVRTrackedCamera *
  6925. public IntPtr m_pVRScreenshots; // class vr::IVRScreenshots *
  6926. public IntPtr m_pVRDriverManager; // class vr::IVRDriverManager *
  6927. public IntPtr m_pVRInput; // class vr::IVRInput *
  6928. public IntPtr m_pVRIOBuffer; // class vr::IVRIOBuffer *
  6929. public IntPtr m_pVRSpatialAnchors; // class vr::IVRSpatialAnchors *
  6930. public IntPtr m_pVRDebug; // class vr::IVRDebug *
  6931. public IntPtr m_pVRNotifications; // class vr::IVRNotifications *
  6932. }
  6933. [StructLayout(LayoutKind.Sequential)] public struct PropertyWrite_t
  6934. {
  6935. public ETrackedDeviceProperty prop;
  6936. public EPropertyWriteType writeType;
  6937. public ETrackedPropertyError eSetError;
  6938. public IntPtr pvBuffer; // void *
  6939. public uint unBufferSize;
  6940. public uint unTag;
  6941. public ETrackedPropertyError eError;
  6942. }
  6943. [StructLayout(LayoutKind.Sequential)] public struct PropertyRead_t
  6944. {
  6945. public ETrackedDeviceProperty prop;
  6946. public IntPtr pvBuffer; // void *
  6947. public uint unBufferSize;
  6948. public uint unTag;
  6949. public uint unRequiredBufferSize;
  6950. public ETrackedPropertyError eError;
  6951. }
  6952. [StructLayout(LayoutKind.Sequential)] public struct CVRPropertyHelpers
  6953. {
  6954. public IntPtr m_pProperties; // class vr::IVRProperties *
  6955. }
  6956. [StructLayout(LayoutKind.Sequential)] public struct PathWrite_t
  6957. {
  6958. public ulong ulPath;
  6959. public EPropertyWriteType writeType;
  6960. public ETrackedPropertyError eSetError;
  6961. public IntPtr pvBuffer; // void *
  6962. public uint unBufferSize;
  6963. public uint unTag;
  6964. public ETrackedPropertyError eError;
  6965. public IntPtr pszPath; // const char *
  6966. }
  6967. [StructLayout(LayoutKind.Sequential)] public struct PathRead_t
  6968. {
  6969. public ulong ulPath;
  6970. public IntPtr pvBuffer; // void *
  6971. public uint unBufferSize;
  6972. public uint unTag;
  6973. public uint unRequiredBufferSize;
  6974. public ETrackedPropertyError eError;
  6975. public IntPtr pszPath; // const char *
  6976. }
  6977. public class OpenVR
  6978. {
  6979. public static uint InitInternal(ref EVRInitError peError, EVRApplicationType eApplicationType)
  6980. {
  6981. return OpenVRInterop.InitInternal(ref peError, eApplicationType);
  6982. }
  6983. public static uint InitInternal2(ref EVRInitError peError, EVRApplicationType eApplicationType, string pchStartupInfo)
  6984. {
  6985. return OpenVRInterop.InitInternal2(ref peError, eApplicationType, pchStartupInfo);
  6986. }
  6987. public static void ShutdownInternal()
  6988. {
  6989. OpenVRInterop.ShutdownInternal();
  6990. }
  6991. public static bool IsHmdPresent()
  6992. {
  6993. return OpenVRInterop.IsHmdPresent();
  6994. }
  6995. public static bool IsRuntimeInstalled()
  6996. {
  6997. return OpenVRInterop.IsRuntimeInstalled();
  6998. }
  6999. public static string RuntimePath()
  7000. {
  7001. try
  7002. {
  7003. uint pathSize = 512;
  7004. uint requiredPathSize = 512;
  7005. System.Text.StringBuilder path = new System.Text.StringBuilder((int)pathSize);
  7006. bool success = OpenVRInterop.GetRuntimePath(path, pathSize, ref requiredPathSize);
  7007. if (success == false)
  7008. {
  7009. return null;
  7010. }
  7011. return path.ToString();
  7012. } catch
  7013. {
  7014. return OpenVRInterop.RuntimePath(); //this api is deprecated but here to support older unity versions
  7015. }
  7016. }
  7017. public static string GetStringForHmdError(EVRInitError error)
  7018. {
  7019. return Marshal.PtrToStringAnsi(OpenVRInterop.GetStringForHmdError(error));
  7020. }
  7021. public static IntPtr GetGenericInterface(string pchInterfaceVersion, ref EVRInitError peError)
  7022. {
  7023. return OpenVRInterop.GetGenericInterface(pchInterfaceVersion, ref peError);
  7024. }
  7025. public static bool IsInterfaceVersionValid(string pchInterfaceVersion)
  7026. {
  7027. return OpenVRInterop.IsInterfaceVersionValid(pchInterfaceVersion);
  7028. }
  7029. public static uint GetInitToken()
  7030. {
  7031. return OpenVRInterop.GetInitToken();
  7032. }
  7033. public const uint k_nDriverNone = 4294967295;
  7034. public const uint k_unMaxDriverDebugResponseSize = 32768;
  7035. public const uint k_unTrackedDeviceIndex_Hmd = 0;
  7036. public const uint k_unMaxTrackedDeviceCount = 64;
  7037. public const uint k_unTrackedDeviceIndexOther = 4294967294;
  7038. public const uint k_unTrackedDeviceIndexInvalid = 4294967295;
  7039. public const ulong k_ulInvalidPropertyContainer = 0;
  7040. public const uint k_unInvalidPropertyTag = 0;
  7041. public const ulong k_ulInvalidDriverHandle = 0;
  7042. public const uint k_unFloatPropertyTag = 1;
  7043. public const uint k_unInt32PropertyTag = 2;
  7044. public const uint k_unUint64PropertyTag = 3;
  7045. public const uint k_unBoolPropertyTag = 4;
  7046. public const uint k_unStringPropertyTag = 5;
  7047. public const uint k_unErrorPropertyTag = 6;
  7048. public const uint k_unDoublePropertyTag = 7;
  7049. public const uint k_unHmdMatrix34PropertyTag = 20;
  7050. public const uint k_unHmdMatrix44PropertyTag = 21;
  7051. public const uint k_unHmdVector3PropertyTag = 22;
  7052. public const uint k_unHmdVector4PropertyTag = 23;
  7053. public const uint k_unHmdVector2PropertyTag = 24;
  7054. public const uint k_unHmdQuadPropertyTag = 25;
  7055. public const uint k_unHiddenAreaPropertyTag = 30;
  7056. public const uint k_unPathHandleInfoTag = 31;
  7057. public const uint k_unActionPropertyTag = 32;
  7058. public const uint k_unInputValuePropertyTag = 33;
  7059. public const uint k_unWildcardPropertyTag = 34;
  7060. public const uint k_unHapticVibrationPropertyTag = 35;
  7061. public const uint k_unSkeletonPropertyTag = 36;
  7062. public const uint k_unSpatialAnchorPosePropertyTag = 40;
  7063. public const uint k_unJsonPropertyTag = 41;
  7064. public const uint k_unActiveActionSetPropertyTag = 42;
  7065. public const uint k_unOpenVRInternalReserved_Start = 1000;
  7066. public const uint k_unOpenVRInternalReserved_End = 10000;
  7067. public const uint k_unMaxPropertyStringSize = 32768;
  7068. public const ulong k_ulInvalidActionHandle = 0;
  7069. public const ulong k_ulInvalidActionSetHandle = 0;
  7070. public const ulong k_ulInvalidInputValueHandle = 0;
  7071. public const uint k_unControllerStateAxisCount = 5;
  7072. public const ulong k_ulOverlayHandleInvalid = 0;
  7073. public const uint k_unMaxDistortionFunctionParameters = 8;
  7074. public const uint k_unScreenshotHandleInvalid = 0;
  7075. public const string IVRSystem_Version = "IVRSystem_022";
  7076. public const string IVRExtendedDisplay_Version = "IVRExtendedDisplay_001";
  7077. public const string IVRTrackedCamera_Version = "IVRTrackedCamera_006";
  7078. public const uint k_unMaxApplicationKeyLength = 128;
  7079. public const string k_pch_MimeType_HomeApp = "vr/home";
  7080. public const string k_pch_MimeType_GameTheater = "vr/game_theater";
  7081. public const string IVRApplications_Version = "IVRApplications_007";
  7082. public const string IVRChaperone_Version = "IVRChaperone_004";
  7083. public const string IVRChaperoneSetup_Version = "IVRChaperoneSetup_006";
  7084. public const string IVRCompositor_Version = "IVRCompositor_026";
  7085. public const uint k_unVROverlayMaxKeyLength = 128;
  7086. public const uint k_unVROverlayMaxNameLength = 128;
  7087. public const uint k_unMaxOverlayCount = 128;
  7088. public const uint k_unMaxOverlayIntersectionMaskPrimitivesCount = 32;
  7089. public const string IVROverlay_Version = "IVROverlay_025";
  7090. public const string IVROverlayView_Version = "IVROverlayView_003";
  7091. public const uint k_unHeadsetViewMaxWidth = 3840;
  7092. public const uint k_unHeadsetViewMaxHeight = 2160;
  7093. public const string k_pchHeadsetViewOverlayKey = "system.HeadsetView";
  7094. public const string IVRHeadsetView_Version = "IVRHeadsetView_001";
  7095. public const string k_pch_Controller_Component_GDC2015 = "gdc2015";
  7096. public const string k_pch_Controller_Component_Base = "base";
  7097. public const string k_pch_Controller_Component_Tip = "tip";
  7098. public const string k_pch_Controller_Component_HandGrip = "handgrip";
  7099. public const string k_pch_Controller_Component_Status = "status";
  7100. public const string IVRRenderModels_Version = "IVRRenderModels_006";
  7101. public const uint k_unNotificationTextMaxSize = 256;
  7102. public const string IVRNotifications_Version = "IVRNotifications_002";
  7103. public const uint k_unMaxSettingsKeyLength = 128;
  7104. public const string IVRSettings_Version = "IVRSettings_003";
  7105. public const string k_pch_SteamVR_Section = "steamvr";
  7106. public const string k_pch_SteamVR_RequireHmd_String = "requireHmd";
  7107. public const string k_pch_SteamVR_ForcedDriverKey_String = "forcedDriver";
  7108. public const string k_pch_SteamVR_ForcedHmdKey_String = "forcedHmd";
  7109. public const string k_pch_SteamVR_DisplayDebug_Bool = "displayDebug";
  7110. public const string k_pch_SteamVR_DebugProcessPipe_String = "debugProcessPipe";
  7111. public const string k_pch_SteamVR_DisplayDebugX_Int32 = "displayDebugX";
  7112. public const string k_pch_SteamVR_DisplayDebugY_Int32 = "displayDebugY";
  7113. public const string k_pch_SteamVR_SendSystemButtonToAllApps_Bool = "sendSystemButtonToAllApps";
  7114. public const string k_pch_SteamVR_LogLevel_Int32 = "loglevel";
  7115. public const string k_pch_SteamVR_IPD_Float = "ipd";
  7116. public const string k_pch_SteamVR_Background_String = "background";
  7117. public const string k_pch_SteamVR_BackgroundUseDomeProjection_Bool = "backgroundUseDomeProjection";
  7118. public const string k_pch_SteamVR_BackgroundCameraHeight_Float = "backgroundCameraHeight";
  7119. public const string k_pch_SteamVR_BackgroundDomeRadius_Float = "backgroundDomeRadius";
  7120. public const string k_pch_SteamVR_GridColor_String = "gridColor";
  7121. public const string k_pch_SteamVR_PlayAreaColor_String = "playAreaColor";
  7122. public const string k_pch_SteamVR_TrackingLossColor_String = "trackingLossColor";
  7123. public const string k_pch_SteamVR_ShowStage_Bool = "showStage";
  7124. public const string k_pch_SteamVR_DrawTrackingReferences_Bool = "drawTrackingReferences";
  7125. public const string k_pch_SteamVR_ActivateMultipleDrivers_Bool = "activateMultipleDrivers";
  7126. public const string k_pch_SteamVR_UsingSpeakers_Bool = "usingSpeakers";
  7127. public const string k_pch_SteamVR_SpeakersForwardYawOffsetDegrees_Float = "speakersForwardYawOffsetDegrees";
  7128. public const string k_pch_SteamVR_BaseStationPowerManagement_Int32 = "basestationPowerManagement";
  7129. public const string k_pch_SteamVR_ShowBaseStationPowerManagementTip_Int32 = "ShowBaseStationPowerManagementTip";
  7130. public const string k_pch_SteamVR_NeverKillProcesses_Bool = "neverKillProcesses";
  7131. public const string k_pch_SteamVR_SupersampleScale_Float = "supersampleScale";
  7132. public const string k_pch_SteamVR_MaxRecommendedResolution_Int32 = "maxRecommendedResolution";
  7133. public const string k_pch_SteamVR_MotionSmoothing_Bool = "motionSmoothing";
  7134. public const string k_pch_SteamVR_MotionSmoothingOverride_Int32 = "motionSmoothingOverride";
  7135. public const string k_pch_SteamVR_DisableAsyncReprojection_Bool = "disableAsync";
  7136. public const string k_pch_SteamVR_ForceFadeOnBadTracking_Bool = "forceFadeOnBadTracking";
  7137. public const string k_pch_SteamVR_DefaultMirrorView_Int32 = "mirrorView";
  7138. public const string k_pch_SteamVR_ShowLegacyMirrorView_Bool = "showLegacyMirrorView";
  7139. public const string k_pch_SteamVR_MirrorViewVisibility_Bool = "showMirrorView";
  7140. public const string k_pch_SteamVR_MirrorViewDisplayMode_Int32 = "mirrorViewDisplayMode";
  7141. public const string k_pch_SteamVR_MirrorViewEye_Int32 = "mirrorViewEye";
  7142. public const string k_pch_SteamVR_MirrorViewGeometry_String = "mirrorViewGeometry";
  7143. public const string k_pch_SteamVR_MirrorViewGeometryMaximized_String = "mirrorViewGeometryMaximized";
  7144. public const string k_pch_SteamVR_PerfGraphVisibility_Bool = "showPerfGraph";
  7145. public const string k_pch_SteamVR_StartMonitorFromAppLaunch = "startMonitorFromAppLaunch";
  7146. public const string k_pch_SteamVR_StartCompositorFromAppLaunch_Bool = "startCompositorFromAppLaunch";
  7147. public const string k_pch_SteamVR_StartDashboardFromAppLaunch_Bool = "startDashboardFromAppLaunch";
  7148. public const string k_pch_SteamVR_StartOverlayAppsFromDashboard_Bool = "startOverlayAppsFromDashboard";
  7149. public const string k_pch_SteamVR_EnableHomeApp = "enableHomeApp";
  7150. public const string k_pch_SteamVR_CycleBackgroundImageTimeSec_Int32 = "CycleBackgroundImageTimeSec";
  7151. public const string k_pch_SteamVR_RetailDemo_Bool = "retailDemo";
  7152. public const string k_pch_SteamVR_IpdOffset_Float = "ipdOffset";
  7153. public const string k_pch_SteamVR_AllowSupersampleFiltering_Bool = "allowSupersampleFiltering";
  7154. public const string k_pch_SteamVR_SupersampleManualOverride_Bool = "supersampleManualOverride";
  7155. public const string k_pch_SteamVR_EnableLinuxVulkanAsync_Bool = "enableLinuxVulkanAsync";
  7156. public const string k_pch_SteamVR_AllowDisplayLockedMode_Bool = "allowDisplayLockedMode";
  7157. public const string k_pch_SteamVR_HaveStartedTutorialForNativeChaperoneDriver_Bool = "haveStartedTutorialForNativeChaperoneDriver";
  7158. public const string k_pch_SteamVR_ForceWindows32bitVRMonitor = "forceWindows32BitVRMonitor";
  7159. public const string k_pch_SteamVR_DebugInputBinding = "debugInputBinding";
  7160. public const string k_pch_SteamVR_DoNotFadeToGrid = "doNotFadeToGrid";
  7161. public const string k_pch_SteamVR_RenderCameraMode = "renderCameraMode";
  7162. public const string k_pch_SteamVR_EnableSharedResourceJournaling = "enableSharedResourceJournaling";
  7163. public const string k_pch_SteamVR_EnableSafeMode = "enableSafeMode";
  7164. public const string k_pch_SteamVR_PreferredRefreshRate = "preferredRefreshRate";
  7165. public const string k_pch_SteamVR_LastVersionNotice = "lastVersionNotice";
  7166. public const string k_pch_SteamVR_LastVersionNoticeDate = "lastVersionNoticeDate";
  7167. public const string k_pch_SteamVR_HmdDisplayColorGainR_Float = "hmdDisplayColorGainR";
  7168. public const string k_pch_SteamVR_HmdDisplayColorGainG_Float = "hmdDisplayColorGainG";
  7169. public const string k_pch_SteamVR_HmdDisplayColorGainB_Float = "hmdDisplayColorGainB";
  7170. public const string k_pch_SteamVR_CustomIconStyle_String = "customIconStyle";
  7171. public const string k_pch_SteamVR_CustomOffIconStyle_String = "customOffIconStyle";
  7172. public const string k_pch_SteamVR_CustomIconForceUpdate_String = "customIconForceUpdate";
  7173. public const string k_pch_SteamVR_AllowGlobalActionSetPriority = "globalActionSetPriority";
  7174. public const string k_pch_SteamVR_OverlayRenderQuality = "overlayRenderQuality_2";
  7175. public const string k_pch_SteamVR_BlockOculusSDKOnOpenVRLaunchOption_Bool = "blockOculusSDKOnOpenVRLaunchOption";
  7176. public const string k_pch_SteamVR_BlockOculusSDKOnAllLaunches_Bool = "blockOculusSDKOnAllLaunches";
  7177. public const string k_pch_SteamVR_HDCPLegacyCompatibility_Bool = "hdcp14legacyCompatibility";
  7178. public const string k_pch_SteamVR_UsePrism_Bool = "usePrism";
  7179. public const string k_pch_DirectMode_Section = "direct_mode";
  7180. public const string k_pch_DirectMode_Enable_Bool = "enable";
  7181. public const string k_pch_DirectMode_Count_Int32 = "count";
  7182. public const string k_pch_DirectMode_EdidVid_Int32 = "edidVid";
  7183. public const string k_pch_DirectMode_EdidPid_Int32 = "edidPid";
  7184. public const string k_pch_Lighthouse_Section = "driver_lighthouse";
  7185. public const string k_pch_Lighthouse_DisableIMU_Bool = "disableimu";
  7186. public const string k_pch_Lighthouse_DisableIMUExceptHMD_Bool = "disableimuexcepthmd";
  7187. public const string k_pch_Lighthouse_UseDisambiguation_String = "usedisambiguation";
  7188. public const string k_pch_Lighthouse_DisambiguationDebug_Int32 = "disambiguationdebug";
  7189. public const string k_pch_Lighthouse_PrimaryBasestation_Int32 = "primarybasestation";
  7190. public const string k_pch_Lighthouse_DBHistory_Bool = "dbhistory";
  7191. public const string k_pch_Lighthouse_EnableBluetooth_Bool = "enableBluetooth";
  7192. public const string k_pch_Lighthouse_PowerManagedBaseStations_String = "PowerManagedBaseStations";
  7193. public const string k_pch_Lighthouse_PowerManagedBaseStations2_String = "PowerManagedBaseStations2";
  7194. public const string k_pch_Lighthouse_InactivityTimeoutForBaseStations_Int32 = "InactivityTimeoutForBaseStations";
  7195. public const string k_pch_Lighthouse_EnableImuFallback_Bool = "enableImuFallback";
  7196. public const string k_pch_Null_Section = "driver_null";
  7197. public const string k_pch_Null_SerialNumber_String = "serialNumber";
  7198. public const string k_pch_Null_ModelNumber_String = "modelNumber";
  7199. public const string k_pch_Null_WindowX_Int32 = "windowX";
  7200. public const string k_pch_Null_WindowY_Int32 = "windowY";
  7201. public const string k_pch_Null_WindowWidth_Int32 = "windowWidth";
  7202. public const string k_pch_Null_WindowHeight_Int32 = "windowHeight";
  7203. public const string k_pch_Null_RenderWidth_Int32 = "renderWidth";
  7204. public const string k_pch_Null_RenderHeight_Int32 = "renderHeight";
  7205. public const string k_pch_Null_SecondsFromVsyncToPhotons_Float = "secondsFromVsyncToPhotons";
  7206. public const string k_pch_Null_DisplayFrequency_Float = "displayFrequency";
  7207. public const string k_pch_WindowsMR_Section = "driver_holographic";
  7208. public const string k_pch_UserInterface_Section = "userinterface";
  7209. public const string k_pch_UserInterface_StatusAlwaysOnTop_Bool = "StatusAlwaysOnTop";
  7210. public const string k_pch_UserInterface_MinimizeToTray_Bool = "MinimizeToTray";
  7211. public const string k_pch_UserInterface_HidePopupsWhenStatusMinimized_Bool = "HidePopupsWhenStatusMinimized";
  7212. public const string k_pch_UserInterface_Screenshots_Bool = "screenshots";
  7213. public const string k_pch_UserInterface_ScreenshotType_Int = "screenshotType";
  7214. public const string k_pch_Notifications_Section = "notifications";
  7215. public const string k_pch_Notifications_DoNotDisturb_Bool = "DoNotDisturb";
  7216. public const string k_pch_Keyboard_Section = "keyboard";
  7217. public const string k_pch_Keyboard_TutorialCompletions = "TutorialCompletions";
  7218. public const string k_pch_Keyboard_ScaleX = "ScaleX";
  7219. public const string k_pch_Keyboard_ScaleY = "ScaleY";
  7220. public const string k_pch_Keyboard_OffsetLeftX = "OffsetLeftX";
  7221. public const string k_pch_Keyboard_OffsetRightX = "OffsetRightX";
  7222. public const string k_pch_Keyboard_OffsetY = "OffsetY";
  7223. public const string k_pch_Keyboard_Smoothing = "Smoothing";
  7224. public const string k_pch_Perf_Section = "perfcheck";
  7225. public const string k_pch_Perf_PerfGraphInHMD_Bool = "perfGraphInHMD";
  7226. public const string k_pch_Perf_AllowTimingStore_Bool = "allowTimingStore";
  7227. public const string k_pch_Perf_SaveTimingsOnExit_Bool = "saveTimingsOnExit";
  7228. public const string k_pch_Perf_TestData_Float = "perfTestData";
  7229. public const string k_pch_Perf_GPUProfiling_Bool = "GPUProfiling";
  7230. public const string k_pch_CollisionBounds_Section = "collisionBounds";
  7231. public const string k_pch_CollisionBounds_Style_Int32 = "CollisionBoundsStyle";
  7232. public const string k_pch_CollisionBounds_GroundPerimeterOn_Bool = "CollisionBoundsGroundPerimeterOn";
  7233. public const string k_pch_CollisionBounds_CenterMarkerOn_Bool = "CollisionBoundsCenterMarkerOn";
  7234. public const string k_pch_CollisionBounds_PlaySpaceOn_Bool = "CollisionBoundsPlaySpaceOn";
  7235. public const string k_pch_CollisionBounds_FadeDistance_Float = "CollisionBoundsFadeDistance";
  7236. public const string k_pch_CollisionBounds_WallHeight_Float = "CollisionBoundsWallHeight";
  7237. public const string k_pch_CollisionBounds_ColorGammaR_Int32 = "CollisionBoundsColorGammaR";
  7238. public const string k_pch_CollisionBounds_ColorGammaG_Int32 = "CollisionBoundsColorGammaG";
  7239. public const string k_pch_CollisionBounds_ColorGammaB_Int32 = "CollisionBoundsColorGammaB";
  7240. public const string k_pch_CollisionBounds_ColorGammaA_Int32 = "CollisionBoundsColorGammaA";
  7241. public const string k_pch_CollisionBounds_EnableDriverImport = "enableDriverBoundsImport";
  7242. public const string k_pch_Camera_Section = "camera";
  7243. public const string k_pch_Camera_EnableCamera_Bool = "enableCamera";
  7244. public const string k_pch_Camera_ShowOnController_Bool = "showOnController";
  7245. public const string k_pch_Camera_EnableCameraForCollisionBounds_Bool = "enableCameraForCollisionBounds";
  7246. public const string k_pch_Camera_RoomView_Int32 = "roomView";
  7247. public const string k_pch_Camera_BoundsColorGammaR_Int32 = "cameraBoundsColorGammaR";
  7248. public const string k_pch_Camera_BoundsColorGammaG_Int32 = "cameraBoundsColorGammaG";
  7249. public const string k_pch_Camera_BoundsColorGammaB_Int32 = "cameraBoundsColorGammaB";
  7250. public const string k_pch_Camera_BoundsColorGammaA_Int32 = "cameraBoundsColorGammaA";
  7251. public const string k_pch_Camera_BoundsStrength_Int32 = "cameraBoundsStrength";
  7252. public const string k_pch_Camera_RoomViewStyle_Int32 = "roomViewStyle";
  7253. public const string k_pch_audio_Section = "audio";
  7254. public const string k_pch_audio_SetOsDefaultPlaybackDevice_Bool = "setOsDefaultPlaybackDevice";
  7255. public const string k_pch_audio_EnablePlaybackDeviceOverride_Bool = "enablePlaybackDeviceOverride";
  7256. public const string k_pch_audio_PlaybackDeviceOverride_String = "playbackDeviceOverride";
  7257. public const string k_pch_audio_PlaybackDeviceOverrideName_String = "playbackDeviceOverrideName";
  7258. public const string k_pch_audio_SetOsDefaultRecordingDevice_Bool = "setOsDefaultRecordingDevice";
  7259. public const string k_pch_audio_EnableRecordingDeviceOverride_Bool = "enableRecordingDeviceOverride";
  7260. public const string k_pch_audio_RecordingDeviceOverride_String = "recordingDeviceOverride";
  7261. public const string k_pch_audio_RecordingDeviceOverrideName_String = "recordingDeviceOverrideName";
  7262. public const string k_pch_audio_EnablePlaybackMirror_Bool = "enablePlaybackMirror";
  7263. public const string k_pch_audio_PlaybackMirrorDevice_String = "playbackMirrorDevice";
  7264. public const string k_pch_audio_PlaybackMirrorDeviceName_String = "playbackMirrorDeviceName";
  7265. public const string k_pch_audio_OldPlaybackMirrorDevice_String = "onPlaybackMirrorDevice";
  7266. public const string k_pch_audio_ActiveMirrorDevice_String = "activePlaybackMirrorDevice";
  7267. public const string k_pch_audio_EnablePlaybackMirrorIndependentVolume_Bool = "enablePlaybackMirrorIndependentVolume";
  7268. public const string k_pch_audio_LastHmdPlaybackDeviceId_String = "lastHmdPlaybackDeviceId";
  7269. public const string k_pch_audio_VIVEHDMIGain = "viveHDMIGain";
  7270. public const string k_pch_audio_DualSpeakerAndJackOutput_Bool = "dualSpeakerAndJackOutput";
  7271. public const string k_pch_audio_MuteMicMonitor_Bool = "muteMicMonitor";
  7272. public const string k_pch_Power_Section = "power";
  7273. public const string k_pch_Power_PowerOffOnExit_Bool = "powerOffOnExit";
  7274. public const string k_pch_Power_TurnOffScreensTimeout_Float = "turnOffScreensTimeout";
  7275. public const string k_pch_Power_TurnOffControllersTimeout_Float = "turnOffControllersTimeout";
  7276. public const string k_pch_Power_ReturnToWatchdogTimeout_Float = "returnToWatchdogTimeout";
  7277. public const string k_pch_Power_AutoLaunchSteamVROnButtonPress = "autoLaunchSteamVROnButtonPress";
  7278. public const string k_pch_Power_PauseCompositorOnStandby_Bool = "pauseCompositorOnStandby";
  7279. public const string k_pch_Dashboard_Section = "dashboard";
  7280. public const string k_pch_Dashboard_EnableDashboard_Bool = "enableDashboard";
  7281. public const string k_pch_Dashboard_ArcadeMode_Bool = "arcadeMode";
  7282. public const string k_pch_Dashboard_Position = "position";
  7283. public const string k_pch_Dashboard_DesktopScale = "desktopScale";
  7284. public const string k_pch_Dashboard_DashboardScale = "dashboardScale";
  7285. public const string k_pch_Dashboard_UseStandaloneSystemLayer = "standaloneSystemLayer";
  7286. public const string k_pch_modelskin_Section = "modelskins";
  7287. public const string k_pch_Driver_Enable_Bool = "enable";
  7288. public const string k_pch_Driver_BlockedBySafemode_Bool = "blocked_by_safe_mode";
  7289. public const string k_pch_Driver_LoadPriority_Int32 = "loadPriority";
  7290. public const string k_pch_WebInterface_Section = "WebInterface";
  7291. public const string k_pch_VRWebHelper_Section = "VRWebHelper";
  7292. public const string k_pch_VRWebHelper_DebuggerEnabled_Bool = "DebuggerEnabled";
  7293. public const string k_pch_VRWebHelper_DebuggerPort_Int32 = "DebuggerPort";
  7294. public const string k_pch_TrackingOverride_Section = "TrackingOverrides";
  7295. public const string k_pch_App_BindingAutosaveURLSuffix_String = "AutosaveURL";
  7296. public const string k_pch_App_BindingLegacyAPISuffix_String = "_legacy";
  7297. public const string k_pch_App_BindingSteamVRInputAPISuffix_String = "_steamvrinput";
  7298. public const string k_pch_App_BindingCurrentURLSuffix_String = "CurrentURL";
  7299. public const string k_pch_App_BindingPreviousURLSuffix_String = "PreviousURL";
  7300. public const string k_pch_App_NeedToUpdateAutosaveSuffix_Bool = "NeedToUpdateAutosave";
  7301. public const string k_pch_App_DominantHand_Int32 = "DominantHand";
  7302. public const string k_pch_App_BlockOculusSDK_Bool = "blockOculusSDK";
  7303. public const string k_pch_Trackers_Section = "trackers";
  7304. public const string k_pch_DesktopUI_Section = "DesktopUI";
  7305. public const string k_pch_LastKnown_Section = "LastKnown";
  7306. public const string k_pch_LastKnown_HMDManufacturer_String = "HMDManufacturer";
  7307. public const string k_pch_LastKnown_HMDModel_String = "HMDModel";
  7308. public const string k_pch_DismissedWarnings_Section = "DismissedWarnings";
  7309. public const string k_pch_Input_Section = "input";
  7310. public const string k_pch_Input_LeftThumbstickRotation_Float = "leftThumbstickRotation";
  7311. public const string k_pch_Input_RightThumbstickRotation_Float = "rightThumbstickRotation";
  7312. public const string k_pch_Input_ThumbstickDeadzone_Float = "thumbstickDeadzone";
  7313. public const string k_pch_GpuSpeed_Section = "GpuSpeed";
  7314. public const string IVRScreenshots_Version = "IVRScreenshots_001";
  7315. public const string IVRResources_Version = "IVRResources_001";
  7316. public const string IVRDriverManager_Version = "IVRDriverManager_001";
  7317. public const uint k_unMaxActionNameLength = 64;
  7318. public const uint k_unMaxActionSetNameLength = 64;
  7319. public const uint k_unMaxActionOriginCount = 16;
  7320. public const uint k_unMaxBoneNameLength = 32;
  7321. public const int k_nActionSetOverlayGlobalPriorityMin = 16777216;
  7322. public const int k_nActionSetOverlayGlobalPriorityMax = 33554431;
  7323. public const int k_nActionSetPriorityReservedMin = 33554432;
  7324. public const string IVRInput_Version = "IVRInput_010";
  7325. public const ulong k_ulInvalidIOBufferHandle = 0;
  7326. public const string IVRIOBuffer_Version = "IVRIOBuffer_002";
  7327. public const uint k_ulInvalidSpatialAnchorHandle = 0;
  7328. public const string IVRSpatialAnchors_Version = "IVRSpatialAnchors_001";
  7329. public const string IVRDebug_Version = "IVRDebug_001";
  7330. public const ulong k_ulDisplayRedirectContainer = 25769803779;
  7331. public const string IVRProperties_Version = "IVRProperties_001";
  7332. public const string k_pchPathUserHandRight = "/user/hand/right";
  7333. public const string k_pchPathUserHandLeft = "/user/hand/left";
  7334. public const string k_pchPathUserHandPrimary = "/user/hand/primary";
  7335. public const string k_pchPathUserHandSecondary = "/user/hand/secondary";
  7336. public const string k_pchPathUserHead = "/user/head";
  7337. public const string k_pchPathUserGamepad = "/user/gamepad";
  7338. public const string k_pchPathUserTreadmill = "/user/treadmill";
  7339. public const string k_pchPathUserStylus = "/user/stylus";
  7340. public const string k_pchPathDevices = "/devices";
  7341. public const string k_pchPathDevicePath = "/device_path";
  7342. public const string k_pchPathBestAliasPath = "/best_alias_path";
  7343. public const string k_pchPathBoundTrackerAliasPath = "/bound_tracker_path";
  7344. public const string k_pchPathBoundTrackerRole = "/bound_tracker_role";
  7345. public const string k_pchPathPoseRaw = "/pose/raw";
  7346. public const string k_pchPathPoseTip = "/pose/tip";
  7347. public const string k_pchPathPoseGrip = "/pose/grip";
  7348. public const string k_pchPathSystemButtonClick = "/input/system/click";
  7349. public const string k_pchPathProximity = "/proximity";
  7350. public const string k_pchPathControllerTypePrefix = "/controller_type/";
  7351. public const string k_pchPathInputProfileSuffix = "/input_profile";
  7352. public const string k_pchPathBindingNameSuffix = "/binding_name";
  7353. public const string k_pchPathBindingUrlSuffix = "/binding_url";
  7354. public const string k_pchPathBindingErrorSuffix = "/binding_error";
  7355. public const string k_pchPathActiveActionSets = "/active_action_sets";
  7356. public const string k_pchPathComponentUpdates = "/total_component_updates";
  7357. public const string k_pchPathUserFootLeft = "/user/foot/left";
  7358. public const string k_pchPathUserFootRight = "/user/foot/right";
  7359. public const string k_pchPathUserShoulderLeft = "/user/shoulder/left";
  7360. public const string k_pchPathUserShoulderRight = "/user/shoulder/right";
  7361. public const string k_pchPathUserElbowLeft = "/user/elbow/left";
  7362. public const string k_pchPathUserElbowRight = "/user/elbow/right";
  7363. public const string k_pchPathUserKneeLeft = "/user/knee/left";
  7364. public const string k_pchPathUserKneeRight = "/user/knee/right";
  7365. public const string k_pchPathUserWaist = "/user/waist";
  7366. public const string k_pchPathUserChest = "/user/chest";
  7367. public const string k_pchPathUserCamera = "/user/camera";
  7368. public const string k_pchPathUserKeyboard = "/user/keyboard";
  7369. public const string k_pchPathClientAppKey = "/client_info/app_key";
  7370. public const ulong k_ulInvalidPathHandle = 0;
  7371. public const string IVRPaths_Version = "IVRPaths_001";
  7372. public const string IVRBlockQueue_Version = "IVRBlockQueue_004";
  7373. static uint VRToken { get; set; }
  7374. const string FnTable_Prefix = "FnTable:";
  7375. class COpenVRContext
  7376. {
  7377. public COpenVRContext() { Clear(); }
  7378. public void Clear()
  7379. {
  7380. m_pVRSystem = null;
  7381. m_pVRChaperone = null;
  7382. m_pVRChaperoneSetup = null;
  7383. m_pVRCompositor = null;
  7384. m_pVRHeadsetView = null;
  7385. m_pVROverlay = null;
  7386. m_pVROverlayView = null;
  7387. m_pVRRenderModels = null;
  7388. m_pVRExtendedDisplay = null;
  7389. m_pVRSettings = null;
  7390. m_pVRApplications = null;
  7391. m_pVRScreenshots = null;
  7392. m_pVRTrackedCamera = null;
  7393. m_pVRInput = null;
  7394. m_pVRIOBuffer = null;
  7395. m_pVRSpatialAnchors = null;
  7396. m_pVRNotifications = null;
  7397. m_pVRDebug = null;
  7398. }
  7399. void CheckClear()
  7400. {
  7401. if (VRToken != GetInitToken())
  7402. {
  7403. Clear();
  7404. VRToken = GetInitToken();
  7405. }
  7406. }
  7407. public CVRSystem VRSystem()
  7408. {
  7409. CheckClear();
  7410. if (m_pVRSystem == null)
  7411. {
  7412. var eError = EVRInitError.None;
  7413. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRSystem_Version, ref eError);
  7414. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7415. m_pVRSystem = new CVRSystem(pInterface);
  7416. }
  7417. return m_pVRSystem;
  7418. }
  7419. public CVRChaperone VRChaperone()
  7420. {
  7421. CheckClear();
  7422. if (m_pVRChaperone == null)
  7423. {
  7424. var eError = EVRInitError.None;
  7425. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRChaperone_Version, ref eError);
  7426. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7427. m_pVRChaperone = new CVRChaperone(pInterface);
  7428. }
  7429. return m_pVRChaperone;
  7430. }
  7431. public CVRChaperoneSetup VRChaperoneSetup()
  7432. {
  7433. CheckClear();
  7434. if (m_pVRChaperoneSetup == null)
  7435. {
  7436. var eError = EVRInitError.None;
  7437. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRChaperoneSetup_Version, ref eError);
  7438. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7439. m_pVRChaperoneSetup = new CVRChaperoneSetup(pInterface);
  7440. }
  7441. return m_pVRChaperoneSetup;
  7442. }
  7443. public CVRCompositor VRCompositor()
  7444. {
  7445. CheckClear();
  7446. if (m_pVRCompositor == null)
  7447. {
  7448. var eError = EVRInitError.None;
  7449. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRCompositor_Version, ref eError);
  7450. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7451. m_pVRCompositor = new CVRCompositor(pInterface);
  7452. }
  7453. return m_pVRCompositor;
  7454. }
  7455. public CVRHeadsetView VRHeadsetView()
  7456. {
  7457. CheckClear();
  7458. if (m_pVRHeadsetView == null)
  7459. {
  7460. var eError = EVRInitError.None;
  7461. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRHeadsetView_Version, ref eError);
  7462. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7463. m_pVRHeadsetView = new CVRHeadsetView(pInterface);
  7464. }
  7465. return m_pVRHeadsetView;
  7466. }
  7467. public CVROverlay VROverlay()
  7468. {
  7469. CheckClear();
  7470. if (m_pVROverlay == null)
  7471. {
  7472. var eError = EVRInitError.None;
  7473. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVROverlay_Version, ref eError);
  7474. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7475. m_pVROverlay = new CVROverlay(pInterface);
  7476. }
  7477. return m_pVROverlay;
  7478. }
  7479. public CVROverlayView VROverlayView()
  7480. {
  7481. CheckClear();
  7482. if (m_pVROverlayView == null)
  7483. {
  7484. var eError = EVRInitError.None;
  7485. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVROverlayView_Version, ref eError);
  7486. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7487. m_pVROverlayView = new CVROverlayView(pInterface);
  7488. }
  7489. return m_pVROverlayView;
  7490. }
  7491. public CVRRenderModels VRRenderModels()
  7492. {
  7493. CheckClear();
  7494. if (m_pVRRenderModels == null)
  7495. {
  7496. var eError = EVRInitError.None;
  7497. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRRenderModels_Version, ref eError);
  7498. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7499. m_pVRRenderModels = new CVRRenderModels(pInterface);
  7500. }
  7501. return m_pVRRenderModels;
  7502. }
  7503. public CVRExtendedDisplay VRExtendedDisplay()
  7504. {
  7505. CheckClear();
  7506. if (m_pVRExtendedDisplay == null)
  7507. {
  7508. var eError = EVRInitError.None;
  7509. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRExtendedDisplay_Version, ref eError);
  7510. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7511. m_pVRExtendedDisplay = new CVRExtendedDisplay(pInterface);
  7512. }
  7513. return m_pVRExtendedDisplay;
  7514. }
  7515. public CVRSettings VRSettings()
  7516. {
  7517. CheckClear();
  7518. if (m_pVRSettings == null)
  7519. {
  7520. var eError = EVRInitError.None;
  7521. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRSettings_Version, ref eError);
  7522. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7523. m_pVRSettings = new CVRSettings(pInterface);
  7524. }
  7525. return m_pVRSettings;
  7526. }
  7527. public CVRApplications VRApplications()
  7528. {
  7529. CheckClear();
  7530. if (m_pVRApplications == null)
  7531. {
  7532. var eError = EVRInitError.None;
  7533. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRApplications_Version, ref eError);
  7534. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7535. m_pVRApplications = new CVRApplications(pInterface);
  7536. }
  7537. return m_pVRApplications;
  7538. }
  7539. public CVRScreenshots VRScreenshots()
  7540. {
  7541. CheckClear();
  7542. if (m_pVRScreenshots == null)
  7543. {
  7544. var eError = EVRInitError.None;
  7545. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRScreenshots_Version, ref eError);
  7546. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7547. m_pVRScreenshots = new CVRScreenshots(pInterface);
  7548. }
  7549. return m_pVRScreenshots;
  7550. }
  7551. public CVRTrackedCamera VRTrackedCamera()
  7552. {
  7553. CheckClear();
  7554. if (m_pVRTrackedCamera == null)
  7555. {
  7556. var eError = EVRInitError.None;
  7557. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRTrackedCamera_Version, ref eError);
  7558. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7559. m_pVRTrackedCamera = new CVRTrackedCamera(pInterface);
  7560. }
  7561. return m_pVRTrackedCamera;
  7562. }
  7563. public CVRInput VRInput()
  7564. {
  7565. CheckClear();
  7566. if (m_pVRInput == null)
  7567. {
  7568. var eError = EVRInitError.None;
  7569. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix+IVRInput_Version, ref eError);
  7570. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7571. m_pVRInput = new CVRInput(pInterface);
  7572. }
  7573. return m_pVRInput;
  7574. }
  7575. public CVRIOBuffer VRIOBuffer()
  7576. {
  7577. CheckClear();
  7578. if (m_pVRIOBuffer == null)
  7579. {
  7580. var eError = EVRInitError.None;
  7581. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRIOBuffer_Version, ref eError);
  7582. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7583. m_pVRIOBuffer = new CVRIOBuffer(pInterface);
  7584. }
  7585. return m_pVRIOBuffer;
  7586. }
  7587. public CVRSpatialAnchors VRSpatialAnchors()
  7588. {
  7589. CheckClear();
  7590. if (m_pVRSpatialAnchors == null)
  7591. {
  7592. var eError = EVRInitError.None;
  7593. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRSpatialAnchors_Version, ref eError);
  7594. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7595. m_pVRSpatialAnchors = new CVRSpatialAnchors(pInterface);
  7596. }
  7597. return m_pVRSpatialAnchors;
  7598. }
  7599. public CVRDebug VRDebug()
  7600. {
  7601. CheckClear();
  7602. if (m_pVRDebug == null)
  7603. {
  7604. var eError = EVRInitError.None;
  7605. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRDebug_Version, ref eError);
  7606. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7607. m_pVRDebug = new CVRDebug(pInterface);
  7608. }
  7609. return m_pVRDebug;
  7610. }
  7611. public CVRNotifications VRNotifications()
  7612. {
  7613. CheckClear();
  7614. if (m_pVRNotifications == null)
  7615. {
  7616. var eError = EVRInitError.None;
  7617. var pInterface = OpenVRInterop.GetGenericInterface(FnTable_Prefix + IVRNotifications_Version, ref eError);
  7618. if (pInterface != IntPtr.Zero && eError == EVRInitError.None)
  7619. m_pVRNotifications = new CVRNotifications(pInterface);
  7620. }
  7621. return m_pVRNotifications;
  7622. }
  7623. private CVRSystem m_pVRSystem;
  7624. private CVRChaperone m_pVRChaperone;
  7625. private CVRChaperoneSetup m_pVRChaperoneSetup;
  7626. private CVRCompositor m_pVRCompositor;
  7627. private CVRHeadsetView m_pVRHeadsetView;
  7628. private CVROverlay m_pVROverlay;
  7629. private CVROverlayView m_pVROverlayView;
  7630. private CVRRenderModels m_pVRRenderModels;
  7631. private CVRExtendedDisplay m_pVRExtendedDisplay;
  7632. private CVRSettings m_pVRSettings;
  7633. private CVRApplications m_pVRApplications;
  7634. private CVRScreenshots m_pVRScreenshots;
  7635. private CVRTrackedCamera m_pVRTrackedCamera;
  7636. private CVRInput m_pVRInput;
  7637. private CVRIOBuffer m_pVRIOBuffer;
  7638. private CVRSpatialAnchors m_pVRSpatialAnchors;
  7639. private CVRNotifications m_pVRNotifications;
  7640. private CVRDebug m_pVRDebug;
  7641. };
  7642. private static COpenVRContext _OpenVRInternal_ModuleContext = null;
  7643. static COpenVRContext OpenVRInternal_ModuleContext
  7644. {
  7645. get
  7646. {
  7647. if (_OpenVRInternal_ModuleContext == null)
  7648. _OpenVRInternal_ModuleContext = new COpenVRContext();
  7649. return _OpenVRInternal_ModuleContext;
  7650. }
  7651. }
  7652. public static CVRSystem System { get { return OpenVRInternal_ModuleContext.VRSystem(); } }
  7653. public static CVRChaperone Chaperone { get { return OpenVRInternal_ModuleContext.VRChaperone(); } }
  7654. public static CVRChaperoneSetup ChaperoneSetup { get { return OpenVRInternal_ModuleContext.VRChaperoneSetup(); } }
  7655. public static CVRCompositor Compositor { get { return OpenVRInternal_ModuleContext.VRCompositor(); } }
  7656. public static CVRHeadsetView HeadsetView { get { return OpenVRInternal_ModuleContext.VRHeadsetView(); } }
  7657. public static CVROverlay Overlay { get { return OpenVRInternal_ModuleContext.VROverlay(); } }
  7658. public static CVROverlayView OverlayView { get { return OpenVRInternal_ModuleContext.VROverlayView(); } }
  7659. public static CVRRenderModels RenderModels { get { return OpenVRInternal_ModuleContext.VRRenderModels(); } }
  7660. public static CVRExtendedDisplay ExtendedDisplay { get { return OpenVRInternal_ModuleContext.VRExtendedDisplay(); } }
  7661. public static CVRSettings Settings { get { return OpenVRInternal_ModuleContext.VRSettings(); } }
  7662. public static CVRApplications Applications { get { return OpenVRInternal_ModuleContext.VRApplications(); } }
  7663. public static CVRScreenshots Screenshots { get { return OpenVRInternal_ModuleContext.VRScreenshots(); } }
  7664. public static CVRTrackedCamera TrackedCamera { get { return OpenVRInternal_ModuleContext.VRTrackedCamera(); } }
  7665. public static CVRInput Input { get { return OpenVRInternal_ModuleContext.VRInput(); } }
  7666. public static CVRIOBuffer IOBuffer { get { return OpenVRInternal_ModuleContext.VRIOBuffer(); } }
  7667. public static CVRSpatialAnchors SpatialAnchors { get { return OpenVRInternal_ModuleContext.VRSpatialAnchors(); } }
  7668. public static CVRNotifications Notifications { get { return OpenVRInternal_ModuleContext.VRNotifications(); } }
  7669. public static CVRDebug Debug { get { return OpenVRInternal_ModuleContext.VRDebug(); } }
  7670. /** Finds the active installation of vrclient.dll and initializes it */
  7671. public static CVRSystem Init(ref EVRInitError peError, EVRApplicationType eApplicationType = EVRApplicationType.VRApplication_Scene, string pchStartupInfo= "")
  7672. {
  7673. try
  7674. {
  7675. VRToken = InitInternal2(ref peError, eApplicationType, pchStartupInfo);
  7676. }
  7677. catch (EntryPointNotFoundException)
  7678. {
  7679. VRToken = InitInternal(ref peError, eApplicationType);
  7680. }
  7681. OpenVRInternal_ModuleContext.Clear();
  7682. if (peError != EVRInitError.None)
  7683. return null;
  7684. bool bInterfaceValid = IsInterfaceVersionValid(IVRSystem_Version);
  7685. if (!bInterfaceValid)
  7686. {
  7687. ShutdownInternal();
  7688. peError = EVRInitError.Init_InterfaceNotFound;
  7689. return null;
  7690. }
  7691. return OpenVR.System;
  7692. }
  7693. /** unloads vrclient.dll. Any interface pointers from the interface are
  7694. * invalid after this point */
  7695. public static void Shutdown()
  7696. {
  7697. ShutdownInternal();
  7698. }
  7699. }
  7700. }
  7701. #endif