Fix for GCC bing stupid and not casting float*[3] to const float*[3] without a wanring :S

This commit is contained in:
Sergey Sharybin
2013-10-17 14:44:23 +00:00
parent 1263a0891c
commit a0da34871a
2 changed files with 5 additions and 5 deletions

View File

@@ -1068,7 +1068,7 @@ static void cddm_draw_attrib_vertex(DMVertexAttribs *attribs, MVert *mvert, int
/* orco texture coordinates */
if (attribs->totorco) {
const float (*array)[3] = attribs->orco.array;
/*const*/ float (*array)[3] = attribs->orco.array;
const float *orco = (array) ? array[index] : zero;
if (attribs->orco.gl_texco)
@@ -1112,7 +1112,7 @@ static void cddm_draw_attrib_vertex(DMVertexAttribs *attribs, MVert *mvert, int
/* tangent for normal mapping */
if (attribs->tottang) {
const float (*array)[4] = attribs->tang.array;
/*const*/ float (*array)[4] = attribs->tang.array;
const float *tang = (array) ? array[a * 4 + vert] : zero;
glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
}

View File

@@ -1824,7 +1824,7 @@ static void ccgdm_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index,
/* orco texture coordinates */
if (attribs->totorco) {
const float (*array)[3] = attribs->orco.array;
/*const*/ float (*array)[3] = attribs->orco.array;
const float *orco = (array) ? array[index] : zero;
if (attribs->orco.gl_texco)
@@ -1868,7 +1868,7 @@ static void ccgdm_draw_attrib_vertex(DMVertexAttribs *attribs, int a, int index,
/* tangent for normal mapping */
if (attribs->tottang) {
const float (*array)[4] = attribs->tang.array;
/*const*/ float (*array)[4] = attribs->tang.array;
const float *tang = (array) ? array[a * 4 + vert] : zero;
glVertexAttrib4fvARB(attribs->tang.gl_index, tang);
@@ -2028,7 +2028,7 @@ static void ccgDM_drawMappedFacesMat(DerivedMesh *dm,
int gridFaces = gridSize - 1;
int edgeSize = ccgSubSurf_getEdgeSize(ss);
DMFlagMat *faceFlags = ccgdm->faceFlags;
int a, b, i, numVerts, matnr, new_matnr, totface;
int a, i, numVerts, matnr, new_matnr, totface;
CCG_key_top_level(&key, ss);
ccgdm_pbvh_update(ccgdm);