| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974 |
- // 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
- {
- public Graphics (IntPtr handle) : base (handle)
- {
- }
- protected Graphics (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- }
- [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 ());
- }
- public Graphics () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Graphics_Graphics (IntPtr context);
- public Graphics (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(Graphics));
- handle = Graphics_Graphics ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- }
- [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);
- /// <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)
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_SetMode (handle, width, height, fullscreen, borderless, resizable, highDPI, vsync, tripleBuffer, multiSample);
- }
- [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, float depth, uint stencil)
- {
- 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)
- {
- 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, StencilOp pass, StencilOp fail, StencilOp zFail, uint stencilRef, uint compareMask, uint writeMask)
- {
- 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 IntVector2 Graphics_GetWindowPosition (IntPtr handle);
- /// <summary>
- /// Return window position.
- /// </summary>
- private 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 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 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 IntVector2 Graphics_GetDesktopResolution (IntPtr handle);
- /// <summary>
- /// Return the desktop resolution.
- /// </summary>
- private IntVector2 GetDesktopResolution ()
- {
- Runtime.ValidateRefCounted (this);
- return Graphics_GetDesktopResolution (handle);
- }
- [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 IntVector2 Graphics_GetRenderTargetDimensions (IntPtr handle);
- /// <summary>
- /// Return current rendertarget width and height.
- /// </summary>
- private 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_AddGPUObject (IntPtr handle, GPUObject* @object);
- /// <summary>
- /// Add a GPU object to keep track of. Called by GPUObject.
- /// </summary>
- public void AddGPUObject (GPUObject* @object)
- {
- Runtime.ValidateRefCounted (this);
- Graphics_AddGPUObject (handle, @object);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Graphics_RemoveGPUObject (IntPtr handle, GPUObject* @object);
- /// <summary>
- /// Remove a GPU object. Called by GPUObject.
- /// </summary>
- public void RemoveGPUObject (GPUObject* @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 ();
- }
- }
- 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 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 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 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 desktop resolution.
- /// </summary>
- public IntVector2 DesktopResolution {
- get {
- return GetDesktopResolution ();
- }
- }
- /// <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 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 ();
- }
- }
- }
- }
|