diff options
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/shaders/scenegraph/qsggeometry.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/imports/shaders/scenegraph/qsggeometry.cpp b/src/imports/shaders/scenegraph/qsggeometry.cpp index 7c8b876c..48f48374 100644 --- a/src/imports/shaders/scenegraph/qsggeometry.cpp +++ b/src/imports/shaders/scenegraph/qsggeometry.cpp @@ -41,6 +41,8 @@ #include "qsggeometry.h" +#include <stdlib.h> + QT_BEGIN_NAMESPACE @@ -101,7 +103,7 @@ QSGGeometry::QSGGeometry(const QSGGeometry::AttributeSet &attributes, QSGGeometry::~QSGGeometry() { if (m_owns_data) - qFree(m_data); + free(m_data); } void *QSGGeometry::indexData() @@ -135,7 +137,7 @@ void QSGGeometry::allocate(int vertexCount, int indexCount) int vertexByteSize = m_attributes.stride * m_vertex_count; if (m_owns_data) - qFree(m_data); + free(m_data); if (canUsePrealloc && vertexByteSize <= (int) sizeof(m_prealloc)) { m_data = (void *) &m_prealloc[0]; @@ -144,7 +146,7 @@ void QSGGeometry::allocate(int vertexCount, int indexCount) } else { Q_ASSERT(m_index_type == GL_UNSIGNED_INT || m_index_type == GL_UNSIGNED_SHORT); int indexByteSize = indexCount * (m_index_type == GL_UNSIGNED_SHORT ? sizeof(quint16) : sizeof(quint32)); - m_data = (void *) qMalloc(vertexByteSize + indexByteSize); + m_data = malloc(vertexByteSize + indexByteSize); m_index_data_offset = vertexByteSize; m_owns_data = true; } |