m3g/m3gcore11/src/m3g_vertexbuffer.c
changeset 187 9f66f99ee56f
parent 0 5d03bc08d59c
child 164 25ffed67c7ef
child 178 89bd4cfee505
equal deleted inserted replaced
103:2717213c588a 187:9f66f99ee56f
   348      * or compare the new array against the current vertex count */
   348      * or compare the new array against the current vertex count */
   349     
   349     
   350     if (newArray != NULL) {
   350     if (newArray != NULL) {
   351     	if (buffer->arrayCount == 0 || (buffer->arrayCount == 1
   351     	if (buffer->arrayCount == 0 || (buffer->arrayCount == 1
   352                                         && change == 0)) {
   352                                         && change == 0)) {
   353     		buffer->vertexCount =
   353     		buffer->vertexCount = m3gGetArrayVertexCount(newArray);
   354                 (newArray != NULL ? m3gGetArrayVertexCount(newArray) : 0);
       
   355     	}
   354     	}
   356     	else if (m3gGetArrayVertexCount(newArray) != buffer->vertexCount) {
   355     	else if (m3gGetArrayVertexCount(newArray) != buffer->vertexCount) {
   357             m3gRaiseError(M3G_INTERFACE(buffer), M3G_INVALID_VALUE);
   356             m3gRaiseError(M3G_INTERFACE(buffer), M3G_INVALID_VALUE);
   358             return;
   357             return;
   359     	}
   358     	}