public styles_gouraud(mesh_ctrl mesh, GammaLookUpTable gamma) { int i; for (i = 0; i < mesh.num_triangles(); i++) { mesh_triangle t = mesh.triangle(i); mesh_point p1 = mesh.vertex(t.p1); mesh_point p2 = mesh.vertex(t.p2); mesh_point p3 = mesh.vertex(t.p3); RGBA_Bytes c1 = p1.color; RGBA_Bytes c2 = p2.color; RGBA_Bytes c3 = p3.color; c1.apply_gamma_dir(gamma); c2.apply_gamma_dir(gamma); c3.apply_gamma_dir(gamma); span_gouraud_rgba gouraud = new span_gouraud_rgba(c1, c2, c3, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y); gouraud.prepare(); m_triangles.Add(gouraud); } }
public styles_gouraud(mesh_ctrl mesh, GammaLut gamma) { uint i; for (i = 0; i < mesh.num_triangles(); i++) { mesh_triangle t = mesh.triangle(i); mesh_point p1 = mesh.vertex(t.p1); mesh_point p2 = mesh.vertex(t.p2); mesh_point p3 = mesh.vertex(t.p3); RGBA_Bytes c1 = p1.color; RGBA_Bytes c2 = p2.color; RGBA_Bytes c3 = p3.color; c1.ApplyGammaDir(gamma); c2.ApplyGammaDir(gamma); c3.ApplyGammaDir(gamma); SpanGouraudRgba <T> gouraud = new SpanGouraudRgba <T>(c1, c2, c3, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y); gouraud.Prepare(); m_triangles.Add(gouraud); } }