fix for bug in do_version_tface(), was assigning 'tf->mode' before tf was defined, also comment unused var.
This commit is contained in:
parent
c61ab5f5d1
commit
79c19590e9
@ -988,14 +988,14 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
|
||||
EditFace *efa;
|
||||
DMVertexAttribs attribs= {{{0}}};
|
||||
GPUVertexAttribs gattribs;
|
||||
int tfoffset;
|
||||
/* int tfoffset; */ /* UNUSED */
|
||||
int i, b, matnr, new_matnr, dodraw, layer;
|
||||
|
||||
dodraw = 0;
|
||||
matnr = -1;
|
||||
|
||||
layer = CustomData_get_layer_index(&em->fdata, CD_MTFACE);
|
||||
tfoffset = (layer == -1)? -1: em->fdata.layers[layer].offset;
|
||||
/* tfoffset = (layer == -1)? -1: em->fdata.layers[layer].offset; */
|
||||
|
||||
/* always use smooth shading even for flat faces, else vertex colors wont interpolate */
|
||||
glShadeModel(GL_SMOOTH);
|
||||
|
@ -1932,6 +1932,9 @@ int do_version_tface(Main *main, int fileload)
|
||||
|
||||
/* loop over all the faces and stop at the ones that use the material*/
|
||||
for(a=0, mf=me->mface; a<me->totface; a++, mf++) {
|
||||
/* texface data for this face */
|
||||
tf = ((MTFace*)cdl->data) + a;
|
||||
|
||||
if(me->mat[(int)mf->mat_nr] != ma) continue;
|
||||
else tf->mode |= TF_CONVERTED;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user