BGE: Some as of yet unmerged work I did in the Swiss branch. These changes include:
* Cleaning up the conversion code to avoid a per-face material conversion. Materials are now stored in buckets and only converted if a new material is found. This replaces some of Campbell's earlier work on the subject. His work wasn't as thorough, but it was much safer for a release. * Shaders are only compiled for LibLoaded materials once. Before they could be compiled twice, which could really slow things down. * Refactoring the rasterizer code to use a strategy design pattern to handle different geometry rendering methods such as immediate mode, vertex arrays and vertex buffer objects. VBOs are added, but they will be disabled in a following commit since they are still slower than vertex arrays with display lists. However, VBOs are still useful for mobile, so it's good to keep them around. * Better multi-uv support. The BGE should now be able to handle more than two UV layers, which should help it better match the viewport.
This commit is contained in:
@@ -324,15 +324,14 @@ void RAS_MeshObject::SetVertexColor(RAS_IPolyMaterial* mat,MT_Vector4 rgba)
|
||||
|
||||
void RAS_MeshObject::AddVertex(RAS_Polygon *poly, int i,
|
||||
const MT_Point3& xyz,
|
||||
const MT_Point2& uv,
|
||||
const MT_Point2& uv2,
|
||||
const MT_Point2 uvs[RAS_TexVert::MAX_UNIT],
|
||||
const MT_Vector4& tangent,
|
||||
const unsigned int rgba,
|
||||
const MT_Vector3& normal,
|
||||
bool flat,
|
||||
int origindex)
|
||||
{
|
||||
RAS_TexVert texvert(xyz, uv, uv2, tangent, rgba, normal, flat, origindex);
|
||||
RAS_TexVert texvert(xyz, uvs, tangent, rgba, normal, flat, origindex);
|
||||
RAS_MeshMaterial *mmat;
|
||||
RAS_DisplayArray *darray;
|
||||
RAS_MeshSlot *slot;
|
||||
|
||||
Reference in New Issue
Block a user