forked from bartvdbraak/blender
style cleanup: macro line breaks
This commit is contained in:
parent
800bc74a8f
commit
0f43da2234
@ -991,23 +991,25 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
|
|||||||
glShadeModel(GL_SMOOTH);
|
glShadeModel(GL_SMOOTH);
|
||||||
BM_mesh_elem_index_ensure(bm, BM_VERT | BM_FACE);
|
BM_mesh_elem_index_ensure(bm, BM_VERT | BM_FACE);
|
||||||
|
|
||||||
#define PASSATTRIB(loop, eve, vert) { \
|
#define PASSATTRIB(loop, eve, vert) { \
|
||||||
if (attribs.totorco) { \
|
if (attribs.totorco) { \
|
||||||
float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \
|
float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \
|
||||||
glVertexAttrib3fvARB(attribs.orco.gl_index, orco); \
|
glVertexAttrib3fvARB(attribs.orco.gl_index, orco); \
|
||||||
} \
|
} \
|
||||||
for (b = 0; b < attribs.tottface; b++) { \
|
for (b = 0; b < attribs.tottface; b++) { \
|
||||||
MLoopUV *_luv = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPUV, b); \
|
MLoopUV *_luv = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, \
|
||||||
|
CD_MLOOPUV, b); \
|
||||||
glVertexAttrib2fvARB(attribs.tface[b].gl_index, _luv->uv); \
|
glVertexAttrib2fvARB(attribs.tface[b].gl_index, _luv->uv); \
|
||||||
} \
|
} \
|
||||||
for (b = 0; b < attribs.totmcol; b++) { \
|
for (b = 0; b < attribs.totmcol; b++) { \
|
||||||
MLoopCol *_cp = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPCOL, b); \
|
MLoopCol *_cp = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, \
|
||||||
|
CD_MLOOPCOL, b); \
|
||||||
GLubyte _col[4]; \
|
GLubyte _col[4]; \
|
||||||
_col[0] = _cp->b; _col[1] = _cp->g; _col[2] = _cp->r; _col[3] = _cp->a; \
|
_col[0] = _cp->b; _col[1] = _cp->g; _col[2] = _cp->r; _col[3] = _cp->a; \
|
||||||
glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, _col); \
|
glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, _col); \
|
||||||
} \
|
} \
|
||||||
if (attribs.tottang) { \
|
if (attribs.tottang) { \
|
||||||
float *tang = attribs.tang.array[i * 4 + vert]; \
|
float *tang = attribs.tang.array[i * 4 + vert]; \
|
||||||
glVertexAttrib3fvARB(attribs.tang.gl_index, tang); \
|
glVertexAttrib3fvARB(attribs.tang.gl_index, tang); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
@ -1112,7 +1114,7 @@ static void emDM_drawMappedFacesMat(DerivedMesh *dm,
|
|||||||
|
|
||||||
BM_mesh_elem_index_ensure(bm, BM_VERT | BM_FACE);
|
BM_mesh_elem_index_ensure(bm, BM_VERT | BM_FACE);
|
||||||
|
|
||||||
#define PASSATTRIB(loop, eve, vert) { \
|
#define PASSATTRIB(loop, eve, vert) { \
|
||||||
if (attribs.totorco) { \
|
if (attribs.totorco) { \
|
||||||
float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \
|
float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \
|
||||||
if (attribs.orco.gl_texco) \
|
if (attribs.orco.gl_texco) \
|
||||||
@ -1121,20 +1123,22 @@ static void emDM_drawMappedFacesMat(DerivedMesh *dm,
|
|||||||
glVertexAttrib3fvARB(attribs.orco.gl_index, orco); \
|
glVertexAttrib3fvARB(attribs.orco.gl_index, orco); \
|
||||||
} \
|
} \
|
||||||
for (b = 0; b < attribs.tottface; b++) { \
|
for (b = 0; b < attribs.tottface; b++) { \
|
||||||
MLoopUV *_luv = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPUV, b); \
|
MLoopUV *_luv = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, \
|
||||||
|
CD_MLOOPUV, b); \
|
||||||
if (attribs.tface[b].gl_texco) \
|
if (attribs.tface[b].gl_texco) \
|
||||||
glTexCoord2fv(_luv->uv); \
|
glTexCoord2fv(_luv->uv); \
|
||||||
else \
|
else \
|
||||||
glVertexAttrib2fvARB(attribs.tface[b].gl_index, _luv->uv); \
|
glVertexAttrib2fvARB(attribs.tface[b].gl_index, _luv->uv); \
|
||||||
} \
|
} \
|
||||||
for (b = 0; b < attribs.totmcol; b++) { \
|
for (b = 0; b < attribs.totmcol; b++) { \
|
||||||
MLoopCol *_cp = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPCOL, b); \
|
MLoopCol *_cp = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, \
|
||||||
|
CD_MLOOPCOL, b); \
|
||||||
GLubyte _col[4]; \
|
GLubyte _col[4]; \
|
||||||
_col[0] = _cp->b; _col[1] = _cp->g; _col[2] = _cp->r; _col[3] = _cp->a; \
|
_col[0] = _cp->b; _col[1] = _cp->g; _col[2] = _cp->r; _col[3] = _cp->a; \
|
||||||
glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, _col); \
|
glVertexAttrib4ubvARB(attribs.mcol[b].gl_index, _col); \
|
||||||
} \
|
} \
|
||||||
if (attribs.tottang) { \
|
if (attribs.tottang) { \
|
||||||
float *tang = attribs.tang.array[i * 4 + vert]; \
|
float *tang = attribs.tang.array[i * 4 + vert]; \
|
||||||
glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
|
glVertexAttrib4fvARB(attribs.tang.gl_index, tang); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user