| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // Graphics.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho
- {
- /// <summary>
- /// %Graphics subsystem. Manages the application window, rendering state and GPU resources.
- /// </summary>
- public unsafe partial class Graphics : UrhoObject
- {
- unsafe partial void OnGraphicsCreated ();
- [Preserve]
- public Graphics (IntPtr handle) : base (handle)
- {
- OnGraphicsCreated ();
- }
- [Preserve]
- protected Graphics (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnGraphicsCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Graphics_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (Graphics_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Graphics_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Graphics_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(Graphics));
- return new StringHash (Graphics_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(Graphics));
- return Marshal.PtrToStringAnsi (Graphics_GetTypeNameStatic ());
- }
- [Preserve]
- public Graphics () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_Graphics (IntPtr context);
- [Preserve]
- public Graphics (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(Graphics));
- handle = Graphics_Graphics ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnGraphicsCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetExternalWindow (IntPtr handle, IntPtr window);
- /// <summary>
- /// Set external window handle. Only effective before setting the initial screen mode.
- /// </summary>
- private void SetExternalWindow (IntPtr window)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetExternalWindow (handle, window);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetWindowTitle (IntPtr handle, string windowTitle);
- /// <summary>
- /// Set window title.
- /// </summary>
- private void SetWindowTitle (string windowTitle)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetWindowTitle (handle, windowTitle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetWindowIcon (IntPtr handle, IntPtr windowIcon);
- /// <summary>
- /// Set window icon.
- /// </summary>
- public void SetWindowIcon (Image windowIcon)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetWindowIcon (handle, (object)windowIcon == null ? IntPtr.Zero : windowIcon.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetWindowPosition (IntPtr handle, ref Urho.IntVector2 position);
- /// <summary>
- /// Set window position. Sets initial position if window is not created yet.
- /// </summary>
- public void SetWindowPosition (Urho.IntVector2 position)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetWindowPosition (handle, ref position);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetWindowPosition0 (IntPtr handle, int x, int y);
- /// <summary>
- /// Set window position. Sets initial position if window is not created yet.
- /// </summary>
- public void SetWindowPosition (int x, int y)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetWindowPosition0 (handle, x, y);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_SetMode (IntPtr handle, int width, int height, bool fullscreen, bool borderless, bool resizable, bool highDPI, bool vsync, bool tripleBuffer, int multiSample, int monitor, int refreshRate);
- /// <summary>
- /// Set screen mode. Return true if successful.
- /// </summary>
- public bool SetMode (int width, int height, bool fullscreen, bool borderless, bool resizable, bool highDPI, bool vsync, bool tripleBuffer, int multiSample, int monitor, int refreshRate)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_SetMode (handle, width, height, fullscreen, borderless, resizable, highDPI, vsync, tripleBuffer, multiSample, monitor, refreshRate);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_SetMode1 (IntPtr handle, int width, int height);
- /// <summary>
- /// Set screen resolution only. Return true if successful.
- /// </summary>
- public bool SetMode (int width, int height)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_SetMode1 (handle, width, height);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetSRGB (IntPtr handle, bool enable);
- /// <summary>
- /// Set whether the main window uses sRGB conversion on write.
- /// </summary>
- private void SetSRGB (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetSRGB (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetDither (IntPtr handle, bool enable);
- /// <summary>
- /// Set whether rendering output is dithered. Default true on OpenGL. No effect on Direct3D.
- /// </summary>
- private void SetDither (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetDither (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetFlushGPU (IntPtr handle, bool enable);
- /// <summary>
- /// Set whether to flush the GPU command buffer to prevent multiple frames being queued and uneven frame timesteps. Default off, may decrease performance if enabled. Not currently implemented on OpenGL.
- /// </summary>
- private void SetFlushGPU (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetFlushGPU (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetOrientations (IntPtr handle, string orientations);
- /// <summary>
- /// Set allowed screen orientations as a space-separated list of "LandscapeLeft", "LandscapeRight", "Portrait" and "PortraitUpsideDown". Affects currently only iOS platform.
- /// </summary>
- private void SetOrientations (string orientations)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetOrientations (handle, orientations);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_ToggleFullscreen (IntPtr handle);
- /// <summary>
- /// Toggle between full screen and windowed mode. Return true if successful.
- /// </summary>
- public bool ToggleFullscreen ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_ToggleFullscreen (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_Close (IntPtr handle);
- /// <summary>
- /// Close the window.
- /// </summary>
- public void Close ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_Close (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_TakeScreenShot (IntPtr handle, IntPtr destImage);
- /// <summary>
- /// Take a screenshot. Return true if successful.
- /// </summary>
- public bool TakeScreenShot (Image destImage)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_TakeScreenShot (handle, (object)destImage == null ? IntPtr.Zero : destImage.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_BeginFrame (IntPtr handle);
- /// <summary>
- /// Begin frame rendering. Return true if device available and can render.
- /// </summary>
- public bool BeginFrame ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_BeginFrame (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_EndFrame (IntPtr handle);
- /// <summary>
- /// End frame rendering and swap buffers.
- /// </summary>
- public void EndFrame ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_EndFrame (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_Clear (IntPtr handle, uint flags, ref Urho.Color color, float depth, uint stencil);
- /// <summary>
- /// Clear any or all of rendertarget, depth buffer and stencil buffer.
- /// </summary>
- public void Clear (uint flags, Urho.Color color = default(Urho.Color), float depth = 1f, uint stencil = 0)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_Clear (handle, flags, ref color, depth, stencil);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_ResolveToTexture (IntPtr handle, IntPtr destination, ref Urho.IntRect viewport);
- /// <summary>
- /// Resolve multisampled backbuffer to a texture rendertarget. The texture's size should match the viewport size.
- /// </summary>
- public bool ResolveToTexture (Texture2D destination, Urho.IntRect viewport)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_ResolveToTexture (handle, (object)destination == null ? IntPtr.Zero : destination.Handle, ref viewport);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_ResolveToTexture2 (IntPtr handle, IntPtr texture);
- /// <summary>
- /// Resolve a multisampled texture on itself.
- /// </summary>
- public bool ResolveToTexture (Texture2D texture)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_ResolveToTexture2 (handle, (object)texture == null ? IntPtr.Zero : texture.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_ResolveToTexture3 (IntPtr handle, IntPtr texture);
- /// <summary>
- /// Resolve a multisampled cube texture on itself.
- /// </summary>
- public bool ResolveToTexture (TextureCube texture)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_ResolveToTexture3 (handle, (object)texture == null ? IntPtr.Zero : texture.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_Draw (IntPtr handle, PrimitiveType type, uint vertexStart, uint vertexCount);
- /// <summary>
- /// Draw non-indexed geometry.
- /// </summary>
- public void Draw (PrimitiveType type, uint vertexStart, uint vertexCount)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_Draw (handle, type, vertexStart, vertexCount);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_Draw4 (IntPtr handle, PrimitiveType type, uint indexStart, uint indexCount, uint minVertex, uint vertexCount);
- /// <summary>
- /// Draw indexed geometry.
- /// </summary>
- public void Draw (PrimitiveType type, uint indexStart, uint indexCount, uint minVertex, uint vertexCount)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_Draw4 (handle, type, indexStart, indexCount, minVertex, vertexCount);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_Draw5 (IntPtr handle, PrimitiveType type, uint indexStart, uint indexCount, uint baseVertexIndex, uint minVertex, uint vertexCount);
- /// <summary>
- /// Draw indexed geometry with vertex index offset.
- /// </summary>
- public void Draw (PrimitiveType type, uint indexStart, uint indexCount, uint baseVertexIndex, uint minVertex, uint vertexCount)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_Draw5 (handle, type, indexStart, indexCount, baseVertexIndex, minVertex, vertexCount);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_DrawInstanced (IntPtr handle, PrimitiveType type, uint indexStart, uint indexCount, uint minVertex, uint vertexCount, uint instanceCount);
- /// <summary>
- /// Draw indexed, instanced geometry. An instancing vertex buffer must be set.
- /// </summary>
- public void DrawInstanced (PrimitiveType type, uint indexStart, uint indexCount, uint minVertex, uint vertexCount, uint instanceCount)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_DrawInstanced (handle, type, indexStart, indexCount, minVertex, vertexCount, instanceCount);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_DrawInstanced6 (IntPtr handle, PrimitiveType type, uint indexStart, uint indexCount, uint baseVertexIndex, uint minVertex, uint vertexCount, uint instanceCount);
- /// <summary>
- /// Draw indexed, instanced geometry with vertex index offset.
- /// </summary>
- public void DrawInstanced (PrimitiveType type, uint indexStart, uint indexCount, uint baseVertexIndex, uint minVertex, uint vertexCount, uint instanceCount)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_DrawInstanced6 (handle, type, indexStart, indexCount, baseVertexIndex, minVertex, vertexCount, instanceCount);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetVertexBuffer (IntPtr handle, IntPtr buffer);
- /// <summary>
- /// Set vertex buffer.
- /// </summary>
- public void SetVertexBuffer (VertexBuffer buffer)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetVertexBuffer (handle, (object)buffer == null ? IntPtr.Zero : buffer.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetIndexBuffer (IntPtr handle, IntPtr buffer);
- /// <summary>
- /// Set index buffer.
- /// </summary>
- private void SetIndexBuffer (IndexBuffer buffer)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetIndexBuffer (handle, (object)buffer == null ? IntPtr.Zero : buffer.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaders (IntPtr handle, IntPtr vs, IntPtr ps);
- /// <summary>
- /// Set shaders.
- /// </summary>
- public void SetShaders (ShaderVariation vs, ShaderVariation ps)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaders (handle, (object)vs == null ? IntPtr.Zero : vs.Handle, (object)ps == null ? IntPtr.Zero : ps.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter (IntPtr handle, int param, float* data, uint count);
- /// <summary>
- /// Set shader float constants.
- /// </summary>
- public void SetShaderParameter (StringHash param, float* data, uint count)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter (handle, param.Code, data, count);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter7 (IntPtr handle, int param, float value);
- /// <summary>
- /// Set shader float constant.
- /// </summary>
- public void SetShaderParameter (StringHash param, float value)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter7 (handle, param.Code, value);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter8 (IntPtr handle, int param, int value);
- /// <summary>
- /// Set shader integer constant.
- /// </summary>
- public void SetShaderParameter (StringHash param, int value)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter8 (handle, param.Code, value);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter9 (IntPtr handle, int param, bool value);
- /// <summary>
- /// Set shader boolean constant.
- /// </summary>
- public void SetShaderParameter (StringHash param, bool value)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter9 (handle, param.Code, value);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter10 (IntPtr handle, int param, ref Urho.Color color);
- /// <summary>
- /// Set shader color constant.
- /// </summary>
- public void SetShaderParameter (StringHash param, Urho.Color color)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter10 (handle, param.Code, ref color);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter11 (IntPtr handle, int param, ref Urho.Vector2 vector);
- /// <summary>
- /// Set shader 2D vector constant.
- /// </summary>
- public void SetShaderParameter (StringHash param, Urho.Vector2 vector)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter11 (handle, param.Code, ref vector);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter12 (IntPtr handle, int param, ref Urho.Vector3 vector);
- /// <summary>
- /// Set shader 3D vector constant.
- /// </summary>
- public void SetShaderParameter (StringHash param, Urho.Vector3 vector)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter12 (handle, param.Code, ref vector);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter13 (IntPtr handle, int param, ref Urho.Matrix4 matrix);
- /// <summary>
- /// Set shader 4x4 matrix constant.
- /// </summary>
- public void SetShaderParameter (StringHash param, Urho.Matrix4 matrix)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter13 (handle, param.Code, ref matrix);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter14 (IntPtr handle, int param, ref Urho.Vector4 vector);
- /// <summary>
- /// Set shader 4D vector constant.
- /// </summary>
- public void SetShaderParameter (StringHash param, Urho.Vector4 vector)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter14 (handle, param.Code, ref vector);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderParameter15 (IntPtr handle, int param, ref Urho.Matrix3x4 matrix);
- /// <summary>
- /// Set shader 3x4 matrix constant.
- /// </summary>
- public void SetShaderParameter (StringHash param, Urho.Matrix3x4 matrix)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderParameter15 (handle, param.Code, ref matrix);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_NeedParameterUpdate (IntPtr handle, ShaderParameterGroup group, void* source);
- /// <summary>
- /// Check whether a shader parameter group needs update. Does not actually check whether parameters exist in the shaders.
- /// </summary>
- public bool NeedParameterUpdate (ShaderParameterGroup group, void* source)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_NeedParameterUpdate (handle, group, source);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_HasShaderParameter (IntPtr handle, int param);
- /// <summary>
- /// Check whether a shader parameter exists on the currently set shaders.
- /// </summary>
- public bool HasShaderParameter (StringHash param)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_HasShaderParameter (handle, param.Code);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_HasTextureUnit (IntPtr handle, TextureUnit unit);
- /// <summary>
- /// Check whether the current vertex or pixel shader uses a texture unit.
- /// </summary>
- public bool HasTextureUnit (TextureUnit unit)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_HasTextureUnit (handle, unit);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_ClearParameterSource (IntPtr handle, ShaderParameterGroup group);
- /// <summary>
- /// Clear remembered shader parameter source group.
- /// </summary>
- public void ClearParameterSource (ShaderParameterGroup group)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_ClearParameterSource (handle, group);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_ClearParameterSources (IntPtr handle);
- /// <summary>
- /// Clear remembered shader parameter sources.
- /// </summary>
- public void ClearParameterSources ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_ClearParameterSources (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_ClearTransformSources (IntPtr handle);
- /// <summary>
- /// Clear remembered transform shader parameter sources.
- /// </summary>
- public void ClearTransformSources ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_ClearTransformSources (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetTexture (IntPtr handle, uint index, IntPtr texture);
- /// <summary>
- /// Set texture.
- /// </summary>
- public void SetTexture (uint index, Texture texture)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetTexture (handle, index, (object)texture == null ? IntPtr.Zero : texture.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetTextureParametersDirty (IntPtr handle);
- /// <summary>
- /// Dirty texture parameters of all textures (when global settings change.)
- /// </summary>
- public void SetTextureParametersDirty ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetTextureParametersDirty (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetDefaultTextureFilterMode (IntPtr handle, TextureFilterMode mode);
- /// <summary>
- /// Set default texture filtering mode. Called by Renderer before rendering.
- /// </summary>
- private void SetDefaultTextureFilterMode (TextureFilterMode mode)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetDefaultTextureFilterMode (handle, mode);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetDefaultTextureAnisotropy (IntPtr handle, uint level);
- /// <summary>
- /// Set default texture anisotropy level. Called by Renderer before rendering.
- /// </summary>
- private void SetDefaultTextureAnisotropy (uint level)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetDefaultTextureAnisotropy (handle, level);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_ResetRenderTargets (IntPtr handle);
- /// <summary>
- /// Reset all rendertargets, depth-stencil surface and viewport.
- /// </summary>
- public void ResetRenderTargets ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_ResetRenderTargets (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_ResetRenderTarget (IntPtr handle, uint index);
- /// <summary>
- /// Reset specific rendertarget.
- /// </summary>
- public void ResetRenderTarget (uint index)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_ResetRenderTarget (handle, index);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_ResetDepthStencil (IntPtr handle);
- /// <summary>
- /// Reset depth-stencil surface.
- /// </summary>
- public void ResetDepthStencil ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_ResetDepthStencil (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetRenderTarget (IntPtr handle, uint index, IntPtr renderTarget);
- /// <summary>
- /// Set rendertarget.
- /// </summary>
- public void SetRenderTarget (uint index, RenderSurface renderTarget)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetRenderTarget (handle, index, (object)renderTarget == null ? IntPtr.Zero : renderTarget.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetRenderTarget16 (IntPtr handle, uint index, IntPtr texture);
- /// <summary>
- /// Set rendertarget.
- /// </summary>
- public void SetRenderTarget (uint index, Texture2D texture)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetRenderTarget16 (handle, index, (object)texture == null ? IntPtr.Zero : texture.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetDepthStencil (IntPtr handle, IntPtr depthStencil);
- /// <summary>
- /// Set depth-stencil surface.
- /// </summary>
- private void SetDepthStencil (RenderSurface depthStencil)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetDepthStencil (handle, (object)depthStencil == null ? IntPtr.Zero : depthStencil.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetDepthStencil17 (IntPtr handle, IntPtr texture);
- /// <summary>
- /// Set depth-stencil surface.
- /// </summary>
- public void SetDepthStencil (Texture2D texture)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetDepthStencil17 (handle, (object)texture == null ? IntPtr.Zero : texture.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetViewport (IntPtr handle, ref Urho.IntRect rect);
- /// <summary>
- /// Set viewport.
- /// </summary>
- public void SetViewport (Urho.IntRect rect)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetViewport (handle, ref rect);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetBlendMode (IntPtr handle, BlendMode mode, bool alphaToCoverage);
- /// <summary>
- /// Set blending and alpha-to-coverage modes. Alpha-to-coverage is not supported on Direct3D9.
- /// </summary>
- public void SetBlendMode (BlendMode mode, bool alphaToCoverage = false)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetBlendMode (handle, mode, alphaToCoverage);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetColorWrite (IntPtr handle, bool enable);
- /// <summary>
- /// Set color write on/off.
- /// </summary>
- private void SetColorWrite (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetColorWrite (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetCullMode (IntPtr handle, CullMode mode);
- /// <summary>
- /// Set hardware culling mode.
- /// </summary>
- private void SetCullMode (CullMode mode)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetCullMode (handle, mode);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetDepthBias (IntPtr handle, float constantBias, float slopeScaledBias);
- /// <summary>
- /// Set depth bias.
- /// </summary>
- public void SetDepthBias (float constantBias, float slopeScaledBias)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetDepthBias (handle, constantBias, slopeScaledBias);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetDepthTest (IntPtr handle, CompareMode mode);
- /// <summary>
- /// Set depth compare.
- /// </summary>
- private void SetDepthTest (CompareMode mode)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetDepthTest (handle, mode);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetDepthWrite (IntPtr handle, bool enable);
- /// <summary>
- /// Set depth write on/off.
- /// </summary>
- private void SetDepthWrite (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetDepthWrite (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetFillMode (IntPtr handle, FillMode mode);
- /// <summary>
- /// Set polygon fill mode.
- /// </summary>
- private void SetFillMode (FillMode mode)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetFillMode (handle, mode);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetStereo (IntPtr handle, bool stereo);
- /// <summary>
- /// Set stereo mode
- /// </summary>
- public void SetStereo (bool stereo)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetStereo (handle, stereo);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetLineAntiAlias (IntPtr handle, bool enable);
- /// <summary>
- /// Set line antialiasing on/off.
- /// </summary>
- private void SetLineAntiAlias (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetLineAntiAlias (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetScissorTest (IntPtr handle, bool enable, ref Urho.IntRect rect);
- /// <summary>
- /// Set scissor test.
- /// </summary>
- public void SetScissorTest (bool enable, Urho.IntRect rect)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetScissorTest (handle, enable, ref rect);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetStencilTest (IntPtr handle, bool enable, CompareMode mode, StencilOp pass, StencilOp fail, StencilOp zFail, uint stencilRef, uint compareMask, uint writeMask);
- /// <summary>
- /// Set stencil test.
- /// </summary>
- public void SetStencilTest (bool enable, CompareMode mode = CompareMode.Always, StencilOp pass = StencilOp.Keep, StencilOp fail = StencilOp.Keep, StencilOp zFail = StencilOp.Keep, uint stencilRef = 0, uint compareMask = uint.MaxValue, uint writeMask = uint.MaxValue)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetStencilTest (handle, enable, mode, pass, fail, zFail, stencilRef, compareMask, writeMask);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetClipPlane (IntPtr handle, bool enable, ref Urho.Plane clipPlane, ref Urho.Matrix3x4 view, ref Urho.Matrix4 projection);
- /// <summary>
- /// Set a custom clipping plane. The plane is specified in world space, but is dependent on the view and projection matrices.
- /// </summary>
- public void SetClipPlane (bool enable, Urho.Plane clipPlane, Urho.Matrix3x4 view, Urho.Matrix4 projection)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetClipPlane (handle, enable, ref clipPlane, ref view, ref projection);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_BeginDumpShaders (IntPtr handle, string fileName);
- /// <summary>
- /// Begin dumping shader variation names to an XML file for precaching.
- /// </summary>
- public void BeginDumpShaders (string fileName)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_BeginDumpShaders (handle, fileName);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_EndDumpShaders (IntPtr handle);
- /// <summary>
- /// End dumping shader variations names.
- /// </summary>
- public void EndDumpShaders ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_EndDumpShaders (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_PrecacheShaders_File (IntPtr handle, IntPtr source);
- /// <summary>
- /// Precache shader variations from an XML file generated with BeginDumpShaders().
- /// </summary>
- public void PrecacheShaders (File source)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_PrecacheShaders_File (handle, (object)source == null ? IntPtr.Zero : source.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_PrecacheShaders_MemoryBuffer (IntPtr handle, IntPtr source);
- /// <summary>
- /// Precache shader variations from an XML file generated with BeginDumpShaders().
- /// </summary>
- public void PrecacheShaders (MemoryBuffer source)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_PrecacheShaders_MemoryBuffer (handle, (object)source == null ? IntPtr.Zero : source.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_SetShaderCacheDir (IntPtr handle, string path);
- /// <summary>
- /// Set shader cache directory, Direct3D only. This can either be an absolute path or a path within the resource system.
- /// </summary>
- private void SetShaderCacheDir (string path)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_SetShaderCacheDir (handle, path);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_IsInitialized (IntPtr handle);
- /// <summary>
- /// Return whether rendering initialized.
- /// </summary>
- private bool IsInitialized ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_IsInitialized (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern GraphicsImpl* Graphics_GetImpl (IntPtr handle);
- /// <summary>
- /// Return graphics implementation, which holds the actual API-specific resources.
- /// </summary>
- private GraphicsImpl* GetImpl ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetImpl (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetExternalWindow (IntPtr handle);
- /// <summary>
- /// Return OS-specific external window handle. Null if not in use.
- /// </summary>
- private IntPtr GetExternalWindow ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetExternalWindow (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetWindowTitle (IntPtr handle);
- /// <summary>
- /// Return window title.
- /// </summary>
- private string GetWindowTitle ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Graphics_GetWindowTitle (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetApiName (IntPtr handle);
- /// <summary>
- /// Return graphics API name.
- /// </summary>
- private string GetApiName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Graphics_GetApiName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 Graphics_GetWindowPosition (IntPtr handle);
- /// <summary>
- /// Return window position.
- /// </summary>
- private Urho.IntVector2 GetWindowPosition ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetWindowPosition (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Graphics_GetWidth (IntPtr handle);
- /// <summary>
- /// Return window width in pixels.
- /// </summary>
- private int GetWidth ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetWidth (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Graphics_GetHeight (IntPtr handle);
- /// <summary>
- /// Return window height in pixels.
- /// </summary>
- private int GetHeight ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetHeight (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Graphics_GetMultiSample (IntPtr handle);
- /// <summary>
- /// Return multisample mode (1 = no multisampling.)
- /// </summary>
- private int GetMultiSample ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetMultiSample (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 Graphics_GetSize (IntPtr handle);
- /// <summary>
- /// Return window size in pixels.
- /// </summary>
- private Urho.IntVector2 GetSize ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetSize (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetFullscreen (IntPtr handle);
- /// <summary>
- /// Return whether window is fullscreen.
- /// </summary>
- private bool GetFullscreen ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetFullscreen (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetBorderless (IntPtr handle);
- /// <summary>
- /// Return whether window is borderless.
- /// </summary>
- private bool GetBorderless ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetBorderless (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetResizable (IntPtr handle);
- /// <summary>
- /// Return whether window is resizable.
- /// </summary>
- private bool GetResizable ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetResizable (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetHighDPI (IntPtr handle);
- /// <summary>
- /// Return whether window is high DPI.
- /// </summary>
- private bool GetHighDPI ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetHighDPI (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetVSync (IntPtr handle);
- /// <summary>
- /// Return whether vertical sync is on.
- /// </summary>
- private bool GetVSync ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetVSync (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Graphics_GetRefreshRate (IntPtr handle);
- /// <summary>
- /// Return refresh rate when using vsync in fullscreen
- /// </summary>
- private int GetRefreshRate ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetRefreshRate (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Graphics_GetMonitor (IntPtr handle);
- /// <summary>
- /// Return the current monitor index. Effective on in fullscreen
- /// </summary>
- private int GetMonitor ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetMonitor (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetTripleBuffer (IntPtr handle);
- /// <summary>
- /// Return whether triple buffering is enabled.
- /// </summary>
- private bool GetTripleBuffer ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetTripleBuffer (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetSRGB (IntPtr handle);
- /// <summary>
- /// Return whether the main window is using sRGB conversion on write.
- /// </summary>
- private bool GetSRGB ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetSRGB (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetDither (IntPtr handle);
- /// <summary>
- /// Return whether rendering output is dithered.
- /// </summary>
- private bool GetDither ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDither (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetFlushGPU (IntPtr handle);
- /// <summary>
- /// Return whether the GPU command buffer is flushed each frame.
- /// </summary>
- private bool GetFlushGPU ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetFlushGPU (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetOrientations (IntPtr handle);
- /// <summary>
- /// Return allowed screen orientations.
- /// </summary>
- private string GetOrientations ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Graphics_GetOrientations (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_IsDeviceLost (IntPtr handle);
- /// <summary>
- /// Return whether graphics context is lost and can not render or load GPU resources.
- /// </summary>
- private bool IsDeviceLost ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_IsDeviceLost (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetNumPrimitives (IntPtr handle);
- /// <summary>
- /// Return number of primitives drawn this frame.
- /// </summary>
- private uint GetNumPrimitives ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetNumPrimitives (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetNumBatches (IntPtr handle);
- /// <summary>
- /// Return number of batches drawn this frame.
- /// </summary>
- private uint GetNumBatches ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetNumBatches (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetDummyColorFormat (IntPtr handle);
- /// <summary>
- /// Return dummy color texture format for shadow maps. Is "NULL" (consume no video memory) if supported.
- /// </summary>
- private uint GetDummyColorFormat ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDummyColorFormat (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetShadowMapFormat (IntPtr handle);
- /// <summary>
- /// Return shadow map depth texture format, or 0 if not supported.
- /// </summary>
- private uint GetShadowMapFormat ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetShadowMapFormat (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetHiresShadowMapFormat (IntPtr handle);
- /// <summary>
- /// Return 24-bit shadow map depth texture format, or 0 if not supported.
- /// </summary>
- private uint GetHiresShadowMapFormat ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetHiresShadowMapFormat (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetInstancingSupport (IntPtr handle);
- /// <summary>
- /// Return whether hardware instancing is supported.
- /// </summary>
- private bool GetInstancingSupport ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetInstancingSupport (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetLightPrepassSupport (IntPtr handle);
- /// <summary>
- /// Return whether light pre-pass rendering is supported.
- /// </summary>
- private bool GetLightPrepassSupport ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetLightPrepassSupport (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetDeferredSupport (IntPtr handle);
- /// <summary>
- /// Return whether deferred rendering is supported.
- /// </summary>
- private bool GetDeferredSupport ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDeferredSupport (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetHardwareShadowSupport (IntPtr handle);
- /// <summary>
- /// Return whether shadow map depth compare is done in hardware.
- /// </summary>
- private bool GetHardwareShadowSupport ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetHardwareShadowSupport (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetReadableDepthSupport (IntPtr handle);
- /// <summary>
- /// Return whether a readable hardware depth format is available.
- /// </summary>
- private bool GetReadableDepthSupport ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetReadableDepthSupport (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetSRGBSupport (IntPtr handle);
- /// <summary>
- /// Return whether sRGB conversion on texture sampling is supported.
- /// </summary>
- private bool GetSRGBSupport ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetSRGBSupport (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetSRGBWriteSupport (IntPtr handle);
- /// <summary>
- /// Return whether sRGB conversion on rendertarget writing is supported.
- /// </summary>
- private bool GetSRGBWriteSupport ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetSRGBWriteSupport (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 Graphics_GetDesktopResolution (IntPtr handle, int monitor);
- /// <summary>
- /// Return the desktop resolution.
- /// </summary>
- public Urho.IntVector2 GetDesktopResolution (int monitor)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDesktopResolution (handle, monitor);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Graphics_GetMonitorCount (IntPtr handle);
- /// <summary>
- /// Return the number of currently connected monitors.
- /// </summary>
- private int GetMonitorCount ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetMonitorCount (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Graphics_GetCurrentMonitor (IntPtr handle);
- /// <summary>
- /// Returns the index of the display containing the center of the window on success or a negative error code on failure.
- /// </summary>
- private int GetCurrentMonitor ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetCurrentMonitor (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetMaximized (IntPtr handle);
- /// <summary>
- /// Returns true if window is maximized or runs in full screen mode.
- /// </summary>
- private bool GetMaximized ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetMaximized (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Vector3 Graphics_GetDisplayDPI (IntPtr handle, int monitor);
- /// <summary>
- /// Return display dpi information: (hdpi, vdpi, ddpi). On failure returns zero vector.
- /// </summary>
- public Vector3 GetDisplayDPI (int monitor = 0)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDisplayDPI (handle, monitor);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetFormat (IntPtr handle, CompressedFormat format);
- /// <summary>
- /// Return hardware format for a compressed image format, or 0 if unsupported.
- /// </summary>
- public uint GetFormat (CompressedFormat format)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetFormat (handle, format);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetShader (IntPtr handle, ShaderType type, string name, string defines);
- /// <summary>
- /// Return a shader variation by name and defines.
- /// </summary>
- public ShaderVariation GetShader (ShaderType type, string name, string defines = "")
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<ShaderVariation> (Graphics_GetShader (handle, type, name, defines));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetVertexBuffer (IntPtr handle, uint index);
- /// <summary>
- /// Return current vertex buffer by index.
- /// </summary>
- public VertexBuffer GetVertexBuffer (uint index)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<VertexBuffer> (Graphics_GetVertexBuffer (handle, index));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetIndexBuffer (IntPtr handle);
- /// <summary>
- /// Return current index buffer.
- /// </summary>
- private IndexBuffer GetIndexBuffer ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<IndexBuffer> (Graphics_GetIndexBuffer (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetVertexShader (IntPtr handle);
- /// <summary>
- /// Return current vertex shader.
- /// </summary>
- private ShaderVariation GetVertexShader ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<ShaderVariation> (Graphics_GetVertexShader (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetPixelShader (IntPtr handle);
- /// <summary>
- /// Return current pixel shader.
- /// </summary>
- private ShaderVariation GetPixelShader ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<ShaderVariation> (Graphics_GetPixelShader (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern TextureUnit Graphics_GetTextureUnit (IntPtr handle, string name);
- /// <summary>
- /// Return texture unit index by name.
- /// </summary>
- public TextureUnit GetTextureUnit (string name)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetTextureUnit (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetTextureUnitName (IntPtr handle, TextureUnit unit);
- /// <summary>
- /// Return texture unit name by index.
- /// </summary>
- public string GetTextureUnitName (TextureUnit unit)
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Graphics_GetTextureUnitName (handle, unit));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetTexture (IntPtr handle, uint index);
- /// <summary>
- /// Return current texture by texture unit index.
- /// </summary>
- public Texture GetTexture (uint index)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Texture> (Graphics_GetTexture (handle, index));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern TextureFilterMode Graphics_GetDefaultTextureFilterMode (IntPtr handle);
- /// <summary>
- /// Return default texture filtering mode.
- /// </summary>
- private TextureFilterMode GetDefaultTextureFilterMode ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDefaultTextureFilterMode (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetDefaultTextureAnisotropy (IntPtr handle);
- /// <summary>
- /// Return default texture max. anisotropy level.
- /// </summary>
- private uint GetDefaultTextureAnisotropy ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDefaultTextureAnisotropy (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetRenderTarget (IntPtr handle, uint index);
- /// <summary>
- /// Return current rendertarget by index.
- /// </summary>
- public RenderSurface GetRenderTarget (uint index)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<RenderSurface> (Graphics_GetRenderTarget (handle, index));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetDepthStencil (IntPtr handle);
- /// <summary>
- /// Return current depth-stencil surface.
- /// </summary>
- private RenderSurface GetDepthStencil ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<RenderSurface> (Graphics_GetDepthStencil (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntRect Graphics_GetViewport (IntPtr handle);
- /// <summary>
- /// Return the viewport coordinates.
- /// </summary>
- private IntRect GetViewport ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetViewport (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern BlendMode Graphics_GetBlendMode (IntPtr handle);
- /// <summary>
- /// Return blending mode.
- /// </summary>
- private BlendMode GetBlendMode ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetBlendMode (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetAlphaToCoverage (IntPtr handle);
- /// <summary>
- /// Return whether alpha-to-coverage is enabled.
- /// </summary>
- private bool GetAlphaToCoverage ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetAlphaToCoverage (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetColorWrite (IntPtr handle);
- /// <summary>
- /// Return whether color write is enabled.
- /// </summary>
- private bool GetColorWrite ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetColorWrite (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern CullMode Graphics_GetCullMode (IntPtr handle);
- /// <summary>
- /// Return hardware culling mode.
- /// </summary>
- private CullMode GetCullMode ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetCullMode (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float Graphics_GetDepthConstantBias (IntPtr handle);
- /// <summary>
- /// Return depth constant bias.
- /// </summary>
- private float GetDepthConstantBias ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDepthConstantBias (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float Graphics_GetDepthSlopeScaledBias (IntPtr handle);
- /// <summary>
- /// Return depth slope scaled bias.
- /// </summary>
- private float GetDepthSlopeScaledBias ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDepthSlopeScaledBias (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern CompareMode Graphics_GetDepthTest (IntPtr handle);
- /// <summary>
- /// Return depth compare mode.
- /// </summary>
- private CompareMode GetDepthTest ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDepthTest (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetDepthWrite (IntPtr handle);
- /// <summary>
- /// Return whether depth write is enabled.
- /// </summary>
- private bool GetDepthWrite ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDepthWrite (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern FillMode Graphics_GetFillMode (IntPtr handle);
- /// <summary>
- /// Return polygon fill mode.
- /// </summary>
- private FillMode GetFillMode ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetFillMode (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetLineAntiAlias (IntPtr handle);
- /// <summary>
- /// Return whether line antialiasing is enabled.
- /// </summary>
- private bool GetLineAntiAlias ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetLineAntiAlias (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetStencilTest (IntPtr handle);
- /// <summary>
- /// Return whether stencil test is enabled.
- /// </summary>
- private bool GetStencilTest ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetStencilTest (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetScissorTest (IntPtr handle);
- /// <summary>
- /// Return whether scissor test is enabled.
- /// </summary>
- private bool GetScissorTest ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetScissorTest (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntRect Graphics_GetScissorRect (IntPtr handle);
- /// <summary>
- /// Return scissor rectangle coordinates.
- /// </summary>
- private Urho.IntRect GetScissorRect ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetScissorRect (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern CompareMode Graphics_GetStencilTestMode (IntPtr handle);
- /// <summary>
- /// Return stencil compare mode.
- /// </summary>
- private CompareMode GetStencilTestMode ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetStencilTestMode (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern StencilOp Graphics_GetStencilPass (IntPtr handle);
- /// <summary>
- /// Return stencil operation to do if stencil test passes.
- /// </summary>
- private StencilOp GetStencilPass ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetStencilPass (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern StencilOp Graphics_GetStencilFail (IntPtr handle);
- /// <summary>
- /// Return stencil operation to do if stencil test fails.
- /// </summary>
- private StencilOp GetStencilFail ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetStencilFail (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern StencilOp Graphics_GetStencilZFail (IntPtr handle);
- /// <summary>
- /// Return stencil operation to do if depth compare fails.
- /// </summary>
- private StencilOp GetStencilZFail ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetStencilZFail (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetStencilRef (IntPtr handle);
- /// <summary>
- /// Return stencil reference value.
- /// </summary>
- private uint GetStencilRef ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetStencilRef (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetStencilCompareMask (IntPtr handle);
- /// <summary>
- /// Return stencil compare bitmask.
- /// </summary>
- private uint GetStencilCompareMask ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetStencilCompareMask (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetStencilWriteMask (IntPtr handle);
- /// <summary>
- /// Return stencil write bitmask.
- /// </summary>
- private uint GetStencilWriteMask ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetStencilWriteMask (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Graphics_GetUseClipPlane (IntPtr handle);
- /// <summary>
- /// Return whether a custom clipping plane is in use.
- /// </summary>
- private bool GetUseClipPlane ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetUseClipPlane (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_GetShaderCacheDir (IntPtr handle);
- /// <summary>
- /// Return shader cache directory, Direct3D only.
- /// </summary>
- private string GetShaderCacheDir ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Graphics_GetShaderCacheDir (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 Graphics_GetRenderTargetDimensions (IntPtr handle);
- /// <summary>
- /// Return current rendertarget width and height.
- /// </summary>
- private Urho.IntVector2 GetRenderTargetDimensions ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetRenderTargetDimensions (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_OnWindowResized (IntPtr handle);
- /// <summary>
- /// Window was resized through user interaction. Called by Input subsystem.
- /// </summary>
- public void OnWindowResized ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_OnWindowResized (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_OnWindowMoved (IntPtr handle);
- /// <summary>
- /// Window was moved through user interaction. Called by Input subsystem.
- /// </summary>
- public void OnWindowMoved ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_OnWindowMoved (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_Maximize (IntPtr handle);
- /// <summary>
- /// Maximize the window.
- /// </summary>
- public void Maximize ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_Maximize (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_Minimize (IntPtr handle);
- /// <summary>
- /// Minimize the window.
- /// </summary>
- public void Minimize ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_Minimize (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_Raise (IntPtr handle);
- /// <summary>
- /// Raises window if it was minimized.
- /// </summary>
- public void Raise ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_Raise (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_AddGPUObject (IntPtr handle, IntPtr @object);
- /// <summary>
- /// Add a GPU object to keep track of. Called by GPUObject.
- /// </summary>
- public void AddGPUObject (IntPtr @object)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_AddGPUObject (handle, @object);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_RemoveGPUObject (IntPtr handle, IntPtr @object);
- /// <summary>
- /// Remove a GPU object. Called by GPUObject.
- /// </summary>
- public void RemoveGPUObject (IntPtr @object)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_RemoveGPUObject (handle, @object);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_ReserveScratchBuffer (IntPtr handle, uint size);
- /// <summary>
- /// Reserve a CPU-side scratch buffer.
- /// </summary>
- public IntPtr ReserveScratchBuffer (uint size)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_ReserveScratchBuffer (handle, size);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_FreeScratchBuffer (IntPtr handle, IntPtr buffer);
- /// <summary>
- /// Free a CPU-side scratch buffer.
- /// </summary>
- public void FreeScratchBuffer (IntPtr buffer)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_FreeScratchBuffer (handle, buffer);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_CleanupScratchBuffers (IntPtr handle);
- /// <summary>
- /// Clean up too large scratch buffers.
- /// </summary>
- public void CleanupScratchBuffers ()
- {
- Runtime.ValidateRefCounted (this);
- Graphics_CleanupScratchBuffers (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetAlphaFormat ();
- /// <summary>
- /// Return the API-specific alpha texture format.
- /// </summary>
- private static uint GetAlphaFormat ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetAlphaFormat ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetLuminanceFormat ();
- /// <summary>
- /// Return the API-specific luminance texture format.
- /// </summary>
- private static uint GetLuminanceFormat ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetLuminanceFormat ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetLuminanceAlphaFormat ();
- /// <summary>
- /// Return the API-specific luminance alpha texture format.
- /// </summary>
- private static uint GetLuminanceAlphaFormat ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetLuminanceAlphaFormat ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetRGBFormat ();
- /// <summary>
- /// Return the API-specific RGB texture format.
- /// </summary>
- private static uint GetRGBFormat ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetRGBFormat ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetRGBAFormat ();
- /// <summary>
- /// Return the API-specific RGBA texture format.
- /// </summary>
- private static uint GetRGBAFormat ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetRGBAFormat ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetRGBA16Format ();
- /// <summary>
- /// Return the API-specific RGBA 16-bit texture format.
- /// </summary>
- private static uint GetRGBA16Format ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetRGBA16Format ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetRGBAFloat16Format ();
- /// <summary>
- /// Return the API-specific RGBA 16-bit float texture format.
- /// </summary>
- private static uint GetRGBAFloat16Format ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetRGBAFloat16Format ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetRGBAFloat32Format ();
- /// <summary>
- /// Return the API-specific RGBA 32-bit float texture format.
- /// </summary>
- private static uint GetRGBAFloat32Format ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetRGBAFloat32Format ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetRG16Format ();
- /// <summary>
- /// Return the API-specific RG 16-bit texture format.
- /// </summary>
- private static uint GetRG16Format ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetRG16Format ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetRGFloat16Format ();
- /// <summary>
- /// Return the API-specific RG 16-bit float texture format.
- /// </summary>
- private static uint GetRGFloat16Format ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetRGFloat16Format ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetRGFloat32Format ();
- /// <summary>
- /// Return the API-specific RG 32-bit float texture format.
- /// </summary>
- private static uint GetRGFloat32Format ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetRGFloat32Format ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetFloat16Format ();
- /// <summary>
- /// Return the API-specific single channel 16-bit float texture format.
- /// </summary>
- private static uint GetFloat16Format ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetFloat16Format ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetFloat32Format ();
- /// <summary>
- /// Return the API-specific single channel 32-bit float texture format.
- /// </summary>
- private static uint GetFloat32Format ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetFloat32Format ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetLinearDepthFormat ();
- /// <summary>
- /// Return the API-specific linear depth texture format.
- /// </summary>
- private static uint GetLinearDepthFormat ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetLinearDepthFormat ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetDepthStencilFormat ();
- /// <summary>
- /// Return the API-specific hardware depth-stencil texture format.
- /// </summary>
- private static uint GetDepthStencilFormat ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetDepthStencilFormat ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetReadableDepthFormat ();
- /// <summary>
- /// Return the API-specific readable hardware depth format, or 0 if not supported.
- /// </summary>
- private static uint GetReadableDepthFormat ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetReadableDepthFormat ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetFormat18 (string formatName);
- /// <summary>
- /// Return the API-specific texture format from a textual description, for example "rgb".
- /// </summary>
- public static uint GetFormat (string formatName)
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetFormat18 (formatName);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.Vector2 Graphics_GetPixelUVOffset ();
- /// <summary>
- /// Return UV offset required for pixel perfect rendering.
- /// </summary>
- private static Urho.Vector2 GetPixelUVOffset ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetPixelUVOffset ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Graphics_GetMaxBones ();
- /// <summary>
- /// Return maximum number of supported bones for skinning.
- /// </summary>
- private static uint GetMaxBones ()
- {
- Runtime.Validate (typeof(Graphics));
- return Graphics_GetMaxBones ();
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- [Preserve]
- public static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- /// <summary>
- /// Return OS-specific external window handle. Null if not in use.
- /// Or
- /// Set external window handle. Only effective before setting the initial screen mode.
- /// </summary>
- public IntPtr ExternalWindow {
- get {
- return GetExternalWindow ();
- }
- set {
- SetExternalWindow (value);
- }
- }
- /// <summary>
- /// Return window title.
- /// Or
- /// Set window title.
- /// </summary>
- public string WindowTitle {
- get {
- return GetWindowTitle ();
- }
- set {
- SetWindowTitle (value);
- }
- }
- /// <summary>
- /// Return window position.
- /// </summary>
- public Urho.IntVector2 WindowPosition {
- get {
- return GetWindowPosition ();
- }
- }
- /// <summary>
- /// Return whether the main window is using sRGB conversion on write.
- /// Or
- /// Set whether the main window uses sRGB conversion on write.
- /// </summary>
- public bool SRGB {
- get {
- return GetSRGB ();
- }
- set {
- SetSRGB (value);
- }
- }
- /// <summary>
- /// Return whether rendering output is dithered.
- /// Or
- /// Set whether rendering output is dithered. Default true on OpenGL. No effect on Direct3D.
- /// </summary>
- public bool Dither {
- get {
- return GetDither ();
- }
- set {
- SetDither (value);
- }
- }
- /// <summary>
- /// Return whether the GPU command buffer is flushed each frame.
- /// Or
- /// Set whether to flush the GPU command buffer to prevent multiple frames being queued and uneven frame timesteps. Default off, may decrease performance if enabled. Not currently implemented on OpenGL.
- /// </summary>
- public bool FlushGPU {
- get {
- return GetFlushGPU ();
- }
- set {
- SetFlushGPU (value);
- }
- }
- /// <summary>
- /// Return allowed screen orientations.
- /// Or
- /// Set allowed screen orientations as a space-separated list of "LandscapeLeft", "LandscapeRight", "Portrait" and "PortraitUpsideDown". Affects currently only iOS platform.
- /// </summary>
- public string Orientations {
- get {
- return GetOrientations ();
- }
- set {
- SetOrientations (value);
- }
- }
- /// <summary>
- /// Return current index buffer.
- /// Or
- /// Set index buffer.
- /// </summary>
- public IndexBuffer IndexBuffer {
- get {
- return GetIndexBuffer ();
- }
- set {
- SetIndexBuffer (value);
- }
- }
- /// <summary>
- /// Return default texture filtering mode.
- /// Or
- /// Set default texture filtering mode. Called by Renderer before rendering.
- /// </summary>
- public TextureFilterMode DefaultTextureFilterMode {
- get {
- return GetDefaultTextureFilterMode ();
- }
- set {
- SetDefaultTextureFilterMode (value);
- }
- }
- /// <summary>
- /// Return default texture max. anisotropy level.
- /// Or
- /// Set default texture anisotropy level. Called by Renderer before rendering.
- /// </summary>
- public uint DefaultTextureAnisotropy {
- get {
- return GetDefaultTextureAnisotropy ();
- }
- set {
- SetDefaultTextureAnisotropy (value);
- }
- }
- /// <summary>
- /// Return current depth-stencil surface.
- /// Or
- /// Set depth-stencil surface.
- /// </summary>
- public RenderSurface DepthStencil {
- get {
- return GetDepthStencil ();
- }
- set {
- SetDepthStencil (value);
- }
- }
- /// <summary>
- /// Return the viewport coordinates.
- /// </summary>
- public IntRect Viewport {
- get {
- return GetViewport ();
- }
- }
- /// <summary>
- /// Return whether color write is enabled.
- /// Or
- /// Set color write on/off.
- /// </summary>
- public bool ColorWrite {
- get {
- return GetColorWrite ();
- }
- set {
- SetColorWrite (value);
- }
- }
- /// <summary>
- /// Return hardware culling mode.
- /// Or
- /// Set hardware culling mode.
- /// </summary>
- public CullMode CullMode {
- get {
- return GetCullMode ();
- }
- set {
- SetCullMode (value);
- }
- }
- /// <summary>
- /// Return depth compare mode.
- /// Or
- /// Set depth compare.
- /// </summary>
- public CompareMode DepthTest {
- get {
- return GetDepthTest ();
- }
- set {
- SetDepthTest (value);
- }
- }
- /// <summary>
- /// Return whether depth write is enabled.
- /// Or
- /// Set depth write on/off.
- /// </summary>
- public bool DepthWrite {
- get {
- return GetDepthWrite ();
- }
- set {
- SetDepthWrite (value);
- }
- }
- /// <summary>
- /// Return polygon fill mode.
- /// Or
- /// Set polygon fill mode.
- /// </summary>
- public FillMode FillMode {
- get {
- return GetFillMode ();
- }
- set {
- SetFillMode (value);
- }
- }
- /// <summary>
- /// Return whether line antialiasing is enabled.
- /// Or
- /// Set line antialiasing on/off.
- /// </summary>
- public bool LineAntiAlias {
- get {
- return GetLineAntiAlias ();
- }
- set {
- SetLineAntiAlias (value);
- }
- }
- /// <summary>
- /// Return shader cache directory, Direct3D only.
- /// Or
- /// Set shader cache directory, Direct3D only. This can either be an absolute path or a path within the resource system.
- /// </summary>
- public string ShaderCacheDir {
- get {
- return GetShaderCacheDir ();
- }
- set {
- SetShaderCacheDir (value);
- }
- }
- /// <summary>
- /// Return whether rendering initialized.
- /// </summary>
- public bool Initialized {
- get {
- return IsInitialized ();
- }
- }
- /// <summary>
- /// Return graphics implementation, which holds the actual API-specific resources.
- /// </summary>
- public GraphicsImpl* Impl {
- get {
- return GetImpl ();
- }
- }
- /// <summary>
- /// Return graphics API name.
- /// </summary>
- public string ApiName {
- get {
- return GetApiName ();
- }
- }
- /// <summary>
- /// Return window width in pixels.
- /// </summary>
- public int Width {
- get {
- return GetWidth ();
- }
- }
- /// <summary>
- /// Return window height in pixels.
- /// </summary>
- public int Height {
- get {
- return GetHeight ();
- }
- }
- /// <summary>
- /// Return multisample mode (1 = no multisampling.)
- /// </summary>
- public int MultiSample {
- get {
- return GetMultiSample ();
- }
- }
- /// <summary>
- /// Return window size in pixels.
- /// </summary>
- public Urho.IntVector2 Size {
- get {
- return GetSize ();
- }
- }
- /// <summary>
- /// Return whether window is fullscreen.
- /// </summary>
- public bool Fullscreen {
- get {
- return GetFullscreen ();
- }
- }
- /// <summary>
- /// Return whether window is borderless.
- /// </summary>
- public bool Borderless {
- get {
- return GetBorderless ();
- }
- }
- /// <summary>
- /// Return whether window is resizable.
- /// </summary>
- public bool Resizable {
- get {
- return GetResizable ();
- }
- }
- /// <summary>
- /// Return whether window is high DPI.
- /// </summary>
- public bool HighDPI {
- get {
- return GetHighDPI ();
- }
- }
- /// <summary>
- /// Return whether vertical sync is on.
- /// </summary>
- public bool VSync {
- get {
- return GetVSync ();
- }
- }
- /// <summary>
- /// Return refresh rate when using vsync in fullscreen
- /// </summary>
- public int RefreshRate {
- get {
- return GetRefreshRate ();
- }
- }
- /// <summary>
- /// Return the current monitor index. Effective on in fullscreen
- /// </summary>
- public int Monitor {
- get {
- return GetMonitor ();
- }
- }
- /// <summary>
- /// Return whether triple buffering is enabled.
- /// </summary>
- public bool TripleBuffer {
- get {
- return GetTripleBuffer ();
- }
- }
- /// <summary>
- /// Return whether graphics context is lost and can not render or load GPU resources.
- /// </summary>
- public bool DeviceLost {
- get {
- return IsDeviceLost ();
- }
- }
- /// <summary>
- /// Return number of primitives drawn this frame.
- /// </summary>
- public uint NumPrimitives {
- get {
- return GetNumPrimitives ();
- }
- }
- /// <summary>
- /// Return number of batches drawn this frame.
- /// </summary>
- public uint NumBatches {
- get {
- return GetNumBatches ();
- }
- }
- /// <summary>
- /// Return dummy color texture format for shadow maps. Is "NULL" (consume no video memory) if supported.
- /// </summary>
- public uint DummyColorFormat {
- get {
- return GetDummyColorFormat ();
- }
- }
- /// <summary>
- /// Return shadow map depth texture format, or 0 if not supported.
- /// </summary>
- public uint ShadowMapFormat {
- get {
- return GetShadowMapFormat ();
- }
- }
- /// <summary>
- /// Return 24-bit shadow map depth texture format, or 0 if not supported.
- /// </summary>
- public uint HiresShadowMapFormat {
- get {
- return GetHiresShadowMapFormat ();
- }
- }
- /// <summary>
- /// Return whether hardware instancing is supported.
- /// </summary>
- public bool InstancingSupport {
- get {
- return GetInstancingSupport ();
- }
- }
- /// <summary>
- /// Return whether light pre-pass rendering is supported.
- /// </summary>
- public bool LightPrepassSupport {
- get {
- return GetLightPrepassSupport ();
- }
- }
- /// <summary>
- /// Return whether deferred rendering is supported.
- /// </summary>
- public bool DeferredSupport {
- get {
- return GetDeferredSupport ();
- }
- }
- /// <summary>
- /// Return whether shadow map depth compare is done in hardware.
- /// </summary>
- public bool HardwareShadowSupport {
- get {
- return GetHardwareShadowSupport ();
- }
- }
- /// <summary>
- /// Return whether a readable hardware depth format is available.
- /// </summary>
- public bool ReadableDepthSupport {
- get {
- return GetReadableDepthSupport ();
- }
- }
- /// <summary>
- /// Return whether sRGB conversion on texture sampling is supported.
- /// </summary>
- public bool SRGBSupport {
- get {
- return GetSRGBSupport ();
- }
- }
- /// <summary>
- /// Return whether sRGB conversion on rendertarget writing is supported.
- /// </summary>
- public bool SRGBWriteSupport {
- get {
- return GetSRGBWriteSupport ();
- }
- }
- /// <summary>
- /// Return the number of currently connected monitors.
- /// </summary>
- public int MonitorCount {
- get {
- return GetMonitorCount ();
- }
- }
- /// <summary>
- /// Returns the index of the display containing the center of the window on success or a negative error code on failure.
- /// </summary>
- public int CurrentMonitor {
- get {
- return GetCurrentMonitor ();
- }
- }
- /// <summary>
- /// Returns true if window is maximized or runs in full screen mode.
- /// </summary>
- public bool Maximized {
- get {
- return GetMaximized ();
- }
- }
- /// <summary>
- /// Return current vertex shader.
- /// </summary>
- public ShaderVariation VertexShader {
- get {
- return GetVertexShader ();
- }
- }
- /// <summary>
- /// Return current pixel shader.
- /// </summary>
- public ShaderVariation PixelShader {
- get {
- return GetPixelShader ();
- }
- }
- /// <summary>
- /// Return blending mode.
- /// </summary>
- public BlendMode BlendMode {
- get {
- return GetBlendMode ();
- }
- }
- /// <summary>
- /// Return whether alpha-to-coverage is enabled.
- /// </summary>
- public bool AlphaToCoverage {
- get {
- return GetAlphaToCoverage ();
- }
- }
- /// <summary>
- /// Return depth constant bias.
- /// </summary>
- public float DepthConstantBias {
- get {
- return GetDepthConstantBias ();
- }
- }
- /// <summary>
- /// Return depth slope scaled bias.
- /// </summary>
- public float DepthSlopeScaledBias {
- get {
- return GetDepthSlopeScaledBias ();
- }
- }
- /// <summary>
- /// Return whether stencil test is enabled.
- /// </summary>
- public bool StencilTest {
- get {
- return GetStencilTest ();
- }
- }
- /// <summary>
- /// Return whether scissor test is enabled.
- /// </summary>
- public bool ScissorTest {
- get {
- return GetScissorTest ();
- }
- }
- /// <summary>
- /// Return scissor rectangle coordinates.
- /// </summary>
- public Urho.IntRect ScissorRect {
- get {
- return GetScissorRect ();
- }
- }
- /// <summary>
- /// Return stencil compare mode.
- /// </summary>
- public CompareMode StencilTestMode {
- get {
- return GetStencilTestMode ();
- }
- }
- /// <summary>
- /// Return stencil operation to do if stencil test passes.
- /// </summary>
- public StencilOp StencilPass {
- get {
- return GetStencilPass ();
- }
- }
- /// <summary>
- /// Return stencil operation to do if stencil test fails.
- /// </summary>
- public StencilOp StencilFail {
- get {
- return GetStencilFail ();
- }
- }
- /// <summary>
- /// Return stencil operation to do if depth compare fails.
- /// </summary>
- public StencilOp StencilZFail {
- get {
- return GetStencilZFail ();
- }
- }
- /// <summary>
- /// Return stencil reference value.
- /// </summary>
- public uint StencilRef {
- get {
- return GetStencilRef ();
- }
- }
- /// <summary>
- /// Return stencil compare bitmask.
- /// </summary>
- public uint StencilCompareMask {
- get {
- return GetStencilCompareMask ();
- }
- }
- /// <summary>
- /// Return stencil write bitmask.
- /// </summary>
- public uint StencilWriteMask {
- get {
- return GetStencilWriteMask ();
- }
- }
- /// <summary>
- /// Return whether a custom clipping plane is in use.
- /// </summary>
- public bool UseClipPlane {
- get {
- return GetUseClipPlane ();
- }
- }
- /// <summary>
- /// Return current rendertarget width and height.
- /// </summary>
- public Urho.IntVector2 RenderTargetDimensions {
- get {
- return GetRenderTargetDimensions ();
- }
- }
- /// <summary>
- /// Return the API-specific alpha texture format.
- /// </summary>
- public static uint AlphaFormat {
- get {
- return GetAlphaFormat ();
- }
- }
- /// <summary>
- /// Return the API-specific luminance texture format.
- /// </summary>
- public static uint LuminanceFormat {
- get {
- return GetLuminanceFormat ();
- }
- }
- /// <summary>
- /// Return the API-specific luminance alpha texture format.
- /// </summary>
- public static uint LuminanceAlphaFormat {
- get {
- return GetLuminanceAlphaFormat ();
- }
- }
- /// <summary>
- /// Return the API-specific RGB texture format.
- /// </summary>
- public static uint RGBFormat {
- get {
- return GetRGBFormat ();
- }
- }
- /// <summary>
- /// Return the API-specific RGBA texture format.
- /// </summary>
- public static uint RGBAFormat {
- get {
- return GetRGBAFormat ();
- }
- }
- /// <summary>
- /// Return the API-specific RGBA 16-bit texture format.
- /// </summary>
- public static uint RGBA16Format {
- get {
- return GetRGBA16Format ();
- }
- }
- /// <summary>
- /// Return the API-specific RGBA 16-bit float texture format.
- /// </summary>
- public static uint RGBAFloat16Format {
- get {
- return GetRGBAFloat16Format ();
- }
- }
- /// <summary>
- /// Return the API-specific RGBA 32-bit float texture format.
- /// </summary>
- public static uint RGBAFloat32Format {
- get {
- return GetRGBAFloat32Format ();
- }
- }
- /// <summary>
- /// Return the API-specific RG 16-bit texture format.
- /// </summary>
- public static uint RG16Format {
- get {
- return GetRG16Format ();
- }
- }
- /// <summary>
- /// Return the API-specific RG 16-bit float texture format.
- /// </summary>
- public static uint RGFloat16Format {
- get {
- return GetRGFloat16Format ();
- }
- }
- /// <summary>
- /// Return the API-specific RG 32-bit float texture format.
- /// </summary>
- public static uint RGFloat32Format {
- get {
- return GetRGFloat32Format ();
- }
- }
- /// <summary>
- /// Return the API-specific single channel 16-bit float texture format.
- /// </summary>
- public static uint Float16Format {
- get {
- return GetFloat16Format ();
- }
- }
- /// <summary>
- /// Return the API-specific single channel 32-bit float texture format.
- /// </summary>
- public static uint Float32Format {
- get {
- return GetFloat32Format ();
- }
- }
- /// <summary>
- /// Return the API-specific linear depth texture format.
- /// </summary>
- public static uint LinearDepthFormat {
- get {
- return GetLinearDepthFormat ();
- }
- }
- /// <summary>
- /// Return the API-specific hardware depth-stencil texture format.
- /// </summary>
- public static uint DepthStencilFormat {
- get {
- return GetDepthStencilFormat ();
- }
- }
- /// <summary>
- /// Return the API-specific readable hardware depth format, or 0 if not supported.
- /// </summary>
- public static uint ReadableDepthFormat {
- get {
- return GetReadableDepthFormat ();
- }
- }
- /// <summary>
- /// Return UV offset required for pixel perfect rendering.
- /// </summary>
- public static Urho.Vector2 PixelUVOffset {
- get {
- return GetPixelUVOffset ();
- }
- }
- /// <summary>
- /// Return maximum number of supported bones for skinning.
- /// </summary>
- public static uint MaxBones {
- get {
- return GetMaxBones ();
- }
- }
- }
- }
|