private void drawPrimitiveElement(PrimitiveDrawingElement p) { //drawPrimitiveElement(p, 1.0f); }
private void drawPrimitiveElement(PrimitiveDrawingElement p, float alpha) { // float temp = effect.Alpha; //effect.Alpha = alpha; //effect.World = p.transform; //foreach (EffectPass ep in effect.CurrentTechnique.Passes) //{ // ep.Apply(); // if (p.primitiveCount > 0) // { // gdm.GraphicsDevice.DrawUserPrimitives<VertexPositionColor>(p.type, p.vertices, p.vertexOffset, p.primitiveCount); // } //} //effect.Alpha = temp; }
public void drawSinglePrimitiveElement(PrimitiveDrawingElement p) { drawSinglePrimitiveElement(p, 1.0f); }
public void drawSinglePrimitiveElement(PrimitiveDrawingElement p, float alpha) { endBatch(); drawPrimitiveElement(p); beginBatch(); }
public void drawPrimitiveElements(PrimitiveDrawingElement[] elements) { drawPrimitiveElements(elements, 1.0f); }
public void drawPrimitiveElements(PrimitiveDrawingElement[] elements, float alpha) { endBatch(); foreach (var element in elements) { drawPrimitiveElement(element, alpha); } beginBatch(); }
private void initializeLetterBox() { if (!isLetterBoxing) return; VertexPositionColor[] letterboxVertices = new VertexPositionColor[4]; letterboxVertices[0] = new VertexPositionColor(Vector3.Zero, Constants.LETTERBOX_COLOR); letterboxVertices[1] = new VertexPositionColor(Vector3.UnitX, Constants.LETTERBOX_COLOR); letterboxVertices[2] = new VertexPositionColor(Vector3.UnitY, Constants.LETTERBOX_COLOR); letterboxVertices[3] = new VertexPositionColor(new Vector3(1, 1, 0), Constants.LETTERBOX_COLOR); letterBox = new PrimitiveDrawingElement(PrimitiveType.TriangleStrip, letterboxVertices, 0, letterboxVertices.Length - 2, Matrix.Identity); }