static void V(VertexP3fC4b v)
        {
            FastColour AAA = FastColour.Unpack(v.Colour);

            GL.Color4ub(AAA.R, AAA.G, AAA.B, AAA.A);
            GL.Vertex3f(v.X, v.Y, v.Z);
        }
Exemple #2
0
 public virtual void Draw2DQuad(float x, float y, float width, float height,
                                FastColour topCol, FastColour bottomCol)
 {
     quadVerts[0] = new VertexP3fC4b(x, y, 0, topCol);
     quadVerts[1] = new VertexP3fC4b(x + width, y, 0, topCol);
     quadVerts[2] = new VertexP3fC4b(x + width, y + height, 0, bottomCol);
     quadVerts[3] = new VertexP3fC4b(x, y + height, 0, bottomCol);
     SetBatchFormat(VertexFormat.P3fC4b);
     UpdateDynamicIndexedVb(DrawMode.Triangles, quadVb, quadVerts, 4, 6);
 }
Exemple #3
0
        public virtual void Draw2DQuad(int x, int y, int width, int height,
                                       FastColour col)
        {
            int c = col.Pack();

            quadVerts[0] = new VertexP3fC4b(x, y, 0, c);
            quadVerts[1] = new VertexP3fC4b(x + width, y, 0, c);
            quadVerts[2] = new VertexP3fC4b(x + width, y + height, 0, c);
            quadVerts[3] = new VertexP3fC4b(x, y + height, 0, c);
            SetBatchFormat(VertexFormat.P3fC4b);
            UpdateDynamicVb_IndexedTris(quadVb, quadVerts, 4);
        }
Exemple #4
0
        public virtual void Draw2DQuad(float x, float y, float width, float height,
                                       FastColour col)
        {
            int c = col.Pack();

            quadVerts[0] = new VertexP3fC4b(x, y, 0, c);
            quadVerts[1] = new VertexP3fC4b(x + width, y, 0, c);
            quadVerts[2] = new VertexP3fC4b(x + width, y + height, 0, c);
            quadVerts[3] = new VertexP3fC4b(x, y + height, 0, c);
            SetBatchFormat(VertexFormat.P3fC4b);
            UpdateDynamicIndexedVb(DrawMode.Triangles, quadVb, quadVerts, 4);
        }
 static void V(VertexP3fC4b v)
 {
     GL.Color4ub(v.Col.R, v.Col.G, v.Col.B, v.Col.A);
     GL.Vertex3f(v.X, v.Y, v.Z);
 }