public PrimitiveRenderer( Camera camera, Shader textShader, Shader texturedShader, Font font, int capacity = DefaultTriangleCapacity) { mesh = new Mesh(); mesh.MarkDynamic(); subMeshes = new SubMeshList(InitialSubMeshCapacity + 1); this.camera = camera; this.font = font; Font.textureRebuilt += OnFontTextureRebuilt; font.RequestCharactersInTexture("■"); OnFontTextureRebuilt(font); camera.AddCommandBuffer(CameraEvent.AfterForwardAlpha, commandBuffer); textMaterial = new Material(textShader); texturedMaterial = new Material(texturedShader); uvs = new List <Vector2>(capacity); vertices = new List <Vector3>(capacity); colors = new List <Color32>(capacity); indices = new List <int>(capacity); temporaryIndices = new List <int>(capacity); propertyId = Shader.PropertyToID("_MainTex"); materialPropertyBlock = new MaterialPropertyBlock(); Matrix = Matrix4x4.identity; }
public SubMeshList(SubMeshList other) : this(OgrePINVOKE.new_SubMeshList__SWIG_1(SubMeshList.getCPtr(other)), true) { if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } }
public SubMeshListEnumerator(SubMeshList collection) { collectionRef = collection; currentIndex = -1; currentObject = null; currentSize = collectionRef.Count; }
public void SetRange(int index, SubMeshList values) { OgrePINVOKE.SubMeshList_SetRange(swigCPtr, index, SubMeshList.getCPtr(values)); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } }
public void AddRange(SubMeshList values) { OgrePINVOKE.SubMeshList_AddRange(swigCPtr, SubMeshList.getCPtr(values)); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } }
public SubMeshList getSubMeshes() { SubMeshList ret = new SubMeshList(OgrePINVOKE.Mesh_getSubMeshes(swigCPtr), false); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static SubMeshList Repeat(SubMesh value, int count) { global::System.IntPtr cPtr = OgrePINVOKE.SubMeshList_Repeat(SubMesh.getCPtr(value), count); SubMeshList ret = (cPtr == global::System.IntPtr.Zero) ? null : new SubMeshList(cPtr, true); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public SubMeshList GetRange(int index, int count) { global::System.IntPtr cPtr = OgrePINVOKE.SubMeshList_GetRange(swigCPtr, index, count); SubMeshList ret = (cPtr == global::System.IntPtr.Zero) ? null : new SubMeshList(cPtr, true); if (OgrePINVOKE.SWIGPendingException.Pending) { throw OgrePINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SubMeshList obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }